All Products
Search
Document Center

Anycast Elastic IP Address:TagResources

最終更新日:Mar 03, 2024

Creates tags and adds them to resources.

Debugging

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

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ResourceIdarrayYes

The resource ID. You can specify at most 20 IDs.

stringYes

The resource ID. You can specify up to 20 resource IDs.

Note When you call this operation, ResourceId.N is required.
aeip-2zeerraiwb7ujsxdc****
ResourceTypestringYes

The resource type. Set the value to ANYCASTEIPADDRESS.

ANYCASTEIPADDRESS
Tagobject []Yes

The tag information.

KeystringNo

The key of tag N to add to the resource. You must enter at least one tag key and at most 20 tag keys. The tag key cannot be an empty string.

The tag key can be up to 128 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.

Note When you call this operation, Tag.N.Key is required.
FinanceDept
ValuestringNo

The value of tag N to add to the resource. You must enter at least one tag value and at most 20 tag values. The tag value can be an empty string.

It can be up to 128 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.

Note When you call this operation, Tag.N.Value is required.
FinanceJoshua

Response parameters

ParameterTypeDescriptionExample
object

BaseResult

Successboolean

Indicates whether the operation is successful. Valid values:

true

false

true
RequestIdstring

The request ID.

C46FF5A8-C5F0-4024-8262-B16B639225A0

Examples

Sample success responses

JSONformat

{
  "Success": true,
  "RequestId": "C46FF5A8-C5F0-4024-8262-B16B639225A0"
}

Error codes

HTTP status codeError codeError message
400NumberExceed.TagsThe maximum number of tags is exceeded.
400NumberExceed.ResourceIdsThe maximum number of resource IDs is exceeded.
400Forbidden.TagKeysThe tag key cannot be operated by the request.
400Forbidden.TagKey.DuplicatedThe specified tag key already exists.
400InvalidInstanceIds.NotFoundThe instance IDs are not found.
400InvalidInstanceType.NotFoundThe instance type is not found.

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

Change history

Change timeSummary of changesOperation
No change history