GET Object tagging
), ensure that the root account has authorized it to do so.VersionId
parameter in the request.GET /<ObjectKey>?tagging&VersionId=VersionId HTTP 1.1Host:<BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateAuthorization: Auth String
examplebucket-1250000000
(see Bucket Overview > Basic Information and Bucket Overview > Bucket Naming Conventions), and <Region> is a COS region (see Regions and Access Endpoints).Parameter | Description | Type | Required |
versionId | Version ID of the object (if versioning is enabled). If this parameter is not specified, the latest version will be queried. | string | No |
Node Name (Keyword) | Parent Node | Description | Type | Required |
Tagging | None | Tagging configuration | Container | Yes |
TagSet | Tagging | Tag set | Container | Yes |
Tag | Tagging.TagSet | A single tag. Up to 10 tags are supported. | Containers | Yes |
Key | Tagging.TagSet.Tag | Tag key, which can be up to 128 characters. A tag key can contain letters, digits, spaces, plus signs (+), minus signs (−), underscores (_), equals signs (=), dots (.), colons (:), and slashes (/). | String | Yes |
Value | Tagging.TagSet.Tag | Tag value, which can be up to 256 characters. A tag value can contain letters, digits, spaces, plus signs (+), minus signs (−), underscores (_), equals signs (=), dots (.), colons (:), and slashes (/). | String | Yes |
exampleobject.txt
object in the examplebucket-1250000000
bucket. COS parses the request and returns the {age:18}
and {name:xiaoming}
tags.GET /exampleobject.txt?tagging HTTP/1.1User-Agent: curl/7.29.0Accept: */*Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comAuthorization: Auth StringContent-Md5: MD5 StringContent-Length: 127Content-Type: application/xml
HTTP/1.1 200 OKContent-Type: application/xmlConnection: closeDate: Fri, 19 Jan 2020 11:40:22 GMTServer: tencent-cos<Tagging><TagSet><Tag><Key>age</Key><Value>18</Value></Tag><Tag><Key>name</Key><Value>xiaoming</Value></Tag></TagSet></Tagging>
Apakah halaman ini membantu?