All Products
Search
Document Center

Application Real-Time Monitoring Service:TagResources

Last Updated:Mar 22, 2023

Create a label resource relationship.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ResourceIdarrayYes

The list of resource IDs.

stringNo

The ID of the resource.

uxqcr8bh21
TagarrayYes

The tags.

objectNo

The tag that you want to associate with the resource.

KeystringNo

The tag key.

A tag key can be a maximum of 128 characters in length. It cannot contain http:// or https:// and cannot start with acs: or aliyun.

Key1
ValuestringNo

The value of the tag.

Test1
ResourceTypestringYes

The type of the resource. Specify savings plan instance as the type of the resource.

PROMETHEUS

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

Id of the request

05919CF2-B8A1-588D-B3DB-89B3********
Datastring

The message returned.

success
Codestring

Interface status or pop error code.

200
Messagestring

The message returned.

ResourceType.Illegal

Examples

Sample success responses

JSONformat

{
  "RequestId": "05919CF2-B8A1-588D-B3DB-89B3********",
  "Data": "success",
  "Code": "200",
  "Message": "ResourceType.Illegal"
}

Error codes

HTTP status codeError codeError messageDescription
400DuplicateTagKeyParam tagKey is duplicate.-
400NoPermissionKeyOperatoruser is no permission for operating param tagKey.-
400ResourceIdAndTagIsNullresourceId or tag param must have one-
400TagISNullparam tag must be not null.-
400TagNumOUTthe number of tag is out .-
400ResourceIdIsNullparam resourceId must be not null.-
400ResourceTypeIllegalThe ResourceType parameter is invalid.The specified ResourceType parameter is invalid.
400NoPermissionUSERuser no permission-
400ScopeDisAgreementParam scope is different from before.-
400ParameterNextTokenIllegalparam nextToken is invalid.-
400InvalidParameterTagKeyThe specified TagKey is invalid.The specified TagKey parameter is invalid.
400InvalidParameterTagValueThe specified TagValue is invalid.The specified TagValue parameter is invalid.
400TagKeyIsIllegalThe specified TagKey is invalid.The specified TagKey parameter is invalid.
400TagValueIsIllegalThe specified TagValue is invalid.The specified TagValue parameter is invalid.
400ResourceIDOUTThe specified resourceId number is out of range.The number of resource IDs exceeds the upper limit.

For a list of error codes, visit the Service error codes.