All Products
Search
Document Center

Bastionhost:TagResources

Last Updated:Apr 16, 2024

Creates and adds tags to specified bastion hosts.

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
RegionIdstringYes

The region ID of the bastion hosts to which you want to create and add tags.

Note For more information about the mapping between region IDs and region names, see Regions and zones.
cn-hangzhou
ResourceTypestringYes

The type of the resource.

Set the value to INSTANCE, which indicates that the resource is a bastion host.

INSTANCE
ResourceIdarrayYes

An array that consists of IDs of bastion hosts.

Valid values: 1 to 20.

Note You can call the DescribeInstances operation to query IDs of bastion hosts.
stringYes

The ID of the bastion host.

bastionhost-cn-78v1gc****
Tagobject []No

An array that consists of tags.

KeystringNo

The key of tag N. Valid values of N: 1 to 20.

Note
  • The value can be up to 128 characters in length but cannot be an empty string.

  • The value cannot start with aliyun or acs:. The value cannot contain http:// or https://.

operation
ValuestringNo

The value of tag N.
Valid values of N: 1 to 20.

Note
  • The value can be up to 128 characters in length or an empty string.

  • The value cannot start with aliyun or acs:. The value cannot contain http:// or https://.

operation_test

Response parameters

ParameterTypeDescriptionExample
object

The data returned.

RequestIdstring

The ID of the request, which is used to locate and troubleshoot issues.

2F24F0A8-4C69-4E89-9392-457D107E2D4A

Examples

Sample success responses

JSONformat

{
  "RequestId": "2F24F0A8-4C69-4E89-9392-457D107E2D4A"
}

Error codes

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