检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
Accessing TMS Adding Tags to Cloud Resources 04 APIs A wide range of open APIs and sample API calls to draw from makes it easy to query the version, create or delete predefined tags, query the predefined tag list, or modify the predefined tags.
Deleting Predefined Tags Function This API is used to delete predefined tags. This API supports idempotency and batch data processing. Calling Method For details, see Calling APIs.
Click Delete above the predefined tag list. In the displayed Delete Tag dialog box, click OK. The predefined tags have been deleted. You can also click Delete in the Operation column to delete a specific tag. Parent topic: Predefined Tags
You can use TMS APIs to create, delete, query, or modify predefined tags, or query the version information. All regions API Overview SDK TMS provides Java, Python, Go, and .NET SDKs to facilitate your secondary development. All regions SDK Overview
Querying predefined tags GET /v1.0/predefine_tags tms:predefineTags:list Supported Not supported Creating predefined tags POST /v1.0/predefine_tags/action tms:predefineTags:create Supported Not supported Deleting predefined tags POST /v1.0/predefine_tags/action tms:predefineTags:delete
To delete multiple tags of a resource, repeat the preceding steps. You can also select the target resource in the list and click Manage Tag above the list to delete one or more tags. For details, see Deleting Tags for Multiple Resources.
An invalid tag can be restored in either of the following situations: If the tag key is invalid, delete the tag and add a new tag that meets the requirements. If only the tag value is invalid, modify the tag value. Procedure Log in to the management console.
Delete unnecessary predefined tags. 400 TMS.1002 Old_tag cannot be found. The old tag does not exist. Check the old tag. 400 TMS.1003 New_tag already exists. The new tag already exists. Check the new tag. 400 TMS.1004 Old_tag is empty. The old tag is left blank.
Deleting Tags in Batches Function This API is used to delete tags from multiple resources of a cloud service in batches. A maximum of 10 tags can be deleted from one resource. Tags of up to 50 resources can be deleted at a time. Calling Method For details, see Calling APIs.
DELETE Requests the server to delete specified resources, for example, an object. HEAD Same as GET except that the server must return only the response header. PATCH Requests the server to update partial content of a specified resource.
Users with these permissions can query, create, delete, import, or export predefined tags, and create, delete, modify, or query resource tags.
So, to modify a cloud resource tag, you must have both related TMS permissions and service permissions to delete and create tags.
Assume that you want to grant the TMS FullAccess permissions to a user but do not want them to delete predefined tags. You can create a custom policy for denying predefined tag deletion, and attach this policy together with the TMS FullAccess policy to the user.
This section describes how to search for, create, delete, import, or export predefined tags. Constraints and Limitations Predefined tags cannot be identical. Either their keys or values must be different.
This section describes how to query resources by tag, create tag keys, add a tag to multiple cloud resources, and update, modify, or delete resource tags. Constraints and Limitations Up to 10 tags can be specified to query for resources at a time.
You can delete predefined tags created.
You can review, modify, and delete tags in a unified manner. Figure 1 Central management of resources Resource Migration If you need to migrate large numbers of resources, you can create or import predefined tags in batches for these resources.