aws-sdk-core 2.0.0.rc12 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/apis/AutoScaling.api.json +1943 -0
- data/apis/CloudFormation.api.json +785 -0
- data/apis/CloudFront.api.json +2581 -0
- data/apis/CloudFront.paginators.json +32 -0
- data/apis/CloudSearch.api.json +1955 -0
- data/apis/CloudSearchDomain.api.json +349 -0
- data/apis/CloudTrail.api.json +559 -0
- data/apis/CloudWatch.api.json +917 -0
- data/apis/CloudWatchLogs.api.json +816 -0
- data/apis/CognitoIdentity.api.json +631 -0
- data/apis/CognitoSync.api.json +721 -0
- data/apis/DataPipeline.api.json +940 -0
- data/apis/DirectConnect.api.json +833 -0
- data/apis/DynamoDB.api.json +1210 -0
- data/apis/{dynamodb-2011-12-05.paginators.json → DynamoDB.paginators.json} +1 -3
- data/apis/EC2.api.json +9914 -0
- data/apis/{ec2-2014-06-15.resources.json → EC2.resources.json} +16 -0
- data/apis/EMR.api.json +1339 -0
- data/apis/ElastiCache.api.json +3410 -0
- data/apis/ElasticBeanstalk.api.json +1543 -0
- data/apis/ElasticLoadBalancing.api.json +2131 -0
- data/apis/ElasticTranscoder.api.json +1647 -0
- data/apis/Glacier.api.json +1456 -0
- data/apis/{glacier-2012-06-01.resources.json → Glacier.resources.json} +5 -9
- data/apis/IAM.api.json +4033 -0
- data/apis/{iam-2010-05-08.resources.json → IAM.resources.json} +1 -1
- data/apis/ImportExport.api.json +515 -0
- data/apis/Kinesis.api.json +706 -0
- data/apis/{kinesis-2013-12-02.paginators.json → Kinesis.paginators.json} +0 -6
- data/apis/OpsWorks.api.json +2555 -0
- data/apis/OpsWorks.resources.json +181 -0
- data/apis/RDS.api.json +4473 -0
- data/apis/Redshift.api.json +4482 -0
- data/apis/Route53.api.json +1935 -0
- data/apis/Route53Domains.api.json +1129 -0
- data/apis/{s3-2006-03-01.api.json → S3.api.json} +377 -972
- data/apis/{s3-2006-03-01.paginators.json → S3.paginators.json} +1 -1
- data/apis/{s3-2006-03-01.resources.json → S3.resources.json} +13 -2
- data/apis/SES.api.json +644 -0
- data/apis/SNS.api.json +1760 -0
- data/apis/SQS.api.json +1113 -0
- data/apis/{sqs-2012-11-05.resources.json → SQS.resources.json} +0 -10
- data/apis/STS.api.json +594 -0
- data/apis/SWF.api.json +2656 -0
- data/apis/SimpleDB.api.json +954 -0
- data/apis/StorageGateway.api.json +2311 -0
- data/apis/Support.api.json +869 -0
- data/bin/aws.rb +19 -1
- data/endpoints.json +77 -0
- data/lib/aws-sdk-core/api/docstrings.rb +35 -0
- data/lib/aws-sdk-core/api/documenter.rb +241 -0
- data/lib/{aws/api/documentor.rb → aws-sdk-core/api/operation_documenter.rb} +39 -28
- data/lib/{aws/api/doc_example.rb → aws-sdk-core/api/operation_example.rb} +31 -22
- data/lib/{aws → aws-sdk-core}/api/service_customizations.rb +5 -1
- data/lib/aws-sdk-core/autoscaling.rb +5 -0
- data/lib/aws-sdk-core/client.rb +121 -0
- data/lib/aws-sdk-core/cloudformation.rb +5 -0
- data/lib/aws-sdk-core/cloudfront.rb +6 -0
- data/lib/aws-sdk-core/cloudsearch.rb +5 -0
- data/lib/aws-sdk-core/cloudsearchdomain.rb +4 -0
- data/lib/aws-sdk-core/cloudtrail.rb +5 -0
- data/lib/aws-sdk-core/cloudwatch.rb +5 -0
- data/lib/aws-sdk-core/cloudwatchlogs.rb +5 -0
- data/lib/aws-sdk-core/cognitoidentity.rb +4 -0
- data/lib/aws-sdk-core/cognitosync.rb +4 -0
- data/lib/{aws → aws-sdk-core}/credential_provider_chain.rb +4 -1
- data/lib/aws-sdk-core/datapipeline.rb +5 -0
- data/lib/aws-sdk-core/directconnect.rb +5 -0
- data/lib/aws-sdk-core/dynamodb/attribute_value.rb +87 -0
- data/lib/aws-sdk-core/dynamodb.rb +12 -0
- data/lib/aws-sdk-core/ec2.rb +7 -0
- data/lib/aws-sdk-core/elasticache.rb +5 -0
- data/lib/aws-sdk-core/elasticbeanstalk.rb +5 -0
- data/lib/aws-sdk-core/elasticloadbalancing.rb +5 -0
- data/lib/aws-sdk-core/elastictranscoder.rb +5 -0
- data/lib/{aws → aws-sdk-core}/empty_structure.rb +4 -3
- data/lib/aws-sdk-core/emr.rb +5 -0
- data/lib/aws-sdk-core/endpoint_provider.rb +97 -0
- data/lib/{aws → aws-sdk-core}/errors.rb +27 -8
- data/lib/aws-sdk-core/glacier.rb +7 -0
- data/lib/aws-sdk-core/iam.rb +6 -0
- data/lib/aws-sdk-core/importexport.rb +5 -0
- data/lib/{aws → aws-sdk-core}/instance_profile_credentials.rb +13 -9
- data/lib/aws-sdk-core/kinesis.rb +5 -0
- data/lib/aws-sdk-core/opsworks.rb +6 -0
- data/lib/{aws → aws-sdk-core}/pageable_response.rb +1 -1
- data/lib/aws-sdk-core/plugins/csd_conditional_signing.rb +37 -0
- data/lib/aws-sdk-core/plugins/dynamodb_simple_attributes.rb +179 -0
- data/lib/{aws → aws-sdk-core}/plugins/global_configuration.rb +14 -7
- data/lib/{aws → aws-sdk-core}/plugins/protocols/json_rpc.rb +9 -7
- data/lib/{aws → aws-sdk-core}/plugins/regional_endpoint.rb +2 -4
- data/lib/{aws → aws-sdk-core}/plugins/request_signer.rb +18 -8
- data/lib/aws-sdk-core/plugins/response_paging.rb +25 -0
- data/lib/{aws → aws-sdk-core}/plugins/retry_errors.rb +11 -1
- data/lib/aws-sdk-core/plugins/route_53_id_fix.rb +55 -0
- data/lib/aws-sdk-core/plugins/s3_expect_100_continue.rb +27 -0
- data/lib/aws-sdk-core/plugins/s3_sse_cpk.rb +63 -0
- data/lib/aws-sdk-core/plugins/s3_url_encoded_keys.rb +92 -0
- data/lib/{aws → aws-sdk-core}/plugins/user_agent.rb +1 -2
- data/lib/{aws → aws-sdk-core}/query/handler.rb +4 -5
- data/lib/aws-sdk-core/rds.rb +6 -0
- data/lib/aws-sdk-core/redshift.rb +6 -0
- data/lib/aws-sdk-core/route53.rb +5 -0
- data/lib/aws-sdk-core/route53domains.rb +4 -0
- data/lib/aws-sdk-core/s3/presigner.rb +64 -0
- data/lib/aws-sdk-core/s3.rb +13 -0
- data/lib/aws-sdk-core/service.rb +4 -0
- data/lib/aws-sdk-core/ses.rb +6 -0
- data/lib/{aws → aws-sdk-core}/signers/v4.rb +6 -5
- data/lib/aws-sdk-core/simpledb.rb +5 -0
- data/lib/aws-sdk-core/sns.rb +6 -0
- data/lib/aws-sdk-core/sqs.rb +6 -0
- data/lib/aws-sdk-core/storagegateway.rb +5 -0
- data/lib/{aws → aws-sdk-core}/structure.rb +60 -4
- data/lib/aws-sdk-core/sts.rb +4 -0
- data/lib/aws-sdk-core/support.rb +5 -0
- data/lib/aws-sdk-core/swf.rb +5 -0
- data/lib/aws-sdk-core/version.rb +3 -0
- data/lib/aws-sdk-core/waiters/errors.rb +30 -0
- data/lib/aws-sdk-core/waiters/null_provider.rb +12 -0
- data/lib/aws-sdk-core/waiters/provider.rb +54 -0
- data/lib/aws-sdk-core/waiters/waiter.rb +194 -0
- data/lib/{aws → aws-sdk-core}/xml/builder.rb +4 -3
- data/lib/aws-sdk-core/xml/default_list.rb +10 -0
- data/lib/{aws → aws-sdk-core}/xml/parser.rb +6 -1
- data/lib/aws-sdk-core.rb +288 -1
- data/{vendor/seahorse/lib → lib}/seahorse/client/base.rb +45 -20
- data/{vendor/seahorse/lib → lib}/seahorse/client/handler_list.rb +17 -3
- data/{vendor/seahorse/lib → lib}/seahorse/client/http/error.rb +2 -2
- data/{vendor/seahorse/lib → lib}/seahorse/client/http/request.rb +1 -9
- data/{vendor/seahorse/lib → lib}/seahorse/client/net_http/connection_pool.rb +2 -0
- data/{vendor/seahorse/lib → lib}/seahorse/client/net_http/handler.rb +13 -1
- data/lib/seahorse/client/net_http/patches.rb +97 -0
- data/{vendor/seahorse/lib → lib}/seahorse/client/param_converter.rb +2 -2
- data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/endpoint.rb +24 -15
- data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/restful_bindings.rb +1 -1
- data/{vendor/seahorse/lib → lib}/seahorse/client/request.rb +1 -1
- data/{vendor/seahorse/lib → lib}/seahorse/client/response.rb +0 -2
- data/{vendor/seahorse/lib → lib}/seahorse/client/xml/builder.rb +0 -1
- data/{vendor/seahorse/lib → lib}/seahorse/model/shape_map.rb +1 -0
- data/{vendor/seahorse/lib → lib}/seahorse/model/shapes.rb +13 -4
- data/{vendor/seahorse/lib → lib}/seahorse.rb +3 -3
- metadata +257 -593
- data/.gitignore +0 -8
- data/.simplecov +0 -6
- data/.travis.yml +0 -20
- data/.yardopts +0 -11
- data/Gemfile +0 -26
- data/LICENSE.txt +0 -12
- data/README.md +0 -250
- data/Rakefile +0 -17
- data/apis/autoscaling-2011-01-01.api.json +0 -2602
- data/apis/cloudformation-2010-05-15.api.json +0 -1306
- data/apis/cloudfront-2014-01-31.api.json +0 -3478
- data/apis/cloudfront-2014-01-31.paginators.json +0 -32
- data/apis/cloudfront-2014-05-31.api.json +0 -3540
- data/apis/cloudfront-2014-05-31.paginators.json +0 -32
- data/apis/cloudfront-2014-05-31.waiters.json +0 -29
- data/apis/cloudsearch-2011-02-01.api.json +0 -2093
- data/apis/cloudsearch-2011-02-01.paginators.json +0 -13
- data/apis/cloudsearch-2013-01-01.api.json +0 -2655
- data/apis/cloudsearchdomain-2013-01-01.api.json +0 -508
- data/apis/cloudtrail-2013-11-01.api.json +0 -773
- data/apis/cognito-identity-2014-06-30.api.json +0 -884
- data/apis/cognito-sync-2014-06-30.api.json +0 -1029
- data/apis/datapipeline-2012-10-29.api.json +0 -1432
- data/apis/directconnect-2012-10-25.api.json +0 -1174
- data/apis/dynamodb-2011-12-05.api.json +0 -1208
- data/apis/dynamodb-2011-12-05.waiters.json +0 -27
- data/apis/dynamodb-2012-08-10.api.json +0 -1857
- data/apis/dynamodb-2012-08-10.paginators.json +0 -27
- data/apis/ec2-2014-06-15.api.json +0 -11661
- data/apis/elasticache-2014-03-24.api.json +0 -4789
- data/apis/elasticbeanstalk-2010-12-01.api.json +0 -2442
- data/apis/elasticloadbalancing-2012-06-01.api.json +0 -2576
- data/apis/elasticmapreduce-2009-03-31.api.json +0 -2282
- data/apis/elastictranscoder-2012-09-25.api.json +0 -2478
- data/apis/email-2010-12-01.api.json +0 -954
- data/apis/endpoints.json +0 -98
- data/apis/glacier-2012-06-01.api.json +0 -2012
- data/apis/iam-2010-05-08.api.json +0 -5046
- data/apis/importexport-2010-06-01.api.json +0 -687
- data/apis/kinesis-2013-12-02.api.json +0 -769
- data/apis/logs-2014-03-28.api.json +0 -942
- data/apis/manifest.json +0 -250
- data/apis/monitoring-2010-08-01.api.json +0 -1338
- data/apis/opsworks-2013-02-18.api.json +0 -4348
- data/apis/rds-2013-01-10.api.json +0 -6074
- data/apis/rds-2013-02-12.api.json +0 -6392
- data/apis/rds-2013-02-12.paginators.json +0 -110
- data/apis/rds-2013-09-09.api.json +0 -6564
- data/apis/rds-2013-09-09.paginators.json +0 -110
- data/apis/redshift-2012-12-01.api.json +0 -6318
- data/apis/route53-2013-04-01.api.json +0 -1927
- data/apis/sdb-2009-04-15.api.json +0 -1178
- data/apis/sns-2010-03-31.api.json +0 -2275
- data/apis/sqs-2012-11-05.api.json +0 -1438
- data/apis/storagegateway-2013-06-30.api.json +0 -3153
- data/apis/sts-2011-06-15.api.json +0 -786
- data/apis/support-2013-04-15.api.json +0 -1115
- data/apis/swf-2012-01-25.api.json +0 -4463
- data/aws-sdk-core.gemspec +0 -22
- data/doc-src/images/lastnode.png +0 -0
- data/doc-src/images/node.png +0 -0
- data/doc-src/images/vline.png +0 -0
- data/doc-src/plugins/apis.rb +0 -260
- data/doc-src/plugins/stability.rb +0 -1
- data/doc-src/services/CloudSearchDomain/client.md +0 -8
- data/doc-src/services/CloudSearchDomain/service.md +0 -0
- data/doc-src/services/default/client.md +0 -84
- data/doc-src/services/default/errors.md +0 -45
- data/doc-src/services/default/service.md +0 -28
- data/doc-src/templates/default/fulldoc/html/css/common.css +0 -90
- data/doc-src/templates/default/fulldoc/html/js/tabs.js +0 -21
- data/doc-src/templates/default/fulldoc/html/setup.rb +0 -66
- data/doc-src/templates/default/layout/html/footer.erb +0 -29
- data/doc-src/templates/default/layout/html/layout.erb +0 -37
- data/doc-src/templates/default/layout/html/setup.rb +0 -3
- data/features/autoscaling/client.feature +0 -18
- data/features/autoscaling/step_definitions.rb +0 -6
- data/features/cloudformation/client.feature +0 -17
- data/features/cloudformation/step_definitions.rb +0 -6
- data/features/cloudfront/client.feature +0 -17
- data/features/cloudfront/step_definitions.rb +0 -6
- data/features/cloudsearch/client.feature +0 -16
- data/features/cloudsearch/step_definitions.rb +0 -6
- data/features/cloudtrail/client.feature +0 -16
- data/features/cloudtrail/step_definitions.rb +0 -6
- data/features/cloudwatch/client.feature +0 -19
- data/features/cloudwatch/step_definitions.rb +0 -6
- data/features/cloudwatchlogs/client.feature +0 -17
- data/features/cloudwatchlogs/step_definitions.rb +0 -6
- data/features/cognitoidentity/client.feature +0 -17
- data/features/cognitoidentity/step_definitions.rb +0 -6
- data/features/cognitosync/client.feature +0 -16
- data/features/cognitosync/step_definitions.rb +0 -6
- data/features/datapipeline/client.feature +0 -16
- data/features/datapipeline/step_definitions.rb +0 -6
- data/features/directconnect/client.feature +0 -16
- data/features/directconnect/step_definitions.rb +0 -6
- data/features/dynamodb/client.feature +0 -17
- data/features/dynamodb/simplified.feature +0 -32
- data/features/dynamodb/step_definitions.rb +0 -11
- data/features/ec2/client.feature +0 -16
- data/features/ec2/step_definitions.rb +0 -6
- data/features/elasticache/client.feature +0 -16
- data/features/elasticache/step_definitions.rb +0 -6
- data/features/elasticbeanstalk/client.feature +0 -16
- data/features/elasticbeanstalk/step_definitions.rb +0 -6
- data/features/elasticloadbalancing/client.feature +0 -16
- data/features/elasticloadbalancing/step_definitions.rb +0 -6
- data/features/elastictranscoder/client.feature +0 -16
- data/features/elastictranscoder/step_definitions.rb +0 -6
- data/features/emr/client.feature +0 -16
- data/features/emr/step_definitions.rb +0 -6
- data/features/env.rb +0 -23
- data/features/glacier/client.feature +0 -17
- data/features/glacier/step_definitions.rb +0 -93
- data/features/glacier/upload.feature +0 -27
- data/features/iam/client.feature +0 -16
- data/features/iam/step_definitions.rb +0 -6
- data/features/importexport/client.feature +0 -16
- data/features/importexport/step_definitions.rb +0 -6
- data/features/kinesis/client.feature +0 -16
- data/features/kinesis/step_definitions.rb +0 -6
- data/features/opsworks/client.feature +0 -16
- data/features/opsworks/step_definitions.rb +0 -6
- data/features/rds/client.feature +0 -16
- data/features/rds/step_definitions.rb +0 -6
- data/features/redshift/client.feature +0 -16
- data/features/redshift/step_definitions.rb +0 -6
- data/features/route53/client.feature +0 -16
- data/features/route53/step_definitions.rb +0 -6
- data/features/s3/buckets.feature +0 -40
- data/features/s3/objects.feature +0 -37
- data/features/s3/step_definitions.rb +0 -165
- data/features/s3/test.png +0 -0
- data/features/ses/client.feature +0 -16
- data/features/ses/step_definitions.rb +0 -6
- data/features/simpledb/client.feature +0 -16
- data/features/simpledb/step_definitions.rb +0 -6
- data/features/sns/client.feature +0 -17
- data/features/sns/step_definitions.rb +0 -6
- data/features/sqs/client.feature +0 -21
- data/features/sqs/step_definitions.rb +0 -29
- data/features/step_definitions.rb +0 -94
- data/features/storagegateway/client.feature +0 -16
- data/features/storagegateway/step_definitions.rb +0 -6
- data/features/sts/client.feature +0 -17
- data/features/sts/step_definitions.rb +0 -6
- data/features/swf/client.feature +0 -17
- data/features/swf/step_definitions.rb +0 -6
- data/integration-test-config.json.sample +0 -3
- data/lib/aws/api/manifest.rb +0 -29
- data/lib/aws/api/manifest_builder.rb +0 -57
- data/lib/aws/client.rb +0 -241
- data/lib/aws/endpoint_provider.rb +0 -165
- data/lib/aws/plugins/response_paging.rb +0 -20
- data/lib/aws/plugins/s3_sse_cpk.rb +0 -42
- data/lib/aws/response_handler.rb +0 -38
- data/lib/aws/service.rb +0 -32
- data/lib/aws/signers/v4.rb.orig +0 -243
- data/lib/aws/version.rb +0 -3
- data/lib/aws/version.rb.orig +0 -7
- data/lib/aws.rb +0 -208
- data/lib/aws.rb.orig +0 -218
- data/spec/aws/client_spec.rb +0 -269
- data/spec/aws/credential_provider_chain_spec.rb +0 -120
- data/spec/aws/credentials_spec.rb +0 -47
- data/spec/aws/errors_spec.rb +0 -39
- data/spec/aws/iam_spec.rb +0 -17
- data/spec/aws/instance_profile_credentials_spec.rb +0 -94
- data/spec/aws/json/builder_spec.rb +0 -188
- data/spec/aws/json/parser_spec.rb +0 -214
- data/spec/aws/operations_spec.rb +0 -145
- data/spec/aws/pageable_response_spec.rb +0 -171
- data/spec/aws/plugins/global_configuration_spec.rb +0 -58
- data/spec/aws/plugins/region_endpoint_spec.rb +0 -86
- data/spec/aws/plugins/request_signer_spec.rb +0 -88
- data/spec/aws/plugins/retry_errors_spec.rb +0 -266
- data/spec/aws/plugins/s3_md5s_spec.rb +0 -84
- data/spec/aws/plugins/sqs_queue_urls_spec.rb +0 -42
- data/spec/aws/query/param_builder_spec.rb +0 -362
- data/spec/aws/query/param_list_spec.rb +0 -80
- data/spec/aws/query/param_spec.rb +0 -64
- data/spec/aws/s3_spec.rb +0 -79
- data/spec/aws/shared_credentials_spec.rb +0 -68
- data/spec/aws/signers/v4_spec.rb +0 -141
- data/spec/aws/structure_spec.rb +0 -166
- data/spec/aws/util_spec.rb +0 -60
- data/spec/aws/xml/builder_spec.rb +0 -412
- data/spec/aws/xml/parser_spec.rb +0 -723
- data/spec/aws_spec.rb +0 -94
- data/spec/fixtures/api/swf.json +0 -100
- data/spec/fixtures/credentials/mock_shared_credentials +0 -14
- data/spec/fixtures/operations/cloudfront/list_distributions.yml +0 -199
- data/spec/fixtures/operations/cloudfront/max_items.yml +0 -11
- data/spec/fixtures/operations/dynamodb/error_parsing.yml +0 -13
- data/spec/fixtures/operations/glacier/account_id_param.yml +0 -13
- data/spec/fixtures/operations/glacier/custom_account_id.yml +0 -11
- data/spec/fixtures/operations/glacier/default_account_id.yml +0 -10
- data/spec/fixtures/operations/glacier/error_parsing.yml +0 -10
- data/spec/fixtures/operations/glacier/get_job_output.yml +0 -23
- data/spec/fixtures/operations/glacier/list_vaults.yml +0 -24
- data/spec/fixtures/operations/iam/result_wrapped_elements.yml +0 -31
- data/spec/fixtures/operations/route53/change_resource_record_sets.yml +0 -18
- data/spec/fixtures/operations/s3/304_response.yml +0 -12
- data/spec/fixtures/operations/s3/400_response.yml +0 -12
- data/spec/fixtures/operations/s3/403_response.yml +0 -12
- data/spec/fixtures/operations/s3/404_response.yml +0 -12
- data/spec/fixtures/operations/s3/412_response_head.yml +0 -10
- data/spec/fixtures/operations/s3/comlete_multipart_upload_error.yml +0 -18
- data/spec/fixtures/operations/s3/content_type_header.yml +0 -12
- data/spec/fixtures/operations/s3/create_bucket_with_implied_location_constraint.yml +0 -23
- data/spec/fixtures/operations/s3/create_bucket_with_location_constraint.yml +0 -25
- data/spec/fixtures/operations/s3/create_bucket_without_location_constraint.yml +0 -9
- data/spec/fixtures/operations/s3/delete_objects.yml +0 -54
- data/spec/fixtures/operations/s3/error_parsing.yml +0 -17
- data/spec/fixtures/operations/s3/get_bucket_location.yml +0 -17
- data/spec/fixtures/operations/s3/get_bucket_location_classic.yml +0 -17
- data/spec/fixtures/operations/s3/get_bucket_policy.yml +0 -8
- data/spec/fixtures/operations/s3/head_bucket_with_dns_incompatible_name.yml +0 -12
- data/spec/fixtures/operations/s3/head_object.yml +0 -50
- data/spec/fixtures/operations/s3/list_buckets.yml +0 -41
- data/spec/fixtures/operations/s3/md5_checksum_disabled.yml +0 -10
- data/spec/fixtures/operations/s3/md5_checksum_enabled.yml +0 -8
- data/spec/fixtures/operations/swf/list_domains.yml +0 -20
- data/spec/fixtures/protocols/input/ec2.json +0 -383
- data/spec/fixtures/protocols/input/json.json +0 -47
- data/spec/fixtures/protocols/input/query.json +0 -335
- data/spec/fixtures/protocols/input/rest-json.json +0 -365
- data/spec/fixtures/protocols/input/rest-xml.json +0 -818
- data/spec/fixtures/protocols/output/ec2.json +0 -381
- data/spec/fixtures/protocols/output/json.json +0 -313
- data/spec/fixtures/protocols/output/query.json +0 -424
- data/spec/fixtures/protocols/output/rest-json.json +0 -486
- data/spec/fixtures/protocols/output/rest-xml.json +0 -486
- data/spec/protocols_spec.rb +0 -186
- data/spec/spec_helper.rb +0 -66
- data/tasks/docs.rake +0 -61
- data/tasks/handlers.rake +0 -98
- data/tasks/manifest.rake +0 -9
- data/tasks/test.rake +0 -30
- data/vendor/seahorse/.gitignore +0 -5
- data/vendor/seahorse/.simplecov +0 -4
- data/vendor/seahorse/.yardopts +0 -10
- data/vendor/seahorse/Gemfile +0 -17
- data/vendor/seahorse/LICENSE.txt +0 -12
- data/vendor/seahorse/README.md +0 -129
- data/vendor/seahorse/Rakefile +0 -7
- data/vendor/seahorse/lib/seahorse/client/plugins/api.rb +0 -11
- data/vendor/seahorse/seahorse.gemspec +0 -20
- data/vendor/seahorse/spec/fixtures/plugin.rb +0 -4
- data/vendor/seahorse/spec/seahorse/client/base_spec.rb +0 -299
- data/vendor/seahorse/spec/seahorse/client/configuration_spec.rb +0 -122
- data/vendor/seahorse/spec/seahorse/client/handler_builder_spec.rb +0 -159
- data/vendor/seahorse/spec/seahorse/client/handler_list_spec.rb +0 -232
- data/vendor/seahorse/spec/seahorse/client/handler_spec.rb +0 -40
- data/vendor/seahorse/spec/seahorse/client/http/headers_spec.rb +0 -213
- data/vendor/seahorse/spec/seahorse/client/http/request_spec.rb +0 -121
- data/vendor/seahorse/spec/seahorse/client/http/response_spec.rb +0 -77
- data/vendor/seahorse/spec/seahorse/client/logging/formatter_spec.rb +0 -185
- data/vendor/seahorse/spec/seahorse/client/logging/handler_spec.rb +0 -63
- data/vendor/seahorse/spec/seahorse/client/net_http/connection_pool_spec.rb +0 -10
- data/vendor/seahorse/spec/seahorse/client/net_http/handler_spec.rb +0 -242
- data/vendor/seahorse/spec/seahorse/client/param_converter_spec.rb +0 -308
- data/vendor/seahorse/spec/seahorse/client/param_validator_spec.rb +0 -275
- data/vendor/seahorse/spec/seahorse/client/plugin_list_spec.rb +0 -166
- data/vendor/seahorse/spec/seahorse/client/plugin_spec.rb +0 -118
- data/vendor/seahorse/spec/seahorse/client/plugins/content_length_spec.rb +0 -19
- data/vendor/seahorse/spec/seahorse/client/plugins/endpoint_spec.rb +0 -33
- data/vendor/seahorse/spec/seahorse/client/plugins/logging_spec.rb +0 -46
- data/vendor/seahorse/spec/seahorse/client/plugins/net_http_spec.rb +0 -70
- data/vendor/seahorse/spec/seahorse/client/plugins/operation_methods_spec.rb +0 -76
- data/vendor/seahorse/spec/seahorse/client/request_context_spec.rb +0 -105
- data/vendor/seahorse/spec/seahorse/client/request_spec.rb +0 -152
- data/vendor/seahorse/spec/seahorse/client/response_spec.rb +0 -95
- data/vendor/seahorse/spec/seahorse/client/xml/builder/xml_doc_spec.rb +0 -142
- data/vendor/seahorse/spec/seahorse/client/xml/builder_spec.rb +0 -10
- data/vendor/seahorse/spec/seahorse/model/api_spec.rb +0 -154
- data/vendor/seahorse/spec/seahorse/model/operation_spec.rb +0 -162
- data/vendor/seahorse/spec/seahorse/model/shape_map_spec.rb +0 -84
- data/vendor/seahorse/spec/seahorse/model/shapes_spec.rb +0 -522
- data/vendor/seahorse/spec/seahorse/util_spec.rb +0 -54
- data/vendor/seahorse/spec/seahorse/version_spec.rb +0 -11
- data/vendor/seahorse/spec/spec_helper.rb +0 -34
- data/vendor/seahorse/tasks/docs.rake +0 -11
- data/vendor/seahorse/tasks/test.rake +0 -15
- /data/apis/{autoscaling-2011-01-01.paginators.json → AutoScaling.paginators.json} +0 -0
- /data/apis/{cloudformation-2010-05-15.paginators.json → CloudFormation.paginators.json} +0 -0
- /data/apis/{cloudfront-2014-01-31.waiters.json → CloudFront.waiters.json} +0 -0
- /data/apis/{cloudsearch-2013-01-01.paginators.json → CloudSearch.paginators.json} +0 -0
- /data/apis/{cloudtrail-2013-11-01.paginators.json → CloudTrail.paginators.json} +0 -0
- /data/apis/{monitoring-2010-08-01.paginators.json → CloudWatch.paginators.json} +0 -0
- /data/apis/{logs-2014-03-28.paginators.json → CloudWatchLogs.paginators.json} +0 -0
- /data/apis/{datapipeline-2012-10-29.paginators.json → DataPipeline.paginators.json} +0 -0
- /data/apis/{directconnect-2012-10-25.paginators.json → DirectConnect.paginators.json} +0 -0
- /data/apis/{dynamodb-2012-08-10.waiters.json → DynamoDB.waiters.json} +0 -0
- /data/apis/{ec2-2014-06-15.paginators.json → EC2.paginators.json} +0 -0
- /data/apis/{ec2-2014-06-15.waiters.json → EC2.waiters.json} +0 -0
- /data/apis/{elasticmapreduce-2009-03-31.paginators.json → EMR.paginators.json} +0 -0
- /data/apis/{elasticache-2014-03-24.paginators.json → ElastiCache.paginators.json} +0 -0
- /data/apis/{elasticbeanstalk-2010-12-01.paginators.json → ElasticBeanstalk.paginators.json} +0 -0
- /data/apis/{elasticloadbalancing-2012-06-01.paginators.json → ElasticLoadBalancing.paginators.json} +0 -0
- /data/apis/{elastictranscoder-2012-09-25.paginators.json → ElasticTranscoder.paginators.json} +0 -0
- /data/apis/{glacier-2012-06-01.paginators.json → Glacier.paginators.json} +0 -0
- /data/apis/{glacier-2012-06-01.waiters.json → Glacier.waiters.json} +0 -0
- /data/apis/{iam-2010-05-08.paginators.json → IAM.paginators.json} +0 -0
- /data/apis/{importexport-2010-06-01.paginators.json → ImportExport.paginators.json} +0 -0
- /data/apis/{opsworks-2013-02-18.paginators.json → OpsWorks.paginators.json} +0 -0
- /data/apis/{rds-2013-01-10.paginators.json → RDS.paginators.json} +0 -0
- /data/apis/{rds-2013-09-09.waiters.json → RDS.waiters.json} +0 -0
- /data/apis/{redshift-2012-12-01.paginators.json → Redshift.paginators.json} +0 -0
- /data/apis/{redshift-2012-12-01.waiters.json → Redshift.waiters.json} +0 -0
- /data/apis/{route53-2013-04-01.paginators.json → Route53.paginators.json} +0 -0
- /data/apis/{s3-2006-03-01.waiters.json → S3.waiters.json} +0 -0
- /data/apis/{email-2010-12-01.paginators.json → SES.paginators.json} +0 -0
- /data/apis/{email-2010-12-01.waiters.json → SES.waiters.json} +0 -0
- /data/apis/{sns-2010-03-31.paginators.json → SNS.paginators.json} +0 -0
- /data/apis/{sns-2010-03-31.resources.json → SNS.resources.json} +0 -0
- /data/apis/{sqs-2012-11-05.paginators.json → SQS.paginators.json} +0 -0
- /data/apis/{swf-2012-01-25.paginators.json → SWF.paginators.json} +0 -0
- /data/apis/{sdb-2009-04-15.paginators.json → SimpleDB.paginators.json} +0 -0
- /data/apis/{storagegateway-2013-06-30.paginators.json → StorageGateway.paginators.json} +0 -0
- /data/apis/{support-2013-04-15.paginators.json → Support.paginators.json} +0 -0
- /data/lib/{aws → aws-sdk-core}/api/customizer.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/credentials.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/builder.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/error_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/parser.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/rest_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/rpc_body_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/rpc_headers_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/simple_body_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/paging/null_pager.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/paging/null_provider.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/paging/pager.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/paging/provider.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/dynamodb_extended_retries.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/ec2_copy_encrypted_snapshot.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/glacier_account_id.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/glacier_api_version.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/glacier_checksums.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/protocols/ec2.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/protocols/query.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/protocols/rest_json.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/protocols/rest_xml.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_bucket_dns.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_complete_multipart_upload_fix.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_get_bucket_location_fix.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_location_constraint.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_md5s.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_redirects.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/sqs_queue_urls.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/swf_read_timeouts.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/query/ec2_param_builder.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/query/param.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/query/param_builder.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/query/param_list.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/rest_body_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/shared_credentials.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/signers/base.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/signers/handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/signers/s3.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/signers/v2.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/signers/v3.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/tree_hash.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/xml/error_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/xml/rest_handler.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/block_io.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/configuration.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/handler.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/handler_builder.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/handler_list_entry.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/http/headers.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/http/response.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/logging/formatter.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/logging/handler.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/managed_file.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/param_validator.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugin.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugin_list.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/content_length.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/json_simple.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/logging.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/net_http.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/operation_methods.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/param_conversion.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/param_validation.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/raise_response_errors.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/request_context.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/model/api.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/model/operation.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/util.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/version.rb +0 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
module Aws
|
|
2
|
+
|
|
3
|
+
# Base class for all {Aws} service clients.
|
|
4
|
+
class Client < Seahorse::Client::Base
|
|
5
|
+
|
|
6
|
+
# Waits until a particular condition is satisfied. This works by
|
|
7
|
+
# polling a client request and checking for particular response
|
|
8
|
+
# data or errors. Waiters each have a default duration max attempts
|
|
9
|
+
# which are configurable. Additionally, you can register callbacks
|
|
10
|
+
# and stop waiters by throwing `:success` or `:failure`.
|
|
11
|
+
#
|
|
12
|
+
# @example Basic usage
|
|
13
|
+
# client.wait_until(:waiter_name)
|
|
14
|
+
#
|
|
15
|
+
# @example Configuring interval and maximum attempts
|
|
16
|
+
# client.wait_until(:waiter_name) do |w|
|
|
17
|
+
# w.interval = 10 # number of seconds to sleep between attempts
|
|
18
|
+
# w.max_attempts = 6 # maximum number of polling attempts
|
|
19
|
+
# end
|
|
20
|
+
#
|
|
21
|
+
# @example Rescuing a failed wait
|
|
22
|
+
# begin
|
|
23
|
+
# client.wait_until(:waiter_name)
|
|
24
|
+
# rescue Aws::Waiters::Errors::WaiterFailed
|
|
25
|
+
# # gave up waiting
|
|
26
|
+
# end
|
|
27
|
+
#
|
|
28
|
+
# @example Waiting with progress callbacks
|
|
29
|
+
# client.wait_until(:waiter_name) do |w|
|
|
30
|
+
#
|
|
31
|
+
# # yields just before polling for change
|
|
32
|
+
# w.before_attempt do |attempt|
|
|
33
|
+
# # attempts - number of previous attempts made
|
|
34
|
+
# end
|
|
35
|
+
#
|
|
36
|
+
# # yields before sleeping
|
|
37
|
+
# w.before_wait do |attempt, prev_response|
|
|
38
|
+
# # attempts - number of previous attempts made
|
|
39
|
+
# # prev_response - the last client response received
|
|
40
|
+
# end
|
|
41
|
+
# end
|
|
42
|
+
#
|
|
43
|
+
# @example Throw :success or :failure to terminate early
|
|
44
|
+
# # wait for an hour, not for a number of requests
|
|
45
|
+
# client.wait_until(:waiter_name) do |waiter|
|
|
46
|
+
# one_hour = Time.now + 3600
|
|
47
|
+
# waiter.max_attempts = nil
|
|
48
|
+
# waiter.before_attempt do |attempt|
|
|
49
|
+
# throw(:failure, 'waited to long') if Time.now > one_hour
|
|
50
|
+
# end
|
|
51
|
+
# end
|
|
52
|
+
#
|
|
53
|
+
# @param [Symbol] waiter_name The name of the waiter. See {#waiter_names}
|
|
54
|
+
# for a full list of supported waiters.
|
|
55
|
+
# @param [Hash] params Additional request parameters. See the {#waiter_names}
|
|
56
|
+
# for a list of supported waiters and what request they call. The
|
|
57
|
+
# called request determines the list of accepted parameters.
|
|
58
|
+
# @return [Seahorse::Client::Response] Returns the client response from
|
|
59
|
+
# the successful polling request. If `:success` is thrown from a callback,
|
|
60
|
+
# then the 2nd argument to `#throw` is returned.
|
|
61
|
+
# @yieldparam [Waiters::Waiter] waiter Yields a {Waiters::Waiter Waiter}
|
|
62
|
+
# object that can be configured prior to waiting.
|
|
63
|
+
# @raise [Waiters::Errors::NoSuchWaiter] Raised when the named waiter
|
|
64
|
+
# is not defined.
|
|
65
|
+
# @raise [Waiters::Errors::WaiterFailed] Raised when one of the
|
|
66
|
+
# following conditions is met:
|
|
67
|
+
#
|
|
68
|
+
# * A failure condition is detected
|
|
69
|
+
# * The maximum number of attempts has been made without success
|
|
70
|
+
# * `:failure` is thrown from a callback
|
|
71
|
+
#
|
|
72
|
+
def wait_until(waiter_name, params = {}, &block)
|
|
73
|
+
waiter = self.class.waiters.waiter(waiter_name)
|
|
74
|
+
yield(waiter) if block_given?
|
|
75
|
+
waiter.wait(self, params)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Returns the list of supported waiters.
|
|
79
|
+
# @return [Array<Symbol>]
|
|
80
|
+
def waiter_names
|
|
81
|
+
self.class.waiters.waiter_names
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
class << self
|
|
85
|
+
|
|
86
|
+
# @return [Symbol]
|
|
87
|
+
# @api private
|
|
88
|
+
attr_accessor :identifier
|
|
89
|
+
|
|
90
|
+
# @return [Paging::Provider]
|
|
91
|
+
# @api private
|
|
92
|
+
attr_accessor :paginators
|
|
93
|
+
|
|
94
|
+
# @return [Waiters::Provider]
|
|
95
|
+
# @api private
|
|
96
|
+
attr_accessor :waiters
|
|
97
|
+
|
|
98
|
+
# @api private
|
|
99
|
+
def define(svc_name, options)
|
|
100
|
+
client_class = Class.new(self)
|
|
101
|
+
client_class.identifier = svc_name.downcase.to_sym
|
|
102
|
+
client_class.set_api(load_api(options[:api]))
|
|
103
|
+
Api::ServiceCustomizations.apply(client_class)
|
|
104
|
+
client_class
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
private
|
|
108
|
+
|
|
109
|
+
def load_api(api)
|
|
110
|
+
case api
|
|
111
|
+
when Seahorse::Model::Api then api
|
|
112
|
+
when Hash then Seahorse::Model::Api.new(api)
|
|
113
|
+
when String then Seahorse::Model::Api.new(Aws.load_json(api))
|
|
114
|
+
when nil then Seahorse::Model::Api.new({})
|
|
115
|
+
else raise ArgumentError, "invalid api definition #{api}"
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
end
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
Aws.add_service(:CloudFront, {
|
|
2
|
+
api: File.join(Aws::APIS_DIR, 'CloudFront.api.json'),
|
|
3
|
+
docs: File.join(Aws::APIS_DIR, 'CloudFront.docs.json'),
|
|
4
|
+
paginators: File.join(Aws::APIS_DIR, 'CloudFront.paginators.json'),
|
|
5
|
+
waiters: File.join(Aws::APIS_DIR, 'CloudFront.waiters.json'),
|
|
6
|
+
})
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
module Aws
|
|
2
|
+
# @api private
|
|
2
3
|
class CredentialProviderChain
|
|
3
4
|
|
|
4
5
|
def initialize(config)
|
|
@@ -8,7 +9,7 @@ module Aws
|
|
|
8
9
|
def resolve
|
|
9
10
|
providers.each do |method_name, options|
|
|
10
11
|
credentials = send(method_name, options.merge(config: @config))
|
|
11
|
-
return credentials if credentials.set?
|
|
12
|
+
return credentials if credentials && credentials.set?
|
|
12
13
|
end
|
|
13
14
|
nil
|
|
14
15
|
end
|
|
@@ -49,6 +50,8 @@ module Aws
|
|
|
49
50
|
|
|
50
51
|
def shared_credentials(options = {})
|
|
51
52
|
SharedCredentials.new(profile_name: options[:config].profile)
|
|
53
|
+
rescue Errors::NoSuchProfileError
|
|
54
|
+
nil
|
|
52
55
|
end
|
|
53
56
|
|
|
54
57
|
def instance_profile_credentials(*args)
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
require 'bigdecimal'
|
|
2
|
+
require 'stringio'
|
|
3
|
+
require 'set'
|
|
4
|
+
|
|
5
|
+
module Aws
|
|
6
|
+
module DynamoDB
|
|
7
|
+
# @api private
|
|
8
|
+
class AttributeValue
|
|
9
|
+
|
|
10
|
+
def initialize
|
|
11
|
+
@marshaler = Marshaler.new
|
|
12
|
+
@unmarshaler = Unmarshaler.new
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def marshal(value)
|
|
16
|
+
@marshaler.format(value)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def unmarshal(value)
|
|
20
|
+
@unmarshaler.format(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
class Marshaler
|
|
24
|
+
|
|
25
|
+
def format(obj)
|
|
26
|
+
case obj
|
|
27
|
+
when String then { s: obj }
|
|
28
|
+
when Numeric then { n: obj.to_s }
|
|
29
|
+
when StringIO, IO then { b: obj.read }
|
|
30
|
+
when Set then format_set(obj)
|
|
31
|
+
else
|
|
32
|
+
msg = "unsupported type, expected Set, String, Numeric, or "
|
|
33
|
+
msg << "IO object, got #{obj.class.name}"
|
|
34
|
+
raise ArgumentError, msg
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
private
|
|
39
|
+
|
|
40
|
+
def format_set(set)
|
|
41
|
+
case set.first
|
|
42
|
+
when String then { ss: set.map(&:to_s) }
|
|
43
|
+
when Numeric then { ns: set.map(&:to_s) }
|
|
44
|
+
when StringIO, IO then { bs: set.map(&:read) }
|
|
45
|
+
else
|
|
46
|
+
msg = "set types only support String, Numeric, or IO objects"
|
|
47
|
+
raise ArgumentError, msg
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
class Unmarshaler
|
|
54
|
+
|
|
55
|
+
def format(obj)
|
|
56
|
+
type, value = extract_type_and_value(obj)
|
|
57
|
+
case type
|
|
58
|
+
when :s then value
|
|
59
|
+
when :n then BigDecimal.new(value)
|
|
60
|
+
when :b then StringIO.new(value)
|
|
61
|
+
when :ss then Set.new(value)
|
|
62
|
+
when :ns then Set.new(value.map { |n| BigDecimal.new(n) })
|
|
63
|
+
when :bs then Set.new(value.map { |b| StringIO.new(b) })
|
|
64
|
+
else
|
|
65
|
+
raise ArgumentError, "unhandled type #{type.inspect}"
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
private
|
|
70
|
+
|
|
71
|
+
def extract_type_and_value(obj)
|
|
72
|
+
case obj
|
|
73
|
+
when Hash then obj.to_a.first
|
|
74
|
+
when Struct
|
|
75
|
+
obj.members.each do |key|
|
|
76
|
+
value = obj[key]
|
|
77
|
+
return [key, value] unless value.nil?
|
|
78
|
+
end
|
|
79
|
+
else
|
|
80
|
+
raise ArgumentError, "unhandled type #{obj.inspect}"
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Aws.add_service(:DynamoDB, {
|
|
2
|
+
api: File.join(Aws::APIS_DIR, 'DynamoDB.api.json'),
|
|
3
|
+
docs: File.join(Aws::APIS_DIR, 'DynamoDB.docs.json'),
|
|
4
|
+
paginators: File.join(Aws::APIS_DIR, 'DynamoDB.paginators.json'),
|
|
5
|
+
waiters: File.join(Aws::APIS_DIR, 'DynamoDB.waiters.json'),
|
|
6
|
+
})
|
|
7
|
+
|
|
8
|
+
module Aws
|
|
9
|
+
module DynamoDB
|
|
10
|
+
autoload :AttributeValue, 'aws-sdk-core/dynamodb/attribute_value'
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Aws.add_service(:EC2, {
|
|
2
|
+
api: File.join(Aws::APIS_DIR, 'EC2.api.json'),
|
|
3
|
+
docs: File.join(Aws::APIS_DIR, 'EC2.docs.json'),
|
|
4
|
+
paginators: File.join(Aws::APIS_DIR, 'EC2.paginators.json'),
|
|
5
|
+
resources: File.join(Aws::APIS_DIR, 'EC2.resources.json'),
|
|
6
|
+
waiters: File.join(Aws::APIS_DIR, 'EC2.waiters.json'),
|
|
7
|
+
})
|
|
@@ -6,14 +6,14 @@ module Aws
|
|
|
6
6
|
end
|
|
7
7
|
|
|
8
8
|
def ==(other)
|
|
9
|
-
other.is_a?(
|
|
9
|
+
other.is_a?(EmptyStructure)
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def [](member_name)
|
|
13
13
|
raise NameError, "no member '#{member_name}' in struct"
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
def []=(member_name)
|
|
16
|
+
def []=(member_name, value)
|
|
17
17
|
raise NameError, "no member '#{member_name}' in struct"
|
|
18
18
|
end
|
|
19
19
|
|
|
@@ -30,7 +30,7 @@ module Aws
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
def eql?(other)
|
|
33
|
-
other.is_a?(
|
|
33
|
+
other.is_a?(EmptyStructure)
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
# @api private
|
|
@@ -52,6 +52,7 @@ module Aws
|
|
|
52
52
|
end
|
|
53
53
|
|
|
54
54
|
def select(&block)
|
|
55
|
+
[]
|
|
55
56
|
end
|
|
56
57
|
|
|
57
58
|
def size
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
require 'multi_json'
|
|
2
|
+
|
|
3
|
+
module Aws
|
|
4
|
+
# @api private
|
|
5
|
+
class EndpointProvider
|
|
6
|
+
|
|
7
|
+
# @option options [Array<Hash>] :rules ([]) An array of grouped rules.
|
|
8
|
+
def initialize(options = {})
|
|
9
|
+
@rules = options[:rules] || []
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# @option options [required, String] :service
|
|
13
|
+
# @option options [required, String] :region
|
|
14
|
+
# @option options [required, String] :scheme
|
|
15
|
+
# @return [Hash]
|
|
16
|
+
def resolve(options)
|
|
17
|
+
@rules.each do |rule_group|
|
|
18
|
+
if region_matches?(rule_group, options)
|
|
19
|
+
rule_group['rules'].each do |rule|
|
|
20
|
+
if service_matches?(rule, options)
|
|
21
|
+
return expand_endpoint(rule['config']['endpoint'], options)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
{}
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# @option options [required, String] :pattern The endpoint pattern with
|
|
30
|
+
# optional placeholders. This is applied when rules match during
|
|
31
|
+
# resolution. Valid placeholders include:
|
|
32
|
+
#
|
|
33
|
+
# * `{scheme}`
|
|
34
|
+
# * `{region}`
|
|
35
|
+
# * `{service}`
|
|
36
|
+
#
|
|
37
|
+
# An example pattern:
|
|
38
|
+
#
|
|
39
|
+
# "#{scheme}://{service}.{region}.amazonaws.com"
|
|
40
|
+
#
|
|
41
|
+
# @option options [Integer] :priority (100) A number from 0 to 999.
|
|
42
|
+
# Rules with lower number have a higher priority and are evaluated first.
|
|
43
|
+
#
|
|
44
|
+
# @option options [String] :region_prefix ("") Causes regions with this
|
|
45
|
+
# prefix to match. Leave this empty if you want to match all regions.
|
|
46
|
+
#
|
|
47
|
+
# @option options [Array<String>] :services A list of services this rule
|
|
48
|
+
# applies to. Omit this option if you want this rule to apply to all
|
|
49
|
+
# services.
|
|
50
|
+
#
|
|
51
|
+
# The string must be the service endpoint prefix as a string.
|
|
52
|
+
# E.g. "s3", "ec2", "monitoring" (for cloud watch).
|
|
53
|
+
#
|
|
54
|
+
def add_rule(options = {})
|
|
55
|
+
@rules = (@rules + [new_rule(options)]).sort_by { |r| r['priority'] }
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
private
|
|
59
|
+
|
|
60
|
+
def new_rule(options)
|
|
61
|
+
rule = {}
|
|
62
|
+
rule['services'] = options[:services] if options[:services]
|
|
63
|
+
rule['config'] = {}
|
|
64
|
+
rule['config']['endpoint'] = options[:pattern]
|
|
65
|
+
{
|
|
66
|
+
'priority' => options[:priority] || 100,
|
|
67
|
+
'regionPrefix' => options[:region_prefix] || '',
|
|
68
|
+
'rules' => [rule]
|
|
69
|
+
}
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def region_matches?(rule_group, options)
|
|
73
|
+
options[:region] && options[:region].match(/^#{rule_group['regionPrefix']}/)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def service_matches?(rule, options)
|
|
77
|
+
rule['services'].nil? || rule['services'].include?(options[:service])
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def expand_endpoint(pattern, options)
|
|
81
|
+
pattern.gsub(/{\w+}/) { |match| options[match[1..-2].to_sym] }
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
class << self
|
|
85
|
+
|
|
86
|
+
def default_provider
|
|
87
|
+
@default_provider ||= EndpointProvider.new(rules: default_rules)
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def default_rules
|
|
91
|
+
path = File.join(File.dirname(__FILE__), '..', '..', 'endpoints.json')
|
|
92
|
+
MultiJson.load(File.read(path))
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
require 'thread'
|
|
2
2
|
|
|
3
3
|
module Aws
|
|
4
|
+
|
|
5
|
+
# Each Service module has its own Errors module, e.g. {S3::Errors}.
|
|
4
6
|
module Errors
|
|
5
7
|
|
|
6
8
|
# The base class for all errors returned by an Amazon Web Service.
|
|
@@ -20,16 +22,18 @@ module Aws
|
|
|
20
22
|
# that triggered the remote service to return this error.
|
|
21
23
|
attr_reader :context
|
|
22
24
|
|
|
25
|
+
class << self
|
|
26
|
+
|
|
27
|
+
# @return [String]
|
|
28
|
+
attr_accessor :code
|
|
29
|
+
|
|
30
|
+
end
|
|
23
31
|
end
|
|
24
32
|
|
|
25
33
|
# Various plugins perform client-side checksums of responses.
|
|
26
34
|
# This error indicates a checksum failed.
|
|
27
35
|
class ChecksumError < RuntimeError; end
|
|
28
36
|
|
|
29
|
-
# Raised when a {Service} is constructed an no suitable API
|
|
30
|
-
# version is found based on configuration.
|
|
31
|
-
class NoSuchApiVersionError < RuntimeError; end
|
|
32
|
-
|
|
33
37
|
# Raised when a {Service} is constructed and the specified shared
|
|
34
38
|
# credentials profile does not exist.
|
|
35
39
|
class NoSuchProfileError < RuntimeError; end
|
|
@@ -72,9 +76,7 @@ module Aws
|
|
|
72
76
|
#
|
|
73
77
|
# @api private
|
|
74
78
|
def error_class(error_code)
|
|
75
|
-
constant = error_code
|
|
76
|
-
constant = constant.gsub(/http:\/\/.*$/, '') # remove http namespaces
|
|
77
|
-
constant = constant.gsub(/[^a-zA-Z0-9]/, '').to_sym
|
|
79
|
+
constant = error_class_constant(error_code)
|
|
78
80
|
if error_const_set?(constant)
|
|
79
81
|
const_get(constant)
|
|
80
82
|
else
|
|
@@ -84,13 +86,30 @@ module Aws
|
|
|
84
86
|
|
|
85
87
|
private
|
|
86
88
|
|
|
89
|
+
# Convert an error code to an error class name/constant.
|
|
90
|
+
# This requires filtering non-safe characters from the constant
|
|
91
|
+
# name and ensuring it begins with an uppercase letter.
|
|
92
|
+
# @param [String] error_code
|
|
93
|
+
# @return [Symbol] Returns a symbolized constant name for the given
|
|
94
|
+
# `error_code`.
|
|
95
|
+
def error_class_constant(error_code)
|
|
96
|
+
constant = error_code.to_s
|
|
97
|
+
constant = constant.gsub(/https?:.*$/, '')
|
|
98
|
+
constant = constant.gsub(/[^a-zA-Z0-9]/, '')
|
|
99
|
+
constant = 'Error' + constant unless constant.match(/^[a-z]/i)
|
|
100
|
+
constant = constant[0].upcase + constant[1..-1]
|
|
101
|
+
constant.to_sym
|
|
102
|
+
end
|
|
103
|
+
|
|
87
104
|
def set_error_constant(constant)
|
|
88
105
|
@const_set_mutex.synchronize do
|
|
89
106
|
# Ensure the const was not defined while blocked by the mutex
|
|
90
107
|
if error_const_set?(constant)
|
|
91
108
|
const_get(constant)
|
|
92
109
|
else
|
|
93
|
-
|
|
110
|
+
error_class = Class.new(const_get(:ServiceError))
|
|
111
|
+
error_class.code = constant.to_s
|
|
112
|
+
const_set(constant, error_class)
|
|
94
113
|
end
|
|
95
114
|
end
|
|
96
115
|
end
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Aws.add_service(:Glacier, {
|
|
2
|
+
api: File.join(Aws::APIS_DIR, 'Glacier.api.json'),
|
|
3
|
+
docs: File.join(Aws::APIS_DIR, 'Glacier.docs.json'),
|
|
4
|
+
paginators: File.join(Aws::APIS_DIR, 'Glacier.paginators.json'),
|
|
5
|
+
resources: File.join(Aws::APIS_DIR, 'Glacier.resources.json'),
|
|
6
|
+
waiters: File.join(Aws::APIS_DIR, 'Glacier.waiters.json'),
|
|
7
|
+
})
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
require 'time'
|
|
2
2
|
require 'net/http'
|
|
3
|
+
require 'thread'
|
|
3
4
|
|
|
4
5
|
module Aws
|
|
5
6
|
class InstanceProfileCredentials < Credentials
|
|
@@ -34,6 +35,7 @@ module Aws
|
|
|
34
35
|
@http_open_timeout = options[:http_open_timeout] || 1
|
|
35
36
|
@http_read_timeout = options[:http_read_timeout] || 1
|
|
36
37
|
@http_debug_output = options[:http_debug_output]
|
|
38
|
+
@refresh_mutex = Mutex.new
|
|
37
39
|
refresh!
|
|
38
40
|
end
|
|
39
41
|
|
|
@@ -62,14 +64,16 @@ module Aws
|
|
|
62
64
|
end
|
|
63
65
|
|
|
64
66
|
def refresh!
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
@refresh_mutex.synchronize do
|
|
68
|
+
credentials = MultiJson.load(get_credentials)
|
|
69
|
+
@access_key_id = credentials['AccessKeyId']
|
|
70
|
+
@secret_access_key = credentials['SecretAccessKey']
|
|
71
|
+
@session_token = credentials['Token']
|
|
72
|
+
if expires = credentials['Expiration']
|
|
73
|
+
@expiration = Time.parse(expires)
|
|
74
|
+
else
|
|
75
|
+
@expiration = nil
|
|
76
|
+
end
|
|
73
77
|
end
|
|
74
78
|
end
|
|
75
79
|
|
|
@@ -92,7 +96,7 @@ module Aws
|
|
|
92
96
|
end
|
|
93
97
|
|
|
94
98
|
def open_connection
|
|
95
|
-
http = Net::HTTP.new(@ip_address, @port)
|
|
99
|
+
http = Net::HTTP.new(@ip_address, @port, nil)
|
|
96
100
|
http.open_timeout = @http_open_timeout
|
|
97
101
|
http.read_timeout = @http_read_timeout
|
|
98
102
|
http.set_debug_output(@http_debug_output) if @http_debug_output
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
Aws.add_service(:OpsWorks, {
|
|
2
|
+
api: File.join(Aws::APIS_DIR, 'OpsWorks.api.json'),
|
|
3
|
+
docs: File.join(Aws::APIS_DIR, 'OpsWorks.docs.json'),
|
|
4
|
+
paginators: File.join(Aws::APIS_DIR, 'OpsWorks.paginators.json'),
|
|
5
|
+
resources: File.join(Aws::APIS_DIR, 'OpsWorks.resources.json'),
|
|
6
|
+
})
|
|
@@ -101,7 +101,7 @@ module Aws
|
|
|
101
101
|
# @return [Hash] Returns the hash of request parameters for the
|
|
102
102
|
# next page, merging any given params.
|
|
103
103
|
def next_page_params(params)
|
|
104
|
-
context.
|
|
104
|
+
context[:original_params].merge(@pager.next_tokens(self).merge(params))
|
|
105
105
|
end
|
|
106
106
|
|
|
107
107
|
# Raised when calling {PageableResponse#next_page} on a pager that
|