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
,查询特定地域下的存储桶列表指定为 cos.<Region>.myqcloud.com,其中 <Region> 为 COS 的可用地域,可参阅 地域和访问域名 文档。名称 | 描述 | 类型 | 是否必选 |
tagkey | 支持根据存储桶标签过滤存储桶,仅支持传入一个存储桶标签,tagkey 用于传入标签键 | string | 否 |
tagvalue | 支持根据存储桶标签过滤存储桶,仅支持传入一个存储桶标签,tagvalue 用于传入标签值 | string | 否 |
region | string | 否 | |
create-time | GMT 时间戳,和 range 参数一起使用,支持根据创建时间过滤存储桶,例如 create-time=1642662645 | Timestamp | 否 |
range | 和 create-time 参数一起使用,支持根据创建时间过滤存储桶,支持枚举值 lt(创建时间早于 create-time)、gt(创建时间晚于 create-time)、lte(创建时间早于或等于 create-time)、gte(创建时间晚于或等于create-time) | string | 否 |
存储桶标签授权情况 | GetService 授权情况 | GetService 请求 | 请求返回 |
主账号通过存储桶标签授权,授权了子账号存储桶标签 tagA 的资源操作权限。 | 没有授权 GetService 权限 | 携带存储桶标签参数 tagA | 包含存储桶标签 tagA 的存储桶列表 |
| | 不携带存储桶标签参数 | Access Denied |
| 额外授权 GetService 权限 | 携带存储桶标签参数 tagA | 包含存储桶标签 tagA 的存储桶列表 |
| | 不携带存储桶标签参数 | 所有存储桶列表 |
主账号没有通过存储桶标签授权,没有授权子账号存储桶标签 tagA 的资源操作权限。 | 没有授权 GetService 权限 | 携带存储桶标签参数 tagA | Access Denied |
| | 不携带存储桶标签参数 | Access Denied |
| 额外授权 GetService 权限 | 携带存储桶标签参数 tagA | 包含存储桶标签 tagA 的存储桶列表 |
| | 不携带存储桶标签参数 | 所有存储桶列表 |
<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>
节点名称(关键字) | 父节点 | 描述 | 类型 |
ListAllMyBucketsResult | 无 | 保存 GET Service 结果的所有信息 | Container |
节点名称(关键字) | 父节点 | 描述 | 类型 |
Owner | ListAllMyBucketsResult | 存储桶持有者信息 | Container |
Buckets | ListAllMyBucketsResult | 存储桶列表 | Container |
节点名称(关键字) | 父节点 | 描述 | 类型 |
ID | ListAllMyBucketsResult.Owner | 存储桶持有者的完整 ID,格式为 qcs::cam::uin/[OwnerUin]:uin/[OwnerUin] 例如 qcs::cam::uin/100000000001:uin/100000000001 | string |
DisplayName | ListAllMyBucketsResult.Owner | 存储桶持有者的名字 | string |
节点名称(关键字) | 父节点 | 描述 | 类型 |
Bucket | ListAllMyBucketsResult.Buckets | 存储桶信息 | Container |
节点名称(关键字) | 父节点 | 描述 | 类型 |
Name | ListAllMyBucketsResult.Buckets.Bucket | 存储桶的名称,格式为 <BucketName-APPID> 例如 examplebucket-1250000000 | string |
Location | ListAllMyBucketsResult.Buckets.Bucket | 例如 ap-beijing,ap-hongkong,eu-frankfurt 等 | Enum |
CreationDate | ListAllMyBucketsResult.Buckets.Bucket | 存储桶的创建时间,为 ISO8601 格式,例如 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> 和 <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>
本页内容是否解决了您的问题?