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

Class: Aws::EC2::Tag

Inherits:
Resources::Resource show all
Defined in:
(unknown)

Instance Attribute Summary collapse

Attributes inherited from Resources::Resource

#client, #identifiers

Instance Method Summary collapse

Methods inherited from Resources::Resource

add_data_attribute, add_identifier, #data, data_attributes, #data_loaded?, identifiers, #load, #wait_until

Methods included from Resources::OperationMethods

#add_batch_operation, #add_operation, #batch_operation, #batch_operation_names, #batch_operations, #operation, #operation_names, #operations

Constructor Details

#initialize(resource_id, key, value, options = {}) ⇒ Object #initialize(options = {}) ⇒ Object

Overloads:

  • #initialize(resource_id, key, value, options = {}) ⇒ Object

    Parameters:

    • resource_id (String)
    • key (String)
    • value (String)

    Options Hash (options):

    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

  • #initialize(options = {}) ⇒ Object

    Options Hash (options):

    • :resource_id (required, String)
    • :key (required, String)
    • :value (required, String)
    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

Instance Attribute Details

#keyString (readonly)

Returns:

  • (String)

#resource_idString (readonly)

Returns:

  • (String)

#resource_typeString (readonly)

The resource type.

Possible values:

  • client-vpn-endpoint
  • customer-gateway
  • dedicated-host
  • dhcp-options
  • egress-only-internet-gateway
  • elastic-ip
  • elastic-gpu
  • export-image-task
  • export-instance-task
  • fleet
  • fpga-image
  • host-reservation
  • image
  • import-image-task
  • import-snapshot-task
  • instance
  • internet-gateway
  • key-pair
  • launch-template
  • local-gateway-route-table-vpc-association
  • 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
  • vpc-flow-log

Returns:

  • (String)

    The resource type.

#valueString (readonly)

Returns:

  • (String)

Instance Method Details

#delete(options = {}) ⇒ Struct

Deletes the specified set of tags from the specified set of resources.

To list the current tags, use DescribeTags. For more information about tags, see Tagging Your Resources in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax example with placeholder values


tag.delete({
  dry_run: false,
})

Options Hash (options):

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Returns:

  • (Struct)

    Returns an empty response.

See Also: