You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::EC2::Types::TagSpecification

Inherits:
Struct
  • Object
show all
Defined in:
(unknown)

Overview

Note:

When passing TagSpecification as input to an Aws::Client method, you can use a vanilla Hash:

{
  resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, elastic-ip, fleet, fpga-image, host-reservation, image, instance, internet-gateway, launch-template, natgateway, network-acl, network-interface, reserved-instances, route-table, security-group, snapshot, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
}

The tags to apply to a resource when the resource is being created.

Instance Attribute Summary collapse

Instance Attribute Details

#resource_typeString

The type of resource to tag. Currently, the resource types that support tagging on creation are: capacity-reservation | client-vpn-endpoint | dedicated-host | fleet | fpga-image | instance | launch-template | snapshot | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-route-table | volume.

To tag a resource after it has been created, see CreateTags.

Returns:

  • (String)

    The type of resource to tag.

#tagsArray<Types::Tag>

The tags to apply to the resource.

Returns:

  • (Array<Types::Tag>)

    The tags to apply to the resource.