Module AWS
In: lib/aws.rb
lib/aws/simple_email_service/request.rb
lib/aws/simple_email_service/email_address_collection.rb
lib/aws/simple_email_service/errors.rb
lib/aws/simple_email_service/quotas.rb
lib/aws/simple_email_service/client.rb
lib/aws/simple_email_service/client/options.rb
lib/aws/simple_email_service/client/xml.rb
lib/aws/configured_client_methods.rb
lib/aws/iam/account_alias_collection.rb
lib/aws/iam/resource.rb
lib/aws/iam/user.rb
lib/aws/iam/request.rb
lib/aws/iam/server_certificate_collection.rb
lib/aws/iam/signing_certificate.rb
lib/aws/iam/access_key_collection.rb
lib/aws/iam/collection.rb
lib/aws/iam/access_key.rb
lib/aws/iam/errors.rb
lib/aws/iam/user_collection.rb
lib/aws/iam/mfa_device.rb
lib/aws/iam/user_policy_collection.rb
lib/aws/iam/policy_collection.rb
lib/aws/iam/group_policy_collection.rb
lib/aws/iam/group.rb
lib/aws/iam/group_user_collection.rb
lib/aws/iam/server_certificate.rb
lib/aws/iam/policy.rb
lib/aws/iam/login_profile.rb
lib/aws/iam/group_collection.rb
lib/aws/iam/user_group_collection.rb
lib/aws/iam/signing_certificate_collection.rb
lib/aws/iam/mfa_device_collection.rb
lib/aws/iam/user_policy.rb
lib/aws/iam/client.rb
lib/aws/iam/client/xml.rb
lib/aws/inflection.rb
lib/aws/resource.rb
lib/aws/simple_db/item_data.rb
lib/aws/simple_db/request.rb
lib/aws/simple_db/delete_attributes.rb
lib/aws/simple_db/errors.rb
lib/aws/simple_db/attribute.rb
lib/aws/simple_db/put_attributes.rb
lib/aws/simple_db/item_collection.rb
lib/aws/simple_db/domain_metadata.rb
lib/aws/simple_db/attribute_collection.rb
lib/aws/simple_db/domain.rb
lib/aws/simple_db/domain_collection.rb
lib/aws/simple_db/expect_condition_option.rb
lib/aws/simple_db/item.rb
lib/aws/simple_db/client.rb
lib/aws/simple_db/consistent_read_option.rb
lib/aws/simple_db/client/options.rb
lib/aws/simple_db/client/xml.rb
lib/aws/base_client.rb
lib/aws/authorize_v3.rb
lib/aws/rails.rb
lib/aws/resource_cache.rb
lib/aws/client_logging.rb
lib/aws/iam.rb
lib/aws/configuration.rb
lib/aws/configured_grammars.rb
lib/aws/meta_utils.rb
lib/aws/service_interface.rb
lib/aws/indifferent_hash.rb
lib/aws/sts.rb
lib/aws/errors.rb
lib/aws/cacheable.rb
lib/aws/ignore_result_element.rb
lib/aws/collections.rb
lib/aws/sts/federated_session.rb
lib/aws/sts/request.rb
lib/aws/sts/errors.rb
lib/aws/sts/session.rb
lib/aws/sts/policy.rb
lib/aws/sts/client.rb
lib/aws/sts/client/xml.rb
lib/aws/ec2.rb
lib/aws/common.rb
lib/aws/sns.rb
lib/aws/api_config_transform.rb
lib/aws/http/request.rb
lib/aws/http/request_param.rb
lib/aws/http/curb_handler.rb
lib/aws/http/response.rb
lib/aws/http/handler.rb
lib/aws/http/httparty_handler.rb
lib/aws/s3.rb
lib/aws/authorize_v2.rb
lib/aws/simple_db.rb
lib/aws/response.rb
lib/aws/response_cache.rb
lib/aws/api_config.rb
lib/aws/sns/topic_collection.rb
lib/aws/sns/subscription.rb
lib/aws/sns/request.rb
lib/aws/sns/errors.rb
lib/aws/sns/topic_subscription_collection.rb
lib/aws/sns/subscription_collection.rb
lib/aws/sns/policy.rb
lib/aws/sns/topic.rb
lib/aws/sns/client.rb
lib/aws/sns/client/options.rb
lib/aws/sns/client/xml.rb
lib/aws/policy.rb
lib/aws/sqs.rb
lib/aws/configured_xml_grammars.rb
lib/aws/naming.rb
lib/aws/model.rb
lib/aws/sqs/queue_collection.rb
lib/aws/sqs/request.rb
lib/aws/sqs/queue.rb
lib/aws/sqs/errors.rb
lib/aws/sqs/received_sns_message.rb
lib/aws/sqs/policy.rb
lib/aws/sqs/received_message.rb
lib/aws/sqs/client.rb
lib/aws/sqs/client/xml.rb
lib/aws/authorize_with_session_token.rb
lib/aws/uri_escape.rb
lib/aws/record/scopes.rb
lib/aws/record/conversion.rb
lib/aws/record/validator.rb
lib/aws/record/dirty_tracking.rb
lib/aws/record/finder_methods.rb
lib/aws/record/attributes/datetime.rb
lib/aws/record/attributes/integer.rb
lib/aws/record/attributes/string.rb
lib/aws/record/attributes/sortable_integer.rb
lib/aws/record/attributes/boolean.rb
lib/aws/record/attributes/sortable_float.rb
lib/aws/record/attributes/float.rb
lib/aws/record/validations.rb
lib/aws/record/errors.rb
lib/aws/record/attribute.rb
lib/aws/record/exceptions.rb
lib/aws/record/scope.rb
lib/aws/record/validators/acceptance.rb
lib/aws/record/validators/inclusion.rb
lib/aws/record/validators/presence.rb
lib/aws/record/validators/block.rb
lib/aws/record/validators/exclusion.rb
lib/aws/record/validators/format.rb
lib/aws/record/validators/numericality.rb
lib/aws/record/validators/length.rb
lib/aws/record/validators/count.rb
lib/aws/record/validators/confirmation.rb
lib/aws/record/attribute_macros.rb
lib/aws/record/naming.rb
lib/aws/record/base.rb
lib/aws/record/optimistic_locking.rb
lib/aws/lazy_error_classes.rb
lib/aws/default_signer.rb
lib/aws/ec2/tag.rb
lib/aws/ec2/key_pair_collection.rb
lib/aws/ec2/instance.rb
lib/aws/ec2/elastic_ip_collection.rb
lib/aws/ec2/has_permissions.rb
lib/aws/ec2/security_group.rb
lib/aws/ec2/resource.rb
lib/aws/ec2/instance_collection.rb
lib/aws/ec2/request.rb
lib/aws/ec2/tagged_item.rb
lib/aws/ec2/resource_tag_collection.rb
lib/aws/ec2/tag_collection.rb
lib/aws/ec2/image_collection.rb
lib/aws/ec2/reserved_instances.rb
lib/aws/ec2/collection.rb
lib/aws/ec2/errors.rb
lib/aws/ec2/volume_collection.rb
lib/aws/ec2/reserved_instances_offering_collection.rb
lib/aws/ec2/permission_collection.rb
lib/aws/ec2/region.rb
lib/aws/ec2/reserved_instances_collection.rb
lib/aws/ec2/availability_zone_collection.rb
lib/aws/ec2/config_transform.rb
lib/aws/ec2/attachment.rb
lib/aws/ec2/region_collection.rb
lib/aws/ec2/attachment_collection.rb
lib/aws/ec2/snapshot.rb
lib/aws/ec2/availability_zone.rb
lib/aws/ec2/security_group_collection.rb
lib/aws/ec2/security_group/ip_permission_collection.rb
lib/aws/ec2/security_group/ip_permission.rb
lib/aws/ec2/volume.rb
lib/aws/ec2/block_device_mappings.rb
lib/aws/ec2/filtered_collection.rb
lib/aws/ec2/tagged_collection.rb
lib/aws/ec2/reserved_instances_offering.rb
lib/aws/ec2/client.rb
lib/aws/ec2/image.rb
lib/aws/ec2/elastic_ip.rb
lib/aws/ec2/key_pair.rb
lib/aws/ec2/snapshot_collection.rb
lib/aws/ec2/client/xml.rb
lib/aws/async_handle.rb
lib/aws/simple_email_service.rb
lib/aws/s3/presigned_post.rb
lib/aws/s3/request.rb
lib/aws/s3/multipart_upload_collection.rb
lib/aws/s3/bucket_version_collection.rb
lib/aws/s3/tree.rb
lib/aws/s3/multipart_upload.rb
lib/aws/s3/errors.rb
lib/aws/s3/bucket.rb
lib/aws/s3/uploaded_part.rb
lib/aws/s3/object_version.rb
lib/aws/s3/object_collection.rb
lib/aws/s3/paginated_collection.rb
lib/aws/s3/tree/node.rb
lib/aws/s3/tree/parent.rb
lib/aws/s3/tree/branch_node.rb
lib/aws/s3/tree/child_collection.rb
lib/aws/s3/tree/leaf_node.rb
lib/aws/s3/data_options.rb
lib/aws/s3/prefix_and_delimiter_collection.rb
lib/aws/s3/policy.rb
lib/aws/s3/object_metadata.rb
lib/aws/s3/access_control_list.rb
lib/aws/s3/object_upload_collection.rb
lib/aws/s3/uploaded_part_collection.rb
lib/aws/s3/bucket_collection.rb
lib/aws/s3/object_version_collection.rb
lib/aws/s3/client.rb
lib/aws/s3/prefixed_collection.rb
lib/aws/s3/acl_object.rb
lib/aws/s3/s3_object.rb
lib/aws/s3/client/xml.rb
lib/aws/xml_grammar.rb
lib/aws/record.rb
lib/aws/configured_option_grammars.rb
lib/aws/option_grammar.rb

Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at

    http://aws.amazon.com/apache2.0/

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Methods

Classes and Modules

Module AWS::ApiConfig
Module AWS::AsyncHandle
Module AWS::AuthorizeV2
Module AWS::AuthorizeV3
Module AWS::AuthorizeWithSessionToken
Module AWS::Cacheable
Module AWS::ClientLogging
Module AWS::Collections
Module AWS::ConfiguredClientMethods
Module AWS::ConfiguredGrammars
Module AWS::ConfiguredOptionGrammars
Module AWS::ConfiguredXmlGrammars
Module AWS::Errors
Module AWS::Http
Module AWS::IgnoreResultElement
Module AWS::Inflection
Module AWS::LazyErrorClasses
Module AWS::MetaUtils
Module AWS::Model
Module AWS::Naming
Module AWS::Rails
Module AWS::Record
Module AWS::ServiceInterface
Module AWS::UriEscape
Class AWS::ApiConfigTransform
Class AWS::BaseClient
Class AWS::Configuration
Class AWS::DefaultSigner
Class AWS::EC2
Class AWS::IAM
Class AWS::IndifferentHash
Class AWS::OptionGrammar
Class AWS::Policy
Class AWS::Railtie
Class AWS::Resource
Class AWS::ResourceCache
Class AWS::Response
Class AWS::ResponseCache
Class AWS::S3
Class AWS::SNS
Class AWS::SQS
Class AWS::STS
Class AWS::SimpleDB
Class AWS::SimpleEmailService
Class AWS::XmlGrammar

Constants

BaseError = XmlGrammar.customize do element("Errors") do ignore
VERSION = "1.1.1"   Current version of the AWS SDK for Ruby
GetBucketAcl = GetObjectAcl = XmlGrammar.customize do wrapper(:acl, :for => ["Owner", "AccessControlList"]) do construct_value { AccessControlList.new }

Public Class methods

The global configuration for AWS. Generally you set your prefered configuration operations once after loading the aws-sdk gem.

  AWS.config({
    :access_key_id => 'ACCESS_KEY_ID',
    :secret_access_key => 'SECRET_ACCESS_KEY',
    :simple_db_endpoint => 'sdb.us-west-1.amazonaws.com',
    :max_retries => 2,
  })

When using AWS classes they will always default to use configuration values defined in {AWS.config}.

  AWS.config(:max_retries => 2)

  sqs = AWS::SQS.new
  sqs.config.max_retries #=> 2

If you want to change a configuration value for a single instance you pass the new configuration value to that object‘s initializer:

  AWS::SQS.new(:max_retries => 0)

@note Changing the global configuration does not affect objects

  that have already been constructed.

@param [Hash] options @option options [String] :access_key_id (nil) AWS access key id

  credential.

@option options [String] :ec2_endpoint (‘ec2.amazonaws.com’) The

  service endpoint for Amazon EC2.

@option options [Object] :http_handler (AWS::HTTPartyHandler) The

  http handler that sends requests to AWS.

@option options [String] :iam_endpoint (‘iam.amazonaws.com’) The

  service endpoint for AWS Idenity Access Management (IAM).

@option options [Object,nil] :logger (nil) A logger instance that

  should receive log messages generated by service requets.
  A logger needs to respond to #log and must accept a
  severity (e.g. :info, :error, etc) and a string message.

@option options [Integer] :max_retries (3) The maximum number of times

  service errors (500) should be retried.  There is an exponential
  backoff in between service request retries, so the more retries the
  longer it can take to fail.

@option options [String, URI, nil] :proxy_uri (nil) The URI of the proxy

   to send service requests through.  You can pass a URI object or a
   URI string:

      AWS.config(:proxy_uri => 'https://user:password@my.proxy:443/path?query')

@option options [String] :s3_endpoint (‘s3.amazonaws.com’) The

  service endpoint for Amazon S3.

@option options [Integer] :s3_multipart_max_parts (1000) The maximum

  number of parts to split a file into when uploading in parts to S3.

@option options [Integer] :s3_multipart_threshold (16777216) When

  uploading data to S3, if the number of bytes to send exceedes
  +:s3_multipart_threshold+ then a multi part session is automatically
  started and the data is sent up in chunks.  The size of each part
  is specified by +:s3_multipart_min_part_size+. Defaults to
  16777216 (16MB).

@option options [Integer] :s3_multipart_min_part_size (5242880) The

  absolute minimum size (in bytes) each S3 multipart segment should be.
  Defaults to 5242880 (5MB).

@option options [String] :secret_access_key (nil) AWS secret access

  key credential.

@option options [String,nil] :session_token (nil) AWS secret token

  credential.

@option options [String] :simple_db_endpoint (‘sdb.amazonaws.com’) The

  service endpoint for Amazon SimpleDB.

@option options [Boolean] :simple_db_consistent_reads (false) Determines

  if all SimpleDB read requests should be done consistently.
  Consistent reads are slower, but reflect all changes to SDB.

@option options [String] :simple_email_service_endpoint (‘email.us-east-1.amazonaws.com’)

  The service endpoint for Amazon Simple Email Service.

@option options [Object] :signer (AWS::DefaultSigner) The request signer. Defaults to

  a default request signer implementation.

@option options [String] :ssl_ca_file The path to a CA cert bundle in

  PEM format.

  If +:ssl_verify_peer+ is +true+ (the default) this bundle will be
  used to validate the server certificate in each HTTPS request.
  The AWS SDK for Ruby ships with a CA cert bundle, which is the
  default value for this option.

@option options [Boolean] :ssl_verify_peer (true) When true

  the HTTP handler validate server certificates for HTTPS requests.

  This option should only be disabled for diagnostic purposes;
  leaving this option set to +false+ exposes your application to
  man-in-the-middle attacks and can pose a serious security
  risk.

@option options[Boolean] :stub_requests (false) When true requests

  are not sent to AWS, instead empty reponses are generated and
  returned to each service request.

@option options [String] :sns_endpoint (‘sns.us-east-1.amazonaws.com’) The

  service endpoint for Amazon SNS.

@option options [String] :sqs_endpoint (‘sqs.us-east-1.amazonaws.com’) The

  service endpoint for Amazon SQS.

@option options [String] :sts_endpoint (‘sts.amazonaws.com’) The

  service endpoint for AWS Security Token Service.

@option options [Boolean] :use_ssl (true) When true, all requests

  to AWS are sent using HTTPS instead vanilla HTTP.

@option options [String] :user_agent_prefix (nil) A string prefix to

  append to all requets against AWS services.  This should be set
  for clients and applications built ontop of the aws-sdk gem.

@return [Configuration] Returns the new configuration.

@note Memoization is currently only supported for the EC2 APIs;

  other APIs are unaffected by the status of memoization.  To
  protect your code from future changes in memoization support,
  you should not enable memoization while calling non-EC2 APIs.

Enables memoization for the current thread, within a block. Memoization lets you avoid making multiple requests for the same data by reusing the responses which have already been received. For example, consider the following code to get the most recently launched EC2 instance:

 latest = ec2.instances.sort_by(&:launch_time).last

The above code would make N+1 requests (where N is the number of instances in the account); iterating the collection of instances is one request, and +Enumerable#sort_by+ calls {AWS::EC2::Instance#launch_time} for each instance, causing another request per instance. We can rewrite the code as follows to make only one request:

 latest = AWS.memoize do
   ec2.instances.sort_by(&:launch_time).last
 end

Iterating the collection still causes a request, but each subsequent call to {AWS::EC2::Instance#launch_time} uses the results from that first request rather than making a new request for the same data.

While memoization is enabled, every response that is received from the service is retained in memory. Therefore you should use memoization only for short-lived blocks of code that make relatively small numbers of requests. The cached responses are used in two ways while memoization is enabled:

  1. Before making a request, the SDK checks the cache for a response to a request with the same signature (credentials, service endpoint, operation name, and parameters). If such a response is found, it is used instead of making a new request.
  2. Before retrieving data for an attribute of a resource (e.g. {AWS::EC2::Instance#launch_time}), the SDK attempts to find a cached response that contains the requested data. If such a response is found, the cached data is returned instead of making a new request.

When memoization is disabled, all previously cached responses are discarded.

@note Memoization is currently only supported for the EC2 APIs;

  other APIs are unaffected by the status of memoization.  To
  protect your code from future changes in memoization support,
  you should not enable memoization while calling non-EC2 APIs.

@return [Boolean] True if memoization is enabled for the current

  thread.  See {memoize} for a full discussion of the
  memoization feature.

@note Memoization is currently only supported for the EC2 APIs;

  other APIs are unaffected by the status of memoization.  To
  protect your code from future changes in memoization support,
  you should not enable memoization while calling non-EC2 APIs.

Starts memoizing service requests made in the current thread. See {memoize} for a full discussion of the memoization feature. This has no effect if memoization is already enabled.

@note Memoization is currently only supported for the EC2 APIs;

  other APIs are unaffected by the status of memoization.  To
  protect your code from future changes in memoization support,
  you should not enable memoization while calling non-EC2 APIs.

Stops memoizing service requests made in the current thread. See {memoize} for a full discussion of the memoization feature. This has no effect if memoization is already disabled.

Causes all requests to return empty responses without making any requests against the live services. This does not attempt to mock the services. @return [nil]

[Validate]