Class: Ansible::Ruby::Modules::S3

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

Overview

This module allows the user to manage S3 buckets and the objects within them. Includes support for creating and deleting both objects and buckets, retrieving objects as files or strings and generating download links. 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

#aws_access_keyObject?

Returns AWS access key id. If not set then the value of the AWS_ACCESS_KEY environment variable is used.

Returns:

  • (Object, nil)

    AWS access key id. If not set then the value of the AWS_ACCESS_KEY environment variable is used.



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

attribute :aws_access_key

#aws_secret_keyObject?

Returns AWS secret key. If not set then the value of the AWS_SECRET_KEY environment variable is used.

Returns:

  • (Object, nil)

    AWS secret key. If not set then the value of the AWS_SECRET_KEY environment variable is used.



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

attribute :aws_secret_key

#bucketString

Returns Bucket name.

Returns:

  • (String)

    Bucket name.



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

attribute :bucket

#destString?

Returns The destination file path when downloading an object/key with a GET operation.

Returns:

  • (String, nil)

    The destination file path when downloading an object/key with a GET operation.



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

attribute :dest

#encryptBoolean?

Returns When set for PUT mode, asks for server-side encryption.

Returns:

  • (Boolean, nil)

    When set for PUT mode, asks for server-side encryption



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

attribute :encrypt

#expirationInteger?

Returns Time limit (in seconds) for the URL generated and returned by S3/Walrus when performing a mode=put or mode=geturl operation.

Returns:

  • (Integer, nil)

    Time limit (in seconds) for the URL generated and returned by S3/Walrus when performing a mode=put or mode=geturl operation.



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

attribute :expiration

#headersString?

Returns Custom headers for PUT operation, as a dictionary of ‘key=value’ and ‘key=value,key=value’.

Returns:

  • (String, nil)

    Custom headers for PUT operation, as a dictionary of ‘key=value’ and ‘key=value,key=value’.



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

attribute :headers

#markerString?

Returns Specifies the key to start with when using list mode. Object keys are returned in alphabetical order, starting with key after the marker in order.

Returns:

  • (String, nil)

    Specifies the key to start with when using list mode. Object keys are returned in alphabetical order, starting with key after the marker in order.



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

attribute :marker

#max_keysInteger?

Returns Max number of results to return in list mode, set this if you want to retrieve fewer than the default 1000 keys.

Returns:

  • (Integer, nil)

    Max number of results to return in list mode, set this if you want to retrieve fewer than the default 1000 keys.



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

attribute :max_keys

#metadataString?

Returns Metadata for PUT operation, as a dictionary of ‘key=value’ and ‘key=value,key=value’.

Returns:

  • (String, nil)

    Metadata for PUT operation, as a dictionary of ‘key=value’ and ‘key=value,key=value’.



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

attribute :metadata

#mode:get, ...

Returns Switches the module behaviour between put (upload), get (download), geturl (return download url, Ansible 1.3+), getstr (download object as string (1.3+)), list (list keys, Ansible 2.0+), create (bucket), delete (bucket), and delobj (delete object, Ansible 2.0+).

Returns:

  • (:get, :put, :delete, :create, :geturl, :getstr, :delobj, :list)

    Switches the module behaviour between put (upload), get (download), geturl (return download url, Ansible 1.3+), getstr (download object as string (1.3+)), list (list keys, Ansible 2.0+), create (bucket), delete (bucket), and delobj (delete object, Ansible 2.0+).



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

attribute :mode

#objectString?

Returns Keyname of the object inside the bucket. Can be used to create “virtual directories”, see examples.

Returns:

  • (String, nil)

    Keyname of the object inside the bucket. Can be used to create “virtual directories”, see examples.



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

attribute :object

#overwriteBoolean?

Returns Force overwrite either locally on the filesystem or remotely with the object/key. Used with PUT and GET operations. Boolean or one of [Always, Never, Different], new in 2.0.

Returns:

  • (Boolean, nil)

    Force overwrite either locally on the filesystem or remotely with the object/key. Used with PUT and GET operations. Boolean or one of [Always, Never, Different], new in 2.0



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

attribute :overwrite

#permissionString?

Returns This option lets the user set the canned permissions on the object/bucket that are created. The permissions that can be set are ‘private’, ‘public-read’, ‘public-read-write’, ‘authenticated-read’. Multiple permissions can be specified as a list.

Returns:

  • (String, nil)

    This option lets the user set the canned permissions on the object/bucket that are created. The permissions that can be set are ‘private’, ‘public-read’, ‘public-read-write’, ‘authenticated-read’. Multiple permissions can be specified as a list.



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

attribute :permission

#prefixString?

Returns Limits the response to keys that begin with the specified prefix for list mode.

Returns:

  • (String, nil)

    Limits the response to keys that begin with the specified prefix for list mode



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

attribute :prefix

#regionString?

Returns AWS region to create the bucket in. If not set then the value of the AWS_REGION and EC2_REGION environment variables are checked, followed by the aws_region and ec2_region settings in the Boto config file. If none of those are set the region defaults to the S3 Location: US Standard. Prior to ansible 1.8 this parameter could be specified but had no effect.

Returns:

  • (String, nil)

    AWS region to create the bucket in. If not set then the value of the AWS_REGION and EC2_REGION environment variables are checked, followed by the aws_region and ec2_region settings in the Boto config file. If none of those are set the region defaults to the S3 Location: US Standard. Prior to ansible 1.8 this parameter could be specified but had no effect.



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

attribute :region

#retriesInteger?

Returns On recoverable failure, how many times to retry before actually failing.

Returns:

  • (Integer, nil)

    On recoverable failure, how many times to retry before actually failing.



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

attribute :retries

#s3_urlObject?

Returns S3 URL endpoint for usage with Eucalypus, fakes3, etc. Otherwise assumes AWS.

Returns:

  • (Object, nil)

    S3 URL endpoint for usage with Eucalypus, fakes3, etc. Otherwise assumes AWS



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

attribute :s3_url

#srcString?

Returns The source file path when performing a PUT operation.

Returns:

  • (String, nil)

    The source file path when performing a PUT operation.



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

attribute :src

#versionString?

Returns Version ID of the object inside the bucket. Can be used to get a specific version of a file if versioning is enabled in the target bucket.

Returns:

  • (String, nil)

    Version ID of the object inside the bucket. Can be used to get a specific version of a file if versioning is enabled in the target bucket.



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

attribute :version