You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Module: Aws

Defined in:
aws-sdk-core/lib/aws-sdk-core.rb,
aws-sdk-core/lib/aws-sdk-core/s3.rb,
aws-sdk-core/lib/aws-sdk-core/rds.rb,
aws-sdk-core/lib/aws-sdk-core/json.rb,
aws-sdk-core/lib/aws-sdk-core/pager.rb,
aws-sdk-core/lib/aws-sdk-core/polly.rb,
aws-sdk-core/lib/aws-sdk-core/client.rb,
aws-sdk-core/lib/aws-sdk-core/errors.rb,
aws-sdk-core/lib/aws-sdk-core/service.rb,
aws-sdk-core/lib/aws-sdk-core/version.rb,
aws-sdk-core/lib/aws-sdk-core/dynamodb.rb,
aws-sdk-core/lib/aws-sdk-core/checksums.rb,
aws-sdk-core/lib/aws-sdk-core/structure.rb,
aws-sdk-core/lib/aws-sdk-core/tree_hash.rb,
aws-sdk-core/lib/aws-sdk-core/cloudfront.rb,
aws-sdk-core/lib/aws-sdk-core/ini_parser.rb,
aws-sdk-core/lib/aws-sdk-core/partitions.rb,
aws-sdk-core/lib/aws-sdk-core/signers/s3.rb,
aws-sdk-core/lib/aws-sdk-core/signers/v2.rb,
aws-sdk-core/lib/aws-sdk-core/signers/v3.rb,
aws-sdk-core/lib/aws-sdk-core/signers/v4.rb,
aws-sdk-core/lib/aws-sdk-core/xml/parser.rb,
aws-sdk-core/lib/aws-sdk-core/api/builder.rb,
aws-sdk-core/lib/aws-sdk-core/credentials.rb,
aws-sdk-core/lib/aws-sdk-core/json/parser.rb,
aws-sdk-core/lib/aws-sdk-core/query/param.rb,
aws-sdk-core/lib/aws-sdk-core/xml/builder.rb,
aws-sdk-core/lib/aws-sdk-core/client_stubs.rb,
aws-sdk-core/lib/aws-sdk-core/deprecations.rb,
aws-sdk-core/lib/aws-sdk-core/eager_loader.rb,
aws-sdk-core/lib/aws-sdk-core/json/builder.rb,
aws-sdk-core/lib/aws-sdk-core/json/handler.rb,
aws-sdk-core/lib/aws-sdk-core/rest/handler.rb,
aws-sdk-core/lib/aws-sdk-core/s3/presigner.rb,
aws-sdk-core/lib/aws-sdk-core/signers/base.rb,
aws-sdk-core/lib/aws-sdk-core/type_builder.rb,
aws-sdk-core/lib/aws-sdk-core/api/shape_map.rb,
aws-sdk-core/lib/aws-sdk-core/log/formatter.rb,
aws-sdk-core/lib/aws-sdk-core/query/handler.rb,
aws-sdk-core/lib/aws-sdk-core/shared_config.rb,
aws-sdk-core/lib/aws-sdk-core/api/docs/utils.rb,
aws-sdk-core/lib/aws-sdk-core/client_waiters.rb,
aws-sdk-core/lib/aws-sdk-core/json/oj_engine.rb,
aws-sdk-core/lib/aws-sdk-core/waiters/errors.rb,
aws-sdk-core/lib/aws-sdk-core/waiters/poller.rb,
aws-sdk-core/lib/aws-sdk-core/waiters/waiter.rb,
aws-sdk-core/lib/aws-sdk-core/ecs_credentials.rb,
aws-sdk-core/lib/aws-sdk-core/empty_structure.rb,
aws-sdk-core/lib/aws-sdk-core/param_converter.rb,
aws-sdk-core/lib/aws-sdk-core/param_validator.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/logging.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/s3_md5s.rb,
aws-sdk-core/lib/aws-sdk-core/polly/presigner.rb,
aws-sdk-core/lib/aws-sdk-core/xml/default_map.rb,
aws-sdk-core/lib/aws-sdk-core/xml/doc_builder.rb,
aws-sdk-core/lib/aws-sdk-core/api/docs/builder.rb,
aws-sdk-core/lib/aws-sdk-core/json/json_engine.rb,
aws-sdk-core/lib/aws-sdk-core/log/param_filter.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/sqs_md5s.rb,
aws-sdk-core/lib/aws-sdk-core/query/param_list.rb,
aws-sdk-core/lib/aws-sdk-core/waiters/provider.rb,
aws-sdk-core/lib/aws-sdk-core/xml/default_list.rb,
aws-sdk-core/lib/aws-sdk-core/xml/parser/frame.rb,
aws-sdk-core/lib/aws-sdk-core/xml/parser/stack.rb,
aws-sdk-core/lib/aws-sdk-core/cloudfront/signer.rb,
aws-sdk-core/lib/aws-sdk-core/endpoint_provider.rb,
aws-sdk-core/lib/aws-sdk-core/pageable_response.rb,
aws-sdk-core/lib/aws-sdk-core/partitions/region.rb,
aws-sdk-core/lib/aws-sdk-core/rest/request/body.rb,
aws-sdk-core/lib/aws-sdk-core/xml/error_handler.rb,
aws-sdk-core/lib/aws-sdk-core/api/customizations.rb,
aws-sdk-core/lib/aws-sdk-core/api/docs/crosslink.rb,
aws-sdk-core/lib/aws-sdk-core/json/error_handler.rb,
aws-sdk-core/lib/aws-sdk-core/partitions/service.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/s3_host_id.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/s3_sse_cpk.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/user_agent.rb,
aws-sdk-core/lib/aws-sdk-core/rest/response/body.rb,
aws-sdk-core/lib/aws-sdk-core/shared_credentials.rb,
aws-sdk-core/lib/aws-sdk-core/stubbing/stub_data.rb,
aws-sdk-core/lib/aws-sdk-core/stubbing/xml_error.rb,
aws-sdk-core/lib/aws-sdk-core/credential_provider.rb,
aws-sdk-core/lib/aws-sdk-core/log/param_formatter.rb,
aws-sdk-core/lib/aws-sdk-core/query/param_builder.rb,
aws-sdk-core/lib/aws-sdk-core/stubbing/empty_stub.rb,
aws-sdk-core/lib/aws-sdk-core/partitions/partition.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/retry_errors.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/s3_dualstack.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/s3_redirects.rb,
aws-sdk-core/lib/aws-sdk-core/rest/request/builder.rb,
aws-sdk-core/lib/aws-sdk-core/rest/request/headers.rb,
aws-sdk-core/lib/aws-sdk-core/rest/response/parser.rb,
aws-sdk-core/lib/aws-sdk-core/cloudfront/url_signer.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/protocols/ec2.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/s3_accelerate.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/s3_bucket_dns.rb,
aws-sdk-core/lib/aws-sdk-core/rest/request/endpoint.rb,
aws-sdk-core/lib/aws-sdk-core/rest/response/headers.rb,
aws-sdk-core/lib/aws-sdk-core/waiters/null_provider.rb,
aws-sdk-core/lib/aws-sdk-core/xml/parser/engines/ox.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/request_signer.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/sqs_queue_urls.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/stub_responses.rb,
aws-sdk-core/lib/aws-sdk-core/refreshing_credentials.rb,
aws-sdk-core/lib/aws-sdk-core/s3/bucket_region_cache.rb,
aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/ec2.rb,
aws-sdk-core/lib/aws-sdk-core/xml/parser/engines/oga.rb,
aws-sdk-core/lib/aws-sdk-core/api/docs/shared_example.rb,
aws-sdk-core/lib/aws-sdk-core/assume_role_credentials.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/param_converter.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/param_validator.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/protocols/query.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/response_paging.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/route_53_id_fix.rb,
aws-sdk-core/lib/aws-sdk-core/query/ec2_param_builder.rb,
aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/json.rb,
aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/rest.rb,
aws-sdk-core/lib/aws-sdk-core/api/docs/param_formatter.rb,
aws-sdk-core/lib/aws-sdk-core/cloudfront/cookie_signer.rb,
aws-sdk-core/lib/aws-sdk-core/dynamodb/attribute_value.rb,
aws-sdk-core/lib/aws-sdk-core/rds/auth_token_generator.rb,
aws-sdk-core/lib/aws-sdk-core/stubbing/data_applicator.rb,
aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/query.rb,
aws-sdk-core/lib/aws-sdk-core/xml/parser/engines/rexml.rb,
aws-sdk-core/lib/aws-sdk-core/xml/parser/parsing_error.rb,
aws-sdk-core/lib/aws-sdk-core/credential_provider_chain.rb,
aws-sdk-core/lib/aws-sdk-core/partitions/partition_list.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/glacier_checksums.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/idempotency_token.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/regional_endpoint.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/s3_request_signer.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/swf_read_timeouts.rb,
aws-sdk-core/lib/aws-sdk-core/rest/response/status_code.rb,
aws-sdk-core/lib/aws-sdk-core/xml/parser/engines/libxml.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/api_gateway_header.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/csd_switch_to_post.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/glacier_account_id.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/protocols/json_rpc.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/protocols/rest_xml.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/s3_http_200_errors.rb,
aws-sdk-core/lib/aws-sdk-core/api/docs/docstring_provider.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/glacier_api_version.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/jsonvalue_converter.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/protocols/rest_json.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/s3_url_encoded_keys.rb,
aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb,
aws-sdk-core/lib/aws-sdk-core/xml/parser/engines/nokogiri.rb,
aws-sdk-core/lib/aws-sdk-core/instance_profile_credentials.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/global_configuration.rb,
aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/rest_json.rb,
aws-sdk-core/lib/aws-sdk-core/api/docs/operation_documenter.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/ec2_region_validation.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/helpful_socket_errors.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/s3_expect_100_continue.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/s3_location_constraint.rb,
aws-sdk-core/lib/aws-sdk-core/api/docs/client_type_documenter.rb,
aws-sdk-core/lib/aws-sdk-core/api/docs/request_syntax_example.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/csd_conditional_signing.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/rds_cross_region_copying.rb,
aws-sdk-core/lib/aws-sdk-core/rest/request/querystring_builder.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/dynamodb_crc32_validation.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/dynamodb_extended_retries.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/dynamodb_simple_attributes.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb,
aws-sdk-core/lib/aws-sdk-core/api/docs/response_structure_example.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/ec2_copy_encrypted_snapshot.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/s3_bucket_name_restrictions.rb,
aws-sdk-core/lib/aws-sdk-core/plugins/machine_learning_predict_endpoint.rb,
aws-sdk-resources/lib/aws-sdk-resources.rb,
aws-sdk-resources/lib/aws-sdk-resources/batch.rb,
aws-sdk-resources/lib/aws-sdk-resources/errors.rb,
aws-sdk-resources/lib/aws-sdk-resources/source.rb,
aws-sdk-resources/lib/aws-sdk-resources/builder.rb,
aws-sdk-resources/lib/aws-sdk-resources/options.rb,
aws-sdk-resources/lib/aws-sdk-resources/request.rb,
aws-sdk-resources/lib/aws-sdk-resources/resource.rb,
aws-sdk-resources/lib/aws-sdk-resources/collection.rb,
aws-sdk-resources/lib/aws-sdk-resources/definition.rb,
aws-sdk-resources/lib/aws-sdk-resources/documenter.rb,
aws-sdk-resources/lib/aws-sdk-resources/operations.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/ec2.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/iam.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/sns.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/sqs.rb,
aws-sdk-resources/lib/aws-sdk-resources/request_params.rb,
aws-sdk-resources/lib/aws-sdk-resources/builder_sources.rb,
aws-sdk-resources/lib/aws-sdk-resources/operation_methods.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/bucket.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/object.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/ec2/instance.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/file_part.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/file_uploader.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/object_copier.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/sqs/queue_poller.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/object_summary.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/file_downloader.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/utils.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/multipart_upload.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/client.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/errors.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/sns/message_verifier.rb,
aws-sdk-resources/lib/aws-sdk-resources/documenter/operation_documenter.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/materials.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/multipart_upload_error.rb,
aws-sdk-resources/lib/aws-sdk-resources/documenter/has_operation_documenter.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/io_encrypter.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/key_provider.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/multipart_file_uploader.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/object_multipart_copier.rb,
aws-sdk-resources/lib/aws-sdk-resources/documenter/base_operation_documenter.rb,
aws-sdk-resources/lib/aws-sdk-resources/documenter/data_operation_documenter.rb,
aws-sdk-resources/lib/aws-sdk-resources/documenter/waiter_operation_documenter.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/decrypt_handler.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/encrypt_handler.rb,
aws-sdk-resources/lib/aws-sdk-resources/documenter/has_many_operation_documenter.rb,
aws-sdk-resources/lib/aws-sdk-resources/documenter/resource_operation_documenter.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/io_auth_decrypter.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/kms_cipher_provider.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/default_key_provider.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/default_cipher_provider.rb

Defined Under Namespace

Modules: ACM, ACMPCA, APIGateway, AlexaForBusiness, AppStream, AppSync, ApplicationAutoScaling, ApplicationDiscoveryService, Athena, AutoScaling, AutoScalingPlans, Batch, Budgets, ClientStubs, ClientWaiters, Cloud9, CloudDirectory, CloudFormation, CloudFront, CloudHSM, CloudHSMV2, CloudSearch, CloudSearchDomain, CloudTrail, CloudWatch, CloudWatchEvents, CloudWatchLogs, CodeBuild, CodeCommit, CodeDeploy, CodePipeline, CodeStar, CognitoIdentity, CognitoIdentityProvider, CognitoSync, Comprehend, ConfigService, Connect, CostExplorer, CostandUsageReportService, CredentialProvider, DAX, DataPipeline, DatabaseMigrationService, DeviceFarm, DirectConnect, DirectoryService, DynamoDB, DynamoDBStreams, EC2, ECR, ECS, EFS, EMR, ElastiCache, ElasticBeanstalk, ElasticLoadBalancing, ElasticLoadBalancingV2, ElasticTranscoder, ElasticsearchService, Errors, FMS, Firehose, GameLift, Glacier, Glue, Greengrass, GuardDuty, Health, IAM, ImportExport, Inspector, IoT, IoTDataPlane, IoTJobsDataPlane, KMS, Kinesis, KinesisAnalytics, KinesisVideo, KinesisVideoArchivedMedia, KinesisVideoMedia, Lambda, LambdaPreview, Lex, LexModelBuildingService, Lightsail, Log, MQ, MTurk, MachineLearning, MarketplaceCommerceAnalytics, MarketplaceEntitlementService, MarketplaceMetering, MediaConvert, MediaLive, MediaPackage, MediaStore, MediaStoreData, MigrationHub, Mobile, OpsWorks, OpsWorksCM, Organizations, PageableResponse, Partitions, Pinpoint, Plugins, Polly, Pricing, RDS, Redshift, Rekognition, ResourceGroups, ResourceGroupsTaggingAPI, Resources, Route53, Route53Domains, S3, SES, SMS, SNS, SQS, SSM, STS, SWF, SageMaker, SageMakerRuntime, SecretsManager, ServerlessApplicationRepository, Service, ServiceCatalog, ServiceDiscovery, Shield, SimpleDB, Snowball, States, StorageGateway, Support, TranscribeService, Translate, WAF, WAFRegional, Waiters, WorkDocs, WorkMail, WorkSpaces, XRay Classes: AssumeRoleCredentials, Client, Credentials, ECSCredentials, IniParser, InstanceProfileCredentials, SharedCredentials, TreeHash

Constant Summary

VERSION =
'2.11.35'
EmptyStructure =
Class.new(Structure.new('AwsEmptyStructure'))

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.



364
365
366
# File 'aws-sdk-core/lib/aws-sdk-core.rb', line 364

def config
  @config
end

Class Method Details

.add_service(svc_name, options = {}) ⇒ Module<Service>

Registers a new service.

Aws.add_service('SvcName',
  api: '/path/to/svc.api.json',
  paginators: '/path/to/svc.paginators.json',
  waiters: '/path/to/svc.waiters.json',
  resources: '/path/to/svc.resources.json')

Aws::SvcName::Client.new
#=> #<Aws::SvcName::Client>

Parameters:

  • svc_name (String)

    The name of the service. This will also be the namespace under Aws. This must be a valid constant name.

  • options[String,Pathname,Hash,Seahorse::Model::Api,nil] (Hash)

    a customizable set of options

  • options[String,Pathname,Hash,nil] (Hash)

    a customizable set of options

  • options[String,Pathname,Hash,Waiters::Provider,nil] (Hash)

    a customizable set of options

  • options[String,Pathname,Hash,Resources::Definition,nil] (Hash)

    a customizable set of options

Returns:

  • (Module<Service>)

    Returns the new service module.



534
535
536
537
538
539
540
541
542
# File 'aws-sdk-core/lib/aws-sdk-core.rb', line 534

def add_service(svc_name, options = {})
  svc_module = Module.new { extend Service }
  const_set(svc_name, svc_module)
  @services[svc_name] = [svc_module, options]
  @service_added_callbacks.each do |callback|
    callback.call(svc_name.to_s, *@services[svc_name])
  end
  svc_module
end

.eager_autoload!(options = {}) ⇒ void

This method returns an undefined value.

Loads modules that are normally loaded with Ruby's autoload. This can avoid thread-safety issues that some Ruby versions have with autoload.

# loads ALL services
Aws.eager_autoload!

Loading all services can be slow. You can specify what services you want to load with the :services option. All services not named will continue to autoload as normal.

Aws.eager_autoload!(services: %w(S3 EC2))


481
482
483
484
485
486
487
488
489
# File 'aws-sdk-core/lib/aws-sdk-core.rb', line 481

def eager_autoload!(options = {})
  eager_loader = EagerLoader.new
  eager_loader.load(JMESPath)
  eager_loader.load(Seahorse)
  sub_modules(options).each do |module_or_class|
    eager_loader.load(module_or_class)
  end
  eager_loader
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)


461
462
463
464
465
# File 'aws-sdk-core/lib/aws-sdk-core.rb', line 461

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

.partition(partition_name) ⇒ Partitions::Partition

Return the partition with the given name. A partition describes the services and regions available in that partition.

aws = Aws.partition('aws')

puts "Regions available in the aws partition:\n"
aws.regions.each do |region|
  puts region.name
end

puts "Services available in the aws partition:\n"
aws.services.each do |services|
  puts services.name
end

See Partitions for more information and examples.

Parameters:

  • partition_name (String)

    The name of the partition to return. Valid names include "aws", "aws-cn", and "aws-us-gov".

Returns:

Raises:

  • (ArgumentError)

    Raises an ArgumentError if a partition is not found with the given name. The error message contains a list of valid partition names.



400
401
402
# File 'aws-sdk-core/lib/aws-sdk-core.rb', line 400

def partition(partition_name)
  Partitions.default_list.partition(partition_name)
end

.partitionsArray<Partitions::Partition>

Return an array of partitions. A partition describes the services and regions available in that partition.

Aws.partitions.each do |partition|

  puts "Regions available in #{partition.name}:\n"
  partition.regions.each do |region|
    puts region.name
  end

  puts "Services available in #{partition.name}:\n"
  partition.services.each do |service|
    puts service.name
  end
end

See Partitions for more information and examples.

Returns:



424
425
426
# File 'aws-sdk-core/lib/aws-sdk-core.rb', line 424

def partitions
  Partitions.default_list.partitions
end

.sub_modules(options = {}) ⇒ Object



491
492
493
494
495
496
497
498
499
500
501
502
# File 'aws-sdk-core/lib/aws-sdk-core.rb', line 491

def sub_modules(options = {})
  constants = Aws.constants.map(&:to_s)
  if options[:services]
    constants -= SERVICE_MODULE_NAMES
    constants += options[:services] || SERVICE_MODULE_NAMES
  end
  constants.inject([]) do |modules, const_name|
    constant = Aws.const_get(const_name)
    modules << constant if Module === constant
    modules
  end
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.



439
440
441
442
443
444
445
446
447
# File 'aws-sdk-core/lib/aws-sdk-core.rb', line 439

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