CreateTags

GET /?Action=CreateTags
Description

Adds one or more tags to the specified resources.
If a tag with the same key already exists for the resource, the tag value is replaced.
You can tag the following resources using their IDs:

  • Instances (i-xxxxxxxx)

  • OMIs (ami-xxxxxxxx)

  • Volumes (vol-xxxxxxxx)

  • Snapshots (snap-xxxxxxxx)

  • EIPs (eipalloc-xxxxxxxx)

  • Security groups (sg-xxxxxxxx)

  • Route tables (rtb-xxxxxxxx)

  • Network interfaces (eni-xxxxxxxx)

  • VPCs (vpc-xxxxxxxx)

  • Subnets (subnet-xxxxxxxx)

  • VPC peering connections (vpcx-xxxxxxxx)

  • VPC endpoints (vpce-xxxxxxxx)

  • NAT gateways (nat-xxxxxxxx)

  • Internet gateways (igw-xxxxxxxx)

  • Customer gateways (cgw-xxxxxxxx)

  • Virtual private gateways (vgw-xxxxxxxx)

  • VPN connections (vpn-xxxxxxxx)

  • DHCP options (dopt-xxxxxxxx)

  • OMI export tasks (image-export-xxxxxxxx)

  • Snapshot export tasks (snap-export-xxxxxxxx)

Body parameter

Required: false
Name: CreateTagsRequest

Name Description Required Schema Default Example

ResourceId.N

One or more resource IDs.

true

string

Tag.N

One or more tags you want to add to the specified resources.
Example for an instance:
osc-cli fcu CreateTags \
  --ResourceId i-xxxxxxxx \
  --Tag.1.Key "AAAA" --Tag.1.Value "BBBB" \
  --Tag.2.Key "CCCC" --Tag.2.Value "DDDD"

true

Tag

Responses
HTTP Code 200
HTTP Code Description Schema

200

CreateTagsResult

Response 200

Response 200

Name Description Required Schema Default Example

requestId

The ID of the request.

false

string

return

If true, the request succeeds. Otherwise, an error is returned.

false

boolean