Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Organizations/ Getting Started/ Using Tag Policies to Standardize Resource Tags

Using Tag Policies to Standardize Resource Tags

Updated on 2024-12-09 GMT+08:00

Scenarios

Tag policies are a type of policy that can help you standardize tags across resources in your organization's accounts. In a tag policy, you specify tagging rules applicable to resources when they are tagged. Untagged resources and tags that are not defined in the tag policy are not evaluated for compliance with the tag policy.

To standardize the usage of tags in your organization, you can create a tag policy to formulate tag rules.

The following describes how to create a tag policy and attach it to a member account.

Procedure

Step

Description

Preparations

  1. Create an organization and add a member account to the organization.
  2. Top up your account to ensure that the account is not frozen due to arrears.

Step 1: Enable the Tag Policy Type and Create a Tag Policy

Enable the tag policy type and create a tag policy.

Step 2: Attach the Tag Policy

Attach the tag policy to a member account.

Step 3: Test the Tag Policy Effect

Use the member account to test the tag policy effect.

Preparations

  1. Create an organization and add one or more member accounts to the organization. For details, see Using Organizations to Manage Multiple Accounts.
  2. Top up your account.

    Organizations is a free service. You will not be billed for using Organizations-related functions.

    Ensure that your account balance is sufficient. If your account is frozen due to arrears, you cannot perform any write operations on the Organizations console. For details about how to top up your account, see Topping Up an Account.

Step 1: Enable the Tag Policy Type and Create a Tag Policy

The following example only focuses on key parameter settings. You can retain the default values of other parameters. For more information about creating tag policies, see Creating a Tag Policy.

  1. Log in to the management console as the organization administrator or using the management account, and navigate to the Organizations console.
  2. On the Policies page, locate Tag policies, and click Enable in the Operation column.
  3. In the displayed dialog box, select the check box and click OK.

  4. Click Tag policies. The list of tag policies is displayed.

  5. Click Create Policy. The Create Tag Policy page is displayed.
  6. Set parameters for the tag policy based on the table below, and retain the default values for other parameters.

    Parameter

    Example

    Setting

    Tag Key

    ABC

    Enter the key (ABC in this example) for the tag you want to define in the tag policy.

    The tag policy will apply only to tags with this tag key.

    Tag Key Capitalization Compliance

    Selected

    Use the capitalization you specified for the tag key for compliance check.

    If you select this option, tag keys in all uppercase characters like ABC are considered compliant, and those in all lowercase characters like abc or both uppercase and lowercase characters (such as Abc) are considered non-compliant. The tag policy will prevent you from adding any non-compliant tags to your resources.

    Resource Types to Enforce

    ces:alarm

    Specify resource types to enforce the tag policy.

    Select the Prevent noncompliant operations on this tag. option and click Specify Resource Types. In the displayed dialog box, read and confirm the effects of using tag policies. Then, select resource types and click OK.

  7. Click Save in the lower right corner.

Step 2: Attach the Tag Policy

After a tag policy is bound to a member account, the member account must comply with the tag specifications defined by the tag policy when adding tags to related resources.

  1. In the tag policy list, locate the tag policy you created and click Attach in the Operation column.
  2. In the displayed dialog box, select the member account you want to attach the tag policy to and click OK.

    NOTICE:

    The SCP will be applied within 30 minutes.

Step 3: Test the Tag Policy Effect

Perform the following steps to test the tag policy effect.

  1. Log in to the management console as the member account with the tag policy attached. Access the Cloud Eye console, create an alarm rule, and add a tag to the alarm rule to check whether the tag policy is in effect.

    1. If you add the tag ABC to the alarm rule, the operation will be successful.
    2. If you add tag abc to the alarm rule, an error will be displayed, indicating that the tag is non-compliant. In this case, you need to modify the tag and try again until it becomes compliant.
      CAUTION:

      If you try to add tags that do not comply with the tag policy during resource creation, the operation will be blocked by the tag policy, and the resources will not be created.

      If you try to add tags that do not comply with the tag policy to ongoing resources, the operation will be blocked by the tag policy, but the resources will not be affected.

Follow-up Operations

For details about other operations on tag policies, see Managing Tag Policies.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback