Binds tags to resources.

Note The tag feature is suitable only for Anti-DDoS Pro.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateTagResources

The operation that you want to perform. Set the value to CreateTagResources.

RegionId String Yes cn-hangzhou

The region ID of the instance. Set the value to cn-hangzhou, which indicates an Anti-DDoS Pro instance.

ResourceIds.N RepeatList Yes ddoscoo-cn-mp91j1ao****

The ID of resource N to which you want to bind with a tag. The resource indicates the instance.

Note You can call the DescribeInstanceIds operation to query the IDs of all instances.
ResourceType String Yes INSTANCE

The type of the resource. Set the value to INSTANCE, which indicates an Anti-DDoS Pro instance.

ResourceGroupId String No default

The ID of the resource group to which the instance belongs in Resource Management. This parameter is empty by default, which indicates that the instance belongs to the default resource group.

Tags.N.Key String No testkey

The key of tag N that you want to bind to the resource.

Tags.N.Value String No testvalue

The value of tag N that you want to bind to the resource.

Response parameters

Parameter Type Example Description
RequestId String C33EB3D5-AF96-43CA-9C7E-37A81BC06A1E

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/? Action=CreateTagResources
&RegionId=cn-hangzhou
&ResourceIds.1=ddoscoo-cn-mp91j1ao****
&ResourceType=INSTANCE
&Tag.1.Key=testkey
&Tag.1.Value=testvalue
&<Common request parameters>

Sample success responses

XML format

<CreateTagResourcesResponse>
      <RequestId>C33EB3D5-AF96-43CA-9C7E-37A81BC06A1E</RequestId>
</CreateTagResourcesResponse>

JSON format

{
  "RequestId": "C33EB3D5-AF96-43CA-9C7E-37A81BC06A1E"
}

Error codes

For a list of error codes, visit the API Error Center.