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

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

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb

Overview

Note:

When making an API call, you may pass TagSpecification data as a 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, key-pair, launch-template, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, 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 | key-pair | launch-template | placement-group | 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)


44061
44062
44063
44064
44065
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 44061

class TagSpecification < Struct.new(
  :resource_type,
  :tags)
  include Aws::Structure
end

#tagsArray<Types::Tag>

The tags to apply to the resource.

Returns:



44061
44062
44063
44064
44065
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 44061

class TagSpecification < Struct.new(
  :resource_type,
  :tags)
  include Aws::Structure
end