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,37 @@
|
|
|
1
|
+
module Aws
|
|
2
|
+
module Plugins
|
|
3
|
+
|
|
4
|
+
# Makes it possible to conditional sign {Aws::CloudSearchDomain::Client}
|
|
5
|
+
# requests. When credentials are configured, requests are signed.
|
|
6
|
+
# When they are omitted, the request is sent anonymously.
|
|
7
|
+
#
|
|
8
|
+
# @seahorse.client.option [String] :sigv4_region Only needed when sending
|
|
9
|
+
# authenticated/signed requests to a Cloud Search domain and the
|
|
10
|
+
# endpoint does not contain the region name.
|
|
11
|
+
#
|
|
12
|
+
class CSDConditionalSigning < Seahorse::Client::Plugin
|
|
13
|
+
|
|
14
|
+
# Adding region as an option to avoid an issue when `Aws.config[:region]`
|
|
15
|
+
# is populated and the global configuration plugin merges options onto
|
|
16
|
+
# this client.
|
|
17
|
+
option(:region)
|
|
18
|
+
|
|
19
|
+
option(:sigv4_region) do |cfg|
|
|
20
|
+
# extract the region name from the cloud search domain endpoint
|
|
21
|
+
if cfg.endpoint
|
|
22
|
+
cfg.endpoint.to_s.split('.')[1]
|
|
23
|
+
else
|
|
24
|
+
raise ArgumentError, 'missing required option :endpoint'
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def after_initialize(client)
|
|
29
|
+
# disable request singing when credentials are not set
|
|
30
|
+
if client.config.credentials.nil? or !client.config.credentials.set?
|
|
31
|
+
client.config.signature_version = nil
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
module Aws
|
|
2
|
+
module Plugins
|
|
3
|
+
|
|
4
|
+
# Simplifies working with Amazon DynamoDB attribute values.
|
|
5
|
+
# Translates attribute values for requests and responses to sensible
|
|
6
|
+
# Ruby natives.
|
|
7
|
+
#
|
|
8
|
+
# This plugin is enabled by default for all {DynamoDB::Client}
|
|
9
|
+
# objects. You can disable this plugin by passing
|
|
10
|
+
# `simple_attributes: false` to the client constructor:
|
|
11
|
+
#
|
|
12
|
+
# ddb = Aws::DynamoDB::Client.new(simple_attributes: false)
|
|
13
|
+
#
|
|
14
|
+
# ## Input Examples
|
|
15
|
+
#
|
|
16
|
+
# With this plugin **enabled**, `simple_attributes: true`:
|
|
17
|
+
#
|
|
18
|
+
# dynamodb.put_item(
|
|
19
|
+
# table_name: 'aws-sdk',
|
|
20
|
+
# item: {
|
|
21
|
+
# id: 'uuid',
|
|
22
|
+
# age: 35,
|
|
23
|
+
# tags: Set.new(%w(simple attributes)),
|
|
24
|
+
# data: StringIO.new('data')
|
|
25
|
+
# }
|
|
26
|
+
# )
|
|
27
|
+
#
|
|
28
|
+
# With this plugin **disabled**, `simple_attributes: false`:
|
|
29
|
+
#
|
|
30
|
+
# # note that all types are prefixed in a hash and that
|
|
31
|
+
# # numeric types must be serialized as strings
|
|
32
|
+
# dynamodb.put_item(
|
|
33
|
+
# table_name: 'aws-sdk',
|
|
34
|
+
# item: {
|
|
35
|
+
# 'id' => { s: 'uuid' },
|
|
36
|
+
# 'age' => { n: '35' },
|
|
37
|
+
# 'tags' => { ss: ['simple', 'attributes'] },
|
|
38
|
+
# 'data' => { b: 'data' },
|
|
39
|
+
# }
|
|
40
|
+
# )
|
|
41
|
+
#
|
|
42
|
+
# ## Output Examples
|
|
43
|
+
#
|
|
44
|
+
# With this plugin **enabled**, `simple_attributes: true`:
|
|
45
|
+
#
|
|
46
|
+
# resp = dynamodb.get(table_name: 'aws-sdk', key: { id: 'uuid' })
|
|
47
|
+
# resp.item
|
|
48
|
+
# {
|
|
49
|
+
# id: 'uuid',
|
|
50
|
+
# age: 35,
|
|
51
|
+
# tags: Set.new(%w(simple attributes)),
|
|
52
|
+
# data: StringIO.new('data')
|
|
53
|
+
# }
|
|
54
|
+
#
|
|
55
|
+
# With this plugin **disabled**, `simple_attributes: false`:
|
|
56
|
+
#
|
|
57
|
+
# # note that the request `:key` had to be type prefixed
|
|
58
|
+
# resp = dynamodb.get(table_name: 'aws-sdk', key: { 'id' => { s: 'uuid' }})
|
|
59
|
+
# resp.item
|
|
60
|
+
# # {
|
|
61
|
+
# # "id"=> <struct s='uuid', n=nil, b=nil, ss=nil, ns=nil, bs=nil>,
|
|
62
|
+
# # "age"=> <struct s=nil, n="35", b=nil, ss=nil, ns=nil, bs=nil>,
|
|
63
|
+
# # "tags"=> <struct s=nil, n=nil, b=nil, ss=['simple', 'attributes'], ns=nil, bs=nil>,
|
|
64
|
+
# # "data"=> <struct s=nil, n=nil, b="data", ss=nil, ns=nil, bs=nil>,
|
|
65
|
+
# # }
|
|
66
|
+
#
|
|
67
|
+
# @seahorse.client.option [Boolean] :simple_attributes (true)
|
|
68
|
+
# Enables working with DynamoDB attribute values using simple
|
|
69
|
+
# Ruby natives.
|
|
70
|
+
#
|
|
71
|
+
# Disabling this option requires that all attribute values have
|
|
72
|
+
# their types specified, e.g. `{ s: 'abc' }` instead of simply
|
|
73
|
+
# `'abc'`.
|
|
74
|
+
#
|
|
75
|
+
class DynamoDBSimpleAttributes < Seahorse::Client::Plugin
|
|
76
|
+
|
|
77
|
+
option(:simple_attributes) { |config| !config.simple_json }
|
|
78
|
+
|
|
79
|
+
def add_handlers(handlers, config)
|
|
80
|
+
if config.simple_attributes
|
|
81
|
+
handlers.add(Handler, step: :initialize)
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
class Handler < Seahorse::Client::Handler
|
|
86
|
+
|
|
87
|
+
def call(context)
|
|
88
|
+
context.params = translate_input(context)
|
|
89
|
+
@handler.call(context).on(200) do |response|
|
|
90
|
+
response.data = translate_output(response)
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
private
|
|
95
|
+
|
|
96
|
+
def translate_input(context)
|
|
97
|
+
if shape = context.operation.input
|
|
98
|
+
ValueTranslator.new(shape, :marshal).apply(context.params)
|
|
99
|
+
else
|
|
100
|
+
context.params
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
def translate_output(response)
|
|
105
|
+
if shape = response.context.operation.output
|
|
106
|
+
ValueTranslator.new(shape, :unmarshal).apply(response.data)
|
|
107
|
+
else
|
|
108
|
+
response.data
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# @api private
|
|
115
|
+
class ValueTranslator
|
|
116
|
+
|
|
117
|
+
# @param [Seahorse::Model::Shapes::Shape] shape
|
|
118
|
+
# @param [Symbol<:marshal,:unmarshal>] mode
|
|
119
|
+
def initialize(shape, mode)
|
|
120
|
+
@shape = shape
|
|
121
|
+
@mode = mode
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
def apply(values)
|
|
125
|
+
structure(@shape, values) if @shape
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
private
|
|
129
|
+
|
|
130
|
+
def structure(shape, values)
|
|
131
|
+
if values.is_a?(Struct)
|
|
132
|
+
values.members.each do |key|
|
|
133
|
+
values[key] = translate(shape.member(key), values[key])
|
|
134
|
+
end
|
|
135
|
+
values
|
|
136
|
+
elsif values.is_a?(Hash)
|
|
137
|
+
values.each.with_object({}) do |(key, value), hash|
|
|
138
|
+
hash[key] = translate(shape.member(key), value)
|
|
139
|
+
end
|
|
140
|
+
else
|
|
141
|
+
values
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
def list(shape, values)
|
|
146
|
+
return values unless values.is_a?(Array)
|
|
147
|
+
values.inject([]) do |list, value|
|
|
148
|
+
list << translate(shape.member, value)
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
def map(shape, values)
|
|
153
|
+
return values unless values.is_a?(Hash)
|
|
154
|
+
values.each.with_object({}) do |(key, value), hash|
|
|
155
|
+
hash[key] = translate(shape.value, value)
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
def translate(shape, value)
|
|
160
|
+
if shape.name == 'AttributeValue'
|
|
161
|
+
DynamoDB::AttributeValue.new.send(@mode, value)
|
|
162
|
+
else
|
|
163
|
+
translate_complex(shape, value)
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
def translate_complex(shape, value)
|
|
168
|
+
case shape
|
|
169
|
+
when Seahorse::Model::Shapes::Structure then structure(shape, value)
|
|
170
|
+
when Seahorse::Model::Shapes::List then list(shape, value)
|
|
171
|
+
when Seahorse::Model::Shapes::Map then map(shape, value)
|
|
172
|
+
else value
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require 'set'
|
|
2
|
+
|
|
1
3
|
module Aws
|
|
2
4
|
module Plugins
|
|
3
5
|
|
|
@@ -38,6 +40,9 @@ module Aws
|
|
|
38
40
|
#
|
|
39
41
|
class GlobalConfiguration < Seahorse::Client::Plugin
|
|
40
42
|
|
|
43
|
+
# @api private
|
|
44
|
+
IDENTIFIERS = Set.new
|
|
45
|
+
|
|
41
46
|
# @api private
|
|
42
47
|
def before_initialize(client_class, options)
|
|
43
48
|
# apply service specific defaults before the global aws defaults
|
|
@@ -48,20 +53,16 @@ module Aws
|
|
|
48
53
|
private
|
|
49
54
|
|
|
50
55
|
def apply_service_defaults(client_class, options)
|
|
51
|
-
if defaults = Aws.config[client_class
|
|
56
|
+
if defaults = Aws.config[client_class.identifier]
|
|
52
57
|
defaults.each do |option_name, default|
|
|
53
|
-
|
|
54
|
-
next if options.key?(option_name)
|
|
55
|
-
options[option_name] = default
|
|
58
|
+
options[option_name] = default unless options.key?(option_name)
|
|
56
59
|
end
|
|
57
60
|
end
|
|
58
61
|
end
|
|
59
62
|
|
|
60
63
|
def apply_aws_defaults(client_class, options)
|
|
61
64
|
Aws.config.each do |option_name, default|
|
|
62
|
-
next if
|
|
63
|
-
next if Aws.service_modules.key?(option_name)
|
|
64
|
-
next if option_name == :api_version
|
|
65
|
+
next if IDENTIFIERS.include?(option_name)
|
|
65
66
|
next if options.key?(option_name)
|
|
66
67
|
options[option_name] = default
|
|
67
68
|
end
|
|
@@ -69,4 +70,10 @@ module Aws
|
|
|
69
70
|
|
|
70
71
|
end
|
|
71
72
|
end
|
|
73
|
+
|
|
74
|
+
service_added do |name, _, _|
|
|
75
|
+
Plugins::GlobalConfiguration::IDENTIFIERS << name.downcase.to_sym
|
|
76
|
+
end
|
|
77
|
+
|
|
72
78
|
end
|
|
79
|
+
|
|
@@ -3,13 +3,15 @@ module Aws
|
|
|
3
3
|
module Protocols
|
|
4
4
|
|
|
5
5
|
# @seahorse.client.option [Boolean] :simple_json (false)
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
6
|
+
# Disables request parameter conversion, validation, and formatting.
|
|
7
|
+
# Also disable response data type conversions. This option is useful
|
|
8
|
+
# when you want to ensure the highest level of performance by
|
|
9
|
+
# avoiding overhead of walking request parameters and response data
|
|
10
|
+
# structures.
|
|
11
|
+
#
|
|
12
|
+
# When `:simple_json` is enabled, the request parameters hash must
|
|
13
|
+
# be formatted exactly as the DynamoDB API expects.
|
|
14
|
+
#
|
|
13
15
|
class JsonRpc < Seahorse::Client::Plugin
|
|
14
16
|
|
|
15
17
|
option(:simple_json, false)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module Aws
|
|
2
2
|
module Plugins
|
|
3
3
|
|
|
4
|
-
# @seahorse.client.option [String] :region
|
|
4
|
+
# @seahorse.client.option [required, String] :region
|
|
5
5
|
# The AWS region to connect to. The region is used to construct
|
|
6
6
|
# the client endpoint. Defaults to `ENV['AWS_DEFAULT_REGION']`.
|
|
7
7
|
# Also checks `AWS_REGION` and `AMAZON_REGION`.
|
|
@@ -19,10 +19,8 @@ module Aws
|
|
|
19
19
|
ENV.values_at(*keys).compact.first
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
option(:endpoint_provider) { EndpointProvider.default_provider }
|
|
23
|
-
|
|
24
22
|
option(:endpoint) do |cfg|
|
|
25
|
-
|
|
23
|
+
EndpointProvider.default_provider.resolve(
|
|
26
24
|
service: cfg.api.metadata('endpointPrefix'),
|
|
27
25
|
region: cfg.region,
|
|
28
26
|
scheme: 'https'
|
|
@@ -40,8 +40,11 @@ module Aws
|
|
|
40
40
|
# Intentionally not documented - this should go away when all
|
|
41
41
|
# services support signature version 4 in every region.
|
|
42
42
|
option(:signature_version) do |cfg|
|
|
43
|
-
if
|
|
44
|
-
'
|
|
43
|
+
if
|
|
44
|
+
cfg.api.metadata('endpointPrefix') == 's3' &&
|
|
45
|
+
cfg.api.metadata('v3Regions').include?(cfg.region)
|
|
46
|
+
then
|
|
47
|
+
's3'
|
|
45
48
|
else
|
|
46
49
|
cfg.api.metadata('signatureVersion')
|
|
47
50
|
end
|
|
@@ -76,22 +79,29 @@ module Aws
|
|
|
76
79
|
@handler.call(context)
|
|
77
80
|
end
|
|
78
81
|
|
|
82
|
+
private
|
|
83
|
+
|
|
79
84
|
def sign_authenticated_requests(context)
|
|
80
85
|
if signer = SIGNERS[context.config.signature_version]
|
|
86
|
+
require_credentials(context)
|
|
81
87
|
signer.sign(context)
|
|
82
88
|
end
|
|
83
89
|
end
|
|
84
90
|
|
|
91
|
+
def require_credentials(context)
|
|
92
|
+
if
|
|
93
|
+
context.config.credentials.nil? or
|
|
94
|
+
!context.config.credentials.set?
|
|
95
|
+
then
|
|
96
|
+
msg = 'unable to sign request without credentials set'
|
|
97
|
+
raise Errors::MissingCredentialsError, msg
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
85
101
|
end
|
|
86
102
|
|
|
87
103
|
handler(Handler, step: :sign)
|
|
88
104
|
|
|
89
|
-
def after_initialize(client)
|
|
90
|
-
if client.config.credentials.nil? or !client.config.credentials.set?
|
|
91
|
-
raise Errors::MissingCredentialsError
|
|
92
|
-
end
|
|
93
|
-
end
|
|
94
|
-
|
|
95
105
|
end
|
|
96
106
|
end
|
|
97
107
|
end
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
|
@@ -44,7 +44,7 @@ module Aws
|
|
|
44
44
|
|
|
45
45
|
def initialize(error, http_status_code)
|
|
46
46
|
@error = error
|
|
47
|
-
@name = error
|
|
47
|
+
@name = extract_name(error)
|
|
48
48
|
@http_status_code = http_status_code
|
|
49
49
|
end
|
|
50
50
|
|
|
@@ -70,6 +70,16 @@ module Aws
|
|
|
70
70
|
(500..599).include?(@http_status_code)
|
|
71
71
|
end
|
|
72
72
|
|
|
73
|
+
private
|
|
74
|
+
|
|
75
|
+
def extract_name(error)
|
|
76
|
+
if error.is_a?(Errors::ServiceError)
|
|
77
|
+
error.class.code
|
|
78
|
+
else
|
|
79
|
+
error.class.name.to_s
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
73
83
|
end
|
|
74
84
|
|
|
75
85
|
class Handler < Seahorse::Client::Handler
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
module Aws
|
|
2
|
+
module Plugins
|
|
3
|
+
|
|
4
|
+
# The Amazon Route 53 API returns hosted zones and request Ids as strings
|
|
5
|
+
# formatted like:
|
|
6
|
+
#
|
|
7
|
+
# '/hostedzone/ID'
|
|
8
|
+
# '/change/ID'
|
|
9
|
+
#
|
|
10
|
+
# However, their API does not accept Ids with the '/hostedzone/' or
|
|
11
|
+
# '/change/' prefixes. This plugin removes those prefixes before
|
|
12
|
+
# serializing their Ids onto the request. This allows a user to
|
|
13
|
+
# use the prefixed Ids returned in {Aws::Route53::Client} responses.
|
|
14
|
+
class Route53IdFix < Seahorse::Client::Plugin
|
|
15
|
+
|
|
16
|
+
class Handler < Seahorse::Client::Handler
|
|
17
|
+
|
|
18
|
+
def call(context)
|
|
19
|
+
remove_id_prefixes(context.params)
|
|
20
|
+
@handler.call(context)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
private
|
|
24
|
+
|
|
25
|
+
def remove_id_prefixes(params)
|
|
26
|
+
# Many operations accept of :id or :hosted_zone_id as a root-level
|
|
27
|
+
# param, pruning prefixes from those.
|
|
28
|
+
[:id, :hosted_zone_id].each do |key|
|
|
29
|
+
params[key] = remove_prefix(params[key]) if params[key]
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# The `#change_resource_record_sets operation` has a deeply nested
|
|
33
|
+
# target with a :hosted_zone_id that needs to be pruned.
|
|
34
|
+
if params[:change_batch]
|
|
35
|
+
params[:change_batch][:changes].each do |batch|
|
|
36
|
+
if target = batch[:resource_record_set][:alias_target]
|
|
37
|
+
target[:hosted_zone_id] = remove_prefix(target[:hosted_zone_id])
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def remove_prefix(str)
|
|
44
|
+
str.sub(/^\/(hostedzone|change)\//, '')
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Run this handler after params have been validated, but before
|
|
50
|
+
# they are serialized onto the request
|
|
51
|
+
handler(Handler, priority: 99, step: :build)
|
|
52
|
+
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
require 'uri'
|
|
2
|
+
|
|
3
|
+
module Aws
|
|
4
|
+
module Plugins
|
|
5
|
+
|
|
6
|
+
# @seahorse.client.option [Boolean] :require_https_for_sse_cpk (true)
|
|
7
|
+
# When `true`, the endpoint **must** be HTTPS for all operations
|
|
8
|
+
# where server-side-encryption is used with customer-provided keys.
|
|
9
|
+
# This should only be disabled for local testing.
|
|
10
|
+
class S3SseCpk < Seahorse::Client::Plugin
|
|
11
|
+
|
|
12
|
+
option(:require_https_for_sse_cpk, true)
|
|
13
|
+
|
|
14
|
+
class Handler < Seahorse::Client::Handler
|
|
15
|
+
|
|
16
|
+
def call(context)
|
|
17
|
+
compute_key_md5(context)
|
|
18
|
+
@handler.call(context)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
private
|
|
22
|
+
|
|
23
|
+
def compute_key_md5(context)
|
|
24
|
+
params = context.params
|
|
25
|
+
if key = params[:sse_customer_key]
|
|
26
|
+
require_https(context)
|
|
27
|
+
params[:sse_customer_key] = base64(key)
|
|
28
|
+
params[:sse_customer_key_md5] = base64(md5(key))
|
|
29
|
+
end
|
|
30
|
+
if key = params[:copy_source_sse_customer_key]
|
|
31
|
+
require_https(context)
|
|
32
|
+
params[:copy_source_sse_customer_key] = base64(key)
|
|
33
|
+
params[:copy_source_sse_customer_key_md5] = base64(md5(key))
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def require_https(context)
|
|
38
|
+
unless URI::HTTPS === context.config.endpoint
|
|
39
|
+
msg = <<-MSG.strip.gsub("\n", ' ')
|
|
40
|
+
Attempting to send customer-provided-keys for S3
|
|
41
|
+
server-side-encryption over HTTP; Please configure a HTTPS
|
|
42
|
+
endpoint. If you are attempting to use a test endpoint,
|
|
43
|
+
you can disable this check via `:require_https_for_sse_cpk`
|
|
44
|
+
MSG
|
|
45
|
+
raise ArgumentError, msg
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def md5(str)
|
|
50
|
+
OpenSSL::Digest::MD5.digest(str)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def base64(str)
|
|
54
|
+
Base64.encode64(str).strip
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
handler(Handler, step: :initialize)
|
|
60
|
+
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
require 'cgi'
|
|
2
|
+
|
|
3
|
+
module Aws
|
|
4
|
+
module Plugins
|
|
5
|
+
|
|
6
|
+
# This plugin auto-populates the `:encoding_type` request parameter
|
|
7
|
+
# to all calls made to Amazon S3 that accept it.
|
|
8
|
+
#
|
|
9
|
+
# This enables Amazon S3 to return object keys that might contain
|
|
10
|
+
# invalid XML characters as URL encoded strings. This plugin also
|
|
11
|
+
# automatically decodes these keys so that the key management is
|
|
12
|
+
# transparent to the user.
|
|
13
|
+
#
|
|
14
|
+
# If you specify the `:encoding_type` parameter, then this plugin
|
|
15
|
+
# will be disabled, and you will need to decode the keys yourself.
|
|
16
|
+
#
|
|
17
|
+
# The following operations are managed:
|
|
18
|
+
#
|
|
19
|
+
# * {S3::Client#list_objects}
|
|
20
|
+
# * {S3::Client#list_multipart_uploads}
|
|
21
|
+
# * {S3::Client#list_object_versions}
|
|
22
|
+
#
|
|
23
|
+
class S3UrlEncodedKeys < Seahorse::Client::Plugin
|
|
24
|
+
|
|
25
|
+
class Handler < Seahorse::Client::Handler
|
|
26
|
+
|
|
27
|
+
def call(context)
|
|
28
|
+
if context.params.key?(:encoding_type)
|
|
29
|
+
@handler.call(context) # user managed
|
|
30
|
+
else
|
|
31
|
+
manage_keys(context)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
private
|
|
36
|
+
|
|
37
|
+
def manage_keys(context)
|
|
38
|
+
context.params[:encoding_type] = 'url'
|
|
39
|
+
@handler.call(context).on_success do |resp|
|
|
40
|
+
send("decode_#{resp.context.operation_name}_keys", resp.data)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def decode_list_objects_keys(data)
|
|
45
|
+
decode(:marker, data)
|
|
46
|
+
decode(:next_marker, data)
|
|
47
|
+
decode(:prefix, data)
|
|
48
|
+
decode(:delimiter, data)
|
|
49
|
+
data.contents.each { |o| decode(:key, o) } if data.contents
|
|
50
|
+
data.common_prefixes.each { |o| decode(:prefix, o) } if data.common_prefixes
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def decode_list_object_versions_keys(data)
|
|
54
|
+
decode(:key_marker, data)
|
|
55
|
+
decode(:next_key_marker, data)
|
|
56
|
+
decode(:prefix, data)
|
|
57
|
+
decode(:delimiter, data)
|
|
58
|
+
data.versions.each { |o| decode(:key, o) } if data.versions
|
|
59
|
+
data.delete_markers.each { |o| decode(:key, o) } if data.delete_markers
|
|
60
|
+
data.common_prefixes.each { |o| decode(:prefix, o) } if data.common_prefixes
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def decode_list_multipart_uploads_keys(data)
|
|
64
|
+
decode(:key_marker, data)
|
|
65
|
+
decode(:next_key_marker, data)
|
|
66
|
+
decode(:prefix, data)
|
|
67
|
+
decode(:delimiter, data)
|
|
68
|
+
data.uploads.each { |o| decode(:key, o) } if data.uploads
|
|
69
|
+
data.common_prefixes.each { |o| decode(:prefix, o) } if data.common_prefixes
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def decode(member, struct)
|
|
73
|
+
if struct[member]
|
|
74
|
+
struct[member] = CGI.unescape(struct[member])
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
handler(Handler,
|
|
81
|
+
step: :build,
|
|
82
|
+
priority: 60, # run this just before/after the XML builder/parser
|
|
83
|
+
operations: [
|
|
84
|
+
:list_objects,
|
|
85
|
+
:list_object_versions,
|
|
86
|
+
:list_multipart_uploads,
|
|
87
|
+
]
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
@@ -13,11 +13,10 @@ module Aws
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def set_user_agent(context)
|
|
16
|
-
ua = "aws-sdk-ruby2/#{VERSION} %s/%s %s
|
|
16
|
+
ua = "aws-sdk-ruby2/#{VERSION} %s/%s %s %s" % [
|
|
17
17
|
(RUBY_ENGINE rescue nil or "ruby"),
|
|
18
18
|
RUBY_VERSION,
|
|
19
19
|
RUBY_PLATFORM,
|
|
20
|
-
Seahorse::VERSION,
|
|
21
20
|
context.config.user_agent_suffix,
|
|
22
21
|
]
|
|
23
22
|
context.http_request.headers['User-Agent'] = ua.strip
|
|
@@ -33,9 +33,8 @@ module Aws
|
|
|
33
33
|
|
|
34
34
|
def parse_xml(context)
|
|
35
35
|
if rules = context.operation.output
|
|
36
|
-
|
|
37
|
-
data
|
|
38
|
-
remove_wrapper(data, context)
|
|
36
|
+
data = Xml::Parser.new(apply_wrapper(rules)).parse(xml(context))
|
|
37
|
+
remove_wrapper(data, context, rules)
|
|
39
38
|
else
|
|
40
39
|
EmptyStructure.new
|
|
41
40
|
end
|
|
@@ -59,10 +58,10 @@ module Aws
|
|
|
59
58
|
}, shape_map: shape.shape_map)
|
|
60
59
|
end
|
|
61
60
|
|
|
62
|
-
def remove_wrapper(data, context)
|
|
61
|
+
def remove_wrapper(data, context, rules)
|
|
63
62
|
if context.operation.output.metadata('resultWrapper')
|
|
64
63
|
context[:request_id] = data.response_metadata.request_id
|
|
65
|
-
data[data.members.first]
|
|
64
|
+
data[data.members.first] || Structure.new(rules.member_names)
|
|
66
65
|
else
|
|
67
66
|
data
|
|
68
67
|
end
|