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:

  • customer-gateway
  • dhcp-options
  • image
  • instance
  • internet-gateway
  • network-acl
  • network-interface
  • reserved-instances
  • route-table
  • snapshot
  • spot-instances-request
  • subnet
  • security-group
  • volume
  • vpc
  • vpn-connection
  • vpn-gateway

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: