• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. API Reference (OBS)
  4. Operations on Buckets
  5. PUT Bucket tagging
  6. Requests

Requests

Syntax

PUT /?tagging HTTP/1.1
User-Agent: agent 
Host: bucketname.obs.example.com
Accept: */* 
Date: date 
Authorization: authorization string  
Content-MD5:<md5>
Content-Length: length
Expect: expect 
<Tagging> 
  <TagSet> 
     <Tag> 
       <Key>Tag Name</Key> 
       <Value>Tag Value</Value> 
     </Tag> 
  </TagSet> 
</Tagging>

Request Parameters

This request contains no parameter.

Request Headers

Content-MD5 will be a required header for this operation. This request uses common headers. For details about common request headers, see section Common Request Headers.

Request Elements

In this request, you must configure the tags of buckets in the request body. The configurations of tags are uploaded in the XML format. The following table describes the elements to be configured.

Table 1 Elements to be configured for bucket tags

Element

Description

Mandatory or Not

Tagging

Container for the TagSet and Tag elements

Type: Container

Ancestor: None

Yes

TagSet

Container for a set of tags

Type: Container

Ancestor: Tagging

Yes

Tag

Container for tag information

Type: Container

Ancestor: TagSet

Yes

Key

Name of the tag

Type: String

Ancestor: Tag

Yes

Value

Value of the tag

Type: String

Ancestor: Tag

Yes