├── VERSION ├── .coveralls.yml ├── aws-sdk-resources ├── features │ ├── step_definitions.rb │ ├── s3 │ │ ├── presigned_post.feature │ │ ├── object.feature │ │ └── client_side_encryption.feature │ └── sqs │ │ └── queue_poller.feature ├── spec │ ├── fixtures │ │ ├── definitions │ │ │ └── empty.json │ │ └── validator │ │ │ ├── load_params_can_be_nested │ │ │ ├── errors.json │ │ │ ├── definition.json │ │ │ └── api.json │ │ │ ├── load_path_accepts_dollar_signs │ │ │ ├── errors.json │ │ │ ├── api.json │ │ │ └── definition.json │ │ │ ├── load_path_accepts_nested_paths │ │ │ ├── errors.json │ │ │ ├── definition.json │ │ │ └── api.json │ │ │ ├── identifiers_must_have_unique_names │ │ │ ├── api.json │ │ │ ├── definition.json │ │ │ └── errors.json │ │ │ ├── shape_must_be_defined_in_the_api │ │ │ ├── api.json │ │ │ ├── errors.json │ │ │ └── definition.json │ │ │ ├── identifiers_may_not_be_prefixed_by_their_resource_name │ │ │ ├── api.json │ │ │ ├── errors.json │ │ │ └── definition.json │ │ │ ├── shape_must_be_a_structure │ │ │ ├── api.json │ │ │ ├── errors.json │ │ │ └── definition.json │ │ │ ├── load_requires_shape_to_be_a_structure │ │ │ ├── errors.json │ │ │ ├── definition.json │ │ │ └── api.json │ │ │ ├── load_path_must_resolve_to_shape │ │ │ ├── errors.json │ │ │ ├── definition.json │ │ │ └── api.json │ │ │ ├── load_requires_shape_to_be_set │ │ │ ├── errors.json │ │ │ ├── definition.json │ │ │ └── api.json │ │ │ ├── resource_paths_resolve_to_appropriate_shape │ │ │ ├── errors.json │ │ │ ├── api.json │ │ │ └── definition.json │ │ │ ├── load_operation_must_exist │ │ │ ├── errors.json │ │ │ ├── api.json │ │ │ └── definition.json │ │ │ ├── load_operation_must_accept_input_if_params_given │ │ │ ├── errors.json │ │ │ ├── api.json │ │ │ └── definition.json │ │ │ ├── load_params_must_not_be_dataMembers │ │ │ ├── errors.json │ │ │ ├── definition.json │ │ │ └── api.json │ │ │ ├── identifiers_with_memberName_require_the_resource_to_have_a_shape │ │ │ ├── errors.json │ │ │ ├── definition.json │ │ │ └── api.json │ │ │ ├── load_params_must_resolve │ │ │ ├── errors.json │ │ │ ├── api.json │ │ │ └── definition.json │ │ │ └── identifiers_with_memberName_require_the_resource_shape_to_have_that_member │ │ │ ├── errors.json │ │ │ ├── api.json │ │ │ └── definition.json │ ├── services │ │ ├── s3 │ │ │ ├── object_spec.rb │ │ │ ├── bucket_spec.rb │ │ │ └── bucket │ │ │ │ └── waiters_spec.rb │ │ └── iam │ │ │ └── delete_account_alias_spec.rb │ └── errors_spec.rb ├── lib │ └── aws-sdk-resources │ │ ├── services │ │ ├── ec2.rb │ │ ├── sqs.rb │ │ ├── sns.rb │ │ ├── s3 │ │ │ ├── encryption │ │ │ │ ├── errors.rb │ │ │ │ ├── io_decrypter.rb │ │ │ │ └── key_provider.rb │ │ │ ├── multipart_upload_error.rb │ │ │ ├── object_summary.rb │ │ │ └── encryption.rb │ │ ├── iam.rb │ │ ├── ec2 │ │ │ └── instance.rb │ │ └── s3.rb │ │ ├── errors.rb │ │ ├── options.rb │ │ └── source.rb └── aws-sdk-resources.gemspec ├── doc-src ├── services │ ├── CloudSearchDomain │ │ ├── service.md │ │ └── client.md │ └── default │ │ └── service.md ├── images │ ├── node.png │ ├── vline.png │ └── lastnode.png ├── templates │ └── default │ │ ├── layout │ │ └── html │ │ │ ├── setup.rb │ │ │ └── layout.erb │ │ └── fulldoc │ │ └── html │ │ └── js │ │ └── tabs.js └── plugins │ └── apis.rb ├── aws-sdk ├── lib │ └── aws-sdk.rb └── aws-sdk.gemspec ├── aws-sdk-core ├── spec │ ├── fixtures │ │ ├── waiters │ │ │ └── waiters.json │ │ ├── schema │ │ │ └── validates_using_the_schema │ │ │ │ ├── api.json │ │ │ │ ├── definition.json │ │ │ │ └── errors.json │ │ ├── plugin.rb │ │ ├── services │ │ │ ├── S3 │ │ │ │ ├── md5_checksum_enabled.yml │ │ │ │ ├── get_bucket_policy.yml │ │ │ │ ├── 412_response_head.yml │ │ │ │ ├── create_bucket_without_location_constraint.yml │ │ │ │ ├── md5_checksum_disabled.yml │ │ │ │ ├── head_bucket_with_dns_incompatible_name.yml │ │ │ │ ├── 404_response.yml │ │ │ │ ├── 304_response.yml │ │ │ │ ├── 400_response.yml │ │ │ │ ├── 403_response.yml │ │ │ │ ├── content_type_header.yml │ │ │ │ ├── get_bucket_location_classic.yml │ │ │ │ ├── get_bucket_location.yml │ │ │ │ ├── error_parsing.yml │ │ │ │ ├── create_bucket_with_implied_location_constraint.yml │ │ │ │ ├── comlete_multipart_upload_error.yml │ │ │ │ └── create_bucket_with_location_constraint.yml │ │ │ ├── Glacier │ │ │ │ ├── custom_account_id.yml │ │ │ │ ├── default_account_id.yml │ │ │ │ ├── error_parsing.yml │ │ │ │ ├── account_id_param.yml │ │ │ │ ├── get_job_output.yml │ │ │ │ └── list_vaults.yml │ │ │ ├── CloudFront │ │ │ │ └── max_items.yml │ │ │ ├── DynamoDB │ │ │ │ └── error_parsing.yml │ │ │ ├── SWF │ │ │ │ └── list_domains.yml │ │ │ └── Route53 │ │ │ │ └── change_resource_record_sets.yml │ │ └── credentials │ │ │ └── mock_shared_credentials │ ├── seahorse │ │ └── client │ │ │ ├── net_http │ │ │ └── connection_pool_spec.rb │ │ │ └── plugins │ │ │ └── content_length_spec.rb │ └── aws │ │ ├── lambdapreview │ │ └── client_spec.rb │ │ ├── paging │ │ └── null_provider_spec.rb │ │ ├── ec2 │ │ └── client_spec.rb │ │ ├── cloud_front │ │ └── client_spec.rb │ │ ├── machinelearning │ │ └── client_spec.rb │ │ └── lambda │ │ └── client_spec.rb ├── lib │ ├── aws-sdk-core │ │ ├── version.rb │ │ ├── service.rb │ │ ├── ecs.rb │ │ ├── ssm.rb │ │ ├── sts.rb │ │ ├── cloudhsm.rb │ │ ├── xml │ │ │ ├── default_list.rb │ │ │ ├── parser │ │ │ │ ├── engines │ │ │ │ │ ├── ox.rb │ │ │ │ │ ├── libxml.rb │ │ │ │ │ ├── nokogiri.rb │ │ │ │ │ └── rexml.rb │ │ │ │ └── parsing_error.rb │ │ │ └── rest_handler.rb │ │ ├── cognitosync.rb │ │ ├── cognitoidentity.rb │ │ ├── cloudsearchdomain.rb │ │ ├── kms.rb │ │ ├── sqs.rb │ │ ├── swf.rb │ │ ├── simpledb.rb │ │ ├── lambda.rb │ │ ├── route53.rb │ │ ├── support.rb │ │ ├── waiters │ │ │ ├── null_provider.rb │ │ │ └── provider.rb │ │ ├── cloudwatchlogs.rb │ │ ├── configservice.rb │ │ ├── lambdapreview.rb │ │ ├── cloudtrail.rb │ │ ├── cloudwatch.rb │ │ ├── codedeploy.rb │ │ ├── workspaces.rb │ │ ├── autoscaling.rb │ │ ├── cloudsearch.rb │ │ ├── datapipeline.rb │ │ ├── importexport.rb │ │ ├── directconnect.rb │ │ ├── route53domains.rb │ │ ├── storagegateway.rb │ │ ├── machinelearning.rb │ │ ├── elasticbeanstalk.rb │ │ ├── iam.rb │ │ ├── paging │ │ │ ├── null_provider.rb │ │ │ ├── null_pager.rb │ │ │ └── provider.rb │ │ ├── sns.rb │ │ ├── plugins │ │ │ ├── protocols │ │ │ │ ├── query.rb │ │ │ │ ├── rest_xml.rb │ │ │ │ ├── rest_json.rb │ │ │ │ └── ec2.rb │ │ │ ├── glacier_account_id.rb │ │ │ ├── glacier_api_version.rb │ │ │ ├── machine_learning_predict_endpoint.rb │ │ │ ├── swf_read_timeouts.rb │ │ │ ├── response_paging.rb │ │ │ ├── s3_get_bucket_location_fix.rb │ │ │ ├── s3_expect_100_continue.rb │ │ │ ├── dynamodb_extended_retries.rb │ │ │ ├── user_agent.rb │ │ │ ├── sqs_queue_urls.rb │ │ │ └── s3_location_constraint.rb │ │ ├── ses.rb │ │ ├── kinesis.rb │ │ ├── redshift.rb │ │ ├── cloudfront.rb │ │ ├── elasticache.rb │ │ ├── emr.rb │ │ ├── ec2.rb │ │ ├── rds.rb │ │ ├── signers │ │ │ ├── handler.rb │ │ │ ├── base.rb │ │ │ └── v3.rb │ │ ├── elastictranscoder.rb │ │ ├── glacier.rb │ │ ├── elasticloadbalancing.rb │ │ ├── opsworks.rb │ │ ├── cloudformation.rb │ │ ├── dynamodb.rb │ │ ├── json │ │ │ ├── rest_handler.rb │ │ │ ├── rpc_headers_handler.rb │ │ │ └── simple_body_handler.rb │ │ ├── client_paging.rb │ │ ├── s3.rb │ │ ├── endpoint_provider.rb │ │ └── query │ │ │ └── param.rb │ └── seahorse │ │ ├── version.rb │ │ └── client │ │ ├── managed_file.rb │ │ ├── networking_error.rb │ │ ├── events.rb │ │ ├── plugins │ │ ├── content_length.rb │ │ ├── param_validation.rb │ │ ├── raise_response_errors.rb │ │ ├── param_conversion.rb │ │ ├── json_simple.rb │ │ └── net_http.rb │ │ ├── handler.rb │ │ ├── block_io.rb │ │ └── logging │ │ └── handler.rb ├── features │ ├── s3 │ │ └── test.png │ ├── ec2 │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── emr │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── iam │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── kms │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── rds │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── ses │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── sns │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── ssm │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── sts │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── swf │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── lambda │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── kinesis │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── route53 │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── cloudhsm │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── opsworks │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── redshift │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── simpledb │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── autoscaling │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── cloudsearch │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── cloudtrail │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── cloudwatch │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── codedeploy │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── cognitosync │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── elasticache │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── workspaces │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── datapipeline │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── importexport │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── configservice │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── directconnect │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── cloudformation │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── cloudwatchlogs │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── route53_domains │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── storagegateway │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── cognitoidentity │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── elasticbeanstalk │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── machinelearning │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── elastictranscoder │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── elasticloadbalancing │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── dynamodb │ │ ├── step_definitions.rb │ │ └── client.feature │ ├── glacier │ │ ├── client.feature │ │ └── upload.feature │ ├── env.rb │ ├── sqs │ │ ├── step_definitions.rb │ │ └── client.feature │ └── cloudfront │ │ └── client.feature ├── apis │ ├── sqs │ │ └── 2012-11-05 │ │ │ └── paginators-1.json │ ├── cloudtrail │ │ └── 2013-11-01 │ │ │ └── paginators-1.json │ ├── config │ │ ├── 2014-10-17 │ │ │ └── paginators-1.json │ │ └── 2014-11-12 │ │ │ └── paginators-1.json │ ├── importexport │ │ └── 2010-06-01 │ │ │ └── paginators-1.json │ ├── email │ │ └── 2010-12-01 │ │ │ ├── paginators-1.json │ │ │ └── waiters-2.json │ ├── sdb │ │ └── 2009-04-15 │ │ │ └── paginators-1.json │ ├── kinesis │ │ └── 2013-12-02 │ │ │ ├── waiters-2.json │ │ │ └── paginators-1.json │ ├── lambda │ │ ├── 2014-11-11 │ │ │ └── paginators-1.json │ │ └── 2015-03-31 │ │ │ └── paginators-1.json │ ├── route53domains │ │ └── 2014-05-15 │ │ │ └── paginators-1.json │ ├── cloudsearch │ │ └── 2013-01-01 │ │ │ └── paginators-1.json │ ├── elasticloadbalancing │ │ └── 2012-06-01 │ │ │ ├── paginators-1.json │ │ │ └── waiters-2.json │ ├── workspaces │ │ └── 2015-04-08 │ │ │ └── paginators-1.json │ ├── directconnect │ │ └── 2012-10-25 │ │ │ └── paginators-1.json │ ├── elastictranscoder │ │ └── 2012-09-25 │ │ │ ├── paginators-1.json │ │ │ └── waiters-2.json │ ├── monitoring │ │ └── 2010-08-01 │ │ │ └── paginators-1.json │ ├── elasticbeanstalk │ │ └── 2010-12-01 │ │ │ └── paginators-1.json │ ├── support │ │ └── 2013-04-15 │ │ │ └── paginators-1.json │ ├── dynamodb │ │ └── 2012-08-10 │ │ │ ├── paginators-1.json │ │ │ └── waiters-2.json │ ├── glacier │ │ └── 2012-06-01 │ │ │ ├── paginators-1.json │ │ │ └── waiters-2.json │ ├── datapipeline │ │ └── 2012-10-29 │ │ │ └── paginators-1.json │ ├── cloudformation │ │ └── 2010-05-15 │ │ │ └── paginators-1.json │ ├── logs │ │ └── 2014-03-28 │ │ │ └── paginators-1.json │ ├── machinelearning │ │ └── 2014-12-12 │ │ │ └── paginators-1.json │ ├── sns │ │ └── 2010-03-31 │ │ │ └── paginators-1.json │ ├── elasticmapreduce │ │ └── 2009-03-31 │ │ │ └── paginators-1.json │ ├── kms │ │ └── 2014-11-01 │ │ │ └── paginators-1.json │ ├── route53 │ │ └── 2013-04-01 │ │ │ └── paginators-1.json │ └── codedeploy │ │ └── 2014-10-06 │ │ └── paginators-1.json ├── tasks │ └── test.rake └── aws-sdk-core.gemspec ├── integration-test-config.json.sample ├── developer_guide └── content │ ├── configuration.md │ ├── sections │ ├── overview.md │ └── quick-start.md │ ├── fonts │ ├── glyphicons-halflings-regular-eot.eot │ ├── glyphicons-halflings-regular-ttf.ttf │ └── glyphicons-halflings-regular-woff.woff │ ├── css │ └── main.css │ └── index.md ├── .gitignore ├── .yardopts ├── tasks ├── gems.rake ├── guide.rake ├── git.rake └── github.rake ├── .travis.yml ├── LICENSE.txt ├── .simplecov ├── Rakefile └── Gemfile /VERSION: -------------------------------------------------------------------------------- 1 | 2.0.39 2 | -------------------------------------------------------------------------------- /.coveralls.yml: -------------------------------------------------------------------------------- 1 | service_name: travis-ci 2 | -------------------------------------------------------------------------------- /aws-sdk-resources/features/step_definitions.rb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /doc-src/services/CloudSearchDomain/service.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /aws-sdk/lib/aws-sdk.rb: -------------------------------------------------------------------------------- 1 | require 'aws-sdk-resources' 2 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/definitions/empty.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/waiters/waiters.json: -------------------------------------------------------------------------------- 1 | { 2 | "waiters":{} 3 | } -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/schema/validates_using_the_schema/api.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /integration-test-config.json.sample: -------------------------------------------------------------------------------- 1 | { 2 | "region": "us-west-2" 3 | } 4 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/version.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | VERSION = '2.0.39' 3 | end 4 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/seahorse/version.rb: -------------------------------------------------------------------------------- 1 | module Seahorse 2 | VERSION = '0.1.0' 3 | end 4 | -------------------------------------------------------------------------------- /developer_guide/content/configuration.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Configuration 3 | --- 4 | 5 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_params_can_be_nested/errors.json: -------------------------------------------------------------------------------- 1 | [ 2 | ] 3 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/service.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Service 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/schema/validates_using_the_schema/definition.json: -------------------------------------------------------------------------------- 1 | { "foo": "bar" } 2 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_path_accepts_dollar_signs/errors.json: -------------------------------------------------------------------------------- 1 | [ 2 | ] 3 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_path_accepts_nested_paths/errors.json: -------------------------------------------------------------------------------- 1 | [ 2 | ] 3 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/plugin.rb: -------------------------------------------------------------------------------- 1 | module SeahorseFixtures 2 | class Plugin 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /doc-src/images/node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sferik/aws-sdk-ruby/master/doc-src/images/node.png -------------------------------------------------------------------------------- /doc-src/images/vline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sferik/aws-sdk-ruby/master/doc-src/images/vline.png -------------------------------------------------------------------------------- /developer_guide/content/sections/overview.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Overview 3 | --- 4 | 5 | The AWS SDK for Ruby. 6 | -------------------------------------------------------------------------------- /doc-src/images/lastnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sferik/aws-sdk-ruby/master/doc-src/images/lastnode.png -------------------------------------------------------------------------------- /doc-src/templates/default/layout/html/setup.rb: -------------------------------------------------------------------------------- 1 | def javascripts 2 | (super + %w(js/tabs.js)).uniq 3 | end 4 | -------------------------------------------------------------------------------- /aws-sdk-core/features/s3/test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sferik/aws-sdk-ruby/master/aws-sdk-core/features/s3/test.png -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/identifiers_must_have_unique_names/api.json: -------------------------------------------------------------------------------- 1 | { 2 | "shapes": { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/shape_must_be_defined_in_the_api/api.json: -------------------------------------------------------------------------------- 1 | { 2 | "shapes": { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/identifiers_may_not_be_prefixed_by_their_resource_name/api.json: -------------------------------------------------------------------------------- 1 | { 2 | "shapes": { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /aws-sdk-core/features/ec2/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@ec2") do 2 | @client = Aws::EC2::Client.new 3 | end 4 | 5 | After("@ec2") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/emr/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@emr") do 2 | @client = Aws::EMR::Client.new 3 | end 4 | 5 | After("@emr") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/iam/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@iam") do 2 | @client = Aws::IAM::Client.new 3 | end 4 | 5 | After("@iam") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/kms/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@kms") do 2 | @client = Aws::KMS::Client.new 3 | end 4 | 5 | After("@kms") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/rds/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@rds") do 2 | @client = Aws::RDS::Client.new 3 | end 4 | 5 | After("@rds") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/ses/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@ses") do 2 | @client = Aws::SES::Client.new 3 | end 4 | 5 | After("@ses") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/sns/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@sns") do 2 | @client = Aws::SNS::Client.new 3 | end 4 | 5 | After("@sns") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/ssm/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@ssm") do 2 | @client = Aws::SSM::Client.new 3 | end 4 | 5 | After("@ssm") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/sts/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@sts") do 2 | @client = Aws::STS::Client.new 3 | end 4 | 5 | After("@sts") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/swf/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@swf") do 2 | @client = Aws::SWF::Client.new 3 | end 4 | 5 | After("@swf") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/lambda/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@lambda") do 2 | @client = Aws::Lambda::Client.new 3 | end 4 | 5 | After("@lambda") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/shape_must_be_a_structure/api.json: -------------------------------------------------------------------------------- 1 | { 2 | "shapes": { 3 | "ShapeName": { "type": "string" } 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/shape_must_be_a_structure/errors.json: -------------------------------------------------------------------------------- 1 | [ 2 | "#/resources/ResourceName/shape must resolve to a structure" 3 | ] 4 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/sqs/2012-11-05/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListQueues": { 4 | "result_key": "QueueUrls" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /aws-sdk-core/features/kinesis/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@kinesis") do 2 | @client = Aws::Kinesis::Client.new 3 | end 4 | 5 | After("@kinesis") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/route53/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@route53") do 2 | @client = Aws::Route53::Client.new 3 | end 4 | 5 | After("@route53") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/cloudhsm/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@cloudhsm") do 2 | @client = Aws::CloudHSM::Client.new 3 | end 4 | 5 | After("@cloudhsm") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/opsworks/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@opsworks") do 2 | @client = Aws::OpsWorks::Client.new 3 | end 4 | 5 | After("@opsworks") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/redshift/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@redshift") do 2 | @client = Aws::Redshift::Client.new 3 | end 4 | 5 | After("@redshift") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/simpledb/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@simpledb") do 2 | @client = Aws::SimpleDB::Client.new 3 | end 4 | 5 | After("@simpledb") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/cloudtrail/2013-11-01/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeTrails": { 4 | "result_key": "trailList" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /aws-sdk-resources/lib/aws-sdk-resources/services/ec2.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module EC2 3 | 4 | require 'aws-sdk-resources/services/ec2/instance' 5 | 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_requires_shape_to_be_a_structure/errors.json: -------------------------------------------------------------------------------- 1 | [ 2 | "#/resources/ResourceName/shape must resolve to a structure" 3 | ] 4 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/shape_must_be_defined_in_the_api/errors.json: -------------------------------------------------------------------------------- 1 | [ 2 | "#/resources/ResourceName/shape not found at api#/shapes/ShapeName" 3 | ] 4 | -------------------------------------------------------------------------------- /aws-sdk-core/features/autoscaling/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@autoscaling") do 2 | @client = Aws::AutoScaling::Client.new 3 | end 4 | 5 | After("@autoscaling") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/cloudsearch/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@cloudsearch") do 2 | @client = Aws::CloudSearch::Client.new 3 | end 4 | 5 | After("@cloudsearch") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/cloudtrail/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@cloudtrail") do 2 | @client = Aws::CloudTrail::Client.new 3 | end 4 | 5 | After("@cloudtrail") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/cloudwatch/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@cloudwatch") do 2 | @client = Aws::CloudWatch::Client.new 3 | end 4 | 5 | After("@cloudwatch") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/codedeploy/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@codedeploy") do 2 | @client = Aws::CodeDeploy::Client.new 3 | end 4 | 5 | After("@codedeploy") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/cognitosync/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@cognitosync") do 2 | @client = Aws::CognitoSync::Client.new 3 | end 4 | 5 | After("@cognitosync") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/elasticache/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@elasticache") do 2 | @client = Aws::ElastiCache::Client.new 3 | end 4 | 5 | After("@elasticache") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/workspaces/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@workspaces") do 2 | @client = Aws::WorkSpaces::Client.new 3 | end 4 | 5 | After("@workspaces") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/datapipeline/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@datapipeline") do 2 | @client = Aws::DataPipeline::Client.new 3 | end 4 | 5 | After("@datapipeline") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/importexport/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@importexport") do 2 | @client = Aws::ImportExport::Client.new 3 | end 4 | 5 | After("@importexport") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_path_must_resolve_to_shape/errors.json: -------------------------------------------------------------------------------- 1 | [ 2 | "#/resources/ResourceName/load/path must resolve to a 'ResourceShape' shape" 3 | ] 4 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_requires_shape_to_be_set/errors.json: -------------------------------------------------------------------------------- 1 | [ 2 | "#/resources/ResourceName/load requires #/resources/ResourceName/shape to be set" 3 | ] 4 | -------------------------------------------------------------------------------- /aws-sdk-core/features/configservice/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@configservice") do 2 | @client = Aws::ConfigService::Client.new 3 | end 4 | 5 | After("@configservice") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/directconnect/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@directconnect") do 2 | @client = Aws::DirectConnect::Client.new 3 | end 4 | 5 | After("@directconnect") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/ecs.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:ECS, { 2 | api: "#{Aws::API_DIR}/ecs/2014-11-13/api-2.json", 3 | docs: "#{Aws::API_DIR}/ecs/2014-11-13/docs-2.json", 4 | }) 5 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/ssm.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:SSM, { 2 | api: "#{Aws::API_DIR}/ssm/2014-11-06/api-2.json", 3 | docs: "#{Aws::API_DIR}/ssm/2014-11-06/docs-2.json", 4 | }) 5 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/sts.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:STS, { 2 | api: "#{Aws::API_DIR}/sts/2011-06-15/api-2.json", 3 | docs: "#{Aws::API_DIR}/sts/2011-06-15/docs-2.json", 4 | }) 5 | -------------------------------------------------------------------------------- /aws-sdk-core/features/cloudformation/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@cloudformation") do 2 | @client = Aws::CloudFormation::Client.new 3 | end 4 | 5 | After("@cloudformation") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/cloudwatchlogs/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@cloudwatchlogs") do 2 | @client = Aws::CloudWatchLogs::Client.new 3 | end 4 | 5 | After("@cloudwatchlogs") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/route53_domains/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@route53_domains") do 2 | @client = Aws::Route53Domains::Client.new 3 | end 4 | 5 | After("@route53_domains") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/storagegateway/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@storagegateway") do 2 | @client = Aws::StorageGateway::Client.new 3 | end 4 | 5 | After("@storagegateway") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-resources/lib/aws-sdk-resources/services/sqs.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module SQS 3 | 4 | autoload :QueuePoller, 'aws-sdk-resources/services/sqs/queue_poller' 5 | 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/shape_must_be_a_structure/definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources": { 3 | "ResourceName": { 4 | "shape": "ShapeName" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /developer_guide/content/fonts/glyphicons-halflings-regular-eot.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sferik/aws-sdk-ruby/master/developer_guide/content/fonts/glyphicons-halflings-regular-eot.eot -------------------------------------------------------------------------------- /developer_guide/content/fonts/glyphicons-halflings-regular-ttf.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sferik/aws-sdk-ruby/master/developer_guide/content/fonts/glyphicons-halflings-regular-ttf.ttf -------------------------------------------------------------------------------- /developer_guide/content/fonts/glyphicons-halflings-regular-woff.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sferik/aws-sdk-ruby/master/developer_guide/content/fonts/glyphicons-halflings-regular-woff.woff -------------------------------------------------------------------------------- /aws-sdk-core/features/cognitoidentity/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@cognitoidentity") do 2 | @client = Aws::CognitoIdentity::Client.new 3 | end 4 | 5 | After("@cognitoidentity") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/elasticbeanstalk/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@elasticbeanstalk") do 2 | @client = Aws::ElasticBeanstalk::Client.new 3 | end 4 | 5 | After("@elasticbeanstalk") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/features/machinelearning/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@machinelearning") do 2 | @client = Aws::MachineLearning::Client.new 3 | end 4 | 5 | After("@machinelearning") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/shape_must_be_defined_in_the_api/definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources": { 3 | "ResourceName": { 4 | "shape": "ShapeName" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /aws-sdk-core/features/elastictranscoder/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@elastictranscoder") do 2 | @client = Aws::ElasticTranscoder::Client.new 3 | end 4 | 5 | After("@elastictranscoder") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-resources/lib/aws-sdk-resources/services/sns.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module SNS 3 | 4 | autoload :MessageVerifier, 'aws-sdk-resources/services/sns/message_verifier' 5 | 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/resource_paths_resolve_to_appropriate_shape/errors.json: -------------------------------------------------------------------------------- 1 | [ 2 | "#/resources/Thing/hasMany/DooDads/resource/path must resolve to a \"DooDad\" shape" 3 | ] 4 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/cloudhsm.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:CloudHSM, { 2 | api: "#{Aws::API_DIR}/cloudhsm/2014-05-30/api-2.json", 3 | docs: "#{Aws::API_DIR}/cloudhsm/2014-05-30/docs-2.json", 4 | }) 5 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_operation_must_exist/errors.json: -------------------------------------------------------------------------------- 1 | [ 2 | "#/resources/ResourceName/load/request/operation is set but is not defined at api#/operations/OperationName" 3 | ] 4 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/schema/validates_using_the_schema/errors.json: -------------------------------------------------------------------------------- 1 | [ 2 | { "match": "did not contain a required property of 'resources'" }, 3 | { "match": "contains additional properties" } 4 | ] 5 | -------------------------------------------------------------------------------- /aws-sdk-core/features/elasticloadbalancing/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@elasticloadbalancing") do 2 | @client = Aws::ElasticLoadBalancing::Client.new 3 | end 4 | 5 | After("@elasticloadbalancing") do 6 | end 7 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/xml/default_list.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Xml 3 | # @api private 4 | class DefaultList < Array 5 | 6 | alias nil? empty? 7 | 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/cognitosync.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:CognitoSync, { 2 | api: "#{Aws::API_DIR}/cognito-sync/2014-06-30/api-2.json", 3 | docs: "#{Aws::API_DIR}/cognito-sync/2014-06-30/docs-2.json", 4 | }) 5 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_operation_must_accept_input_if_params_given/errors.json: -------------------------------------------------------------------------------- 1 | [ 2 | "'#/resources/ResourceName/load/request/params' is set but 'OperationName' does not accept input." 3 | ] 4 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_params_must_not_be_dataMembers/errors.json: -------------------------------------------------------------------------------- 1 | [ 2 | "'#/resources/ResourceName/load/request/params/0/sourceType' is set to 'data' which is not valid in this context." 3 | ] 4 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/cognitoidentity.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:CognitoIdentity, { 2 | api: "#{Aws::API_DIR}/cognito-identity/2014-06-30/api-2.json", 3 | docs: "#{Aws::API_DIR}/cognito-identity/2014-06-30/docs-2.json", 4 | }) 5 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/identifiers_with_memberName_require_the_resource_to_have_a_shape/errors.json: -------------------------------------------------------------------------------- 1 | [ 2 | "#/resources/ResourceName/identifiers/0/memberName requires #/resources/ResourceName/shape to be set" 3 | ] 4 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/cloudsearchdomain.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:CloudSearchDomain, { 2 | api: "#{Aws::API_DIR}/cloudsearchdomain/2013-01-01/api-2.json", 3 | docs: "#{Aws::API_DIR}/cloudsearchdomain/2013-01-01/docs-2.json", 4 | }) 5 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/S3/md5_checksum_enabled.yml: -------------------------------------------------------------------------------- 1 | operation: put_object 2 | params: 3 | :bucket: 'bucket-name' 4 | :key: 'key' 5 | :body: 'abc' 6 | request: 7 | headers: 8 | Content-Md5: kAFQmDzST7DWlj99KOF/cg== 9 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_params_must_resolve/errors.json: -------------------------------------------------------------------------------- 1 | [ 2 | "'#/resources/ResourceName/load/request/params/0/target' has the expression 'ResourceId' which does not resolve from 'api#/operations/OperationName/input'." 3 | ] 4 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/kms.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:KMS, { 2 | api: "#{Aws::API_DIR}/kms/2014-11-01/api-2.json", 3 | docs: "#{Aws::API_DIR}/kms/2014-11-01/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/kms/2014-11-01/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/sqs.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:SQS, { 2 | api: "#{Aws::API_DIR}/sqs/2012-11-05/api-2.json", 3 | docs: "#{Aws::API_DIR}/sqs/2012-11-05/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/sqs/2012-11-05/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/swf.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:SWF, { 2 | api: "#{Aws::API_DIR}/swf/2012-01-25/api-2.json", 3 | docs: "#{Aws::API_DIR}/swf/2012-01-25/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/swf/2012-01-25/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/seahorse/client/net_http/connection_pool_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | module Seahorse 4 | module Client 5 | module NetHttp 6 | describe ConnectionPool do 7 | end 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/identifiers_with_memberName_require_the_resource_shape_to_have_that_member/errors.json: -------------------------------------------------------------------------------- 1 | [ 2 | "#/resources/ResourceName/identifiers/0/memberName is not defined at api#/shapes/ShapeName/members/ResourceId" 3 | ] 4 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_operation_must_exist/api.json: -------------------------------------------------------------------------------- 1 | { 2 | "operations": { 3 | }, 4 | "shapes": { 5 | "ShapeName": { 6 | "type": "structure", 7 | "members": { 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/simpledb.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:SimpleDB, { 2 | api: "#{Aws::API_DIR}/sdb/2009-04-15/api-2.json", 3 | docs: "#{Aws::API_DIR}/sdb/2009-04-15/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/sdb/2009-04-15/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/lambda.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:Lambda, { 2 | api: "#{Aws::API_DIR}/lambda/2015-03-31/api-2.json", 3 | docs: "#{Aws::API_DIR}/lambda/2015-03-31/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/lambda/2015-03-31/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/S3/get_bucket_policy.yml: -------------------------------------------------------------------------------- 1 | operation: get_bucket_policy 2 | params: 3 | :bucket: 'bucket-name' 4 | response: 5 | status_code: 200 6 | body: '{ "policy": "json-document" }' 7 | data: 8 | :policy: '{ "policy": "json-document" }' 9 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/identifiers_with_memberName_require_the_resource_shape_to_have_that_member/api.json: -------------------------------------------------------------------------------- 1 | { 2 | "shapes": { 3 | "ShapeName": { 4 | "type": "structure", 5 | "members": { 6 | } 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/route53.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:Route53, { 2 | api: "#{Aws::API_DIR}/route53/2013-04-01/api-2.json", 3 | docs: "#{Aws::API_DIR}/route53/2013-04-01/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/route53/2013-04-01/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/support.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:Support, { 2 | api: "#{Aws::API_DIR}/support/2013-04-15/api-2.json", 3 | docs: "#{Aws::API_DIR}/support/2013-04-15/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/support/2013-04-15/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/waiters/null_provider.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Waiters 3 | # @api private 4 | class NullProvider < Provider 5 | 6 | def initialize 7 | super('waiters' => {}) 8 | end 9 | 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/identifiers_must_have_unique_names/definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources": { 3 | "ResourceName": { 4 | "identifiers": [ 5 | { "name": "Id" }, 6 | { "name": "Id" } 7 | ] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/cloudwatchlogs.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:CloudWatchLogs, { 2 | api: "#{Aws::API_DIR}/logs/2014-03-28/api-2.json", 3 | docs: "#{Aws::API_DIR}/logs/2014-03-28/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/logs/2014-03-28/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/S3/412_response_head.yml: -------------------------------------------------------------------------------- 1 | operation: head_object 2 | params: 3 | :bucket: 'bucket' 4 | :key: 'key' 5 | response: 6 | status_code: 412 7 | body: '' 8 | error: 9 | class: Aws::S3::Errors::PreconditionFailed 10 | message: '' 11 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/S3/create_bucket_without_location_constraint.yml: -------------------------------------------------------------------------------- 1 | operation: create_bucket 2 | params: 3 | :bucket: 'bucket-name' 4 | request: 5 | host: bucket-name.s3.amazonaws.com 6 | method: PUT 7 | path: / 8 | headers: {} 9 | body: '' 10 | -------------------------------------------------------------------------------- /doc-src/services/CloudSearchDomain/client.md: -------------------------------------------------------------------------------- 1 | Returns a client suitable for making requests against a CloudSearch domain. 2 | To construct a client, you must configure the `:endpoint` option: 3 | 4 | client = Aws::CloudSearchDomain::Client.new(endpoint:'http://...') 5 | 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.bundle 2 | /.yardoc 3 | /*.gem 4 | /api-docs 5 | /api-docs.zip 6 | /integration-test-config.json 7 | /coverage 8 | /Gemfile.lock 9 | /vendor 10 | /release-notes.html 11 | 12 | /developer_guide/output 13 | /developer_guide/tmp 14 | /developer_guide/crash.log 15 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/configservice.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:ConfigService, { 2 | api: "#{Aws::API_DIR}/config/2014-11-12/api-2.json", 3 | docs: "#{Aws::API_DIR}/config/2014-11-12/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/config/2014-11-12/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/lambdapreview.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:LambdaPreview, { 2 | api: "#{Aws::API_DIR}/lambda/2014-11-11/api-2.json", 3 | docs: "#{Aws::API_DIR}/lambda/2014-11-11/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/lambda/2014-11-11/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/cloudtrail.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:CloudTrail, { 2 | api: "#{Aws::API_DIR}/cloudtrail/2013-11-01/api-2.json", 3 | docs: "#{Aws::API_DIR}/cloudtrail/2013-11-01/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/cloudtrail/2013-11-01/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/cloudwatch.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:CloudWatch, { 2 | api: "#{Aws::API_DIR}/monitoring/2010-08-01/api-2.json", 3 | docs: "#{Aws::API_DIR}/monitoring/2010-08-01/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/monitoring/2010-08-01/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/codedeploy.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:CodeDeploy, { 2 | api: "#{Aws::API_DIR}/codedeploy/2014-10-06/api-2.json", 3 | docs: "#{Aws::API_DIR}/codedeploy/2014-10-06/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/codedeploy/2014-10-06/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/workspaces.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:WorkSpaces, { 2 | api: "#{Aws::API_DIR}/workspaces/2015-04-08/api-2.json", 3 | docs: "#{Aws::API_DIR}/workspaces/2015-04-08/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/workspaces/2015-04-08/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/autoscaling.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:AutoScaling, { 2 | api: "#{Aws::API_DIR}/autoscaling/2011-01-01/api-2.json", 3 | docs: "#{Aws::API_DIR}/autoscaling/2011-01-01/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/autoscaling/2011-01-01/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/cloudsearch.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:CloudSearch, { 2 | api: "#{Aws::API_DIR}/cloudsearch/2013-01-01/api-2.json", 3 | docs: "#{Aws::API_DIR}/cloudsearch/2013-01-01/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/cloudsearch/2013-01-01/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/S3/md5_checksum_disabled.yml: -------------------------------------------------------------------------------- 1 | config: 2 | compute_checksums: false 3 | operation: put_object 4 | params: 5 | :bucket: 'bucket-name' 6 | :key: 'key' 7 | :body: 'abc' 8 | request: 9 | headers: 10 | Content-Md5: NULL # should not be set 11 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/datapipeline.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:DataPipeline, { 2 | api: "#{Aws::API_DIR}/datapipeline/2012-10-29/api-2.json", 3 | docs: "#{Aws::API_DIR}/datapipeline/2012-10-29/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/datapipeline/2012-10-29/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/importexport.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:ImportExport, { 2 | api: "#{Aws::API_DIR}/importexport/2010-06-01/api-2.json", 3 | docs: "#{Aws::API_DIR}/importexport/2010-06-01/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/importexport/2010-06-01/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/config/2014-10-17/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "GetResourceConfigHistory": { 4 | "input_token": "nextToken", 5 | "output_token": "nextToken", 6 | "limit_key": "limit", 7 | "result_key": "configurationItems" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/config/2014-11-12/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "GetResourceConfigHistory": { 4 | "input_token": "nextToken", 5 | "output_token": "nextToken", 6 | "limit_key": "limit", 7 | "result_key": "configurationItems" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/directconnect.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:DirectConnect, { 2 | api: "#{Aws::API_DIR}/directconnect/2012-10-25/api-2.json", 3 | docs: "#{Aws::API_DIR}/directconnect/2012-10-25/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/directconnect/2012-10-25/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/identifiers_may_not_be_prefixed_by_their_resource_name/errors.json: -------------------------------------------------------------------------------- 1 | [ 2 | "#/resources/ResourceName/identifiers/0/name must not be prefixed with 'ResourceName'", 3 | "#/resources/ResourceName/identifiers/1/name must not be prefixed with 'ResourceName'" 4 | ] 5 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/identifiers_with_memberName_require_the_resource_to_have_a_shape/definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources": { 3 | "ResourceName": { 4 | "identifiers": [ 5 | { "name": "Id", "memberName": "ResourceId" } 6 | ] 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/route53domains.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:Route53Domains, { 2 | api: "#{Aws::API_DIR}/route53domains/2014-05-15/api-2.json", 3 | docs: "#{Aws::API_DIR}/route53domains/2014-05-15/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/route53domains/2014-05-15/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/storagegateway.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:StorageGateway, { 2 | api: "#{Aws::API_DIR}/storagegateway/2013-06-30/api-2.json", 3 | docs: "#{Aws::API_DIR}/storagegateway/2013-06-30/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/storagegateway/2013-06-30/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/machinelearning.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:MachineLearning, { 2 | api: "#{Aws::API_DIR}/machinelearning/2014-12-12/api-2.json", 3 | docs: "#{Aws::API_DIR}/machinelearning/2014-12-12/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/machinelearning/2014-12-12/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_requires_shape_to_be_set/definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources": { 3 | "ResourceName": { 4 | "load": { 5 | "request": { 6 | "operation": "OperationName" 7 | }, 8 | "path": "$" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/elasticbeanstalk.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:ElasticBeanstalk, { 2 | api: "#{Aws::API_DIR}/elasticbeanstalk/2010-12-01/api-2.json", 3 | docs: "#{Aws::API_DIR}/elasticbeanstalk/2010-12-01/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/elasticbeanstalk/2010-12-01/paginators-1.json", 5 | }) 6 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/iam.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:IAM, { 2 | api: "#{Aws::API_DIR}/iam/2010-05-08/api-2.json", 3 | docs: "#{Aws::API_DIR}/iam/2010-05-08/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/iam/2010-05-08/paginators-1.json", 5 | resources: "#{Aws::API_DIR}/iam/2010-05-08/resources-1.json", 6 | }) 7 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/paging/null_provider.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Paging 3 | class NullProvider 4 | 5 | # @param [String] operation_name 6 | # @return [NullPager] 7 | def pager(operation_name) 8 | NullPager.new 9 | end 10 | 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/sns.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:SNS, { 2 | api: "#{Aws::API_DIR}/sns/2010-03-31/api-2.json", 3 | docs: "#{Aws::API_DIR}/sns/2010-03-31/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/sns/2010-03-31/paginators-1.json", 5 | resources: "#{Aws::API_DIR}/sns/2010-03-31/resources-1.json", 6 | }) 7 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/identifiers_may_not_be_prefixed_by_their_resource_name/definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources": { 3 | "ResourceName": { 4 | "identifiers": [ 5 | { "name": "ResourceNameId" }, 6 | { "name": "ResourceNameArn" } 7 | ] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/plugins/protocols/query.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Plugins 3 | module Protocols 4 | class Query < Seahorse::Client::Plugin 5 | 6 | handler(Aws::Query::Handler) 7 | handler(Xml::ErrorHandler, step: :sign) 8 | 9 | end 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/plugins/protocols/rest_xml.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Plugins 3 | module Protocols 4 | class RestXml < Seahorse::Client::Plugin 5 | 6 | handler(Xml::RestHandler) 7 | handler(Xml::ErrorHandler, step: :sign) 8 | 9 | end 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/ses.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:SES, { 2 | api: "#{Aws::API_DIR}/email/2010-12-01/api-2.json", 3 | docs: "#{Aws::API_DIR}/email/2010-12-01/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/email/2010-12-01/paginators-1.json", 5 | waiters: "#{Aws::API_DIR}/email/2010-12-01/waiters-2.json", 6 | }) 7 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/S3/head_bucket_with_dns_incompatible_name.yml: -------------------------------------------------------------------------------- 1 | operation: head_bucket 2 | params: 3 | :bucket: 'Bucket123' 4 | request: 5 | host: s3.amazonaws.com 6 | method: HEAD 7 | path: /Bucket123 8 | body: '' 9 | response: 10 | status_code: 200 11 | body: '' 12 | data: {} 13 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/importexport/2010-06-01/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListJobs": { 4 | "input_token": "Marker", 5 | "output_token": "Jobs[-1].JobId", 6 | "more_results": "IsTruncated", 7 | "limit_key": "MaxJobs", 8 | "result_key": "Jobs" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/identifiers_must_have_unique_names/errors.json: -------------------------------------------------------------------------------- 1 | [ 2 | "#/resources/ResourceName/identifiers/0/name must be uniq within #/resources/ResourceName/identifiers/*/name", 3 | "#/resources/ResourceName/identifiers/1/name must be uniq within #/resources/ResourceName/identifiers/*/name" 4 | ] 5 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/plugins/protocols/rest_json.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Plugins 3 | module Protocols 4 | class RestJson < Seahorse::Client::Plugin 5 | 6 | handler(Json::RestHandler) 7 | 8 | handler(Json::ErrorHandler, step: :sign) 9 | 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/errors.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module S3 3 | module Encryption 4 | module Errors 5 | 6 | class DecryptionError < RuntimeError; end 7 | 8 | class EncryptionError < RuntimeError; end 9 | 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /aws-sdk-core/features/dynamodb/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@dynamodb") do 2 | @client = Aws::DynamoDB::Client.new 3 | end 4 | 5 | After("@dynamodb") do 6 | end 7 | 8 | Given(/^I disable translation features Aws::DynamoDB$/) do 9 | @simple_json = true 10 | @client = Aws::DynamoDB::Client.new(simple_json: true) 11 | end 12 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/kinesis.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:Kinesis, { 2 | api: "#{Aws::API_DIR}/kinesis/2013-12-02/api-2.json", 3 | docs: "#{Aws::API_DIR}/kinesis/2013-12-02/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/kinesis/2013-12-02/paginators-1.json", 5 | waiters: "#{Aws::API_DIR}/kinesis/2013-12-02/waiters-2.json", 6 | }) 7 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_requires_shape_to_be_set/api.json: -------------------------------------------------------------------------------- 1 | { 2 | "operations": { 3 | "OperationName": { 4 | "output": { "shape": "ResponseShape" } 5 | } 6 | }, 7 | "shapes": { 8 | "ResponseShape": { 9 | "type": "structure", 10 | "members": {} 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/identifiers_with_memberName_require_the_resource_shape_to_have_that_member/definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources": { 3 | "ResourceName": { 4 | "identifiers": [ 5 | { "name": "Id", "memberName": "ResourceId" } 6 | ], 7 | "shape": "ShapeName" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_operation_must_exist/definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources": { 3 | "ResourceName": { 4 | "shape": "ShapeName", 5 | "load": { 6 | "request": { 7 | "operation": "OperationName" 8 | }, 9 | "path": "$" 10 | } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/redshift.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:Redshift, { 2 | api: "#{Aws::API_DIR}/redshift/2012-12-01/api-2.json", 3 | docs: "#{Aws::API_DIR}/redshift/2012-12-01/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/redshift/2012-12-01/paginators-1.json", 5 | waiters: "#{Aws::API_DIR}/redshift/2012-12-01/waiters-2.json", 6 | }) 7 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/identifiers_with_memberName_require_the_resource_to_have_a_shape/api.json: -------------------------------------------------------------------------------- 1 | { 2 | "shapes": { 3 | "ShapeName": { 4 | "type": "structure", 5 | "members": { 6 | "ResourceId": { "shape": "String" } 7 | } 8 | }, 9 | "String": { "type": "string" } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_path_accepts_dollar_signs/api.json: -------------------------------------------------------------------------------- 1 | { 2 | "operations": { 3 | "OperationName": { 4 | "output": { "shape": "ResourceShape" } 5 | } 6 | }, 7 | "shapes": { 8 | "ResourceShape": { 9 | "type": "structure", 10 | "members": { 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_path_accepts_dollar_signs/definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources": { 3 | "ResourceName": { 4 | "shape": "ResourceShape", 5 | "load": { 6 | "request": { 7 | "operation": "OperationName" 8 | }, 9 | "path": "$" 10 | } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/cloudfront.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:CloudFront, { 2 | api: "#{Aws::API_DIR}/cloudfront/2014-11-06/api-2.json", 3 | docs: "#{Aws::API_DIR}/cloudfront/2014-11-06/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/cloudfront/2014-11-06/paginators-1.json", 5 | waiters: "#{Aws::API_DIR}/cloudfront/2014-11-06/waiters-2.json", 6 | }) 7 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_requires_shape_to_be_a_structure/definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources": { 3 | "ResourceName": { 4 | "shape": "ResourceShape", 5 | "load": { 6 | "request": { 7 | "operation": "OperationName" 8 | }, 9 | "path": "$" 10 | } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/elasticache.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:ElastiCache, { 2 | api: "#{Aws::API_DIR}/elasticache/2015-02-02/api-2.json", 3 | docs: "#{Aws::API_DIR}/elasticache/2015-02-02/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/elasticache/2015-02-02/paginators-1.json", 5 | waiters: "#{Aws::API_DIR}/elasticache/2015-02-02/waiters-1.json", 6 | }) 7 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_path_accepts_nested_paths/definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources": { 3 | "ResourceName": { 4 | "shape": "DataShape", 5 | "load": { 6 | "request": { 7 | "operation": "OperationName" 8 | }, 9 | "path": "Items[0].Data[0]" 10 | } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_path_must_resolve_to_shape/definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources": { 3 | "ResourceName": { 4 | "shape": "ResourceShape", 5 | "load": { 6 | "request": { 7 | "operation": "OperationName" 8 | }, 9 | "path": "Result.Data" 10 | } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/emr.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:EMR, { 2 | api: "#{Aws::API_DIR}/elasticmapreduce/2009-03-31/api-2.json", 3 | docs: "#{Aws::API_DIR}/elasticmapreduce/2009-03-31/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/elasticmapreduce/2009-03-31/paginators-1.json", 5 | waiters: "#{Aws::API_DIR}/elasticmapreduce/2009-03-31/waiters-2.json", 6 | }) 7 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_operation_must_accept_input_if_params_given/api.json: -------------------------------------------------------------------------------- 1 | { 2 | "operations": { 3 | "OperationName": { 4 | "output": { "shape": "ResourceShape" } 5 | } 6 | }, 7 | "shapes": { 8 | "ResourceShape": { 9 | "type": "structure", 10 | "members": { 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /aws-sdk-resources/features/s3/presigned_post.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @s3 @presigend_post 3 | Feature: Aws::S3::PresignedPost 4 | 5 | Background: 6 | Given I create a bucket 7 | 8 | Scenario: Using a presigned-post form to upload an object via POST 9 | When I create a presigned post 10 | Then I should be able to POST an object to the form url 11 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/Glacier/custom_account_id.yml: -------------------------------------------------------------------------------- 1 | # This test ensures the default `:account_id` of '-' can be replaced via config 2 | config: 3 | account_id: 'ACCOUNT-ID' 4 | operation: list_vaults 5 | params: {} 6 | request: 7 | path: /ACCOUNT-ID/vaults 8 | response: 9 | status_code: 200 10 | body: | 11 | {"Marker":null,"VaultList":[]} 12 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/Glacier/default_account_id.yml: -------------------------------------------------------------------------------- 1 | # This test ensures the `:account_id` need not be supplied and that it defaults 2 | # to the '-' string, which means current account 3 | operation: list_vaults 4 | params: {} 5 | request: 6 | path: /-/vaults 7 | response: 8 | status_code: 200 9 | body: | 10 | {"Marker":null,"VaultList":[]} 11 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/ec2.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:EC2, { 2 | api: "#{Aws::API_DIR}/ec2/2014-10-01/api-2.json", 3 | docs: "#{Aws::API_DIR}/ec2/2014-10-01/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/ec2/2014-10-01/paginators-1.json", 5 | resources: "#{Aws::API_DIR}/ec2/2014-10-01/resources-1.json", 6 | waiters: "#{Aws::API_DIR}/ec2/2014-10-01/waiters-2.json", 7 | }) 8 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/plugins/glacier_account_id.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Plugins 3 | class GlacierAccountId < Seahorse::Client::Plugin 4 | option :account_id, '-' 5 | 6 | handle_request(step: :validate, priority: 99) do |context| 7 | context.params[:account_id] ||= context.config.account_id 8 | end 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/rds.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:RDS, { 2 | api: "#{Aws::API_DIR}/rds/2014-10-31/api-2.json", 3 | docs: "#{Aws::API_DIR}/rds/2014-10-31/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/rds/2014-10-31/paginators-1.json", 5 | resources: "#{Aws::API_DIR}/rds/2014-10-31/resources-1.json", 6 | waiters: "#{Aws::API_DIR}/rds/2014-10-31/waiters-2.json", 7 | }) 8 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/S3/404_response.yml: -------------------------------------------------------------------------------- 1 | # This test ensures that we generate a helpful error message for failed requests 2 | # that return no response body 3 | operation: get_object 4 | params: 5 | :bucket: 'bucket' 6 | :key: 'key' 7 | response: 8 | status_code: 404 9 | body: '' 10 | error: 11 | class: Aws::S3::Errors::NotFound 12 | message: '' 13 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/aws/lambdapreview/client_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | module Aws 4 | module LambdaPreview 5 | describe Client do 6 | 7 | it 'can be constructed' do 8 | client = LambdaPreview::Client.new(stub_responses:true) 9 | expect(client.config.api.version).to eq('2014-11-11') 10 | end 11 | 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/S3/304_response.yml: -------------------------------------------------------------------------------- 1 | # This test ensures that we generate a helpful error message for failed requests 2 | # that return no response body 3 | operation: get_object 4 | params: 5 | :bucket: 'bucket' 6 | :key: 'key' 7 | response: 8 | status_code: 304 9 | body: '' 10 | error: 11 | class: Aws::S3::Errors::NotModified 12 | message: '' 13 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/S3/400_response.yml: -------------------------------------------------------------------------------- 1 | # This test ensures that we generate a helpful error message for failed requests 2 | # that return no response body 3 | operation: get_object 4 | params: 5 | :bucket: 'bucket' 6 | :key: 'key' 7 | response: 8 | status_code: 400 9 | body: '' 10 | error: 11 | class: Aws::S3::Errors::BadRequest 12 | message: '' 13 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/S3/403_response.yml: -------------------------------------------------------------------------------- 1 | # This test ensures that we generate a helpful error message for failed requests 2 | # that return no response body 3 | operation: get_object 4 | params: 5 | :bucket: 'bucket' 6 | :key: 'key' 7 | response: 8 | status_code: 403 9 | body: '' 10 | error: 11 | class: Aws::S3::Errors::Forbidden 12 | message: '' 13 | -------------------------------------------------------------------------------- /.yardopts: -------------------------------------------------------------------------------- 1 | --title 'AWS SDK for Ruby V2' 2 | --output-dir api-docs 3 | --template-path doc-src/templates 4 | --markup markdown 5 | --markup-provider rdiscount 6 | --hide-api private 7 | --plugin sitemap 8 | --asset doc-src/images:images 9 | -e doc-src/plugins/apis.rb 10 | -e doc-src/plugins/resources.rb 11 | aws-sdk-core/lib/**/*.rb aws-sdk-resources/lib/**/*.rb aws-sdk/lib/**/*.rb 12 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/email/2010-12-01/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListIdentities": { 4 | "input_token": "NextToken", 5 | "output_token": "NextToken", 6 | "limit_key": "MaxItems", 7 | "result_key": "Identities" 8 | }, 9 | "ListVerifiedEmailAddresses": { 10 | "result_key": "VerifiedEmailAddresses" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/signers/handler.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Signers 3 | class Handler 4 | 5 | def initialize(signer) 6 | @signer = signer 7 | end 8 | 9 | attr_accessor :handler 10 | 11 | def call(context) 12 | @signer.sign(context) 13 | @handler.call(context) 14 | end 15 | 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /aws-sdk-resources/features/sqs/queue_poller.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @sqs @queue_poller 3 | Feature: Amazon SQS Queue Poller 4 | 5 | @slow 6 | Scenario: Making a basic request 7 | Given I have have a queue 8 | And I send 10 messages to the queue 9 | When I poll 5 messages at a time with a 2 second idle timeout 10 | Then I should have received all 10 messages 11 | -------------------------------------------------------------------------------- /aws-sdk-resources/lib/aws-sdk-resources/errors.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Resources 3 | module Errors 4 | 5 | class UnknownOperationError < ArgumentError 6 | def initialize(name) 7 | super("operation `#{name}' not defined") 8 | end 9 | end 10 | 11 | class DefinitionError < ArgumentError; end 12 | 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/elastictranscoder.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:ElasticTranscoder, { 2 | api: "#{Aws::API_DIR}/elastictranscoder/2012-09-25/api-2.json", 3 | docs: "#{Aws::API_DIR}/elastictranscoder/2012-09-25/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/elastictranscoder/2012-09-25/paginators-1.json", 5 | waiters: "#{Aws::API_DIR}/elastictranscoder/2012-09-25/waiters-2.json", 6 | }) 7 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/paging/null_pager.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Paging 3 | class NullPager < Pager 4 | 5 | def initialize 6 | end 7 | 8 | # @return [{}] 9 | def next_tokens 10 | {} 11 | end 12 | 13 | # @return [false] 14 | def truncated?(response) 15 | false 16 | end 17 | 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/seahorse/client/managed_file.rb: -------------------------------------------------------------------------------- 1 | module Seahorse 2 | module Client 3 | # This utility class is used to track files opened by Seahorse. 4 | # This allows Seahorse to know what files it needs to close. 5 | class ManagedFile < File 6 | 7 | # @return [Boolean] 8 | def open? 9 | !closed? 10 | end 11 | 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /aws-sdk-resources/features/s3/object.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @s3 @resources @objects 3 | Feature: Aws::S3::Object 4 | 5 | Background: 6 | Given I create a bucket 7 | 8 | @slow 9 | Scenario: Uploading a large file 10 | Given I have a 15MB file 11 | When I upload the file to the "large" object 12 | Then the file should have been uploaded as a multipart upload 13 | 14 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/seahorse/client/networking_error.rb: -------------------------------------------------------------------------------- 1 | module Seahorse 2 | module Client 3 | class NetworkingError < StandardError 4 | 5 | def initialize(error, msg = nil) 6 | super(msg || error.message) 7 | set_backtrace(error.backtrace) 8 | @original_error = error 9 | end 10 | 11 | attr_reader :original_error 12 | 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/glacier.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:Glacier, { 2 | api: "#{Aws::API_DIR}/glacier/2012-06-01/api-2.json", 3 | docs: "#{Aws::API_DIR}/glacier/2012-06-01/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/glacier/2012-06-01/paginators-1.json", 5 | resources: "#{Aws::API_DIR}/glacier/2012-06-01/resources-1.json", 6 | waiters: "#{Aws::API_DIR}/glacier/2012-06-01/waiters-2.json", 7 | }) 8 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/Glacier/error_parsing.yml: -------------------------------------------------------------------------------- 1 | operation: list_vaults 2 | params: 3 | :account_id: '12345' 4 | response: 5 | status_code: 409 6 | body: | 7 | {"message":"Access denied for account ID: 12345","code":"AccessDeniedException","type":"Client"} 8 | error: 9 | class: Aws::Glacier::Errors::AccessDeniedException 10 | message: 'Access denied for account ID: 12345' 11 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/elasticloadbalancing.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:ElasticLoadBalancing, { 2 | api: "#{Aws::API_DIR}/elasticloadbalancing/2012-06-01/api-2.json", 3 | docs: "#{Aws::API_DIR}/elasticloadbalancing/2012-06-01/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/elasticloadbalancing/2012-06-01/paginators-1.json", 5 | waiters: "#{Aws::API_DIR}/elasticloadbalancing/2012-06-01/waiters-2.json", 6 | }) 7 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/opsworks.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:OpsWorks, { 2 | api: "#{Aws::API_DIR}/opsworks/2013-02-18/api-2.json", 3 | docs: "#{Aws::API_DIR}/opsworks/2013-02-18/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/opsworks/2013-02-18/paginators-1.json", 5 | resources: "#{Aws::API_DIR}/opsworks/2013-02-18/resources-1.json", 6 | waiters: "#{Aws::API_DIR}/opsworks/2013-02-18/waiters-1.json", 7 | }) 8 | -------------------------------------------------------------------------------- /aws-sdk-resources/lib/aws-sdk-resources/options.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Resources 3 | module Options 4 | 5 | private 6 | 7 | def option(key, options) 8 | if options[key].nil? 9 | raise Errors::DefinitionError, "missing required option #{key.inspect}" 10 | else 11 | options[key] 12 | end 13 | end 14 | 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/sdb/2009-04-15/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListDomains": { 4 | "input_token": "NextToken", 5 | "output_token": "NextToken", 6 | "limit_key": "MaxNumberOfDomains", 7 | "result_key": "DomainNames" 8 | }, 9 | "Select": { 10 | "input_token": "NextToken", 11 | "output_token": "NextToken", 12 | "result_key": "Items" 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_requires_shape_to_be_a_structure/api.json: -------------------------------------------------------------------------------- 1 | { 2 | "operations": { 3 | "OperationName": { 4 | "output": { "shape": "ResourceShape" } 5 | } 6 | }, 7 | "shapes": { 8 | "ResourceShape": { 9 | "type": "map", 10 | "key": { "shape": "String" }, 11 | "value": { "shape": "String" } 12 | }, 13 | "String": { "type": "string" } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tasks/gems.rake: -------------------------------------------------------------------------------- 1 | desc 'Builds the aws-sdk gems' 2 | task 'gems:build' do 3 | sh("rm -f *.gem") 4 | $GEM_NAMES.each do |gem_name| 5 | Dir.chdir(gem_name) do 6 | sh("gem build #{gem_name}.gemspec") 7 | sh("mv #{gem_name}-#{$VERSION}.gem ..") 8 | end 9 | end 10 | end 11 | 12 | task 'gems:push' do 13 | $GEM_NAMES.each do |gem_name| 14 | sh("gem push #{gem_name}-#{$VERSION}.gem") 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/xml/parser/engines/ox.rb: -------------------------------------------------------------------------------- 1 | require 'ox' 2 | require 'stringio' 3 | 4 | module Aws 5 | module Xml 6 | class Parser 7 | class OxEngine 8 | 9 | def initialize(stack) 10 | @stack = stack 11 | end 12 | 13 | def parse(xml) 14 | Ox.sax_parse(@stack, StringIO.new(xml), :convert_special => true) 15 | end 16 | 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/xml/parser/parsing_error.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Xml 3 | class Parser 4 | class ParsingError < RuntimeError 5 | 6 | def initialize(msg, line, column) 7 | super(msg) 8 | end 9 | 10 | # @return [Integer,nil] 11 | attr_reader :line 12 | 13 | # @return [Integer,nil] 14 | attr_reader :column 15 | 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/S3/content_type_header.yml: -------------------------------------------------------------------------------- 1 | # This test ensures that the content type param makes it to the Content-Type 2 | # header. There was a bug that caused S3 to always set the content 3 | # type to application/xml. 4 | operation: put_object 5 | params: 6 | :bucket: 'bucket-name' 7 | :key: 'key' 8 | :body: 'abc' 9 | :content_type: 'text/plain' 10 | request: 11 | headers: 12 | Content-Type: 'text/plain' 13 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/cloudformation.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:CloudFormation, { 2 | api: "#{Aws::API_DIR}/cloudformation/2010-05-15/api-2.json", 3 | docs: "#{Aws::API_DIR}/cloudformation/2010-05-15/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/cloudformation/2010-05-15/paginators-1.json", 5 | resources: "#{Aws::API_DIR}/cloudformation/2010-05-15/resources-1.json", 6 | waiters: "#{Aws::API_DIR}/cloudformation/2010-05-15/waiters-1.json", 7 | }) 8 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/credentials/mock_shared_credentials: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_access_key_id = ACCESS_KEY_0 3 | aws_secret_access_key = SECRET_KEY_0 4 | aws_session_token = TOKEN_0 5 | 6 | [fooprofile] 7 | aws_access_key_id = ACCESS_KEY_1 8 | aws_secret_access_key = SECRET_KEY_1 9 | aws_session_token = TOKEN_1 10 | 11 | [barprofile] 12 | aws_access_key_id = ACCESS_KEY_2 13 | aws_secret_access_key = SECRET_KEY_2 14 | aws_session_token = TOKEN_2 15 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/aws/paging/null_provider_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | module Aws 4 | module Paging 5 | describe NullProvider do 6 | 7 | let(:provider) { NullProvider.new } 8 | 9 | it 'returns null pagers' do 10 | expect(provider.pager('NonPagedOperation').next_tokens).to eq({}) 11 | expect(provider.pager('NonPagedOperation').truncated?('resp')).to be(false) 12 | end 13 | 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/CloudFront/max_items.yml: -------------------------------------------------------------------------------- 1 | # The source cloud front model describes 'MaxItems' as a string instead of 2 | # an integer. This test asserts that we can make the request using an integer. 3 | config: 4 | region: us-east-1 5 | operation: list_distributions 6 | params: 7 | :max_items: 1 8 | request: 9 | host: cloudfront.amazonaws.com 10 | path: !ruby/regexp /^\/\d{4}-\d{2}-\d{2}\/distribution\?MaxItems=1$/ 11 | body: '' 12 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/Glacier/account_id_param.yml: -------------------------------------------------------------------------------- 1 | # This test ensures the `:account_id` param can be specified and that 2 | # it will override the default configured account id. 3 | config: 4 | account_id: 'CONFIG-ACCOUNT-ID' 5 | operation: list_vaults 6 | params: 7 | :account_id: 'PARAM-ACCOUNT-ID' 8 | request: 9 | path: /PARAM-ACCOUNT-ID/vaults 10 | response: 11 | status_code: 200 12 | body: | 13 | {"Marker":null,"VaultList":[]} 14 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_params_must_not_be_dataMembers/definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources": { 3 | "ResourceName": { 4 | "shape": "ResourceShape", 5 | "load": { 6 | "request": { 7 | "operation": "OperationName", 8 | "params": [ 9 | { "target":"ResourceId", "source":"data", "path":"Id" } 10 | ] 11 | }, 12 | "path": "$" 13 | } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/kinesis/2013-12-02/waiters-2.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "waiters": { 4 | "StreamExists": { 5 | "delay": 10, 6 | "operation": "DescribeStream", 7 | "maxAttempts": 18, 8 | "acceptors": [ 9 | { 10 | "expected": "ACTIVE", 11 | "matcher": "path", 12 | "state": "success", 13 | "argument": "StreamDescription.StreamStatus" 14 | } 15 | ] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/lambda/2014-11-11/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListEventSources": { 4 | "input_token": "Marker", 5 | "output_token": "NextMarker", 6 | "limit_key": "MaxItems", 7 | "result_key": "EventSources" 8 | }, 9 | "ListFunctions": { 10 | "input_token": "Marker", 11 | "output_token": "NextMarker", 12 | "limit_key": "MaxItems", 13 | "result_key": "Functions" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /aws-sdk-resources/lib/aws-sdk-resources/services/s3/multipart_upload_error.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module S3 3 | class MultipartUploadError < StandardError 4 | 5 | def initialize(message, errors) 6 | @errors = errors 7 | super(message) 8 | end 9 | 10 | # @return [Array] The list of errors encountered 11 | # when uploading or aborting the upload. 12 | attr_reader :errors 13 | 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/seahorse/client/events.rb: -------------------------------------------------------------------------------- 1 | module Seahorse 2 | module Client 3 | module EventEmitter 4 | 5 | def initialize(*args) 6 | @listeners = {} 7 | super 8 | end 9 | 10 | def emit(event_name, *args, &block) 11 | @listeners[event_name] ||= [] 12 | @listeners[event_name] << Proc.new 13 | end 14 | 15 | def signal(event, *args) 16 | @listeners 17 | end 18 | 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/lambda/2015-03-31/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListEventSourceMappings": { 4 | "input_token": "Marker", 5 | "output_token": "NextMarker", 6 | "limit_key": "MaxItems", 7 | "result_key": "EventSourceMappings" 8 | }, 9 | "ListFunctions": { 10 | "input_token": "Marker", 11 | "output_token": "NextMarker", 12 | "limit_key": "MaxItems", 13 | "result_key": "Functions" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /aws-sdk-resources/lib/aws-sdk-resources/services/s3/object_summary.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module S3 3 | class ObjectSummary 4 | 5 | alias content_length size 6 | 7 | # @param (see Object#upload_file) 8 | # @options (see Object#upload_file) 9 | # @return (see Object#upload_file) 10 | # @see Object#upload_file 11 | def upload_file(source, options = {}) 12 | object.upload_file(source, options) 13 | end 14 | 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_params_must_resolve/api.json: -------------------------------------------------------------------------------- 1 | { 2 | "operations": { 3 | "OperationName": { 4 | "input": { "shape": "RequestShape" }, 5 | "output": { "shape": "ResourceShape" } 6 | } 7 | }, 8 | "shapes": { 9 | "RequestShape": { 10 | "type": "structure", 11 | "members": { 12 | } 13 | }, 14 | "ResourceShape": { 15 | "type": "structure", 16 | "members": { 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/route53domains/2014-05-15/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "pagination": { 4 | "ListDomains": { 5 | "limit_key": "MaxItems", 6 | "input_token": "Marker", 7 | "output_token": "NextPageMarker", 8 | "result_key": "Domains" 9 | }, 10 | "ListOperations": { 11 | "limit_key": "MaxItems", 12 | "input_token": "Marker", 13 | "output_token": "NextPageMarker", 14 | "result_key": "Operations" 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/aws/ec2/client_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | module Aws 4 | module EC2 5 | describe Client do 6 | 7 | let(:credentials) { Aws::Credentials.new('akid', 'secret') } 8 | 9 | it 'expands the endpoint correctly for gov-cloud' do 10 | ec2 = Client.new(region: 'us-gov-west-1', credentials: credentials) 11 | expect(ec2.config.endpoint.to_s).to eq('https://ec2.us-gov-west-1.amazonaws.com') 12 | end 13 | 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/email/2010-12-01/waiters-2.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "waiters": { 4 | "IdentityExists": { 5 | "delay": 3, 6 | "operation": "GetIdentityVerificationAttributes", 7 | "maxAttempts": 20, 8 | "acceptors": [ 9 | { 10 | "expected": "Success", 11 | "matcher": "pathAll", 12 | "state": "success", 13 | "argument": "VerificationAttributes.*.VerificationStatus" 14 | } 15 | ] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/DynamoDB/error_parsing.yml: -------------------------------------------------------------------------------- 1 | config: 2 | validate_params: false 3 | operation: describe_table 4 | response: 5 | status_code: 400 6 | body: | 7 | { 8 | "__type": "com.amazonaws.dynamodb.v20120810#ResourceNotFoundException", 9 | "message": "Requested resource not found: Table: asdfasdf not found" 10 | } 11 | error: 12 | class: Aws::DynamoDB::Errors::ResourceNotFoundException 13 | message: "Requested resource not found: Table: asdfasdf not found" 14 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/S3/get_bucket_location_classic.yml: -------------------------------------------------------------------------------- 1 | config: 2 | region: us-east-1 3 | operation: get_bucket_location 4 | params: 5 | :bucket: 'bucket-name' 6 | request: 7 | host: s3.amazonaws.com 8 | method: GET 9 | path: /bucket-name?location 10 | body: '' 11 | response: 12 | status_code: 200 13 | body: | 14 | 15 | 16 | data: 17 | :location_constraint: '' 18 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/plugins/glacier_api_version.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Plugins 3 | class GlacierApiVersion < Seahorse::Client::Plugin 4 | 5 | class Handler < Seahorse::Client::Handler 6 | 7 | def call(context) 8 | version = context.config.api.version 9 | context.http_request.headers['x-amz-glacier-version'] = version 10 | @handler.call(context) 11 | end 12 | 13 | end 14 | 15 | handler(Handler) 16 | 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/cloudsearch/2013-01-01/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeAnalysisSchemes": { 4 | "result_key": "AnalysisSchemes" 5 | }, 6 | "DescribeDomains": { 7 | "result_key": "DomainStatusList" 8 | }, 9 | "DescribeExpressions": { 10 | "result_key": "Expressions" 11 | }, 12 | "DescribeIndexFields": { 13 | "result_key": "IndexFields" 14 | }, 15 | "DescribeSuggesters": { 16 | "result_key": "Suggesters" 17 | } 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/S3/get_bucket_location.yml: -------------------------------------------------------------------------------- 1 | config: 2 | region: us-east-1 3 | operation: get_bucket_location 4 | params: 5 | :bucket: 'bucket-name' 6 | request: 7 | host: s3.amazonaws.com 8 | method: GET 9 | path: /bucket-name?location 10 | body: '' 11 | response: 12 | status_code: 200 13 | body: | 14 | 15 | EU 16 | data: 17 | :location_constraint: 'EU' 18 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_params_must_resolve/definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources": { 3 | "ResourceName": { 4 | "identifiers": [ 5 | { "name": "Id" } 6 | ], 7 | "shape": "ResourceShape", 8 | "load": { 9 | "request": { 10 | "operation": "OperationName", 11 | "params": [ 12 | { "target":"ResourceId", "source":"identifier", "name":"Id" } 13 | ] 14 | }, 15 | "path": "$" 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_operation_must_accept_input_if_params_given/definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources": { 3 | "ResourceName": { 4 | "identifiers": [ 5 | { "name": "Id" } 6 | ], 7 | "shape": "ResourceShape", 8 | "load": { 9 | "request": { 10 | "operation": "OperationName", 11 | "params": [ 12 | { "target":"ResourceId", "source":"identifier", "name":"Id" } 13 | ] 14 | }, 15 | "path": "$" 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tasks/guide.rake: -------------------------------------------------------------------------------- 1 | desc 'Builds the developer guide to developer_guide/output' 2 | task 'guide' do 3 | Dir.chdir('developer_guide') do 4 | sh('bundle exec nanoc') 5 | end 6 | end 7 | 8 | desc 'Rebuilds the guide when content changes' 9 | task 'guide:guard' do 10 | Dir.chdir('developer_guide') do 11 | sh('bundle exec guard') 12 | end 13 | end 14 | 15 | desc 'Serves the developer guide at http://localhost:3000/' 16 | task 'guide:serve' do 17 | Dir.chdir('developer_guide') do 18 | sh('bundle exec nanoc view') 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: ruby 2 | 3 | rvm: 4 | - 1.9.3 5 | - 2.0.0 6 | - 2.1 7 | - jruby 8 | 9 | sudo: false 10 | 11 | env: 12 | - PURE_RUBY=1 13 | - KITCHEN_SINK=1 14 | 15 | script: bundle exec rake 16 | 17 | bundler_args: --without docs release repl 18 | 19 | matrix: 20 | exclude: 21 | - rvm: jruby 22 | env: KITCHEN_SINK=1 23 | 24 | notifications: 25 | webhooks: 26 | urls: 27 | - "https://webhooks.gitter.im/e/4442efd380ec811746d9" 28 | on_success: change 29 | on_failure: always 30 | on_start: false 31 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/dynamodb.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:DynamoDB, { 2 | api: "#{Aws::API_DIR}/dynamodb/2012-08-10/api-2.json", 3 | docs: "#{Aws::API_DIR}/dynamodb/2012-08-10/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/dynamodb/2012-08-10/paginators-1.json", 5 | resources: "#{Aws::API_DIR}/dynamodb/2012-08-10/resources-1.json", 6 | waiters: "#{Aws::API_DIR}/dynamodb/2012-08-10/waiters-2.json", 7 | }) 8 | 9 | module Aws 10 | module DynamoDB 11 | autoload :AttributeValue, 'aws-sdk-core/dynamodb/attribute_value' 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/services/s3/object_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | module Aws 4 | module S3 5 | class Object 6 | describe '#presigned_post' do 7 | 8 | let(:object) { Object.new('bucket', 'key', stub_responses: true) } 9 | 10 | it 'creates a presigned post with a key' do 11 | post = object.presigned_post(acl: 'public-read') 12 | expect(post.fields['key']).to eq('key') 13 | expect(post.fields['acl']).to eq('public-read') 14 | end 15 | 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /aws-sdk-core/features/cloudtrail/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @cloudtrail @client 3 | Feature: AWS CloudTrail 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeTrails" API 7 | Then the response should contain a "trailList" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DeleteTrail" API with: 11 | | Name | faketrail | 12 | Then I expect the response error code to be "TrailNotFoundException" 13 | And I expect the response error message to include: 14 | """ 15 | Unknown trail 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/elasticloadbalancing/2012-06-01/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeInstanceHealth": { 4 | "result_key": "InstanceStates" 5 | }, 6 | "DescribeLoadBalancerPolicies": { 7 | "result_key": "PolicyDescriptions" 8 | }, 9 | "DescribeLoadBalancerPolicyTypes": { 10 | "result_key": "PolicyTypeDescriptions" 11 | }, 12 | "DescribeLoadBalancers": { 13 | "input_token": "Marker", 14 | "output_token": "NextMarker", 15 | "result_key": "LoadBalancerDescriptions" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/services/s3/bucket_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | module Aws 4 | module S3 5 | class Bucket 6 | describe '#presigned_post' do 7 | 8 | let(:object) { Bucket.new('bucket', stub_responses: true) } 9 | 10 | it 'creates a presigned post without a key' do 11 | post = object.presigned_post(key: 'foo', acl: 'public-read') 12 | expect(post.fields['key']).to eq('foo') 13 | expect(post.fields['acl']).to eq('public-read') 14 | end 15 | 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /aws-sdk-core/features/ssm/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @ssm @client 3 | Feature: Amazon SSM 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListDocuments" API 7 | Then the response should contain a list of "DocumentIdentifiers" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetDocument" API with: 11 | | name | 'fake-name' | 12 | Then I expect the response error code to be "ValidationException" 13 | And I expect the response error message to include: 14 | """ 15 | validation error detected 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/paging/provider.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Paging 3 | class Provider 4 | 5 | # @param [Hash] rules 6 | def initialize(rules) 7 | @operations = rules['pagination'].select { |k,v| v.key?('input_token') } 8 | end 9 | 10 | # @param [String] operation_name 11 | # @return [Pager] 12 | def pager(operation_name) 13 | if rules = @operations[operation_name] 14 | Pager.new(rules) 15 | else 16 | NullPager.new 17 | end 18 | end 19 | 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_params_must_not_be_dataMembers/api.json: -------------------------------------------------------------------------------- 1 | { 2 | "operations": { 3 | "OperationName": { 4 | "input": { "shape": "RequestShape" }, 5 | "output": { "shape": "ResourceShape" } 6 | } 7 | }, 8 | "shapes": { 9 | "RequestShape": { 10 | "type": "structure", 11 | "members": { 12 | "ResourceId": { "shape": "string" } 13 | } 14 | }, 15 | "ResourceShape": { 16 | "type": "structure", 17 | "members": { 18 | } 19 | }, 20 | "string": { "type": "string" } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /aws-sdk-core/features/emr/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @emr @client 3 | Feature: Amazon EMR 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeJobFlows" API 7 | Then the response should contain a list of "JobFlows" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeJobFlows" API with: 11 | | JobFlowIds | ['fake_job_flow'] | 12 | Then I expect the response error code to be "ValidationException" 13 | And I expect the response error message to include: 14 | """ 15 | Specified job flow ID not valid 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/features/glacier/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @glacier @client 3 | Feature: Amazon Glacier 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListVaults" API with: 7 | | AccountId | - | 8 | Then the response should contain a "VaultList" 9 | 10 | Scenario: Error handling 11 | When I attempt to call the "ListVaults" API with: 12 | | AccountId | abcmnoxyz | 13 | Then I expect the response error code to be "AccessDeniedException" 14 | And I expect the response error message to include: 15 | """ 16 | Access denied 17 | """ 18 | -------------------------------------------------------------------------------- /aws-sdk-core/features/iam/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @iam @client 3 | Feature: AWS Identity and Access Management 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListUsers" API 7 | Then the response should contain a list of "Users" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetUser" API with: 11 | | UserName | fake_user | 12 | Then I expect the response error code to be "NoSuchEntity" 13 | And I expect the response error message to include: 14 | """ 15 | The user with name fake_user cannot be found. 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/features/importexport/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @importexport @client 3 | Feature: AWS Import/Export 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListJobs" API 7 | Then the response should contain a list of "Jobs" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetStatus" API with: 11 | | JobId | fake_job | 12 | Then I expect the response error code to be "InvalidJobIdException" 13 | And I expect the response error message to include: 14 | """ 15 | No such job fake_job for your account 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/features/route53/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @route53 @client 3 | Feature: Amazon Route 53 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListHostedZones" API 7 | Then the response should contain a list of "HostedZones" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetHostedZone" API with: 11 | | Id | fake-zone | 12 | Then I expect the response error code to be "NoSuchHostedZone" 13 | And I expect the response error message to include: 14 | """ 15 | No hosted zone found with ID: fake-zone 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/seahorse/client/plugins/content_length.rb: -------------------------------------------------------------------------------- 1 | module Seahorse 2 | module Client 3 | module Plugins 4 | class ContentLength < Plugin 5 | 6 | # @api private 7 | class Handler < Client::Handler 8 | 9 | def call(context) 10 | length = context.http_request.body.size 11 | context.http_request.headers['Content-Length'] = length 12 | @handler.call(context) 13 | end 14 | 15 | end 16 | 17 | handler(Handler, step: :sign, priority: 0) 18 | 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/SWF/list_domains.yml: -------------------------------------------------------------------------------- 1 | config: 2 | region: us-east-1 3 | operation: list_domains 4 | params: 5 | :registration_status: REGISTERED 6 | request: 7 | host: swf.us-east-1.amazonaws.com 8 | method: POST 9 | path: / 10 | headers: 11 | X-Amz-Target: SimpleWorkflowService.ListDomains 12 | Content-Type: application/x-amz-json-1.0 13 | body: '{"registrationStatus":"REGISTERED"}' 14 | response: 15 | status_code: 200 16 | headers: {} 17 | body: '{"domainInfos": [{"name": "Hello"}]}' 18 | data: 19 | :domain_infos: 20 | - :name: 'Hello' 21 | -------------------------------------------------------------------------------- /aws-sdk-core/features/datapipeline/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @datapipeline @client 3 | Feature: AWS Data Pipeline 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListPipelines" API 7 | Then the response should contain a "PipelineIdList" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetPipelineDefinition" API with: 11 | | PipelineId | fake-id | 12 | Then I expect the response error code to be "PipelineNotFoundException" 13 | And I expect the response error message to include: 14 | """ 15 | does not exist 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/features/lambda/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @lambda @client 3 | Feature: Amazon Lambda 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListEventSourceMappings" API 7 | Then the response should contain a list of "EventSourceMappings" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetEventSourceMapping" API with: 11 | | UUID | fake-uuid | 12 | Then I expect the response error code to be "ResourceNotFoundException" 13 | And I expect the response error message to include: 14 | """ 15 | does not exist 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/features/route53_domains/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @route53_domains @client 3 | Feature: Amazon Route53 Domains 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListDomains" API 7 | Then the response should contain a list of "Domains" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetDomainDetail" API with: 11 | | DomainName | fake-domain-name | 12 | Then I expect the response error code to be "InvalidInput" 13 | And I expect the response error message to include: 14 | """ 15 | Invalid request 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/features/simpledb/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @simpledb @client 3 | Feature: Amazon SimpleDB 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListDomains" API 7 | Then the response should contain a list of "DomainNames" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DomainMetadata" API with: 11 | | DomainName | fake-domain | 12 | Then I expect the response error code to be "NoSuchDomain" 13 | And I expect the response error message to include: 14 | """ 15 | The specified domain does not exist. 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/plugins/machine_learning_predict_endpoint.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Plugins 3 | # @api private 4 | class MachineLearningPredictEndpoint < Seahorse::Client::Plugin 5 | 6 | class Handler < Seahorse::Client::Handler 7 | 8 | def call(context) 9 | endpoint = context.params.delete(:predict_endpoint) 10 | context.http_request.endpoint = URI.parse(endpoint.to_s) 11 | @handler.call(context) 12 | end 13 | 14 | end 15 | 16 | handle(Handler, operations: [:predict]) 17 | 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /developer_guide/content/sections/quick-start.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Quick Start 3 | --- 4 | 5 | ## Installation 6 | 7 | ```bash 8 | $ gem install aws-sdk 9 | ``` 10 | 11 | ```ruby 12 | gem 'aws-sdk', '~> 2' 13 | ``` 14 | 15 | ## Configuration 16 | 17 | ```ruby 18 | require 'aws-sdk' 19 | 20 | # comment here 21 | Aws.config[:region] = 'us-west-2' 22 | Aws.config[:credentials] = Aws::Credentials.new('akid', 'secret') 23 | ``` 24 | 25 | ## Make an API request 26 | 27 | ```ruby 28 | s3 = Aws::S3::Client.new 29 | resp = s3.list_buckets 30 | resp.buckets.map(&:name) 31 | #=> ['aws-sdk', ...] 32 | ``` 33 | -------------------------------------------------------------------------------- /doc-src/templates/default/fulldoc/html/js/tabs.js: -------------------------------------------------------------------------------- 1 | function activateTab($li) { 2 | $li.addClass('active') 3 | $li.siblings('li').removeClass('active'); 4 | $li.parents('.tab-box').find('.tab-contents').hide(); 5 | $('#' + $li.attr('data-tab-id')).show(); 6 | } 7 | 8 | function setupTabBoxes() { 9 | 10 | $('div.tab-box .tabs li:first-child').each(function(n, li) { 11 | activateTab($(li)); 12 | }); 13 | 14 | $('div.tab-box .tabs li').click(function(e) { 15 | activateTab($(e.target)); 16 | }); 17 | } 18 | 19 | $(document).ready(function() { 20 | setupTabBoxes(); 21 | }); 22 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2013-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"). You 4 | may not use this file except in compliance with the License. A copy of 5 | the License is located at 6 | 7 | http://aws.amazon.com/apache2.0/ 8 | 9 | or in the "license" file accompanying this file. This file is 10 | distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | ANY KIND, either express or implied. See the License for the specific 12 | language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /aws-sdk-core/features/opsworks/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @opsworks @client 3 | Feature: AWS OpsWorks 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeStacks" API 7 | Then the response should contain a list of "Stacks" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeLayers" API with: 11 | | StackId | fake_stack | 12 | Then I expect the response error code to be "ResourceNotFoundException" 13 | And I expect the response error message to include: 14 | """ 15 | Unable to find stack with ID fake_stack 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/features/cloudsearch/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @cloudsearch @client 3 | Feature: Amazon CloudSearch 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeDomains" API 7 | Then the response should contain a "DomainStatusList" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeIndexFields" API with: 11 | | DomainName | fakedomain | 12 | Then I expect the response error code to be "ResourceNotFound" 13 | And I expect the response error message to include: 14 | """ 15 | Domain not found: fakedomain 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/features/rds/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @rds @client 3 | Feature: Amazon RDS 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeDbEngineVersions" API 7 | Then the response should contain a list of "DbEngineVersions" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeDbInstances" API with: 11 | | DbInstanceIdentifier | fake-id | 12 | Then I expect the response error code to be "DBInstanceNotFound" 13 | And I expect the response error message to include: 14 | """ 15 | DBInstance fake-id not found. 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/features/cloudhsm/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @cloudhsm @client 3 | Feature: Amazon CloudHSM 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListHapgs" API 7 | Then the response should contain a list of "HapgList" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeHapg" API with: 11 | | HapgArn | bogus-arn | 12 | Then I expect the response error code to be "ValidationException" 13 | And I expect the response error message to include: 14 | """ 15 | Value 'bogus-arn' at 'hapgArn' failed to satisfy constraint 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/features/kinesis/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @kinesis @client 3 | Feature: AWS Kinesis 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListStreams" API 7 | Then the response should contain a list of "StreamNames" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeStream" API with: 11 | | StreamName | bogus-stream-name | 12 | Then I expect the response error code to be "ResourceNotFoundException" 13 | And I expect the response error message to include: 14 | """ 15 | Stream bogus-stream-name under account 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/features/kms/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @kms @client 3 | Feature: Amazon Key Management Service 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListAliases" API 7 | Then the response should contain a list of "Aliases" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetKeyPolicy" API with: 11 | | KeyId | fake-key | 12 | | PolicyName | fake-policy | 13 | Then I expect the response error code to be "NotFoundException" 14 | And I expect the response error message to include: 15 | """ 16 | does not exist 17 | """ 18 | -------------------------------------------------------------------------------- /aws-sdk-core/features/ses/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @ses @client 3 | Feature: Amazon Simple Email Service 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListIdentities" API 7 | Then the response should contain a list of "Identities" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "VerifyEmailIdentity" API with: 11 | | EmailAddress | fake_email | 12 | Then I expect the response error code to be "InvalidParameterValue" 13 | And I expect the response error message to include: 14 | """ 15 | Invalid email address. 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/seahorse/client/plugins/content_length_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | module Seahorse 4 | module Client 5 | module Plugins 6 | describe ContentLength::Handler do 7 | 8 | it 'adds content-length to regular payload' do 9 | handler = ContentLength::Handler.new(lambda { |context| }) 10 | context = RequestContext.new 11 | context.http_request.body = 'BODY' 12 | handler.call(context) 13 | expect(context.http_request.headers['Content-Length']).to eq('4') 14 | end 15 | 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/workspaces/2015-04-08/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeWorkspaceBundles": { 4 | "input_token": "NextToken", 5 | "output_token": "NextToken", 6 | "result_key": "Bundles" 7 | }, 8 | "DescribeWorkspaceDirectories": { 9 | "input_token": "NextToken", 10 | "output_token": "NextToken", 11 | "result_key": "Directories" 12 | }, 13 | "DescribeWorkspaces": { 14 | "limit_key": "Limit", 15 | "input_token": "NextToken", 16 | "output_token": "NextToken", 17 | "result_key": "Workspaces" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /aws-sdk-core/features/redshift/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @redshift @client 3 | Feature: Amazon Redshift 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeClusterVersions" API 7 | Then the response should contain a list of "ClusterVersions" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeClusters" API with: 11 | | ClusterIdentifier | fake-cluster | 12 | Then I expect the response error code to be "ClusterNotFound" 13 | And I expect the response error message to include: 14 | """ 15 | Cluster fake-cluster not found. 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/features/sts/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @sts @client 3 | Feature: AWS STS 4 | 5 | Scenario: Making a basic request 6 | When I call the "GetSessionToken" API 7 | Then the response should contain a "Credentials" member 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetFederationToken" API with: 11 | | Name | temp | 12 | | Policy | | 13 | Then I expect the response error code to be "ValidationError" 14 | And I expect the response error message to include: 15 | """ 16 | Value '' at 'policy' failed to satisfy constraint 17 | """ 18 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/xml/rest_handler.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Xml 3 | class RestHandler < RestBodyHandler 4 | 5 | # @param [Seahorse::Model::Shapes::Structure] shape 6 | # @param [Hash] params 7 | def serialize_params(shape, params) 8 | Builder.new(shape).to_xml(params) 9 | end 10 | 11 | # @param [String] xml 12 | # @param [Seahorse::Model::Shapes::Structure] shape 13 | # @param [Structure, nil] target 14 | def parse_body(xml, shape, target) 15 | Parser.new(shape).parse(xml, target) 16 | end 17 | 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/json/rest_handler.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Json 3 | class RestHandler < RestBodyHandler 4 | 5 | # @param [Seahorse::Model::Shapes::Structure] shape 6 | # @param [Hash] params 7 | def serialize_params(shape, params) 8 | Builder.new.to_json(shape, params) 9 | end 10 | 11 | # @param [String] json 12 | # @param [Seahorse::Model::Shapes::Structure] shape 13 | # @param [Structure, nil] target 14 | def parse_body(json, shape, target) 15 | Parser.new.parse(shape, json, target) 16 | end 17 | 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /developer_guide/content/css/main.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | } 4 | 5 | #main { 6 | padding: 40px 15px; 7 | } 8 | 9 | pre { 10 | color: white; 11 | background-color: #333333; 12 | font-weight: normal; 13 | } 14 | 15 | code.language-ruby .string .delimiter { 16 | color: #FEDEAD; 17 | } 18 | 19 | code.language-ruby .string .content { 20 | color: #F4A09E; 21 | } 22 | 23 | code.language-ruby .symbol { 24 | color: #CD5C5D; 25 | } 26 | 27 | code.language-ruby .comment { 28 | color: #83CEDF; 29 | } 30 | 31 | code.language-ruby .constant { 32 | color: #BDB765; 33 | font-weight: bold; 34 | } 35 | -------------------------------------------------------------------------------- /aws-sdk-core/features/ec2/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @ec2 @client 3 | Feature: Amazon Elastic Compute Cloud 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeRegions" API 7 | Then the response should contain a list of "Regions" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeInstances" API with: 11 | | InstanceIds | ['i-12345678'] | 12 | Then I expect the response error code to be "InvalidInstanceIDNotFound" 13 | And I expect the response error message to include: 14 | """ 15 | The instance ID 'i-12345678' does not exist 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/features/elastictranscoder/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @elastictranscoder @client 3 | Feature: Amazon Elastic Transcoder 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListPresets" API 7 | Then the response should contain a list of "Presets" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "ReadJob" API with: 11 | | Id | fake_job | 12 | Then I expect the response error code to be "ValidationException" 13 | And I expect the response error message to include: 14 | """ 15 | Value 'fake_job' at 'id' failed to satisfy constraint 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/features/machinelearning/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @machinelearning @client 3 | Feature: Amazon Machine Learning 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeMLModels" API 7 | Then the response should contain a list of "Results" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetMLModel" API with: 11 | | MLModelId | fake-model | 12 | Then I expect the response error code to be "ResourceNotFoundException" 13 | And I expect the response error message to include: 14 | """ 15 | No MLModel with id fake-model exists 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/directconnect/2012-10-25/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeConnections": { 4 | "result_key": "connections" 5 | }, 6 | "DescribeConnectionsOnInterconnect": { 7 | "result_key": "connections" 8 | }, 9 | "DescribeInterconnects": { 10 | "result_key": "interconnects" 11 | }, 12 | "DescribeLocations": { 13 | "result_key": "locations" 14 | }, 15 | "DescribeVirtualGateways": { 16 | "result_key": "virtualGateways" 17 | }, 18 | "DescribeVirtualInterfaces": { 19 | "result_key": "virtualInterfaces" 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /aws-sdk-core/features/codedeploy/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @codedeploy @client 3 | Feature: Amazon CodeDeploy 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListApplications" API 7 | Then the response should contain a list of "applications" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetApplication" API with: 11 | | applicationName | bogus-app | 12 | Then I expect the response error code to be "ApplicationDoesNotExistException" 13 | And I expect the response error message to include: 14 | """ 15 | No application found for name: bogus-app 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/errors_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | module Aws 4 | module Resources 5 | module Errors 6 | describe UnknownOperationError do 7 | 8 | it 'extends ArgumentError' do 9 | error = UnknownOperationError.new(:operation_name) 10 | expect(error).to be_kind_of(ArgumentError) 11 | end 12 | 13 | it 'builds a messae from the error name' do 14 | error = UnknownOperationError.new(:operation_name) 15 | expect(error.message).to eq("operation `operation_name' not defined") 16 | end 17 | 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/resource_paths_resolve_to_appropriate_shape/api.json: -------------------------------------------------------------------------------- 1 | { 2 | "operations": { 3 | "ListDooDads": { 4 | "output": { "shape": "ListDooDadsResponse" } 5 | } 6 | }, 7 | "shapes": { 8 | "ListDooDadsResponse": { 9 | "type": "structure", 10 | "members": { 11 | "DooDads": { "shape": "DooDad" }, 12 | "BadPath": { "shape": "String" } 13 | } 14 | }, 15 | "DooDad": { 16 | "type": "structure", 17 | "members": { 18 | "Name": { "shape": "String" } 19 | } 20 | }, 21 | "String": { "type": "string" } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/kinesis/2013-12-02/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeStream": { 4 | "input_token": "ExclusiveStartShardId", 5 | "limit_key": "Limit", 6 | "more_results": "StreamDescription.HasMoreShards", 7 | "output_token": "StreamDescription.Shards[-1].ShardId", 8 | "result_key": "StreamDescription.Shards" 9 | }, 10 | "ListStreams": { 11 | "input_token": "ExclusiveStartStreamName", 12 | "limit_key": "Limit", 13 | "more_results": "HasMoreStreams", 14 | "output_token": "StreamNames[-1]", 15 | "result_key": "StreamNames" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /aws-sdk-core/features/elasticache/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @elasticache @client 3 | Feature: ElastiCache 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeEvents" API 7 | Then the response should contain a list of "Events" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeCacheClusters" API with: 11 | | CacheClusterId | fake_cluster | 12 | Then I expect the response error code to be "InvalidParameterValue" 13 | And I expect the response error message to include: 14 | """ 15 | The parameter CacheClusterIdentifier is not a valid identifier. 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/features/storagegateway/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @storagegateway @client 3 | Feature: AWS Storage Gateway 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListGateways" API 7 | Then the response should contain a list of "Gateways" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "ListVolumes" API with: 11 | | GatewayARN | fake_gateway | 12 | Then I expect the response error code to be "ValidationException" 13 | And I expect the response error message to include: 14 | """ 15 | Value 'fake_gateway' at 'gatewayARN' failed to satisfy constraint 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/features/swf/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @swf @client 3 | Feature: Amazon Simple Workflow Service 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListDomains" API with: 7 | | RegistrationStatus | REGISTERED | 8 | Then the response should contain a list of "DomainInfos" 9 | 10 | Scenario: Error handling 11 | When I attempt to call the "DescribeDomain" API with: 12 | | Name | fake_domain | 13 | Then I expect the response error code to be "UnknownResourceFault" 14 | And I expect the response error message to include: 15 | """ 16 | Unknown domain: fake_domain 17 | """ 18 | -------------------------------------------------------------------------------- /aws-sdk-core/features/workspaces/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @workspaces @client 3 | Feature: Amazon WorkSpaces 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeWorkspaces" API 7 | Then the response should contain a list of "Workspaces" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeWorkspaces" API with: 11 | | DirectoryId | fake-id | 12 | Then I expect the response error code to be "ValidationException" 13 | And I expect the response error message to include: 14 | """ 15 | Value 'fake-id' at 'directoryId' failed to satisfy constraint 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/plugins/swf_read_timeouts.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Plugins 3 | # Extends the default read-timeout value 4 | class SWFReadTimeouts < Seahorse::Client::Plugin 5 | 6 | class Handler < Seahorse::Client::Handler 7 | 8 | def call(context) 9 | context.config = context.config.dup 10 | context.config.http_read_timeout = 90 11 | @handler.call(context) 12 | end 13 | 14 | end 15 | 16 | handler(Handler, operations: [ 17 | :poll_for_activity_task, 18 | :poll_for_decision_task, 19 | ]) 20 | 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /aws-sdk-core/features/dynamodb/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @dynamodb @client 3 | Feature: Amazon DynamoDB 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListTables" API with: 7 | | Limit | 1 | 8 | Then the response should contain a list of "TableNames" 9 | 10 | Scenario: Error handling 11 | When I attempt to call the "DescribeTable" API with: 12 | | TableName | fake-table | 13 | Then I expect the response error code to be "ResourceNotFoundException" 14 | And I expect the response error message to include: 15 | """ 16 | Requested resource not found: Table: fake-table not found 17 | """ 18 | -------------------------------------------------------------------------------- /aws-sdk-core/features/directconnect/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @directconnect @client 3 | Feature: AWS Direct Connect 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeConnections" API 7 | Then the response should contain a list of "Connections" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeConnections" API with: 11 | | connectionId | fake-connection | 12 | Then I expect the response error code to be "DirectConnectClientException" 13 | And I expect the response error message to include: 14 | """ 15 | Connection ID fake-connection has an invalid format 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-resources/lib/aws-sdk-resources/services/iam.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module IAM 3 | class Resource 4 | 5 | # @return [Seahorse::Client::Response, false] Returns the response 6 | # from {Client#delete_account_alias} if an alias was deleted. 7 | # Returns `false` if this account had no alias to remove. 8 | # @see Client#delete_account_alias 9 | def delete_account_alias 10 | if name = @client.list_account_aliases.account_aliases.first 11 | @client.delete_account_alias(account_alias: name) 12 | else 13 | false 14 | end 15 | end 16 | 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_params_can_be_nested/definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources": { 3 | "ResourceName": { 4 | "identifiers": [ 5 | { "name": "Type" }, 6 | { "name": "Id" } 7 | ], 8 | "shape": "ResourceShape", 9 | "load": { 10 | "request": { 11 | "operation": "OperationName", 12 | "params": [ 13 | { "target":"Filters[0].Name", "source":"identifier", "name":"Type" }, 14 | { "target":"Filters[0].Values[]", "source":"identifier", "name":"Id" } 15 | ] 16 | }, 17 | "path": "$" 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /aws-sdk-core/features/sns/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @sns @client 3 | Feature: Amazon Simple Notification Service 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListTopics" API 7 | Then the response should contain a list of "Topics" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "Publish" API with: 11 | | Message | hello | 12 | | TopicArn | fake_topic | 13 | Then I expect the response error code to be "InvalidParameter" 14 | And I expect the response error message to include: 15 | """ 16 | Invalid parameter: TopicArn Reason: fake_topic does not start with arn 17 | """ 18 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/S3/error_parsing.yml: -------------------------------------------------------------------------------- 1 | operation: delete_bucket 2 | params: 3 | :bucket: 'bucket' 4 | response: 5 | status_code: 409 6 | body: | 7 | 8 | 9 | BucketNotEmpty 10 | The bucket you tried to delete is not empty 11 | aws-sdk 12 | 740BE6AB575EACED 13 | MQVg1RMI+d93Hps1E8qpIuDb9Gd2TzkDhm0wE40981DjxSHP1UfLBB7qOAlwAqJB 14 | 15 | error: 16 | class: Aws::S3::Errors::BucketNotEmpty 17 | message: The bucket you tried to delete is not empty 18 | -------------------------------------------------------------------------------- /aws-sdk-core/features/cloudwatchlogs/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @cloudwatchlogs @client 3 | Feature: Amazon CloudWatch Logs 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeLogGroups" API 7 | Then the response should contain a list of "LogGroups" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetLogEvents" API with: 11 | | LogGroupName | fakegroup | 12 | | LogStreamName | fakestream | 13 | Then I expect the response error code to be "ResourceNotFoundException" 14 | And I expect the response error message to include: 15 | """ 16 | The specified log group does not exist. 17 | """ 18 | -------------------------------------------------------------------------------- /aws-sdk-core/features/configservice/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @configservice @client 3 | Feature: AWS Config 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeConfigurationRecorders" API 7 | Then the response should contain a list of "ConfigurationRecorders" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetResourceConfigHistory" API with: 11 | | resourceType | fake-type | 12 | | resourceId | fake-id | 13 | Then I expect the response error code to be "ValidationException" 14 | And I expect the response error message to include: 15 | """ 16 | failed to satisfy constraint 17 | """ 18 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/aws/cloud_front/client_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | module Aws 4 | module CloudFront 5 | describe Client do 6 | 7 | it 'does not have the YYYY_MM_DD suffix on the api operation name' do 8 | operation = Client.api.operation(:list_distributions) 9 | expect(operation.name).to eq('ListDistributions') 10 | end 11 | 12 | it 'returns the paginator for the operation' do 13 | operation = Client.api.operation(:list_distributions) 14 | pager = Client.paginators.pager(operation.name) 15 | expect(pager).not_to be_kind_of(Paging::NullPager) 16 | end 17 | 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /.simplecov: -------------------------------------------------------------------------------- 1 | require 'coveralls' 2 | Coveralls.wear_merged! 3 | 4 | SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ 5 | SimpleCov::Formatter::HTMLFormatter, 6 | Coveralls::SimpleCov::Formatter 7 | ] 8 | 9 | SimpleCov.start do 10 | 11 | project_name 'AWS SDK for Ruby' 12 | 13 | add_filter '/spec/' 14 | add_filter '/features/' 15 | add_filter '/aws-sdk-resources/lib/aws/resource/documenter' 16 | add_filter '/aws-sdk-resources/lib/aws/resource/source.rb' 17 | 18 | %w(aws-sdk aws-sdk-resources aws-sdk-core).each do |group_name| 19 | add_group(group_name, "/#{group_name}/lib") 20 | end 21 | 22 | merge_timeout 60 * 15 # 15 minutes 23 | 24 | end 25 | -------------------------------------------------------------------------------- /aws-sdk-core/features/cloudwatch/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @cloudwatch @client 3 | Feature: Amazon CloudWatch 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListMetrics" API with: 7 | | Namespace | AWS/EC2 | 8 | Then the response should contain a list of "Metrics" 9 | 10 | Scenario: Error handling 11 | When I attempt to call the "SetAlarmState" API with: 12 | | AlarmName | abc | 13 | | StateValue | mno | 14 | | StateReason | xyz | 15 | Then I expect the response error code to be "ValidationError" 16 | And I expect the response error message to include: 17 | """ 18 | failed to satisfy constraint 19 | """ 20 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/resource_paths_resolve_to_appropriate_shape/definition.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources": { 3 | "Thing": { 4 | "hasMany": { 5 | "DooDads": { 6 | "request": { "operation": "ListDooDads" }, 7 | "resource": { 8 | "type": "DooDad", 9 | "identifiers": [ 10 | { "target":"Name", "source":"response", "path":"DooDads[].Name" } 11 | ], 12 | "path": "BadPath" 13 | } 14 | } 15 | } 16 | }, 17 | "DooDad": { 18 | "identifiers": [ 19 | { "name": "Name" } 20 | ], 21 | "shape": "DooDad" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /developer_guide/content/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Developer Guide 3 | --- 4 | 5 | The AWS SDK for Ruby is available from [RubyGems.org](https://rubygems.org/) as the [`aws-sdk` gem](https://rubygems.org/gems/aws-sdk). 6 | 7 | ## Sections 8 | 9 | <% sections.each do |name, _| %> 10 | * <%= section_link(name) %><% end %> 11 | 12 | ## Links of Interest 13 | 14 | * [API Documentation](http://docs.aws.amazon.com/sdkforruby/api/frames.html) 15 | * [Change Log](https://github.com/aws/aws-sdk-ruby/blob/master/CHANGELOG.md) 16 | * [Issues](http://github.com/aws/aws-sdk-ruby/issues) 17 | * [Gitter Channel](https://gitter.im/aws/aws-sdk-ruby) 18 | * [License](http://aws.amazon.com/apache2.0/) 19 | -------------------------------------------------------------------------------- /aws-sdk-core/features/elasticbeanstalk/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @elasticbeanstalk @client 3 | Feature: AWS Elastic Beanstalk 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListAvailableSolutionStacks" API 7 | Then the response should contain a list of "SolutionStacks" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeEnvironmentResources" API with: 11 | | EnvironmentId | fake_environment | 12 | Then I expect the response error code to be "InvalidParameterValue" 13 | And I expect the response error message to include: 14 | """ 15 | No Environment found for EnvironmentId = 'fake_environment'. 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/plugins/response_paging.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Plugins 3 | class ResponsePaging < Seahorse::Client::Plugin 4 | 5 | # @api private 6 | class Handler < Seahorse::Client::Handler 7 | 8 | def call(context) 9 | context[:original_params] = context.params 10 | PageableResponse.new(@handler.call(context), pager(context)) 11 | end 12 | 13 | private 14 | 15 | def pager(context) 16 | context.client.class.paginators.pager(context.operation.name) 17 | end 18 | 19 | end 20 | 21 | handler(Handler, step: :initialize, priority: 90) 22 | 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/Route53/change_resource_record_sets.yml: -------------------------------------------------------------------------------- 1 | # Ensure that params bound for the request URI (like hosted_zone_id) do not 2 | # end up in the XML request body 3 | operation: change_resource_record_sets 4 | config: 5 | region: us-east-1 6 | params: 7 | :hosted_zone_id: 'ZONE-ID' 8 | :change_batch: 9 | :changes: [] 10 | request: 11 | path: !ruby/regexp /^\/\d{4}-\d{2}-\d{2}\/hostedzone\/ZONE-ID\/rrset\// 12 | body: | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/S3/create_bucket_with_implied_location_constraint.yml: -------------------------------------------------------------------------------- 1 | config: 2 | region: us-west-1 3 | operation: create_bucket 4 | params: 5 | :bucket: 'bucket-name' 6 | :acl: public-read 7 | request: 8 | host: bucket-name.s3-us-west-1.amazonaws.com 9 | method: PUT 10 | path: / 11 | headers: 12 | X-Amz-Acl: public-read 13 | body: | 14 | 15 | us-west-1 16 | 17 | response: 18 | status_code: 200 19 | headers: 20 | Location: /us-west-1 21 | body: '' 22 | data: 23 | :location: /us-west-1 24 | -------------------------------------------------------------------------------- /doc-src/plugins/apis.rb: -------------------------------------------------------------------------------- 1 | $LOAD_PATH.unshift(File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'aws-sdk-core', 'lib'))) 2 | 3 | require 'aws-sdk-core' 4 | 5 | YARD::Tags::Library.define_tag('CONFIGURATION_OPTIONS', :seahorse_client_option) 6 | YARD::Tags::Library.define_tag('SERVICE', :service) 7 | YARD::Tags::Library.define_tag('API_VERSION', :api_version) 8 | 9 | YARD::Templates::Engine.register_template_path(File.join(File.dirname(__FILE__), '..', 'templates')) 10 | 11 | YARD::Parser::SourceParser.after_parse_list do 12 | Aws.load_all_services 13 | Aws.service_added do |_, svc_module, options| 14 | Aws::Api::Documenter.new(svc_module, options[:docs]).apply 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/S3/comlete_multipart_upload_error.yml: -------------------------------------------------------------------------------- 1 | operation: complete_multipart_upload 2 | params: 3 | :bucket: 'bucket' 4 | :key: 'key' 5 | :upload_id: 'id' 6 | response: 7 | status_code: 200 8 | body: | 9 | 10 | 11 | InternalError 12 | We encountered an internal error. Please try again. 13 | 656c76696e6727732072657175657374 14 | Uuag1LuByRx9e6j5Onimru9pO4ZVKnJ2Qz7/C1NPcfTWAtRPfTaOFg== 15 | 16 | error: 17 | class: Aws::S3::Errors::InternalError 18 | message: We encountered an internal error. Please try again. 19 | -------------------------------------------------------------------------------- /aws-sdk-core/features/cognitosync/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @cognitosync @client 3 | Feature: Amazon Cognito Sync 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListIdentityPoolUsage" API 7 | Then the response should contain a list of "IdentityPoolUsages" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeIdentityPoolUsage" API with: 11 | | IdentityPoolId | us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee | 12 | Then I expect the response error code to be "ResourceNotFoundException" 13 | And I expect the response error message to include: 14 | """ 15 | IdentityPool 'us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' not found 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/elastictranscoder/2012-09-25/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListJobsByPipeline": { 4 | "input_token": "PageToken", 5 | "output_token": "NextPageToken", 6 | "result_key": "Jobs" 7 | }, 8 | "ListJobsByStatus": { 9 | "input_token": "PageToken", 10 | "output_token": "NextPageToken", 11 | "result_key": "Jobs" 12 | }, 13 | "ListPipelines": { 14 | "input_token": "PageToken", 15 | "output_token": "NextPageToken", 16 | "result_key": "Pipelines" 17 | }, 18 | "ListPresets": { 19 | "input_token": "PageToken", 20 | "output_token": "NextPageToken", 21 | "result_key": "Presets" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /aws-sdk-core/features/cloudformation/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @cloudformation @client 3 | Feature: AWS CloudFormation 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListStacks" API 7 | Then the response should contain a list of "StackSummaries" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "CreateStack" API with: 11 | | StackName | fakestack | 12 | | TemplateURL | http://s3.amazonaws.com/foo/bar | 13 | Then I expect the response error code to be "ValidationError" 14 | And I expect the response error message to include: 15 | """ 16 | TemplateURL must reference a valid S3 object to which you have access. 17 | """ 18 | -------------------------------------------------------------------------------- /aws-sdk-core/features/elasticloadbalancing/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @elasticloadbalancing @client 3 | Feature: Elastic Load Balancing 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeLoadBalancers" API 7 | Then the response should contain a list of "LoadBalancerDescriptions" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeLoadBalancers" API with: 11 | | LoadBalancerNames | ['fake_load_balancer'] | 12 | Then I expect the response error code to be "ValidationError" 13 | And I expect the response error message to include: 14 | """ 15 | LoadBalancer name cannot contain characters that are not letters, or digits or the dash. 16 | """ 17 | -------------------------------------------------------------------------------- /aws-sdk-core/features/env.rb: -------------------------------------------------------------------------------- 1 | $LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib') 2 | 3 | require 'simplecov' 4 | require 'aws-sdk-core' 5 | require 'multi_json' 6 | 7 | SimpleCov.command_name('test:integration:aws-sdk-core') 8 | 9 | cfg = './integration-test-config.json' 10 | 11 | if File.exist?(cfg) 12 | Aws.config = MultiJson.load(File.read(cfg), symbolize_keys: true) 13 | elsif ENV['AWS_INTEGRATION'] 14 | # run integration tests, just don't read a configuration file from disk 15 | else 16 | msg = <<-MSG 17 | 18 | *** skipping aws-sdk-core integration tests *** 19 | To enable integration tests, create a #{cfg} file or export AWS_INTEGRATION=1 20 | 21 | MSG 22 | puts msg 23 | exit(0) 24 | end 25 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/monitoring/2010-08-01/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeAlarmHistory": { 4 | "input_token": "NextToken", 5 | "output_token": "NextToken", 6 | "limit_key": "MaxRecords", 7 | "result_key": "AlarmHistoryItems" 8 | }, 9 | "DescribeAlarms": { 10 | "input_token": "NextToken", 11 | "output_token": "NextToken", 12 | "limit_key": "MaxRecords", 13 | "result_key": "MetricAlarms" 14 | }, 15 | "DescribeAlarmsForMetric": { 16 | "result_key": "MetricAlarms" 17 | }, 18 | "ListMetrics": { 19 | "input_token": "NextToken", 20 | "output_token": "NextToken", 21 | "result_key": "Metrics" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/elasticbeanstalk/2010-12-01/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeApplicationVersions": { 4 | "result_key": "ApplicationVersions" 5 | }, 6 | "DescribeApplications": { 7 | "result_key": "Applications" 8 | }, 9 | "DescribeConfigurationOptions": { 10 | "result_key": "Options" 11 | }, 12 | "DescribeEnvironments": { 13 | "result_key": "Environments" 14 | }, 15 | "DescribeEvents": { 16 | "input_token": "NextToken", 17 | "output_token": "NextToken", 18 | "limit_key": "MaxRecords", 19 | "result_key": "Events" 20 | }, 21 | "ListAvailableSolutionStacks": { 22 | "result_key": "SolutionStacks" 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /aws-sdk-core/features/cognitoidentity/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @cognitoidentity @client 3 | Feature: Amazon Cognito Idenity 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListIdentityPools" API with: 7 | | MaxResults | 10 | 8 | Then the response should contain a list of "IdentityPools" 9 | 10 | Scenario: Error handling 11 | When I attempt to call the "DescribeIdentityPool" API with: 12 | | IdentityPoolId | us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee | 13 | Then I expect the response error code to be "ResourceNotFoundException" 14 | And I expect the response error message to include: 15 | """ 16 | IdentityPool 'us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' not found 17 | """ 18 | -------------------------------------------------------------------------------- /aws-sdk-core/features/autoscaling/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @autoscaling @client 3 | Feature: Auto Scaling 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeScalingProcessTypes" API 7 | Then the response should contain a list of "Processes" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "CreateLaunchConfiguration" API with: 11 | | LaunchConfigurationName | | 12 | | ImageId | ami-12345678 | 13 | | InstanceType | m1.small | 14 | Then I expect the response error code to be "ValidationError" 15 | And I expect the response error message to include: 16 | """ 17 | Member must have length greater than or equal to 1 18 | """ 19 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/S3/create_bucket_with_location_constraint.yml: -------------------------------------------------------------------------------- 1 | config: 2 | region: us-east-1 3 | operation: create_bucket 4 | params: 5 | :bucket: 'bucket-name' 6 | :create_bucket_configuration: 7 | :location_constraint: us-west-2 8 | :acl: public-read 9 | request: 10 | host: bucket-name.s3.amazonaws.com 11 | method: PUT 12 | path: / 13 | headers: 14 | X-Amz-Acl: public-read 15 | body: | 16 | 17 | us-west-2 18 | 19 | response: 20 | status_code: 200 21 | headers: 22 | Location: /us-west-2 23 | body: '' 24 | data: 25 | :location: /us-west-2 26 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_path_must_resolve_to_shape/api.json: -------------------------------------------------------------------------------- 1 | { 2 | "operations": { 3 | "OperationName": { 4 | "output": { "shape": "OutputShape" } 5 | } 6 | }, 7 | "shapes": { 8 | "OutputShape": { 9 | "type": "structure", 10 | "members": { 11 | "Result": { "shape": "DataShape" } 12 | } 13 | }, 14 | "DataShape": { 15 | "type": "structure", 16 | "members": { 17 | "Data": { "shape": "NotResourceShape" } 18 | } 19 | }, 20 | "NotResourceShape": { 21 | "type": "structure", 22 | "members": { 23 | } 24 | }, 25 | "ResourceShape": { 26 | "type": "structure", 27 | "members": { 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /aws-sdk/aws-sdk.gemspec: -------------------------------------------------------------------------------- 1 | version = File.read(File.expand_path('../../VERSION', __FILE__)).strip 2 | 3 | Gem::Specification.new do |spec| 4 | 5 | spec.name = 'aws-sdk' 6 | spec.version = version 7 | spec.summary = 'AWS SDK for Ruby' 8 | spec.description = 'The official AWS SDK for Ruby. Provides both resource oriented interfaces and API clients for AWS services.' 9 | spec.author = 'Amazon Web Services' 10 | spec.homepage = 'http://github.com/aws/aws-sdk-ruby' 11 | spec.license = 'Apache 2.0' 12 | spec.email = ['trevrowe@amazon.com'] 13 | 14 | spec.require_paths = ['lib'] 15 | spec.files += Dir['lib/**/*.rb'] 16 | 17 | spec.add_dependency('aws-sdk-resources', version) 18 | 19 | end 20 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/support/2013-04-15/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeCases": { 4 | "input_token": "nextToken", 5 | "output_token": "nextToken", 6 | "limit_key": "maxResults", 7 | "result_key": "cases" 8 | }, 9 | "DescribeCommunications": { 10 | "input_token": "nextToken", 11 | "output_token": "nextToken", 12 | "limit_key": "maxResults", 13 | "result_key": "communications" 14 | }, 15 | "DescribeServices": { 16 | "result_key": "services" 17 | }, 18 | "DescribeTrustedAdvisorCheckRefreshStatuses": { 19 | "result_key": "statuses" 20 | }, 21 | "DescribeTrustedAdvisorCheckSummaries": { 22 | "result_key": "summaries" 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Plugins 3 | class S3GetBucketLocationFix < Seahorse::Client::Plugin 4 | 5 | class Handler < Seahorse::Client::Handler 6 | 7 | def call(context) 8 | @handler.call(context).on(200) do |response| 9 | response.data = Structure.new([:location_constraint]) 10 | xml = context.http_response.body_contents 11 | matches = xml.match(/>(.+?)<\/LocationConstraint>/) 12 | response.data[:location_constraint] = matches ? matches[1] : '' 13 | end 14 | end 15 | end 16 | 17 | handler(Handler, priority: 60, operations: [:get_bucket_location]) 18 | 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/dynamodb/2012-08-10/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "BatchGetItem": { 4 | "input_token": "RequestItems", 5 | "output_token": "UnprocessedKeys" 6 | }, 7 | "ListTables": { 8 | "input_token": "ExclusiveStartTableName", 9 | "output_token": "LastEvaluatedTableName", 10 | "limit_key": "Limit", 11 | "result_key": "TableNames" 12 | }, 13 | "Query": { 14 | "input_token": "ExclusiveStartKey", 15 | "output_token": "LastEvaluatedKey", 16 | "limit_key": "Limit", 17 | "result_key": "Items" 18 | }, 19 | "Scan": { 20 | "input_token": "ExclusiveStartKey", 21 | "output_token": "LastEvaluatedKey", 22 | "result_key": "Items" 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /aws-sdk-core/features/sqs/step_definitions.rb: -------------------------------------------------------------------------------- 1 | Before("@sqs") do 2 | @client = Aws::SQS::Client.new 3 | end 4 | 5 | After("@sqs") do 6 | end 7 | 8 | Given(/^I create a queue in "(.*?)"$/) do |region| 9 | name = "aws-sdk-core-integration-test-#{Time.now.to_i}-#{rand(1000)}" 10 | resp = Aws::SQS::Client.new(region: region).create_queue(queue_name: name) 11 | @queue_url = resp.queue_url 12 | end 13 | 14 | When(/^I operate on that queue in "(.*?)"$/) do |region| 15 | @response = Aws::SQS::Client.new(region: region).send_message( 16 | queue_url: @queue_url, 17 | message_body: 'hello' 18 | ) 19 | end 20 | 21 | Then(/^the request should be made against "(.*?)"$/) do |region| 22 | expect(@response.context.http_request.endpoint.to_s).to include(region) 23 | end 24 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/Glacier/get_job_output.yml: -------------------------------------------------------------------------------- 1 | # This test ensures the GetJobOutput operation correctly manages the 2 | # http status code response. 3 | operation: get_job_output 4 | params: 5 | :vault_name: 'vault' 6 | :job_id: 'id' 7 | response: 8 | status_code: 200 9 | headers: 10 | "x-amz-sha256-tree-hash": 'checksum' 11 | "Content-Range": 'range' 12 | "Accept-Ranges": 'accept-ranges' 13 | "Content-Type": 'content-type' 14 | "x-amz-archive-description": 'desc' 15 | body: '{ "job": "output" }' 16 | data: 17 | :body: '{ "job": "output" }' 18 | :checksum: 'checksum' 19 | :content_range: 'range' 20 | :accept_ranges: 'accept-ranges' 21 | :content_type: 'content-type' 22 | :status: 200 23 | :archive_description: 'desc' 24 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/signers/base.rb: -------------------------------------------------------------------------------- 1 | require 'openssl' 2 | 3 | module Aws 4 | module Signers 5 | class Base 6 | 7 | # @param [Credentials] credentials 8 | def initialize(credentials) 9 | @credentials = credentials 10 | end 11 | 12 | private 13 | 14 | def sha256_hmac(value) 15 | Base64.encode64( 16 | OpenSSL::HMAC.digest(OpenSSL::Digest.new('sha256'), 17 | @credentials.secret_access_key, value) 18 | ).strip 19 | end 20 | 21 | class << self 22 | 23 | # @param [Seahorse::Client::RequestContext] context 24 | def sign(context) 25 | new(context.config.credentials).sign(context.http_request) 26 | end 27 | 28 | end 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/seahorse/client/handler.rb: -------------------------------------------------------------------------------- 1 | module Seahorse 2 | module Client 3 | class Handler 4 | 5 | # @param [Handler] handler (nil) The next handler in the stack that 6 | # should be called from within the {#call} method. This value 7 | # must only be nil for send handlers. 8 | def initialize(handler = nil) 9 | @handler = handler 10 | end 11 | 12 | # @return [Handler, nil] 13 | attr_accessor :handler 14 | 15 | # @param [RequestContext] context 16 | # @return [Response] 17 | def call(context) 18 | @handler.call(context) 19 | end 20 | 21 | def inspect 22 | "#<#{self.class.name||'UnnamedHandler'} @handler=#{@handler.inspect}>" 23 | end 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/glacier/2012-06-01/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListJobs": { 4 | "input_token": "marker", 5 | "output_token": "Marker", 6 | "limit_key": "limit", 7 | "result_key": "JobList" 8 | }, 9 | "ListMultipartUploads": { 10 | "input_token": "marker", 11 | "output_token": "Marker", 12 | "limit_key": "limit", 13 | "result_key": "UploadsList" 14 | }, 15 | "ListParts": { 16 | "input_token": "marker", 17 | "output_token": "Marker", 18 | "limit_key": "limit", 19 | "result_key": "Parts" 20 | }, 21 | "ListVaults": { 22 | "input_token": "marker", 23 | "output_token": "Marker", 24 | "limit_key": "limit", 25 | "result_key": "VaultList" 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/datapipeline/2012-10-29/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListPipelines": { 4 | "input_token": "marker", 5 | "output_token": "marker", 6 | "more_results": "hasMoreResults", 7 | "result_key": "pipelineIdList" 8 | }, 9 | "DescribeObjects": { 10 | "input_token": "marker", 11 | "output_token": "marker", 12 | "more_results": "hasMoreResults", 13 | "result_key": "pipelineObjects" 14 | }, 15 | "DescribePipelines": { 16 | "result_key": "pipelineDescriptionList" 17 | }, 18 | "QueryObjects": { 19 | "input_token": "marker", 20 | "output_token": "marker", 21 | "more_results": "hasMoreResults", 22 | "limit_key": "limit", 23 | "result_key": "ids" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/elastictranscoder/2012-09-25/waiters-2.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "waiters": { 4 | "JobComplete": { 5 | "delay": 30, 6 | "operation": "ReadJob", 7 | "maxAttempts": 120, 8 | "acceptors": [ 9 | { 10 | "expected": "Complete", 11 | "matcher": "path", 12 | "state": "success", 13 | "argument": "Job.Status" 14 | }, 15 | { 16 | "expected": "Canceled", 17 | "matcher": "path", 18 | "state": "failure", 19 | "argument": "Job.Status" 20 | }, 21 | { 22 | "expected": "Error", 23 | "matcher": "path", 24 | "state": "failure", 25 | "argument": "Job.Status" 26 | } 27 | ] 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/plugins/s3_expect_100_continue.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Plugins 3 | class S3Expect100Continue < Seahorse::Client::Plugin 4 | 5 | def add_handlers(handlers, config) 6 | if config.http_continue_timeout && config.http_continue_timeout > 0 7 | handlers.add(Handler) 8 | end 9 | end 10 | 11 | # @api private 12 | class Handler < Seahorse::Client::Handler 13 | 14 | def call(context) 15 | if 16 | context.http_request.body && 17 | context.http_request.body.size > 0 18 | then 19 | context.http_request.headers['expect'] = '100-continue' 20 | end 21 | @handler.call(context) 22 | end 23 | 24 | end 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/cloudformation/2010-05-15/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeStackEvents": { 4 | "input_token": "NextToken", 5 | "output_token": "NextToken", 6 | "result_key": "StackEvents" 7 | }, 8 | "DescribeStackResources": { 9 | "result_key": "StackResources" 10 | }, 11 | "DescribeStacks": { 12 | "input_token": "NextToken", 13 | "output_token": "NextToken", 14 | "result_key": "Stacks" 15 | }, 16 | "ListStackResources": { 17 | "input_token": "NextToken", 18 | "output_token": "NextToken", 19 | "result_key": "StackResourceSummaries" 20 | }, 21 | "ListStacks": { 22 | "input_token": "NextToken", 23 | "output_token": "NextToken", 24 | "result_key": "StackSummaries" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /aws-sdk-core/features/sqs/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @sqs @client 3 | Feature: Amazon Simple Queue Service 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListQueues" API 7 | Then the response should contain a list of "QueueUrls" 8 | 9 | Scenario: Cross Region Queue Operatoins 10 | Given I create a queue in "us-west-1" 11 | When I operate on that queue in "us-east-1" 12 | Then the request should be made against "us-west-1" 13 | 14 | Scenario: Error handling 15 | When I attempt to call the "GetQueueUrl" API with: 16 | | QueueName | fake_queue | 17 | Then I expect the response error code to be "NonExistentQueue" 18 | And I expect the response error message to include: 19 | """ 20 | The specified queue does not exist for this wsdl version. 21 | """ 22 | -------------------------------------------------------------------------------- /aws-sdk-resources/aws-sdk-resources.gemspec: -------------------------------------------------------------------------------- 1 | version = File.read(File.expand_path('../../VERSION', __FILE__)).strip 2 | 3 | Gem::Specification.new do |spec| 4 | 5 | spec.name = 'aws-sdk-resources' 6 | spec.version = version 7 | spec.summary = 'AWS SDK for Ruby - Resources' 8 | spec.description = 'Provides resource oriented interfaces and other higher-level abstractions for many AWS services. This gem is part of the official AWS SDK for Ruby.' 9 | spec.author = 'Amazon Web Services' 10 | spec.email = ['trevrowe@amazon.com'] 11 | spec.homepage = 'http://github.com/aws/aws-sdk-ruby' 12 | spec.license = 'Apache 2.0' 13 | spec.require_paths = ['lib'] 14 | 15 | spec.files = Dir['lib/**/*.rb'] 16 | 17 | spec.add_dependency('aws-sdk-core', version) 18 | 19 | end 20 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_path_accepts_nested_paths/api.json: -------------------------------------------------------------------------------- 1 | { 2 | "operations": { 3 | "OperationName": { 4 | "output": { "shape": "OutputShape" } 5 | } 6 | }, 7 | "shapes": { 8 | "OutputShape": { 9 | "type": "structure", 10 | "members": { 11 | "Items": { "shape": "ItemList" } 12 | } 13 | }, 14 | "ItemList": { 15 | "type": "list", 16 | "member": { "shape": "Item" } 17 | }, 18 | "Item": { 19 | "type": "structure", 20 | "members": { 21 | "Data": { "shape": "DataList" } 22 | } 23 | }, 24 | "DataList": { 25 | "type": "list", 26 | "member": { "shape": "DataShape" } 27 | }, 28 | "DataShape": { 29 | "type": "structure", 30 | "members": { 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/plugins/dynamodb_extended_retries.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Plugins 3 | 4 | # @seahorse.client.option [Integer] :retry_limit (10) 5 | # The maximum number of times to retry failed requests. Only 6 | # ~ 500 level server errors and certain ~ 400 level client errors 7 | # are retried. Generally, these are throttling errors, data 8 | # checksum errors, networking errors, timeout errors and auth 9 | # errors from expired credentials. 10 | class DynamoDBExtendedRetries < Seahorse::Client::Plugin 11 | 12 | option(:retry_limit, 10) 13 | 14 | option(:retry_backoff, lambda { |context| 15 | if context.retries > 1 16 | Kernel.sleep(50 * (2 ** (context.retries - 1)) / 1000.0) 17 | end 18 | }) 19 | 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/seahorse/client/block_io.rb: -------------------------------------------------------------------------------- 1 | module Seahorse 2 | module Client 3 | class BlockIO 4 | 5 | def initialize(&block) 6 | @block = block 7 | @size = 0 8 | end 9 | 10 | # @param [String] chunk 11 | # @return [Integer] 12 | def write(chunk) 13 | @block.call(chunk) 14 | chunk.bytesize.tap { |chunk_size| @size += chunk_size } 15 | end 16 | 17 | # @param [Integer] bytes (nil) 18 | # @param [String] output_buffer (nil) 19 | # @return [String, nil] 20 | def read(bytes = nil, output_buffer = nil) 21 | data = bytes ? nil : '' 22 | output_buffer ? output_buffer.replace(data || '') : data 23 | end 24 | 25 | # @return [Integer] 26 | def size 27 | @size 28 | end 29 | 30 | end 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/logs/2014-03-28/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeLogGroups": { 4 | "input_token": "nextToken", 5 | "output_token": "nextToken", 6 | "limit_key": "limit", 7 | "result_key": "logGroups" 8 | }, 9 | "DescribeLogStreams": { 10 | "input_token": "nextToken", 11 | "output_token": "nextToken", 12 | "limit_key": "limit", 13 | "result_key": "logStreams" 14 | }, 15 | "DescribeMetricFilters": { 16 | "input_token": "nextToken", 17 | "output_token": "nextToken", 18 | "limit_key": "limit", 19 | "result_key": "metricFilters" 20 | }, 21 | "GetLogEvents": { 22 | "input_token": "nextToken", 23 | "output_token": "nextForwardToken", 24 | "limit_key": "limit", 25 | "result_key": "events" 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/plugins/user_agent.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Plugins 3 | class UserAgent < Seahorse::Client::Plugin 4 | 5 | option(:user_agent_suffix) 6 | 7 | # @api private 8 | class Handler < Seahorse::Client::Handler 9 | 10 | def call(context) 11 | set_user_agent(context) 12 | @handler.call(context) 13 | end 14 | 15 | def set_user_agent(context) 16 | ua = "aws-sdk-ruby2/#{VERSION} %s/%s %s %s" % [ 17 | (RUBY_ENGINE rescue nil or "ruby"), 18 | RUBY_VERSION, 19 | RUBY_PLATFORM, 20 | context.config.user_agent_suffix, 21 | ] 22 | context.http_request.headers['User-Agent'] = ua.strip 23 | end 24 | 25 | end 26 | 27 | handler(Handler) 28 | 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/machinelearning/2014-12-12/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeBatchPredictions": { 4 | "limit_key": "Limit", 5 | "output_token": "NextToken", 6 | "input_token": "NextToken", 7 | "result_key": "Results" 8 | }, 9 | "DescribeDataSources": { 10 | "limit_key": "Limit", 11 | "output_token": "NextToken", 12 | "input_token": "NextToken", 13 | "result_key": "Results" 14 | }, 15 | "DescribeEvaluations": { 16 | "limit_key": "Limit", 17 | "output_token": "NextToken", 18 | "input_token": "NextToken", 19 | "result_key": "Results" 20 | }, 21 | "DescribeMLModels": { 22 | "limit_key": "Limit", 23 | "output_token": "NextToken", 24 | "input_token": "NextToken", 25 | "result_key": "Results" 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /aws-sdk-resources/lib/aws-sdk-resources/services/ec2/instance.rb: -------------------------------------------------------------------------------- 1 | require 'openssl' 2 | 3 | module Aws 4 | module EC2 5 | class Instance 6 | 7 | # @param [String, Pathname] key_pair_path 8 | # @return [String] 9 | def decrypt_windows_password(key_pair_path) 10 | decoded = Base64.decode64(encrypted_password) 11 | pem_bytes = File.open(key_pair_path, 'rb') { |f| f.read } 12 | private_key = OpenSSL::PKey::RSA.new(pem_bytes) 13 | private_key.private_decrypt(decoded) 14 | end 15 | 16 | private 17 | 18 | def encrypted_password 19 | bytes = client.get_password_data(instance_id: id).password_data 20 | if bytes == '' 21 | raise 'password not available yet' 22 | else 23 | bytes 24 | end 25 | end 26 | 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/aws/machinelearning/client_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | module Aws 4 | module MachineLearning 5 | describe Client do 6 | 7 | let(:client) { Client.new(stub_responses:true) } 8 | 9 | describe '#predict' do 10 | 11 | it 'uses the :predict_endpoint parameter as the http endpoint' do 12 | 13 | endpoint = nil 14 | client.handle(step: :send) do |context| 15 | endpoint = context.http_request.endpoint 16 | Seahorse::Client::Response.new(context: context) 17 | end 18 | client.predict( 19 | predict_endpoint: 'https://foo.com', 20 | ml_model_id: 'id', 21 | record: {} 22 | ) 23 | expect(endpoint.to_s).to eq('https://foo.com') 24 | end 25 | 26 | end 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/services/s3/bucket/waiters_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | module Aws 4 | module S3 5 | describe Bucket do 6 | describe 'waiters' do 7 | 8 | let(:client) { S3::Client.new(stub_responses:true) } 9 | 10 | let(:bucket) { Bucket.new('bucket-name', client: client) } 11 | 12 | it 'yields the waiter to the given block' do 13 | client.handle(step: :send) do |context| 14 | context.http_response.signal_headers(200, {}) 15 | context.http_response.signal_done 16 | Seahorse::Client::Response.new(context:context) 17 | end 18 | 19 | yielded = nil 20 | bucket.wait_until_exists { |w| yielded = w } 21 | expect(yielded).to be_kind_of(Aws::Waiters::Waiter) 22 | end 23 | 24 | end 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/elasticloadbalancing/2012-06-01/waiters-2.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "waiters": { 4 | "InstanceInService": { 5 | "delay": 15, 6 | "operation": "DescribeInstanceHealth", 7 | "maxAttempts": 40, 8 | "acceptors": [ 9 | { 10 | "expected": "InService", 11 | "matcher": "pathAll", 12 | "state": "success", 13 | "argument": "InstanceStates[].State" 14 | } 15 | ] 16 | }, 17 | "AnyInstanceInService": { 18 | "delay": 15, 19 | "operation": "DescribeInstanceHealth", 20 | "maxAttempts": 40, 21 | "acceptors": [ 22 | { 23 | "expected": "InService", 24 | "matcher": "pathAny", 25 | "state": "success", 26 | "argument": "InstanceStates[].State" 27 | } 28 | ] 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/client_paging.rb: -------------------------------------------------------------------------------- 1 | require 'pathname' 2 | 3 | module Aws 4 | # @api private 5 | module ClientPaging 6 | 7 | # @api private 8 | def self.included(subclass) 9 | 10 | subclass.add_plugin('Aws::Plugins::ResponsePaging') 11 | 12 | class << subclass 13 | 14 | def set_paginators(paginators) 15 | @paginators = case paginators 16 | when Paging::Provider then paginators 17 | when Hash then Paging::Provider.new(paginators) 18 | when String, Pathname then Paging::Provider.new(Aws.load_json(paginators)) 19 | when nil then Paging::NullProvider.new 20 | else raise ArgumentError, 'invalid paginators' 21 | end 22 | end 23 | 24 | def paginators 25 | @paginators 26 | end 27 | 28 | end 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/seahorse/client/plugins/param_validation.rb: -------------------------------------------------------------------------------- 1 | module Seahorse 2 | module Client 3 | module Plugins 4 | 5 | # @seahorse.client.option [Boolean] :validate_params (true) 6 | # When `true`, request parameters are validated before 7 | # sending the request. 8 | class ParamValidation < Plugin 9 | 10 | option(:validate_params, true) 11 | 12 | def add_handlers(handlers, config) 13 | if config.validate_params 14 | handlers.add(Handler, step: :validate, priority: 50) 15 | end 16 | end 17 | 18 | class Handler < Client::Handler 19 | 20 | def call(context) 21 | ParamValidator.validate!(context.operation.input, context.params) 22 | @handler.call(context) 23 | end 24 | 25 | end 26 | 27 | end 28 | end 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/signers/v3.rb: -------------------------------------------------------------------------------- 1 | require 'time' 2 | require 'base64' 3 | require 'openssl' 4 | 5 | module Aws 6 | # @api private 7 | module Signers 8 | class V3 < Base 9 | 10 | def sign(http_req) 11 | 12 | date = Time.now.httpdate 13 | http_req.headers['Date'] = date 14 | 15 | if @credentials.session_token 16 | http_req.headers['X-Amz-Security-Token'] = @credentials.session_token 17 | end 18 | 19 | parts = [] 20 | parts << "AWS3-HTTPS AWSAccessKeyId=#{@credentials.access_key_id}" 21 | parts << "Algorithm=HmacSHA256" 22 | parts << "Signature=#{signature(date)}" 23 | http_req.headers['X-Amzn-Authorization'] = parts.join(',') 24 | end 25 | 26 | private 27 | 28 | def signature(date) 29 | sha256_hmac(date) 30 | end 31 | 32 | end 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/seahorse/client/plugins/raise_response_errors.rb: -------------------------------------------------------------------------------- 1 | module Seahorse 2 | module Client 3 | module Plugins 4 | 5 | # @seahorse.client.option [Boolean] :raise_response_errors (true) 6 | # When `true`, response errors are raised. 7 | class RaiseResponseErrors < Plugin 8 | 9 | option(:raise_response_errors, true) 10 | 11 | # @api private 12 | class Handler < Client::Handler 13 | def call(context) 14 | response = @handler.call(context) 15 | raise response.error if response.error 16 | response 17 | end 18 | end 19 | 20 | def add_handlers(handlers, config) 21 | if config.raise_response_errors 22 | handlers.add(Handler, step: :validate, priority: 95) 23 | end 24 | end 25 | 26 | end 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /aws-sdk-core/tasks/test.rake: -------------------------------------------------------------------------------- 1 | require 'rspec/core/rake_task' 2 | 3 | desc "aws-sdk-core unit tests" 4 | RSpec::Core::RakeTask.new('test:unit:aws-sdk-core') do |t| 5 | t.rspec_opts = "-I #{$REPO_ROOT}/aws-sdk-core/lib" 6 | t.rspec_opts << " -I #{$REPO_ROOT}/aws-sdk-core/spec" 7 | t.pattern = "#{$REPO_ROOT}/aws-sdk-core/spec" 8 | end 9 | task 'test:unit' => 'test:unit:aws-sdk-core' 10 | 11 | begin 12 | require 'cucumber/rake/task' 13 | desc = 'aws-sdk-core integration tests' 14 | Cucumber::Rake::Task.new('test:integration:aws-sdk-core', desc) do |t| 15 | t.cucumber_opts = 'aws-sdk-core/features -t ~@veryslow' 16 | end 17 | task 'test:integration' => 'test:integration:aws-sdk-core' 18 | rescue LoadError 19 | desc 'aws-sdk-core integration tests' 20 | task 'test:integration' do 21 | puts 'skipping aws-sdk-core integration tests, cucumber not loaded' 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /aws-sdk-resources/lib/aws-sdk-resources/services/s3.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module S3 3 | 4 | require 'aws-sdk-resources/services/s3/bucket' 5 | require 'aws-sdk-resources/services/s3/object' 6 | require 'aws-sdk-resources/services/s3/object_summary' 7 | require 'aws-sdk-resources/services/s3/multipart_upload' 8 | require 'aws-sdk-resources/services/s3/public_url' 9 | 10 | autoload :Encryption, 'aws-sdk-resources/services/s3/encryption' 11 | autoload :FilePart, 'aws-sdk-resources/services/s3/file_part' 12 | autoload :FileUploader, 'aws-sdk-resources/services/s3/file_uploader' 13 | autoload :MultipartFileUploader, 'aws-sdk-resources/services/s3/multipart_file_uploader' 14 | autoload :MultipartUploadError, 'aws-sdk-resources/services/s3/multipart_upload_error' 15 | autoload :PresignedPost, 'aws-sdk-resources/services/s3/presigned_post' 16 | 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/sns/2010-03-31/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListEndpointsByPlatformApplication": { 4 | "input_token": "NextToken", 5 | "output_token": "NextToken", 6 | "result_key": "Endpoints" 7 | }, 8 | "ListPlatformApplications": { 9 | "input_token": "NextToken", 10 | "output_token": "NextToken", 11 | "result_key": "PlatformApplications" 12 | }, 13 | "ListSubscriptions": { 14 | "input_token": "NextToken", 15 | "output_token": "NextToken", 16 | "result_key": "Subscriptions" 17 | }, 18 | "ListSubscriptionsByTopic": { 19 | "input_token": "NextToken", 20 | "output_token": "NextToken", 21 | "result_key": "Subscriptions" 22 | }, 23 | "ListTopics": { 24 | "input_token": "NextToken", 25 | "output_token": "NextToken", 26 | "result_key": "Topics" 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/seahorse/client/plugins/param_conversion.rb: -------------------------------------------------------------------------------- 1 | module Seahorse 2 | module Client 3 | module Plugins 4 | 5 | # @seahorse.client.option [Boolean] :convert_params (true) 6 | # When `true`, an attempt is made to coerce request parameters 7 | # into the required types. 8 | class ParamConversion < Plugin 9 | 10 | option(:convert_params, true) 11 | 12 | def add_handlers(handlers, config) 13 | handlers.add(Handler, step: :initialize) if config.convert_params 14 | end 15 | 16 | class Handler < Client::Handler 17 | 18 | def call(context) 19 | if input = context.operation.input 20 | context.params = ParamConverter.convert(input, context.params) 21 | end 22 | @handler.call(context) 23 | end 24 | 25 | end 26 | end 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/s3.rb: -------------------------------------------------------------------------------- 1 | Aws.add_service(:S3, { 2 | api: "#{Aws::API_DIR}/s3/2006-03-01/api-2.json", 3 | docs: "#{Aws::API_DIR}/s3/2006-03-01/docs-2.json", 4 | paginators: "#{Aws::API_DIR}/s3/2006-03-01/paginators-1.json", 5 | resources: "#{Aws::API_DIR}/s3/2006-03-01/resources-1.json", 6 | waiters: "#{Aws::API_DIR}/s3/2006-03-01/waiters-2.json", 7 | }) 8 | 9 | module Aws 10 | module S3 11 | 12 | autoload :Presigner, 'aws-sdk-core/s3/presigner' 13 | autoload :BucketRegionCache, 'aws-sdk-core/s3/bucket_region_cache' 14 | 15 | # A cache of discovered bucket regions. You can call `#bucket_added` 16 | # on this to be notified when you must configure the proper region 17 | # to access a bucket. 18 | # 19 | # This cache is considered an implementation detail. 20 | # 21 | # @api private 22 | BUCKET_REGIONS = BucketRegionCache.new 23 | 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /aws-sdk-core/features/cloudfront/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @cloudfront @client 3 | Feature: Amazon CloudFront 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListDistributions" API with: 7 | | MaxItems | 1 | 8 | Then the response should contain a "DistributionList" with a list of "Items" 9 | 10 | Scenario: Error handling 11 | When I attempt to call the "GetDistribution" API with: 12 | | Id | fake-id | 13 | Then I expect the response error code to be "NoSuchDistribution" 14 | And I expect the response error message to include: 15 | """ 16 | The specified distribution does not exist. 17 | """ 18 | 19 | @veryslow 20 | Scenario: CRUD distributions 21 | Given I create a disabled distribution 22 | When I get the distribution configuration 23 | Then I can update the distribution configuration 24 | And I can delete the distribution 25 | 26 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/plugins/protocols/ec2.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Plugins 3 | module Protocols 4 | class EC2 < Seahorse::Client::Plugin 5 | 6 | class Handler < Aws::Query::Handler 7 | 8 | def apply_params(param_list, params, rules) 9 | Aws::Query::EC2ParamBuilder.new(param_list).apply(rules, params) 10 | end 11 | 12 | def parse_xml(context) 13 | if rules = context.operation.output 14 | data = Xml::Parser.new(rules).parse(xml(context)) do |h| 15 | context.metadata[:request_id] = h['requestId'] 16 | end 17 | data 18 | else 19 | EmptyStructure.new 20 | end 21 | end 22 | 23 | end 24 | 25 | handler(Handler) 26 | 27 | handler(Xml::ErrorHandler, step: :sign) 28 | 29 | end 30 | end 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/elasticmapreduce/2009-03-31/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "DescribeJobFlows": { 4 | "result_key": "JobFlows" 5 | }, 6 | "ListBootstrapActions": { 7 | "input_token": "Marker", 8 | "output_token": "Marker", 9 | "result_key": "BootstrapActions" 10 | }, 11 | "ListClusters": { 12 | "input_token": "Marker", 13 | "output_token": "Marker", 14 | "result_key": "Clusters" 15 | }, 16 | "ListInstanceGroups": { 17 | "input_token": "Marker", 18 | "output_token": "Marker", 19 | "result_key": "InstanceGroups" 20 | }, 21 | "ListInstances": { 22 | "input_token": "Marker", 23 | "output_token": "Marker", 24 | "result_key": "Instances" 25 | }, 26 | "ListSteps": { 27 | "input_token": "Marker", 28 | "output_token": "Marker", 29 | "result_key": "Steps" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/io_decrypter.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module S3 3 | module Encryption 4 | # @api private 5 | class IODecrypter 6 | 7 | # @param [OpenSSL::Cipher] cipher 8 | # @param [#write] io An IO-like object that responds to {#write}. 9 | def initialize(cipher, io) 10 | @orig_cipher = cipher.clone 11 | @cipher = cipher.clone 12 | @io = io 13 | reset_cipher 14 | end 15 | 16 | # @return [#write] 17 | attr_reader :io 18 | 19 | def write(chunk) 20 | @io.write(@cipher.update(chunk)) 21 | end 22 | 23 | def finalize 24 | @io.write(@cipher.final) 25 | end 26 | 27 | private 28 | 29 | def reset_cipher 30 | @cipher = @orig_cipher.clone 31 | end 32 | 33 | end 34 | end 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/dynamodb/2012-08-10/waiters-2.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "waiters": { 4 | "TableExists": { 5 | "delay": 20, 6 | "operation": "DescribeTable", 7 | "maxAttempts": 25, 8 | "acceptors": [ 9 | { 10 | "expected": "ACTIVE", 11 | "matcher": "path", 12 | "state": "success", 13 | "argument": "Table.TableStatus" 14 | }, 15 | { 16 | "expected": "ResourceNotFoundException", 17 | "matcher": "error", 18 | "state": "retry" 19 | } 20 | ] 21 | }, 22 | "TableNotExists": { 23 | "delay": 20, 24 | "operation": "DescribeTable", 25 | "maxAttempts": 25, 26 | "acceptors": [ 27 | { 28 | "expected": "ResourceNotFoundException", 29 | "matcher": "error", 30 | "state": "success" 31 | } 32 | ] 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /aws-sdk-resources/features/s3/client_side_encryption.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @s3 @client-side-encryption 3 | Feature: S3 Objects 4 | 5 | Background: 6 | Given I create a bucket 7 | 8 | Scenario: Encrypting client-side with GET and PUT 9 | Given I have an encryption client 10 | When I perform an encrypted PUT of the value "secret" 11 | And I GET the object with a non-encyrption client 12 | Then the object data should be encrypted 13 | When I GET the object with an encryption client 14 | Then the object data should be "secret" 15 | 16 | Scenario: Using instruction file for storing the encryption envelope 17 | Given I have an encryption client configured for :instruction_file 18 | When I perform an encrypted PUT of the value "secret" 19 | Then the instruction file should exist 20 | When I GET the object with an encryption client 21 | Then the object data should be "secret" 22 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/endpoint_provider.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | # @api private 3 | class EndpointProvider 4 | 5 | # @api private 6 | PATH = File.join(File.dirname(__FILE__), '..', '..', 'endpoints.json') 7 | 8 | # @api private 9 | RULES = MultiJson.load(File.read(PATH))['endpoints'] 10 | 11 | class << self 12 | 13 | def resolve(region, service) 14 | keys(region, service).each do |key| 15 | if match = RULES[key] 16 | return expand(match['endpoint'], region.to_s, service.to_s) 17 | end 18 | end 19 | end 20 | 21 | private 22 | 23 | def keys(region, service) 24 | ["#{region}/#{service}", "#{region}/*", "*/#{service}", "*/*"] 25 | end 26 | 27 | def expand(pattern, region, service) 28 | 'https://' + pattern.sub('{region}', region).sub('{service}', service) 29 | end 30 | 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/kms/2014-11-01/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListAliases": { 4 | "limit_key": "Limit", 5 | "input_token": "Marker", 6 | "output_token": "NextMarker", 7 | "more_results": "Truncated", 8 | "result_key": "Aliases" 9 | }, 10 | "ListGrants": { 11 | "limit_key": "Limit", 12 | "input_token": "Marker", 13 | "output_token": "NextMarker", 14 | "more_results": "Truncated", 15 | "result_key": "Grants" 16 | }, 17 | "ListKeyPolicies": { 18 | "limit_key": "Limit", 19 | "input_token": "Marker", 20 | "output_token": "NextMarker", 21 | "more_results": "Truncated", 22 | "result_key": "PolicyNames" 23 | }, 24 | "ListKeys": { 25 | "limit_key": "Limit", 26 | "input_token": "Marker", 27 | "output_token": "NextMarker", 28 | "more_results": "Truncated", 29 | "result_key": "Keys" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | $REPO_ROOT = File.dirname(__FILE__) 2 | 3 | $VERSION = ENV['VERSION'] || File.read(File.join($REPO_ROOT, 'VERSION')).strip 4 | 5 | $GEM_NAMES = [ 6 | 'aws-sdk-core', 7 | 'aws-sdk-resources', 8 | 'aws-sdk', 9 | ] 10 | 11 | $GEM_NAMES.each do |gem_name| 12 | $LOAD_PATH.unshift(File.join($REPO_ROOT, gem_name, 'lib')) 13 | end 14 | 15 | require 'aws-sdk' 16 | 17 | task 'test:coverage:clear' do 18 | sh("rm -rf #{File.join($REPO_ROOT, 'coverage')}") 19 | end 20 | 21 | desc 'Runs unit tests' 22 | task 'test:unit' => 'test:coverage:clear' 23 | 24 | desc 'Runs integration tests' 25 | task 'test:integration' => 'test:coverage:clear' 26 | 27 | desc 'Runs unit and integration tests' 28 | task 'test' => ['test:unit', 'test:integration'] 29 | 30 | task :default => :test 31 | 32 | Dir.glob('**/*.rake').each do |task_file| 33 | load task_file 34 | end 35 | 36 | begin 37 | require 'coveralls/rake/task' 38 | Coveralls::RakeTask.new 39 | rescue LoadError 40 | end 41 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/services/iam/delete_account_alias_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | module Aws 4 | module IAM 5 | describe Resource do 6 | 7 | let(:client) { Client.new(stub_responses: true) } 8 | 9 | let(:iam) { Resource.new(client: client) } 10 | 11 | describe '#delete_account_alias' do 12 | 13 | it 'deletes the first account alias, iam only returns one' do 14 | aliases = ['acct-alias'] 15 | client.stub_responses(:list_account_aliases, account_aliases: aliases) 16 | expect(client).to receive(:delete_account_alias). 17 | with(account_alias: 'acct-alias') 18 | iam.delete_account_alias 19 | end 20 | 21 | it 'returns false when there is no account alias' do 22 | client.stub_responses(:list_account_aliases, account_aliases: []) 23 | expect(iam.delete_account_alias).to be(false) 24 | end 25 | 26 | end 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /aws-sdk-resources/spec/fixtures/validator/load_params_can_be_nested/api.json: -------------------------------------------------------------------------------- 1 | { 2 | "operations": { 3 | "OperationName": { 4 | "input": { "shape": "RequestShape" }, 5 | "output": { "shape": "ResourceShape" } 6 | } 7 | }, 8 | "shapes": { 9 | "ResourceShape": { 10 | "type": "structure", 11 | "members": { 12 | } 13 | }, 14 | "RequestShape": { 15 | "type": "structure", 16 | "members": { 17 | "Filters": { "shape": "FilterList" } 18 | } 19 | }, 20 | "FilterList": { 21 | "type": "list", 22 | "member": { "shape": "Filter" } 23 | }, 24 | "Filter": { 25 | "type": "structure", 26 | "members": { 27 | "Name": { "shape": "String" }, 28 | "Values": { "shape": "FilterValueList" } 29 | } 30 | }, 31 | "FilterValueList": { 32 | "type": "list", 33 | "member": { "shape": "String" } 34 | }, 35 | "String": { "type": "string" } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /doc-src/templates/default/layout/html/layout.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <%= erb(:headers) %> 5 | 6 | 7 | 11 | 12 |
13 | 18 | 19 | 20 | 21 |
22 | 23 |

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

24 | <%= yieldall %> 25 |
26 | 27 | <%= erb(:footer) %> 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/json/rpc_headers_handler.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Json 3 | class RpcHeadersHandler < Seahorse::Client::Handler 4 | 5 | CONTENT_TYPE = 'application/x-amz-json-%s' 6 | 7 | # @param [Seahorse::Client::RequestContext] context 8 | # @return [Seahorse::Client::Response] 9 | def call(context) 10 | @handler.call(add_headers(context)) 11 | end 12 | 13 | private 14 | 15 | def add_headers(context) 16 | context.http_request.headers['Content-Type'] = content_type(context) 17 | context.http_request.headers['X-Amz-Target'] = target(context) 18 | context 19 | end 20 | 21 | def content_type(context) 22 | CONTENT_TYPE % [context.config.api.metadata('jsonVersion')] 23 | end 24 | 25 | def target(context) 26 | prefix = context.config.api.metadata('targetPrefix') 27 | "#{prefix}.#{context.operation.name}" 28 | end 29 | 30 | end 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/glacier/2012-06-01/waiters-2.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "waiters": { 4 | "VaultExists": { 5 | "operation": "DescribeVault", 6 | "delay": 3, 7 | "maxAttempts": 15, 8 | "acceptors": [ 9 | { 10 | "state": "success", 11 | "matcher": "status", 12 | "expected": 200 13 | }, 14 | { 15 | "state": "retry", 16 | "matcher": "error", 17 | "expected": "ResourceNotFoundException" 18 | } 19 | ] 20 | }, 21 | "VaultNotExists": { 22 | "operation": "DescribeVault", 23 | "delay": 3, 24 | "maxAttempts": 15, 25 | "acceptors": [ 26 | { 27 | "state": "retry", 28 | "matcher": "status", 29 | "expected": 200 30 | }, 31 | { 32 | "state": "success", 33 | "matcher": "error", 34 | "expected": "ResourceNotFoundException" 35 | } 36 | ] 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/route53/2013-04-01/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListHealthChecks": { 4 | "input_token": "Marker", 5 | "output_token": "NextMarker", 6 | "more_results": "IsTruncated", 7 | "limit_key": "MaxItems", 8 | "result_key": "HealthChecks" 9 | }, 10 | "ListHostedZones": { 11 | "input_token": "Marker", 12 | "output_token": "NextMarker", 13 | "more_results": "IsTruncated", 14 | "limit_key": "MaxItems", 15 | "result_key": "HostedZones" 16 | }, 17 | "ListResourceRecordSets": { 18 | "more_results": "IsTruncated", 19 | "limit_key": "MaxItems", 20 | "result_key": "ResourceRecordSets", 21 | "input_token": [ 22 | "StartRecordName", 23 | "StartRecordType", 24 | "StartRecordIdentifier" 25 | ], 26 | "output_token": [ 27 | "NextRecordName", 28 | "NextRecordType", 29 | "NextRecordIdentifier" 30 | ] 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/query/param.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Query 3 | class Param 4 | 5 | # @param [String] name 6 | # @param [String, nil] value (nil) 7 | def initialize(name, value = nil) 8 | @name = name.to_s 9 | @value = value 10 | end 11 | 12 | # @return [String] 13 | attr_reader :name 14 | 15 | # @return [String, nil] 16 | attr_reader :value 17 | 18 | # @return [String] 19 | def to_s 20 | value ? "#{escape(name)}=#{escape(value)}" : "#{escape(name)}=" 21 | end 22 | 23 | # @api private 24 | def ==(other) 25 | other.kind_of?(Param) && 26 | other.name == name && 27 | other.value == value 28 | end 29 | 30 | # @api private 31 | def <=> other 32 | name <=> other.name 33 | end 34 | 35 | private 36 | 37 | def escape(str) 38 | Seahorse::Util.uri_escape(str) 39 | end 40 | 41 | end 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/fixtures/services/Glacier/list_vaults.yml: -------------------------------------------------------------------------------- 1 | # This test ensures that the glacier api version is sent as a header. 2 | # Additionally, it ensures that the body is omitted as all of the 3 | # params are bound to the request uri 4 | operation: list_vaults 5 | params: 6 | :account_id: '-' 7 | request: 8 | method: GET 9 | path: /-/vaults 10 | headers: 11 | x-amz-glacier-version: 2012-06-01 12 | content-length: 0 13 | body: '' 14 | response: 15 | status_code: 200 16 | body: | 17 | {"Marker":null,"VaultList":[{"CreationDate":"2012-08-29T17:05:48.575Z","LastInventoryDate":null,"NumberOfArchives":19,"SizeInBytes":16261451,"VaultARN":"arn:aws:glacier:us-east-1:469596866844:vaults/aws-sdk","VaultName":"aws-sdk"}]} 18 | data: 19 | :vault_list: 20 | - :vault_arn: 'arn:aws:glacier:us-east-1:469596866844:vaults/aws-sdk' 21 | :vault_name: aws-sdk 22 | :creation_date: 2012-08-29 17:05:48.575 Z 23 | :number_of_archives: 19 24 | :size_in_bytes: 16261451 25 | -------------------------------------------------------------------------------- /tasks/git.rake: -------------------------------------------------------------------------------- 1 | task 'git:require-clean-workspace' do 2 | # Ensure the git repo is free of unstaged or untracked files prior 3 | # to building / testing / pushing a release. 4 | unless `git diff --shortstat 2> /dev/null | tail -n1` == '' 5 | warn('workspace must be clean to release') 6 | exit(1) 7 | end 8 | end 9 | 10 | task 'git:tag' do 11 | sh("git commit -m \"Bumped version to v#{$VERSION}\"") 12 | sh("git tag -a -m \"$(rake git:tag_message)\" v#{$VERSION}") 13 | end 14 | 15 | task 'git:tag_message' do 16 | issues = `git log $(git describe --tags --abbrev=0)...HEAD -E --grep '#[0-9]+' 2>/dev/null` 17 | issues = issues.scan(/((?:\S+\/\S+)?#\d+)/).flatten 18 | msg = "Tag release v#{$VERSION}" 19 | msg << "\n\n" 20 | unless issues.empty? 21 | msg << "References:\n" 22 | msg << " #{issues.uniq.sort.join(', ')}" 23 | msg << "\n\n" 24 | end 25 | puts msg 26 | end 27 | 28 | task 'git:push' do 29 | sh('git push origin') 30 | sh('git push origin --tags') 31 | end 32 | -------------------------------------------------------------------------------- /aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module S3 3 | module Encryption 4 | 5 | autoload :Client, 'aws-sdk-resources/services/s3/encryption/client' 6 | autoload :DecryptHandler, 'aws-sdk-resources/services/s3/encryption/decrypt_handler' 7 | autoload :DefaultKeyProvider, 'aws-sdk-resources/services/s3/encryption/default_key_provider' 8 | autoload :EncryptHandler, 'aws-sdk-resources/services/s3/encryption/encrypt_handler' 9 | autoload :Errors, 'aws-sdk-resources/services/s3/encryption/errors' 10 | autoload :IOEncrypter, 'aws-sdk-resources/services/s3/encryption/io_encrypter' 11 | autoload :IODecrypter, 'aws-sdk-resources/services/s3/encryption/io_decrypter' 12 | autoload :KeyProvider, 'aws-sdk-resources/services/s3/encryption/key_provider' 13 | autoload :Materials, 'aws-sdk-resources/services/s3/encryption/materials' 14 | autoload :Utils, 'aws-sdk-resources/services/s3/encryption/utils' 15 | 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /aws-sdk-core/aws-sdk-core.gemspec: -------------------------------------------------------------------------------- 1 | version = File.read(File.expand_path('../../VERSION', __FILE__)).strip 2 | 3 | Gem::Specification.new do |spec| 4 | 5 | spec.name = 'aws-sdk-core' 6 | spec.version = version 7 | spec.summary = 'AWS SDK for Ruby - Core' 8 | spec.description = 'Provides API clients for AWS. This gem is part of the official AWS SDK for Ruby.' 9 | spec.author = 'Amazon Web Services' 10 | spec.homepage = 'http://github.com/aws/aws-sdk-ruby' 11 | spec.license = 'Apache 2.0' 12 | spec.email = ['trevrowe@amazon.com'] 13 | 14 | spec.require_paths = ['lib'] 15 | 16 | spec.files = ['endpoints.json'] 17 | spec.files += Dir['lib/**/*.rb'] 18 | spec.files += Dir['apis/**/**/*.json'].select { |p| !p.match(/\.docs\.json$/) } 19 | 20 | spec.bindir = 'bin' 21 | spec.executables << 'aws.rb' 22 | 23 | spec.add_dependency('multi_json', '~> 1.0') 24 | spec.add_dependency('builder', '~> 3.0') 25 | spec.add_dependency('jmespath', '~> 1.0') 26 | 27 | end 28 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/waiters/provider.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Waiters 3 | # @api private 4 | class Provider 5 | 6 | def initialize(definitions) 7 | @waiters = {} 8 | definitions['waiters'].each do |waiter_name, definition| 9 | @waiters[Seahorse::Util.underscore(waiter_name).to_sym] = { 10 | poller: Poller.new(definition), 11 | max_attempts: definition['maxAttempts'], 12 | delay: definition['delay'], 13 | } 14 | end 15 | end 16 | 17 | # @return [Array] 18 | def waiter_names 19 | @waiters.keys 20 | end 21 | 22 | # @param [Symbol] waiter_name 23 | # @return [Waiter] 24 | # @raise [ArgumentError] 25 | def waiter(waiter_name) 26 | if @waiters.key?(waiter_name) 27 | Waiter.new(@waiters[waiter_name]) 28 | else 29 | raise Errors::NoSuchWaiterError.new(waiter_name, waiter_names) 30 | end 31 | end 32 | 33 | end 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/plugins/sqs_queue_urls.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Plugins 3 | # @api private 4 | class SQSQueueUrls < Seahorse::Client::Plugin 5 | 6 | class Handler < Seahorse::Client::Handler 7 | 8 | def call(context) 9 | if url = context.params[:queue_url] 10 | update_region(context, url) 11 | update_endpoint(context, url) 12 | end 13 | @handler.call(context) 14 | end 15 | 16 | def update_endpoint(context, url) 17 | context.http_request.endpoint = url 18 | end 19 | 20 | def update_region(context, url) 21 | if region = url.to_s.split('.')[1] 22 | context.config = context.config.dup 23 | context.config.region = region 24 | context.config.sigv4_region = region 25 | else 26 | raise ArgumentError, "invalid queue url `#{url}'" 27 | end 28 | end 29 | 30 | end 31 | 32 | handler(Handler) 33 | 34 | end 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/key_provider.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module S3 3 | module Encryption 4 | 5 | # This module defines the interface required for a {Client#key_provider}. 6 | # A key provider is any object that: 7 | # 8 | # * Responds to {#encryption_materials} with an {Materials} object. 9 | # 10 | # * Responds to {#key_for}, receiving a JSON document String, 11 | # returning an ecryption key. The returned encryption key 12 | # must be one of: 13 | # 14 | # * `OpenSSL::PKey::RSA` - for asymmetric encryption 15 | # * `String` - 32, 24, or 16 bytes long, for symmetric encryption 16 | # 17 | module KeyProvider 18 | 19 | # @return [Materials] 20 | def encryption_materials; end 21 | 22 | # @param [String] materials_description 23 | # @return [OpenSSL::PKey::RSA, String] encryption_key 24 | def key_for(materials_description); end 25 | 26 | end 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gemspec path: 'aws-sdk-core' 4 | 5 | gem 'rake', require: false 6 | 7 | gem 'oj' unless ENV['PURE_RUBY'] 8 | gem 'ox' unless ENV['PURE_RUBY'] 9 | gem 'libxml-ruby' unless ENV['PURE_RUBY'] 10 | gem 'nokogiri' unless ENV['PURE_RUBY'] 11 | 12 | group :test do 13 | gem 'rspec', '~> 3.0.0' 14 | gem 'cucumber' 15 | gem 'webmock' 16 | gem 'simplecov', require: false 17 | gem 'coveralls', require: false 18 | gem 'json-schema' 19 | gem 'rest-client' # used for presigned-post integration test 20 | end 21 | 22 | group :docs do 23 | 24 | gem 'yard', :git => 'https://github.com/trevorrowe/yard.git', branch: 'frameless' 25 | gem 'yard-sitemap', '~> 1.0' 26 | gem 'rdiscount' 27 | 28 | gem 'nanoc' # guide 29 | 30 | # guide - syntax highlight 31 | gem 'nokogiri' 32 | gem 'coderay' 33 | 34 | # guide - local preview 35 | gem 'adsf' # a dead simple fileserver 36 | gem 'guard-nanoc' 37 | 38 | end 39 | 40 | group :release do 41 | gem 'octokit' 42 | end 43 | 44 | group :repl do 45 | gem 'pry' 46 | end 47 | -------------------------------------------------------------------------------- /aws-sdk-core/apis/codedeploy/2014-10-06/paginators-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "pagination": { 3 | "ListApplicationRevisions": { 4 | "input_token": "nextToken", 5 | "output_token": "nextToken", 6 | "result_key": "revisions" 7 | }, 8 | "ListApplications": { 9 | "input_token": "nextToken", 10 | "output_token": "nextToken", 11 | "result_key": "applications" 12 | }, 13 | "ListDeploymentConfigs": { 14 | "input_token": "nextToken", 15 | "output_token": "nextToken", 16 | "result_key": "deploymentConfigsList" 17 | }, 18 | "ListDeploymentGroups": { 19 | "input_token": "nextToken", 20 | "output_token": "nextToken", 21 | "result_key": "deploymentGroups" 22 | }, 23 | "ListDeploymentInstances": { 24 | "input_token": "nextToken", 25 | "output_token": "nextToken", 26 | "result_key": "instancesList" 27 | }, 28 | "ListDeployments": { 29 | "input_token": "nextToken", 30 | "output_token": "nextToken", 31 | "result_key": "deployments" 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/seahorse/client/logging/handler.rb: -------------------------------------------------------------------------------- 1 | module Seahorse 2 | module Client 3 | module Logging 4 | class Handler < Client::Handler 5 | 6 | # @param [RequestContext] context 7 | # @return [Response] 8 | def call(context) 9 | context[:logging_started_at] = Time.now 10 | @handler.call(context).tap do |response| 11 | context[:logging_completed_at] = Time.now 12 | log(context.config, response) 13 | end 14 | end 15 | 16 | private 17 | 18 | # @param [Configuration] config 19 | # @param [Response] response 20 | # @return [void] 21 | def log(config, response) 22 | config.logger.send(config.log_level, format(config, response)) 23 | end 24 | 25 | # @param [Configuration] config 26 | # @param [Response] response 27 | # @return [String] 28 | def format(config, response) 29 | config.log_formatter.format(response) 30 | end 31 | 32 | end 33 | end 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/plugins/s3_location_constraint.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Plugins 3 | 4 | # When making calls to {S3::Client#create_bucket} outside the 5 | # "classic" region, the bucket location constraint must be specified. 6 | # This plugin auto populates the constraint to the configured region. 7 | class S3LocationConstraint < Seahorse::Client::Plugin 8 | 9 | class Handler < Seahorse::Client::Handler 10 | 11 | def call(context) 12 | unless context.config.region == 'us-east-1' 13 | populate_location_constraint(context.params, context.config.region) 14 | end 15 | @handler.call(context) 16 | end 17 | 18 | private 19 | 20 | def populate_location_constraint(params, region) 21 | params[:create_bucket_configuration] ||= {} 22 | params[:create_bucket_configuration][:location_constraint] ||= region 23 | end 24 | 25 | end 26 | 27 | handler(Handler, step: :initialize, operations: [:create_bucket]) 28 | 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/json/simple_body_handler.rb: -------------------------------------------------------------------------------- 1 | module Aws 2 | module Json 3 | 4 | # This plugin performs two trivial translations: 5 | # 6 | # * The request parameters are serialized as JSON for the request body 7 | # * The response body is deserialized as JSON for the response data 8 | # 9 | # No attempt is made to extract errors from the HTTP response body. 10 | # Parsing the response only happens for a successful response. 11 | # 12 | class SimpleBodyHandler < Seahorse::Client::Handler 13 | 14 | def call(context) 15 | build_json(context) 16 | @handler.call(context).on_success do |response| 17 | response.error = nil 18 | response.data = parse_json(context) 19 | end 20 | end 21 | 22 | private 23 | 24 | def build_json(context) 25 | context.http_request.body = MultiJson.dump(context.params) 26 | end 27 | 28 | def parse_json(context) 29 | MultiJson.load(context.http_response.body_contents) 30 | end 31 | 32 | end 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/xml/parser/engines/libxml.rb: -------------------------------------------------------------------------------- 1 | require 'libxml' 2 | 3 | module Aws 4 | module Xml 5 | class Parser 6 | class LibxmlEngine 7 | 8 | include LibXML::XML::SaxParser::Callbacks 9 | 10 | def initialize(stack) 11 | @stack = stack 12 | end 13 | 14 | def parse(xml) 15 | parser = ::LibXML::XML::SaxParser.string(xml) 16 | parser.callbacks = self 17 | parser.parse 18 | end 19 | 20 | def on_start_element_ns(element_name, attributes, *ignored) 21 | @stack.start_element(element_name) 22 | attributes.each do |attr_name, attr_value| 23 | @stack.attr(attr_name, attr_value) 24 | end 25 | end 26 | 27 | def on_end_element_ns(*ignored) 28 | @stack.end_element 29 | end 30 | 31 | def on_characters(chars) 32 | @stack.text(chars) 33 | end 34 | 35 | def on_error(msg) 36 | @stack.error(msg) 37 | end 38 | 39 | end 40 | end 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/seahorse/client/plugins/json_simple.rb: -------------------------------------------------------------------------------- 1 | module Seahorse 2 | module Client 3 | module Plugins 4 | 5 | # This plugin performs two trivial translations: 6 | # 7 | # * The request parameters are serialized as JSON for the request body 8 | # * The response body is deserialized as JSON for the response data 9 | # 10 | # No attempt is made to extract errors from the HTTP response body. 11 | # Parsing the response only happens for a successful response. 12 | # 13 | class JsonSimple < Plugin 14 | 15 | # @api private 16 | class Handler < Client::Handler 17 | 18 | def call(context) 19 | context.http_request.body = MultiJson.dump(context.params) 20 | @handler.call(context).on_success do |response| 21 | response.error = nil 22 | response.data = MultiJson.load(context.http_response.body_contents) 23 | end 24 | end 25 | 26 | end 27 | 28 | handler(Handler) 29 | 30 | end 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /tasks/github.rake: -------------------------------------------------------------------------------- 1 | task 'github:require-access-token' do 2 | unless ENV['AWS_SDK_FOR_RUBY_GH_TOKEN'] 3 | warn("export ENV['AWS_SDK_FOR_RUBY_GH_TOKEN']") 4 | exit 5 | end 6 | end 7 | 8 | task 'github:release' do 9 | require 'octokit' 10 | 11 | gh = Octokit::Client.new(access_token: ENV['AWS_SDK_FOR_RUBY_GH_TOKEN']) 12 | 13 | repo = 'aws/aws-sdk-ruby' 14 | tag_ref_sha = `git show-ref v#{$VERSION}`.split(' ').first 15 | tag = gh.tag(repo, tag_ref_sha) 16 | 17 | release = gh.create_release(repo, "v#{$VERSION}", { 18 | name: 'Release v' + $VERSION + ' - ' + tag.tagger.date.strftime('%Y-%m-%d'), 19 | body: tag.message + "\n" + `rake changelog:latest`, 20 | prerelease: $VERSION.match('rc') ? true : false, 21 | }) 22 | 23 | gh.upload_asset(release.url, 'api-docs.zip', 24 | :content_type => 'application/octet-stream') 25 | 26 | $GEM_NAMES.each do |gem_name| 27 | gh.upload_asset(release.url, "#{gem_name}-#{$VERSION}.gem", 28 | :content_type => 'application/octet-stream') 29 | end 30 | 31 | end 32 | 33 | task 'github:access_token' 34 | -------------------------------------------------------------------------------- /aws-sdk-resources/lib/aws-sdk-resources/source.rb: -------------------------------------------------------------------------------- 1 | require 'json' 2 | 3 | module Aws 4 | module Resources 5 | class Source 6 | 7 | def initialize(definition, file = nil) 8 | @definition = definition 9 | @file = file 10 | end 11 | 12 | # @return [Hash] 13 | attr_reader :definition 14 | 15 | # @return [String, nil] 16 | attr_reader :file 17 | 18 | def format 19 | json = JSON.pretty_generate(definition, indent: ' ', space: '') 20 | stack = [[]] 21 | json.lines.each do |line| 22 | if line.match(/({|\[)$/) 23 | stack.push([]) 24 | end 25 | stack.last.push(line) 26 | if line.match(/(}|\]),?$/) 27 | frame = stack.pop 28 | if frame.size == 3 && !frame[1].match(/[{}]/) 29 | frame = [frame[0].rstrip, '', frame[1].strip, '', frame[2].lstrip] 30 | end 31 | stack.last.push(frame.join) 32 | end 33 | end 34 | stack.last.join 35 | end 36 | 37 | end 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /doc-src/services/default/service.md: -------------------------------------------------------------------------------- 1 | This module provides a client for making API requests to <%= full_name %>. 2 | 3 | # Aws::<%= svc_name %>::Client 4 | 5 | The {Aws::<%= svc_name %>::Client} class provides one-to-one mapping for each API operation. 6 | 7 | <%= svc_name.downcase %> = Aws::<%= svc_name %>::Client.new(region: 'us-east-1') 8 | <%= svc_name.downcase %>.operation_names 9 | #=> [<%= api.operation_names[0..3].map(&:inspect).join(', ') %>, ...] 10 | 11 | Each API operation method accepts a hash of request parameters and returns a response object. 12 | 13 | resp = <%= svc_name.downcase %>.<%= api.operation_names.first %>(params) 14 | 15 | See {Client} for more information. 16 | 17 | # Aws::<%= svc_name %>::Errors 18 | 19 | Errors returned from <%= full_name %> are defined in the {Errors} module 20 | and extend {Aws::<%= svc_name %>::Errors::ServiceError}. 21 | 22 | begin 23 | # do stuff 24 | rescue Aws::<%= svc_name %>::Errors::ServiceError 25 | # rescues all errors returned by <%= full_name %> 26 | end 27 | 28 | See {Errors} for more information. 29 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/xml/parser/engines/nokogiri.rb: -------------------------------------------------------------------------------- 1 | require 'nokogiri' 2 | 3 | module Aws 4 | module Xml 5 | class Parser 6 | class NokogiriEngine 7 | 8 | def initialize(stack) 9 | @stack = stack 10 | end 11 | 12 | def parse(xml) 13 | Nokogiri::XML::SAX::Parser.new(self).parse(xml) 14 | end 15 | 16 | def xmldecl(*args); end 17 | def start_document; end 18 | def end_document; end 19 | def comment(*args); end 20 | 21 | def start_element_namespace(element_name, attributes = [], *ignored) 22 | @stack.start_element(element_name) 23 | attributes.each do |attr| 24 | @stack.attr(attr.localname, attr.value) 25 | end 26 | end 27 | 28 | def characters(chars) 29 | @stack.text(chars) 30 | end 31 | 32 | def end_element_namespace(*ignored) 33 | @stack.end_element 34 | end 35 | 36 | def error(msg) 37 | @stack.error(msg) 38 | end 39 | 40 | end 41 | end 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /aws-sdk-core/features/glacier/upload.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @glacier @upload 3 | Feature: Amazon Glacier 4 | 5 | Background: 6 | Given I have a vault ready to receive uploads 7 | 8 | Scenario: Uploading an archive from a string 9 | When I upload an archive with the contents "Hello World!" 10 | Then I should be able to delete the archive 11 | 12 | @slow 13 | Scenario: Uploading and deleting an archive 14 | When I upload an archive from a 5.5MB large file 15 | Then I should be able to delete the archive 16 | 17 | @multipart @slow 18 | Scenario: Using multipart upload interface 19 | When I multipart-upload a 15.5MB file in 1048576 byte chunks 20 | Then I should be able to delete the archive 21 | 22 | # There was an issue where the client would fail attempting to compute 23 | # a checksum of an empty body, this step ensures that the checksum 24 | # computation does not hang. 25 | Scenario: Attempting to upload an empty archive 26 | When I upload an archive with the contents "" 27 | Then I expect the response error code to be "InvalidParameterValueException" 28 | -------------------------------------------------------------------------------- /aws-sdk-core/spec/aws/lambda/client_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | module Aws 4 | module Lambda 5 | describe Client do 6 | describe '#get_function' do 7 | 8 | let(:client) { Client.new(stub_responses: true) } 9 | 10 | it 'returns #last_modified as a Time value' do 11 | time = "2015-01-02T10:11:12Z" 12 | client.handle(step: :send) do |context| 13 | context.http_response.signal_headers(200, {}) 14 | context.http_response.signal_data(<<-JSON) 15 | { 16 | "Configuration": { 17 | "LastModified": "#{time}" 18 | } 19 | } 20 | JSON 21 | context.http_response.signal_done 22 | Seahorse::Client::Response.new(context: context) 23 | end 24 | 25 | resp = client.get_function(function_name: 'name') 26 | expect(resp.configuration.last_modified).to be_kind_of(Time) 27 | expect(resp.configuration.last_modified.iso8601).to eq(time) 28 | end 29 | 30 | end 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/seahorse/client/plugins/net_http.rb: -------------------------------------------------------------------------------- 1 | module Seahorse 2 | module Client 3 | module Plugins 4 | 5 | # @seahorse.client.option [String] :http_proxy 6 | # @seahorse.client.option [Integer] :http_open_timeout (15) 7 | # @seahorse.client.option [Integer] :http_read_timeout (60) 8 | # @seahorse.client.option [Integer] :http_idle_timeout (5) 9 | # @seahorse.client.option [Float] :http_continue_timeout (1) 10 | # @seahorse.client.option [Boolean] :http_wire_trace (false) 11 | # @seahorse.client.option [Logger] :logger (nil) 12 | # @seahorse.client.option [Boolean] :ssl_verify_peer (true) 13 | # @seahorse.client.option [String] :ssl_ca_bundle 14 | # @seahorse.client.option [String] :ssl_ca_directory 15 | # @seahorse.client.option [String] :ssl_ca_store 16 | class NetHttp < Plugin 17 | 18 | Client::NetHttp::ConnectionPool::OPTIONS.each_pair do |name, default| 19 | option(name, default) 20 | end 21 | 22 | handler(Client::NetHttp::Handler, step: :send) 23 | 24 | end 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /aws-sdk-core/lib/aws-sdk-core/xml/parser/engines/rexml.rb: -------------------------------------------------------------------------------- 1 | require 'rexml/document' 2 | require 'rexml/streamlistener' 3 | 4 | module Aws 5 | module Xml 6 | class Parser 7 | class RexmlEngine 8 | 9 | include REXML::StreamListener 10 | 11 | def initialize(stack) 12 | @stack = stack 13 | @depth = 0 14 | end 15 | 16 | def parse(xml) 17 | begin 18 | source = REXML::Source.new(xml) 19 | REXML::Parsers::StreamParser.new(source, self).parse 20 | rescue REXML::ParseException => error 21 | @stack.error(error.message) 22 | end 23 | end 24 | 25 | def tag_start(name, attrs) 26 | @depth += 1 27 | @stack.start_element(name) 28 | attrs.each do |attr| 29 | @stack.attr(*attr) 30 | end 31 | end 32 | 33 | def text(value) 34 | @stack.text(value) if @depth > 0 35 | end 36 | 37 | def tag_end(name) 38 | @stack.end_element 39 | @depth -= 1 40 | end 41 | 42 | end 43 | end 44 | end 45 | end 46 | --------------------------------------------------------------------------------