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

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

Overview

Note:

When making an API call, you may pass TagSpecification data as a hash:

{
  resource_type: "customer-gateway", # accepts customer-gateway, dedicated-host, dhcp-options, elastic-ip, fleet, fpga-image, image, instance, internet-gateway, launch-template, natgateway, network-acl, network-interface, reserved-instances, route-table, security-group, snapshot, spot-instances-request, subnet, 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 ‘fleet`, `dedicated-host`, `instance`, `snapshot`, and `volume`. To tag a resource after it has been created, see CreateTags.

Returns:

  • (String)


35239
35240
35241
35242
35243
# File 'lib/aws-sdk-ec2/types.rb', line 35239

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

#tagsArray<Types::Tag>

The tags to apply to the resource.

Returns:



35239
35240
35241
35242
35243
# File 'lib/aws-sdk-ec2/types.rb', line 35239

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