GET / HTTP/1.1Host: service.cos.myqcloud.comDate: GMT DateAuthorization: Auth String
GET / HTTP/1.1Host: cos.<Region>.myqcloud.comDate: GMT DateAuthorization: Auth String
service.cos.myqcloud.com
. To query the list of buckets in a specified region, set it to cos.<Region>.myqcloud.com
, where <Region> is a COS available region (see Regions and Access Endpoints).GetService
supports filtering buckets by bucket tag, region, and creation time through request parameters. To filter buckets by tag, only one tag can be passed in. If a bucket has multiple tags, as long as any of them is hit, the bucket will be returned.Field | Description | Type | Required |
tagkey | Filters buckets by bucket tag. Only one tag can be passed in. tagkey is used to pass in the tag key. | string | No |
tagvalue | Filters buckets by bucket tag. Only one tag can be passed in. tagvalue is used to pass in the tag value. | string | No |
region | Filters buckets by region, such as region=ap-beijing . For the regions supported by COS, see Regions and Access Endpoints. | string | No |
create-time | GMT timestamp, which is used together with the range parameter to filter buckets by creation time, such as create-time=1642662645 . | Timestamp | No |
range | Filters buckets by creation time together with the create-time parameter. Enumerated values: lt (creation time before create-time ), gt (creation time after create-time ), lte (creation time before or at create-time ), gte (creation time after or at create-time ). | string | No |
GetService
authorization, the authentication and response of the GetService
request are as follows:Bucket tag Authorization Status | `GetService` Authorization Status | `GetService` Request | Response |
The root account passes the bucket tag authorization and grants the sub-account the resource operation permission of the bucket tag `tagA`. | `GetService` permission not granted. | With bucket tag parameter `tagA` | List of buckets containing bucket tag `tagA` |
| | Without bucket tag parameter | Access Denied |
| `GetService` permission granted | With bucket tag parameter `tagA` | List of buckets containing bucket tag `tagA` |
| | Without bucket tag parameter | List of all buckets |
The root account doesn't pass the bucket tag authorization or grant the sub-account the resource operation permission of the bucket tag `tagA`. | `GetService` permission not granted. | With bucket tag parameter `tagA` | Access Denied |
| | Without bucket tag parameter | Access Denied |
| `GetService` permission granted | With bucket tag parameter `tagA` | List of buckets containing bucket tag `tagA` |
| | Without bucket tag parameter | List of all buckets |
<ListAllMyBucketsResult><Owner><ID>string</ID><DisplayName>string</DisplayName></Owner><Buckets><Bucket><Name>string</Name><Location>Enum</Location><CreationDate>date</CreationDate></Bucket><Bucket><Name>string</Name><Location>Enum</Location><CreationDate>date</CreationDate></Bucket></Buckets></ListAllMyBucketsResult>
Node Name (Keyword) | Parent Node | Description | Type |
ListAllMyBucketsResult | None | Stores the result of the GET Service request | Container |
ListAllMyBucketsResult
:Node Name (Keyword) | Parent Node | Description | Type |
Owner | ListAllMyBucketsResult | Bucket owner information | Container |
Buckets | ListAllMyBucketsResult | Bucket list | Container |
Owner
:Node Name (Keyword) | Parent Node | Description | Type |
ID | ListAllMyBucketsResult.Owner | Complete ID of the bucket owner in the format of qcs::cam::uin/[OwnerUin]:uin/[OwnerUin] Example: qcs::cam::uin/100000000001:uin/100000000001 | string |
DisplayName | ListAllMyBucketsResult.Owner | Bucket owner name | string |
Buckets
:Node Name (Keyword) | Parent Node | Description | Type |
Bucket | ListAllMyBucketsResult.Buckets | Bucket information | Container |
Buckets.Bucket
:Node Name (Keyword) | Parent Node | Description | Type |
Name | ListAllMyBucketsResult.Buckets.Bucket | Bucket name in the format of <BucketName-APPID> Example: examplebucket-1250000000 | string |
Location | ListAllMyBucketsResult.Buckets.Bucket | Example: ap-beijing , ap-hongkong , eu-frankfurt | Enum |
CreationDate | ListAllMyBucketsResult.Buckets.Bucket | Bucket creation time in ISO 8601 format. Example: 2019-05-24T10:56:40Z | date |
GET / HTTP/1.1Host: service.cos.myqcloud.comDate: Fri, 24 May 2019 11:59:50 GMTAuthorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1558699190;1558706390&q-key-time=1558699190;1558706390&q-header-list=date;host&q-url-param-list=&q-signature=89fa1f6a56c34e460f3db4d65f928eaf034a****Connection: close
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 805Connection: closeDate: Fri, 24 May 2019 11:59:51 GMTServer: tencent-cosx-cos-request-id: NWNlN2RjYjdfOGFiMjM1MGFfNTVjMl8zMmI1****<ListAllMyBucketsResult><Owner><ID>qcs::cam::uin/100000000001:uin/100000000001</ID><DisplayName>100000000001</DisplayName></Owner><Buckets><Bucket><Name>examplebucket1-1250000000</Name><Location>ap-beijing</Location><CreationDate>2019-05-24T11:49:50Z</CreationDate></Bucket><Bucket><Name>examplebucket2-1250000000</Name><Location>ap-beijing</Location><CreationDate>2019-05-24T11:51:50Z</CreationDate></Bucket><Bucket><Name>examplebucket3-1250000000</Name><Location>eu-frankfurt</Location><CreationDate>2019-05-24T11:53:50Z</CreationDate></Bucket><Bucket><Name>examplebucket4-1250000000</Name><Location>eu-frankfurt</Location><CreationDate>2019-05-24T11:55:50Z</CreationDate></Bucket></Buckets></ListAllMyBucketsResult>
GET / HTTP/1.1Host: cos.ap-beijing.myqcloud.comDate: Fri, 24 May 2019 11:59:51 GMTAuthorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1558699191;1558706391&q-key-time=1558699191;1558706391&q-header-list=date;host&q-url-param-list=&q-signature=c3f55f4ce2800fb343cf85ff536a9185a0c1****Connection: close
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 495Connection: closeDate: Fri, 24 May 2019 11:59:51 GMTServer: tencent-cosx-cos-request-id: NWNlN2RjYjdfZjhjODBiMDlfOWNlNF9hYzc2****<ListAllMyBucketsResult><Owner><ID>qcs::cam::uin/100000000001:uin/100000000001</ID><DisplayName>100000000001</DisplayName></Owner><Buckets><Bucket><Name>examplebucket1-1250000000</Name><Location>ap-beijing</Location><CreationDate>2019-05-24T11:49:50Z</CreationDate></Bucket><Bucket><Name>examplebucket2-1250000000</Name><Location>ap-beijing</Location><CreationDate>2019-05-24T11:51:50Z</CreationDate></Bucket></Buckets></ListAllMyBucketsResult>
GET /?region=ap-beijing HTTP/1.1Host: service.cos.myqcloud.comDate: Fri, 24 May 2019 11:59:51 GMTAuthorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1558699191;1558706391&q-key-time=1558699191;1558706391&q-header-list=date;host&q-url-param-list=&q-signature=c3f55f4ce2800fb343cf85ff536a9185a0c1****Connection: close
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 495Connection: closeDate: Fri, 24 May 2019 11:59:51 GMTServer: tencent-cosx-cos-request-id: NWNlN2RjYjdfZjhjODBiMDlfOWNlNF9hYzc2****<ListAllMyBucketsResult><Owner><ID>qcs::cam::uin/100000000001:uin/100000000001</ID><DisplayName>100000000001</DisplayName></Owner><Buckets><Bucket><Name>examplebucket1-</Name><Location>ap-beijing</Location><CreationDate>2019-05-24T11:49:50Z</CreationDate></Bucket><Bucket><Name>examplebucket2-1250000000</Name><Location>ap-beijing</Location><CreationDate>2019-05-24T11:51:50Z</CreationDate></Bucket></Buckets></ListAllMyBucketsResult>
<key1, value1>
<key1, value1> and <key2, value2>
GET /?tagkey=key1&tagvalue=value1 HTTP/1.1Host: service.cos.myqcloud.comDate: Fri, 24 May 2019 11:59:51 GMTAuthorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1558699191;1558706391&q-key-time=1558699191;1558706391&q-header-list=date;host&q-url-param-list=&q-signature=c3f55f4ce2800fb343cf85ff536a9185a0c1****Connection: close
HTTP/1.1 200 OKContent-Length: 378Content-Type: application/xmlServer: tencent-cosConnection: keep-aliveDate: Thu, 20 Oct 2022 07:29:40 GMTx-cos-request-id: NjM1MGY4ZTRfMWViMjM1MGFfYjg3MV8xNjdk****<ListAllMyBucketsResult><Owner><ID>qcs::cam::uin/100000000001:uin/100000000001</ID><DisplayName>100000000001</DisplayName></Owner><Buckets><Bucket><Name>examplebucket-1250000000 </Name><Location>ap-guangzhou</Location><CreationDate>2022-04-11T03:01:49Z</CreationDate><BucketType>cos</BucketType></Bucket></Buckets><Buckets><Bucket><Name>examplebucket1-1250000000 </Name><Location>ap-guangzhou</Location><CreationDate>2022-04-12T03:01:49Z</CreationDate><BucketType>cos</BucketType></Bucket></Buckets></ListAllMyBucketsResult>
2022-1-20 15:10:45
.GET /?range=lt&create-time=1642662645 HTTP/1.1Host: service.cos.myqcloud.comUser-Agent: curl/7.64.1Accept: */*Authorization: q-sign-algorithm=sha1&q-ak=AKIDYv3vWrwkHXVDfqk*****&q-sign-time=1667448802;1668448852&q-key-time=1667448802;1668448852&q-url-param-list=create-time;range&q-header-list=host&q-signature=a043c0593c8c4cd1caf570******
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 5566Connection: keep-aliveDate: Thu, 03 Nov 2022 04:14:23 GMTServer: tencent-cosx-cos-request-id: NjM2MzQwMWZfMmJiMjM1MGFfYTc******<ListAllMyBucketsResult><Owner><ID>qcs::cam::uin/100000000001:uin/100000000001</ID><DisplayName>100000000001</DisplayName></Owner><Buckets><Bucket><Name>examplebucket-1250000000</Name><Location>ap-beijing</Location><CreationDate>2021-11-23T03:02:12Z</CreationDate><BucketType>cos</BucketType></Bucket></Buckets></ListAllMyBucketsResult>
Apakah halaman ini membantu?