Tags

Application Scenario

Generally, your service system may use multiple cloud services of HUAWEI CLOUD. You can set tags for different resource instances of these cloud services (for OBS, a resource instance is a bucket). The charging data records (CDRs) generated by those services reflect these resource instances and the tags set for the instances. If your service system is composed of multiple applications, setting a unified tag for resource instances owned by an application can help you easily analyze the usage and cost of different applications.

In OBS, tags are used to identify and classify buckets. If you add tags to a bucket, CDRs generated by the requests for this bucket will be added with these tags, so that you can use the tags to classify CDRs for detailed cost analysis. For example, if you have an application that uploads its running data to a bucket, you can tag the bucket with the application name. In this manner, the costs on the application can be analyzed using tags on CDRs.

A tag is described using a key-value pair. A bucket can have a maximum of 10 tags. Each tag has only one key and one value. The key and value can exist in either sequence in a tag. Each key is unique among all tags of a bucket, whereas values can be repetitive or blank. It takes approximately three minutes for the tag to take effect.

How to Use This Function

You can configure tags using OBS Console, APIs, or SDKs.

Tool

Reference

OBS Console

Configuring Tags

SDKs

OBS supports software development kits (SDKs) in multiple languages. For details, see the corresponding developer guide on the SDK Overview page.

APIs

Configuring Tags for a Bucket