All Products
Search
Document Center

Application Real-Time Monitoring Service:TagResources

Last Updated:May 09, 2024

Adds tags to ARMS resources.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
arms:TagResourcesWrite
  • Prometheus
    acs:arms:{#regionId}:{#accountId}:prometheus/{#ClusterId}
  • RetcodeApp
    acs:arms:{#regionId}:{#accountId}:retcodeapp/{#Pid}
  • TraceApp
    acs:arms:{#regionId}:{#accountId}:traceapp/{#Pid}
  • Environment
    acs:arms:{#regionId}:{#accountId}:environment/{#EnvironmentId}
  • GrafanaWorkspace
    acs:arms:{#regionId}:{#accountId}:grafanaworkspace/{#GrafanaWorkspaceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ResourceIdarrayYes

The resource IDs. You can specify a maximum of 50 resource IDs.

stringYes

The instance ID.

uxqcr8bh21
Tagobject []Yes

The tags to add to the resource. You can specify a maximum of 20 tags.

KeystringNo

The key of the tag.

Key1
ValuestringNo

The value of the tag.

Test1
ResourceTypestringYes

The type of the ARMS resources for which you want to modify tags. Valid values:

  • WEB: Browser Monitoring
  • APPLICATION: Application Monitoring
  • PROMETHEUS: Managed Service for Prometheus
  • SYNTHETICTASK: Synthetic Monitoring
  • ALERTRULE: Application Monitoring alert rule
  • PROMETHEUSALERTRULE: Managed Service for Prometheus alert rule
  • XTRACEAPP: Managed Service for OpenTelemetry
PROMETHEUS

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

Id of the request

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

The returned message.

success

Examples

Sample success responses

JSONformat

{
  "RequestId": "05919CF2-B8A1-588D-B3DB-89B3********",
  "Data": "success"
}

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.

Change history

Change timeSummary of changesOperation
2024-04-11The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
2023-05-12The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
Output ParametersThe response structure of the API has changed.
2023-04-23The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
2023-03-10The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400