Create a label resource relationship.
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ResourceId | array | Yes | The list of resource IDs. | |
string | No | The ID of the resource. | uxqcr8bh21 | |
Tag | array | Yes | The tags. | |
object | No | The tag that you want to associate with the resource. | ||
Key | string | No | The tag key. A tag key can be a maximum of 128 characters in length. It cannot contain | Key1 |
Value | string | No | The value of the tag. | Test1 |
ResourceType | string | Yes | The type of the resource. Specify savings plan instance as the type of the resource. | PROMETHEUS |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "05919CF2-B8A1-588D-B3DB-89B3********",
"Data": "success",
"Code": "200",
"Message": "ResourceType.Illegal"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | DuplicateTagKey | Param tagKey is duplicate. | - |
400 | NoPermissionKeyOperator | user is no permission for operating param tagKey. | - |
400 | ResourceIdAndTagIsNull | resourceId or tag param must have one | - |
400 | TagISNull | param tag must be not null. | - |
400 | TagNumOUT | the number of tag is out . | - |
400 | ResourceIdIsNull | param resourceId must be not null. | - |
400 | ResourceTypeIllegal | The ResourceType parameter is invalid. | The specified ResourceType parameter is invalid. |
400 | NoPermissionUSER | user no permission | - |
400 | ScopeDisAgreement | Param scope is different from before. | - |
400 | ParameterNextTokenIllegal | param nextToken is invalid. | - |
400 | InvalidParameterTagKey | The specified TagKey is invalid. | The specified TagKey parameter is invalid. |
400 | InvalidParameterTagValue | The specified TagValue is invalid. | The specified TagValue parameter is invalid. |
400 | TagKeyIsIllegal | The specified TagKey is invalid. | The specified TagKey parameter is invalid. |
400 | TagValueIsIllegal | The specified TagValue is invalid. | The specified TagValue parameter is invalid. |
400 | ResourceIDOUT | The 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.