Class: Ansible::Ruby::Modules::Ec2_tag

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2_tag.rb

Overview

Creates, removes and lists tags from any EC2 resource. The resource is referenced by its resource id (e.g. an instance being i-XXXXXXX). It is designed to be used with complex args (tags), see the examples. This module has a dependency on python-boto.

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

Methods inherited from Ansible::Ruby::Models::Base

attr_option, attr_options, attribute, #initialize, remove_existing_validations, #to_h, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#resourceString

Returns The EC2 resource id.

Returns:

  • (String)

    The EC2 resource id.



11
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2_tag.rb', line 11

attribute :resource

#state:present, ...

Returns Whether the tags should be present or absent on the resource. Use list to interrogate the tags of an instance.

Returns:

  • (:present, :absent, :list, nil)

    Whether the tags should be present or absent on the resource. Use list to interrogate the tags of an instance.



15
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2_tag.rb', line 15

attribute :state

#tagsObject

Returns a hash/dictionary of tags to add to the resource; ‘“key”:“value”’ and ‘“key”:“value”,“key”:“value”’.

Returns:

  • (Object)

    a hash/dictionary of tags to add to the resource; ‘“key”:“value”’ and ‘“key”:“value”,“key”:“value”’



19
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2_tag.rb', line 19

attribute :tags