Module: Aws

Defined in:
lib/aws-sdk-core.rb,
lib/aws-sdk-core/json.rb,
lib/aws-sdk-core/util.rb,
lib/aws-sdk-core/pager.rb,
lib/aws-sdk-core/errors.rb,
lib/aws-sdk-core/structure.rb,
lib/aws-sdk-core/ini_parser.rb,
lib/aws-sdk-core/xml/parser.rb,
lib/aws-sdk-core/credentials.rb,
lib/aws-sdk-core/json/parser.rb,
lib/aws-sdk-core/query/param.rb,
lib/aws-sdk-core/xml/builder.rb,
lib/aws-sdk-core/client_stubs.rb,
lib/aws-sdk-core/deprecations.rb,
lib/aws-sdk-core/eager_loader.rb,
lib/aws-sdk-core/json/builder.rb,
lib/aws-sdk-core/json/handler.rb,
lib/aws-sdk-core/rest/handler.rb,
lib/aws-sdk-core/type_builder.rb,
lib/aws-sdk-core/event_emitter.rb,
lib/aws-sdk-core/log/formatter.rb,
lib/aws-sdk-core/query/handler.rb,
lib/aws-sdk-core/shared_config.rb,
lib/aws-sdk-core/endpoint_cache.rb,
lib/aws-sdk-core/json/oj_engine.rb,
lib/aws-sdk-core/waiters/errors.rb,
lib/aws-sdk-core/waiters/poller.rb,
lib/aws-sdk-core/waiters/waiter.rb,
lib/aws-sdk-core/ecs_credentials.rb,
lib/aws-sdk-core/param_converter.rb,
lib/aws-sdk-core/param_validator.rb,
lib/aws-sdk-core/plugins/api_key.rb,
lib/aws-sdk-core/plugins/logging.rb,
lib/aws-sdk-core/xml/default_map.rb,
lib/aws-sdk-core/xml/doc_builder.rb,
lib/aws-sdk-core/json/json_engine.rb,
lib/aws-sdk-core/log/param_filter.rb,
lib/aws-sdk-core/query/param_list.rb,
lib/aws-sdk-core/xml/default_list.rb,
lib/aws-sdk-core/xml/parser/frame.rb,
lib/aws-sdk-core/xml/parser/stack.rb,
lib/aws-sdk-core/pageable_response.rb,
lib/aws-sdk-core/rest/request/body.rb,
lib/aws-sdk-core/xml/error_handler.rb,
lib/aws-sdk-core/json/error_handler.rb,
lib/aws-sdk-core/plugins/user_agent.rb,
lib/aws-sdk-core/rest/response/body.rb,
lib/aws-sdk-core/shared_credentials.rb,
lib/aws-sdk-core/stubbing/stub_data.rb,
lib/aws-sdk-core/stubbing/xml_error.rb,
lib/aws-sdk-core/binary/event_parser.rb,
lib/aws-sdk-core/credential_provider.rb,
lib/aws-sdk-core/log/param_formatter.rb,
lib/aws-sdk-core/process_credentials.rb,
lib/aws-sdk-core/query/param_builder.rb,
lib/aws-sdk-core/stubbing/empty_stub.rb,
lib/aws-sdk-core/plugins/retry_errors.rb,
lib/aws-sdk-core/plugins/signature_v2.rb,
lib/aws-sdk-core/plugins/signature_v4.rb,
lib/aws-sdk-core/resources/collection.rb,
lib/aws-sdk-core/rest/request/builder.rb,
lib/aws-sdk-core/rest/request/headers.rb,
lib/aws-sdk-core/rest/response/parser.rb,
lib/aws-sdk-core/binary/decode_handler.rb,
lib/aws-sdk-core/plugins/protocols/ec2.rb,
lib/aws-sdk-core/rest/request/endpoint.rb,
lib/aws-sdk-core/rest/response/headers.rb,
lib/aws-sdk-core/xml/parser/engines/ox.rb,
lib/aws-sdk-core/plugins/stub_responses.rb,
lib/aws-sdk-core/refreshing_credentials.rb,
lib/aws-sdk-core/stubbing/protocols/ec2.rb,
lib/aws-sdk-core/xml/parser/engines/oga.rb,
lib/aws-sdk-core/assume_role_credentials.rb,
lib/aws-sdk-core/plugins/apig_user_agent.rb,
lib/aws-sdk-core/plugins/param_converter.rb,
lib/aws-sdk-core/plugins/param_validator.rb,
lib/aws-sdk-core/plugins/protocols/query.rb,
lib/aws-sdk-core/plugins/response_paging.rb,
lib/aws-sdk-core/query/ec2_param_builder.rb,
lib/aws-sdk-core/stubbing/protocols/json.rb,
lib/aws-sdk-core/stubbing/protocols/rest.rb,
lib/aws-sdk-core/plugins/endpoint_pattern.rb,
lib/aws-sdk-core/stubbing/data_applicator.rb,
lib/aws-sdk-core/stubbing/protocols/query.rb,
lib/aws-sdk-core/xml/parser/engines/rexml.rb,
lib/aws-sdk-core/xml/parser/parsing_error.rb,
lib/aws-sdk-core/credential_provider_chain.rb,
lib/aws-sdk-core/plugins/idempotency_token.rb,
lib/aws-sdk-core/plugins/regional_endpoint.rb,
lib/aws-sdk-core/rest/response/status_code.rb,
lib/aws-sdk-core/xml/parser/engines/libxml.rb,
lib/aws-sdk-core/plugins/endpoint_discovery.rb,
lib/aws-sdk-core/plugins/protocols/json_rpc.rb,
lib/aws-sdk-core/plugins/protocols/rest_xml.rb,
lib/aws-sdk-core/binary/event_stream_decoder.rb,
lib/aws-sdk-core/plugins/jsonvalue_converter.rb,
lib/aws-sdk-core/plugins/protocols/rest_json.rb,
lib/aws-sdk-core/stubbing/protocols/rest_xml.rb,
lib/aws-sdk-core/xml/parser/engines/nokogiri.rb,
lib/aws-sdk-core/instance_profile_credentials.rb,
lib/aws-sdk-core/plugins/global_configuration.rb,
lib/aws-sdk-core/stubbing/protocols/rest_json.rb,
lib/aws-sdk-core/plugins/apig_authorizer_token.rb,
lib/aws-sdk-core/plugins/client_metrics_plugin.rb,
lib/aws-sdk-core/plugins/helpful_socket_errors.rb,
lib/aws-sdk-core/plugins/protocols/api_gateway.rb,
lib/aws-sdk-core/stubbing/protocols/api_gateway.rb,
lib/aws-sdk-core/client_side_monitoring/publisher.rb,
lib/aws-sdk-core/rest/request/querystring_builder.rb,
lib/aws-sdk-core/plugins/credentials_configuration.rb,
lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb,
lib/aws-sdk-core/plugins/event_stream_configuration.rb,
lib/aws-sdk-core/client_side_monitoring/request_metrics.rb,
lib/aws-sdk-core/plugins/apig_credentials_configuration.rb

Defined Under Namespace

Modules: Binary, ClientSideMonitoring, ClientStubs, CredentialProvider, Deprecations, Errors, Json, Log, PageableResponse, Plugins, Query, RefreshingCredentials, Resources, Rest, STS, Structure, Stubbing, Util, Waiters, Xml Classes: AssumeRoleCredentials, CredentialProviderChain, Credentials, ECSCredentials, EagerLoader, EmptyStructure, EndpointCache, EventEmitter, IniParser, InstanceProfileCredentials, Pager, ParamConverter, ParamValidator, ProcessCredentials, SharedConfig, SharedCredentials, TypeBuilder

Constant Summary collapse

CORE_GEM_VERSION =
File.read(File.expand_path('../../VERSION', __FILE__)).strip

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configHash

Returns a hash of default configuration options shared by all constructed clients.

Returns:

  • (Hash)

    Returns a hash of default configuration options shared by all constructed clients.



100
101
102
# File 'lib/aws-sdk-core.rb', line 100

def config
  @config
end

Class Method Details

.eager_autoload!(*args) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



162
163
164
165
166
# File 'lib/aws-sdk-core.rb', line 162

def eager_autoload!(*args)
  msg = 'Aws.eager_autoload is no longer needed, usage of '
  msg << 'autoload has been replaced with require statements'
  warn(msg)
end

.empty_connection_pools!nil

Close any long-lived connections maintained by the SDK's internal connection pool.

Applications that rely heavily on the `fork()` system call on POSIX systems should call this method in the child process directly after fork to ensure there are no race conditions between the parent process and its children for the pooled TCP connections.

Child processes that make multi-threaded calls to the SDK should block on this call before beginning work.

Returns:

  • (nil)


155
156
157
158
159
# File 'lib/aws-sdk-core.rb', line 155

def empty_connection_pools!
  Seahorse::Client::NetHttp::ConnectionPool.pools.each do |pool|
    pool.empty!
  end
end

.partition(partition_name) ⇒ Object

See Also:

  • (Aws(Aws::Partitions(Aws::Partitions.partition)


112
113
114
# File 'lib/aws-sdk-core.rb', line 112

def partition(partition_name)
  Aws::Partitions.partition(partition_name)
end

.partitionsObject

See Also:

  • (Aws(Aws::Partitions(Aws::Partitions.partitions)


117
118
119
# File 'lib/aws-sdk-core.rb', line 117

def partitions
  Aws::Partitions.partitions
end

.shared_configObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



93
94
95
96
# File 'lib/aws-sdk-core.rb', line 93

def shared_config
  enabled = ENV["AWS_SDK_CONFIG_OPT_OUT"] ? false : true
  @shared_config ||= SharedConfig.new(config_enabled: enabled)
end

.use_bundled_cert!String

The SDK ships with a ca certificate bundle to use when verifying SSL peer certificates. By default, this cert bundle is NOT used. The SDK will rely on the default cert available to OpenSSL. This ensures the cert provided by your OS is used.

For cases where the default cert is unavailable, e.g. Windows, you can call this method.

Aws.use_bundled_cert!

Returns:

  • (String)

    Returns the path to the bundled cert.



132
133
134
135
136
137
138
139
140
# File 'lib/aws-sdk-core.rb', line 132

def use_bundled_cert!
  config.delete(:ssl_ca_directory)
  config.delete(:ssl_ca_store)
  config[:ssl_ca_bundle] = File.expand_path(File.join(
    File.dirname(__FILE__),
    '..',
    'ca-bundle.crt'
  ))
end