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
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
require 'openssl'
|
|
2
|
-
require 'base64'
|
|
3
|
-
|
|
4
|
-
module Aws
|
|
5
|
-
module Plugins
|
|
6
|
-
class S3SseCpk < Seahorse::Client::Plugin
|
|
7
|
-
|
|
8
|
-
class Handler < Seahorse::Client::Handler
|
|
9
|
-
|
|
10
|
-
def call(context)
|
|
11
|
-
compute_key_md5(context.params)
|
|
12
|
-
@handler.call(context)
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
private
|
|
16
|
-
|
|
17
|
-
def compute_key_md5(params)
|
|
18
|
-
if key = params[:sse_customer_key]
|
|
19
|
-
params[:sse_customer_key] = base64(key)
|
|
20
|
-
params[:sse_customer_key_md5] = base64(md5(key))
|
|
21
|
-
end
|
|
22
|
-
if key = params[:copy_source_sse_customer_key]
|
|
23
|
-
params[:copy_source_sse_customer_key] = base64(key)
|
|
24
|
-
params[:copy_source_sse_customer_key_md5] = base64(md5(key))
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
def md5(str)
|
|
29
|
-
OpenSSL::Digest::MD5.digest(str)
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
def base64(str)
|
|
33
|
-
Base64.encode64(str).strip
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
handler(Handler, step: :initialize)
|
|
39
|
-
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
end
|
data/lib/aws/response_handler.rb
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
module Aws
|
|
2
|
-
# @api private
|
|
3
|
-
class ResponseHandler
|
|
4
|
-
|
|
5
|
-
def initialize(parser)
|
|
6
|
-
@parser = parser
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
attr_accessor :handler
|
|
10
|
-
|
|
11
|
-
def call(context)
|
|
12
|
-
@handler.call(context).on(200..299) do |response|
|
|
13
|
-
rules = context.operation.output
|
|
14
|
-
response.error = nil
|
|
15
|
-
response.data = case
|
|
16
|
-
when rules.raw_payload? then empty_struct(rules)
|
|
17
|
-
when rules.payload then parse_payload(rules, context)
|
|
18
|
-
else parse(rules, context)
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def empty_struct(rules)
|
|
24
|
-
Structure.new(rules.members.keys)
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
def parse_payload(rules, context)
|
|
28
|
-
data = empty_struct(rules)
|
|
29
|
-
data[rules.payload] = parse(rules.payload_member, context)
|
|
30
|
-
data
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def parse(rules, context)
|
|
34
|
-
@parser.parse(rules, context.http_response.body_contents)
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
end
|
|
38
|
-
end
|
data/lib/aws/service.rb
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
module Aws
|
|
2
|
-
module Service
|
|
3
|
-
|
|
4
|
-
# For backwards compatibility with versions 2.0.0.rc10 and older.
|
|
5
|
-
# Use the following instead:
|
|
6
|
-
#
|
|
7
|
-
# # deprecated
|
|
8
|
-
# Aws::ServiceName.new
|
|
9
|
-
#
|
|
10
|
-
# # prefereed usage
|
|
11
|
-
# Aws::ServiceName::Client.new
|
|
12
|
-
#
|
|
13
|
-
# @deprecated Deprecated as of 2.0.0.rc11
|
|
14
|
-
# @api private
|
|
15
|
-
def new(options = {})
|
|
16
|
-
const_get(:Client).new(options)
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
class << self
|
|
20
|
-
|
|
21
|
-
# @api private
|
|
22
|
-
def define(identifier, versions = {})
|
|
23
|
-
svc_mod = Module.new
|
|
24
|
-
svc_mod.extend(Service)
|
|
25
|
-
svc_mod.const_set(:Errors, Module.new { extend Errors::DynamicErrors })
|
|
26
|
-
svc_mod.const_set(:Client, Client.define(identifier, versions))
|
|
27
|
-
svc_mod
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|
data/lib/aws/signers/v4.rb.orig
DELETED
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
require 'time'
|
|
2
|
-
require 'openssl'
|
|
3
|
-
|
|
4
|
-
module Aws
|
|
5
|
-
module Signers
|
|
6
|
-
class V4
|
|
7
|
-
|
|
8
|
-
def self.sign(context)
|
|
9
|
-
new(
|
|
10
|
-
context.config.sigv4_name,
|
|
11
|
-
context.config.credentials,
|
|
12
|
-
context.config.sigv4_region
|
|
13
|
-
).sign(context.http_request)
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
# @param [Credentials] credentials
|
|
17
|
-
# @param [String] service_name The name used by the service in
|
|
18
|
-
# signing signature version 4 requests. This is generally
|
|
19
|
-
# the endpoint prefix.
|
|
20
|
-
# @param [String] region The region (e.g. 'us-west-1') the request
|
|
21
|
-
# will be made to.
|
|
22
|
-
def initialize(service_name, credentials, region)
|
|
23
|
-
@service_name = service_name
|
|
24
|
-
@credentials = credentials
|
|
25
|
-
@region = region
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
# @param [Seahorse::Client::Http::Request] req
|
|
29
|
-
# @return [Seahorse::Client::Http::Request] the signed request.
|
|
30
|
-
def sign(req)
|
|
31
|
-
datetime = Time.now.utc.strftime("%Y%m%dT%H%M%SZ")
|
|
32
|
-
body_digest = req.headers['X-Amz-Content-Sha256'] || hexdigest(req.body)
|
|
33
|
-
req.headers['X-Amz-Date'] = datetime
|
|
34
|
-
req.headers['Host'] = req.endpoint.host
|
|
35
|
-
req.headers['X-Amz-Security-Token'] = credentials.session_token if
|
|
36
|
-
<<<<<<< HEAD
|
|
37
|
-
credentials.session_token
|
|
38
|
-
req.headers['X-Amz-Content-Sha256'] ||= body_digest
|
|
39
|
-
req.headers['Authorization'] = authorization(req, datetime, body_digest)
|
|
40
|
-
req
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
# Generates an returns a presigned URL.
|
|
44
|
-
# @param [Seahorse::Client::Http::Request] request
|
|
45
|
-
# @option options [required, Integer<Seconds>] :expires_in
|
|
46
|
-
# @option options [optional, String] :body_digest The SHA256 hexdigest of
|
|
47
|
-
# the payload to sign. For S3, this should be the string literal
|
|
48
|
-
# `UNSIGNED-PALOAD`.
|
|
49
|
-
# @return [Seahorse::Client::Http::Request] the signed request.
|
|
50
|
-
# @api private
|
|
51
|
-
def presigned_url(request, options = {})
|
|
52
|
-
now = Time.now.utc.strftime("%Y%m%dT%H%M%SZ")
|
|
53
|
-
body_digest = options[:body_digest] || hexdigest(request.body)
|
|
54
|
-
|
|
55
|
-
params = Query::ParamList.new
|
|
56
|
-
|
|
57
|
-
request.headers['Host'] ||= request.endpoint.host
|
|
58
|
-
request.headers.each do |header_name, header_value|
|
|
59
|
-
if header_name.match(/^x-amz/)
|
|
60
|
-
params.set(header_name, header_value)
|
|
61
|
-
end
|
|
62
|
-
unless %w(host content-md5).include?(header_name)
|
|
63
|
-
request.headers.delete(header_name)
|
|
64
|
-
end
|
|
65
|
-
end
|
|
66
|
-
|
|
67
|
-
params.set("X-Amz-Algorithm", "AWS4-HMAC-SHA256")
|
|
68
|
-
params.set("X-Amz-Date", now)
|
|
69
|
-
params.set("X-Amz-SignedHeaders", signed_headers(request))
|
|
70
|
-
params.set("X-Amz-Expires", options[:expires_in].to_s)
|
|
71
|
-
params.set('X-Amz-Security-Token', credentials.session_token) if
|
|
72
|
-
credentials.session_token
|
|
73
|
-
params.set("X-Amz-Credential", credential(now))
|
|
74
|
-
|
|
75
|
-
endpoint = request.endpoint
|
|
76
|
-
if endpoint.querystring
|
|
77
|
-
endpoint.request_uri += '&' + params.to_s
|
|
78
|
-
else
|
|
79
|
-
endpoint.request_uri += '?' + params.to_s
|
|
80
|
-
end
|
|
81
|
-
endpoint.to_s + '&X-Amz-Signature=' + signature(request, now, body_digest)
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
=======
|
|
85
|
-
credentials.session_token
|
|
86
|
-
req.headers['X-Amz-Content-Sha256'] ||= body_digest
|
|
87
|
-
req.headers['Authorization'] = authorization(req, datetime, body_digest)
|
|
88
|
-
req
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
# Generates an returns a presigned URL.
|
|
92
|
-
# @param [Seahorse::Client::Http::Request] request
|
|
93
|
-
# @option options [required, Integer<Seconds>] :expires_in
|
|
94
|
-
# @option options [optional, String] :body_digest The SHA256 hexdigest of
|
|
95
|
-
# the payload to sign. For S3, this should be the string literal
|
|
96
|
-
# `UNSIGNED-PALOAD`.
|
|
97
|
-
# @return [Seahorse::Client::Http::Request] the signed request.
|
|
98
|
-
# @api private
|
|
99
|
-
def presigned_url(request, options = {})
|
|
100
|
-
now = Time.now.utc.strftime("%Y%m%dT%H%M%SZ")
|
|
101
|
-
body_digest = options[:body_digest] || hexdigest(request.body)
|
|
102
|
-
|
|
103
|
-
params = Query::ParamList.new
|
|
104
|
-
|
|
105
|
-
request.headers['Host'] ||= request.endpoint.host
|
|
106
|
-
request.headers.each do |header_name, header_value|
|
|
107
|
-
if header_name.match(/^x-amz/)
|
|
108
|
-
params.set(header_name, header_value)
|
|
109
|
-
end
|
|
110
|
-
unless %w(host content-md5).include?(header_name)
|
|
111
|
-
request.headers.delete(header_name)
|
|
112
|
-
end
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
params.set("X-Amz-Algorithm", "AWS4-HMAC-SHA256")
|
|
116
|
-
params.set("X-Amz-Date", now)
|
|
117
|
-
params.set("X-Amz-SignedHeaders", signed_headers(request))
|
|
118
|
-
params.set("X-Amz-Expires", options[:expires_in].to_s)
|
|
119
|
-
params.set('X-Amz-Security-Token', credentials.session_token) if
|
|
120
|
-
credentials.session_token
|
|
121
|
-
params.set("X-Amz-Credential", credential(now))
|
|
122
|
-
|
|
123
|
-
endpoint = request.endpoint
|
|
124
|
-
if endpoint.querystring
|
|
125
|
-
endpoint.request_uri += '&' + params.to_s
|
|
126
|
-
else
|
|
127
|
-
endpoint.request_uri += '?' + params.to_s
|
|
128
|
-
end
|
|
129
|
-
endpoint.to_s + '&X-Amz-Signature=' + signature(request, now, body_digest)
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
>>>>>>> master
|
|
133
|
-
def authorization(request, datetime, body_digest)
|
|
134
|
-
parts = []
|
|
135
|
-
parts << "AWS4-HMAC-SHA256 Credential=#{credential(datetime)}"
|
|
136
|
-
parts << "SignedHeaders=#{signed_headers(request)}"
|
|
137
|
-
parts << "Signature=#{signature(request, datetime, body_digest)}"
|
|
138
|
-
parts.join(', ')
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
def credential(datetime)
|
|
142
|
-
"#{credentials.access_key_id}/#{credential_scope(datetime)}"
|
|
143
|
-
end
|
|
144
|
-
|
|
145
|
-
def signature(request, datetime, body_digest)
|
|
146
|
-
k_secret = credentials.secret_access_key
|
|
147
|
-
k_date = hmac("AWS4" + k_secret, datetime[0,8])
|
|
148
|
-
k_region = hmac(k_date, region)
|
|
149
|
-
k_service = hmac(k_region, service_name)
|
|
150
|
-
k_credentials = hmac(k_service, 'aws4_request')
|
|
151
|
-
hexhmac(k_credentials, string_to_sign(request, datetime, body_digest))
|
|
152
|
-
end
|
|
153
|
-
|
|
154
|
-
def string_to_sign(request, datetime, body_digest)
|
|
155
|
-
parts = []
|
|
156
|
-
parts << 'AWS4-HMAC-SHA256'
|
|
157
|
-
parts << datetime
|
|
158
|
-
parts << credential_scope(datetime)
|
|
159
|
-
parts << hexdigest(canonical_request(request, body_digest))
|
|
160
|
-
parts.join("\n")
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
def credential_scope(datetime)
|
|
164
|
-
parts = []
|
|
165
|
-
parts << datetime[0,8]
|
|
166
|
-
parts << region
|
|
167
|
-
parts << service_name
|
|
168
|
-
parts << 'aws4_request'
|
|
169
|
-
parts.join("/")
|
|
170
|
-
end
|
|
171
|
-
|
|
172
|
-
def canonical_request(request, body_digest)
|
|
173
|
-
[
|
|
174
|
-
request.http_method,
|
|
175
|
-
request.endpoint.path,
|
|
176
|
-
normalized_querystring(request.endpoint.querystring),
|
|
177
|
-
canonical_headers(request) + "\n",
|
|
178
|
-
signed_headers(request),
|
|
179
|
-
body_digest
|
|
180
|
-
].join("\n")
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
def normalized_querystring(querystring)
|
|
184
|
-
if querystring
|
|
185
|
-
querystring.split('&').sort.join('&')
|
|
186
|
-
end
|
|
187
|
-
end
|
|
188
|
-
|
|
189
|
-
def signed_headers(request)
|
|
190
|
-
headers = request.headers.keys
|
|
191
|
-
headers.delete('authorization')
|
|
192
|
-
headers.sort.join(';')
|
|
193
|
-
end
|
|
194
|
-
|
|
195
|
-
def canonical_headers(request)
|
|
196
|
-
headers = []
|
|
197
|
-
request.headers.each_pair do |k,v|
|
|
198
|
-
k = k.downcase
|
|
199
|
-
headers << [k,v] unless k == 'authorization'
|
|
200
|
-
end
|
|
201
|
-
headers = headers.sort_by(&:first)
|
|
202
|
-
headers.map{|k,v| "#{k}:#{canonical_header_value(v.to_s)}" }.join("\n")
|
|
203
|
-
end
|
|
204
|
-
|
|
205
|
-
def canonical_header_value(value)
|
|
206
|
-
value.match(/^".*"$/) ? value : value.gsub(/\s+/, ' ').strip
|
|
207
|
-
end
|
|
208
|
-
|
|
209
|
-
def hexdigest(value)
|
|
210
|
-
digest = OpenSSL::Digest::SHA256.new
|
|
211
|
-
if value.respond_to?(:read)
|
|
212
|
-
chunk = nil
|
|
213
|
-
chunk_size = 1024 * 1024 # 1 megabyte
|
|
214
|
-
digest.update(chunk) while chunk = value.read(chunk_size)
|
|
215
|
-
value.rewind
|
|
216
|
-
else
|
|
217
|
-
digest.update(value)
|
|
218
|
-
end
|
|
219
|
-
digest.hexdigest
|
|
220
|
-
end
|
|
221
|
-
|
|
222
|
-
def hmac(key, value)
|
|
223
|
-
OpenSSL::HMAC.digest(OpenSSL::Digest.new('sha256'), key, value)
|
|
224
|
-
end
|
|
225
|
-
|
|
226
|
-
def hexhmac(key, value)
|
|
227
|
-
OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), key, value)
|
|
228
|
-
end
|
|
229
|
-
|
|
230
|
-
private
|
|
231
|
-
|
|
232
|
-
# @return [Credentials]
|
|
233
|
-
attr_reader :credentials
|
|
234
|
-
|
|
235
|
-
# @return [String]
|
|
236
|
-
attr_reader :service_name
|
|
237
|
-
|
|
238
|
-
# @return [String]
|
|
239
|
-
attr_reader :region
|
|
240
|
-
|
|
241
|
-
end
|
|
242
|
-
end
|
|
243
|
-
end
|
data/lib/aws/version.rb
DELETED
data/lib/aws/version.rb.orig
DELETED
data/lib/aws.rb
DELETED
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
module Aws
|
|
2
|
-
|
|
3
|
-
# @api private
|
|
4
|
-
GEM_ROOT = File.dirname(File.dirname(__FILE__))
|
|
5
|
-
|
|
6
|
-
# @api private
|
|
7
|
-
SRC = File.join(GEM_ROOT, 'lib', 'aws')
|
|
8
|
-
|
|
9
|
-
@config = {}
|
|
10
|
-
|
|
11
|
-
autoload :Client, "#{SRC}/client"
|
|
12
|
-
autoload :CredentialProviderChain, "#{SRC}/credential_provider_chain"
|
|
13
|
-
autoload :Credentials, "#{SRC}/credentials"
|
|
14
|
-
autoload :EmptyStructure, "#{SRC}/empty_structure"
|
|
15
|
-
autoload :EndpointProvider, "#{SRC}/endpoint_provider"
|
|
16
|
-
autoload :Errors, "#{SRC}/errors"
|
|
17
|
-
autoload :InstanceProfileCredentials, "#{SRC}/instance_profile_credentials"
|
|
18
|
-
autoload :PageableResponse, "#{SRC}/pageable_response"
|
|
19
|
-
autoload :RestBodyHandler, "#{SRC}/rest_body_handler"
|
|
20
|
-
autoload :Service, "#{SRC}/service"
|
|
21
|
-
autoload :SharedCredentials, "#{SRC}/shared_credentials"
|
|
22
|
-
autoload :Structure, "#{SRC}/structure"
|
|
23
|
-
autoload :TreeHash, "#{SRC}/tree_hash"
|
|
24
|
-
autoload :VERSION, "#{SRC}/version"
|
|
25
|
-
|
|
26
|
-
# @api private
|
|
27
|
-
module Api
|
|
28
|
-
autoload :Customizer, "#{SRC}/api/customizer"
|
|
29
|
-
autoload :DocExample, "#{SRC}/api/doc_example"
|
|
30
|
-
autoload :Documentor, "#{SRC}/api/documentor"
|
|
31
|
-
autoload :Manifest, "#{SRC}/api/manifest"
|
|
32
|
-
autoload :ManifestBuilder, "#{SRC}/api/manifest_builder"
|
|
33
|
-
autoload :ServiceCustomizations, "#{SRC}/api/service_customizations"
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
# @api private
|
|
37
|
-
module Json
|
|
38
|
-
autoload :Builder, "#{SRC}/json/builder"
|
|
39
|
-
autoload :ErrorHandler, "#{SRC}/json/error_handler"
|
|
40
|
-
autoload :Parser, "#{SRC}/json/parser"
|
|
41
|
-
autoload :RestHandler, "#{SRC}/json/rest_handler"
|
|
42
|
-
autoload :RpcBodyHandler, "#{SRC}/json/rpc_body_handler"
|
|
43
|
-
autoload :RpcHeadersHandler, "#{SRC}/json/rpc_headers_handler"
|
|
44
|
-
autoload :SimpleBodyHandler, "#{SRC}/json/simple_body_handler"
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
# @api private
|
|
48
|
-
module Paging
|
|
49
|
-
autoload :NullPager, "#{SRC}/paging/null_pager"
|
|
50
|
-
autoload :NullProvider, "#{SRC}/paging/null_provider"
|
|
51
|
-
autoload :Pager, "#{SRC}/paging/pager"
|
|
52
|
-
autoload :Provider, "#{SRC}/paging/provider"
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
module Plugins
|
|
56
|
-
autoload :DynamoDBExtendedRetries, "#{SRC}/plugins/dynamodb_extended_retries"
|
|
57
|
-
autoload :EC2CopyEncryptedSnapshot, "#{SRC}/plugins/ec2_copy_encrypted_snapshot"
|
|
58
|
-
autoload :GlacierAccountId, "#{SRC}/plugins/glacier_account_id"
|
|
59
|
-
autoload :GlacierApiVersion, "#{SRC}/plugins/glacier_api_version"
|
|
60
|
-
autoload :GlacierChecksums, "#{SRC}/plugins/glacier_checksums"
|
|
61
|
-
autoload :GlobalConfiguration, "#{SRC}/plugins/global_configuration"
|
|
62
|
-
autoload :RegionalEndpoint, "#{SRC}/plugins/regional_endpoint"
|
|
63
|
-
autoload :ResponsePaging, "#{SRC}/plugins/response_paging"
|
|
64
|
-
autoload :RequestSigner, "#{SRC}/plugins/request_signer"
|
|
65
|
-
autoload :RetryErrors, "#{SRC}/plugins/retry_errors"
|
|
66
|
-
autoload :S3BucketDns, "#{SRC}/plugins/s3_bucket_dns"
|
|
67
|
-
autoload :S3CompleteMultipartUploadFix, "#{SRC}/plugins/s3_complete_multipart_upload_fix"
|
|
68
|
-
autoload :S3GetBucketLocationFix, "#{SRC}/plugins/s3_get_bucket_location_fix"
|
|
69
|
-
autoload :S3LocationConstraint, "#{SRC}/plugins/s3_location_constraint"
|
|
70
|
-
autoload :S3Md5s, "#{SRC}/plugins/s3_md5s"
|
|
71
|
-
autoload :S3Redirects, "#{SRC}/plugins/s3_redirects"
|
|
72
|
-
autoload :S3SseCpk, "#{SRC}/plugins/s3_sse_cpk"
|
|
73
|
-
autoload :SQSQueueUrls, "#{SRC}/plugins/sqs_queue_urls"
|
|
74
|
-
autoload :SWFReadTimeouts, "#{SRC}/plugins/swf_read_timeouts"
|
|
75
|
-
autoload :UserAgent, "#{SRC}/plugins/user_agent"
|
|
76
|
-
|
|
77
|
-
module Protocols
|
|
78
|
-
autoload :EC2, "#{SRC}/plugins/protocols/ec2"
|
|
79
|
-
autoload :JsonRpc, "#{SRC}/plugins/protocols/json_rpc"
|
|
80
|
-
autoload :Query, "#{SRC}/plugins/protocols/query"
|
|
81
|
-
autoload :RestJson, "#{SRC}/plugins/protocols/rest_json"
|
|
82
|
-
autoload :RestXml, "#{SRC}/plugins/protocols/rest_xml"
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
# @api private
|
|
88
|
-
module Query
|
|
89
|
-
autoload :EC2ParamBuilder, "#{SRC}/query/ec2_param_builder"
|
|
90
|
-
autoload :Handler, "#{SRC}/query/handler"
|
|
91
|
-
autoload :Param, "#{SRC}/query/param"
|
|
92
|
-
autoload :ParamBuilder, "#{SRC}/query/param_builder"
|
|
93
|
-
autoload :ParamList, "#{SRC}/query/param_list"
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
# @api private
|
|
97
|
-
module Signers
|
|
98
|
-
autoload :Base, "#{SRC}/signers/base"
|
|
99
|
-
autoload :Handler, "#{SRC}/signers/handler"
|
|
100
|
-
autoload :S3, "#{SRC}/signers/s3"
|
|
101
|
-
autoload :V2, "#{SRC}/signers/v2"
|
|
102
|
-
autoload :V3, "#{SRC}/signers/v3"
|
|
103
|
-
autoload :V4, "#{SRC}/signers/v4"
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
# @api private
|
|
107
|
-
module Xml
|
|
108
|
-
autoload :Builder, "#{SRC}/xml/builder"
|
|
109
|
-
autoload :ErrorHandler, "#{SRC}/xml/error_handler"
|
|
110
|
-
autoload :Parser, "#{SRC}/xml/parser"
|
|
111
|
-
autoload :RestHandler, "#{SRC}/xml/rest_handler"
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
class << self
|
|
115
|
-
|
|
116
|
-
# @return [Hash] Returns a hash of default configuration options shared
|
|
117
|
-
# by all constructed clients.
|
|
118
|
-
attr_reader :config
|
|
119
|
-
|
|
120
|
-
# @param [Hash] config
|
|
121
|
-
def config=(config)
|
|
122
|
-
if Hash === config
|
|
123
|
-
@config = config
|
|
124
|
-
else
|
|
125
|
-
raise ArgumentError, 'configuration object must be a hash'
|
|
126
|
-
end
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
# Adds a plugin to every AWS client class. This registers the plugin
|
|
130
|
-
# with each versioned client for each service.
|
|
131
|
-
# @param [Plugin] plugin
|
|
132
|
-
# @return [void]
|
|
133
|
-
def add_plugin(plugin)
|
|
134
|
-
service_clients.each do |client|
|
|
135
|
-
client.add_plugin(plugin)
|
|
136
|
-
end
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
# Removes a plugin to from AWS client class. This removes the plugin
|
|
140
|
-
# from each versioned client for each service.
|
|
141
|
-
# @param [Plugin] plugin
|
|
142
|
-
# @return [void]
|
|
143
|
-
def remove_plugin(plugin)
|
|
144
|
-
service_clients.each do |client|
|
|
145
|
-
client.remove_plugin(plugin)
|
|
146
|
-
end
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
# @return [Hash<Symbol,Module>]
|
|
150
|
-
# @api private
|
|
151
|
-
def service_modules
|
|
152
|
-
@service_modules ||= {}
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
# @return [Array<Class>]
|
|
156
|
-
# @api private
|
|
157
|
-
def service_clients
|
|
158
|
-
service_modules.map { |_,svc_mod| svc_mod.const_get(:Client) }
|
|
159
|
-
end
|
|
160
|
-
|
|
161
|
-
# Registers a new service interface. This method accepts a constant
|
|
162
|
-
# (class name) for the new service class and map of API
|
|
163
|
-
# versions.
|
|
164
|
-
#
|
|
165
|
-
# # register a new service & API version
|
|
166
|
-
# Aws.add_service('S3', {
|
|
167
|
-
# '2006-03-01' => {
|
|
168
|
-
# 'api' => '/path/to/api.json',
|
|
169
|
-
# 'paginators' => '/path/to/paginators.json',
|
|
170
|
-
# }
|
|
171
|
-
# }
|
|
172
|
-
#
|
|
173
|
-
# # create a versioned client
|
|
174
|
-
# Aws::S3.new
|
|
175
|
-
# #=> #<Aws::S3::V20060301>
|
|
176
|
-
#
|
|
177
|
-
# You can register multiple API versions for a service, and
|
|
178
|
-
#
|
|
179
|
-
# @param [String] name The name of the new service class.
|
|
180
|
-
# @param [Hash<YYYY-MM-DD,Hash>] versions A hash of API versions. Hash
|
|
181
|
-
# keys are API version dates, and values are hashes of:
|
|
182
|
-
# * 'api' - path to API defintion
|
|
183
|
-
# * 'paginators' - path to paginator defintion
|
|
184
|
-
# @return [class<Service>]
|
|
185
|
-
def add_service(name, versions = {})
|
|
186
|
-
identifier = name.to_s.downcase.to_sym
|
|
187
|
-
svc = const_set(name, Service.define(identifier, versions))
|
|
188
|
-
add_helper(identifier, svc)
|
|
189
|
-
svc
|
|
190
|
-
end
|
|
191
|
-
|
|
192
|
-
private
|
|
193
|
-
|
|
194
|
-
def add_helper(method_name, svc_mod)
|
|
195
|
-
service_modules[method_name] = svc_mod
|
|
196
|
-
define_method(method_name) do |options = {}|
|
|
197
|
-
svc_mod.const_get(:Client).new(options)
|
|
198
|
-
end
|
|
199
|
-
module_function(method_name)
|
|
200
|
-
end
|
|
201
|
-
|
|
202
|
-
end
|
|
203
|
-
|
|
204
|
-
Api::Manifest.default_manifest.services.each do |service|
|
|
205
|
-
add_service(service.name, service.versions)
|
|
206
|
-
end
|
|
207
|
-
|
|
208
|
-
end
|