aws-sdk-core 2.9.44 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -0
- data/lib/aws-sdk-core/client_stubs.rb +1 -2
- data/lib/aws-sdk-core/credential_provider.rb +2 -0
- data/lib/aws-sdk-core/credential_provider_chain.rb +2 -1
- data/lib/aws-sdk-core/errors.rb +19 -8
- data/lib/aws-sdk-core/ini_parser.rb +1 -0
- data/lib/aws-sdk-core/json/handler.rb +3 -2
- data/lib/aws-sdk-core/json/parser.rb +1 -1
- data/lib/aws-sdk-core/json.rb +4 -5
- data/lib/aws-sdk-core/log/param_filter.rb +4 -3
- data/lib/aws-sdk-core/pageable_response.rb +1 -0
- data/lib/aws-sdk-core/pager.rb +30 -25
- data/lib/aws-sdk-core/param_converter.rb +3 -3
- data/lib/aws-sdk-core/param_validator.rb +10 -4
- data/lib/aws-sdk-core/plugins/credentials_configuration.rb +62 -0
- data/lib/aws-sdk-core/plugins/global_configuration.rb +19 -10
- data/lib/aws-sdk-core/plugins/idempotency_token.rb +1 -2
- data/lib/aws-sdk-core/plugins/logging.rb +18 -18
- data/lib/aws-sdk-core/plugins/param_converter.rb +9 -5
- data/lib/aws-sdk-core/plugins/param_validator.rb +8 -5
- data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -1
- data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +13 -12
- data/lib/aws-sdk-core/plugins/protocols/query.rb +2 -2
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +23 -15
- data/lib/aws-sdk-core/plugins/response_paging.rb +5 -18
- data/lib/aws-sdk-core/plugins/retry_errors.rb +11 -8
- data/lib/aws-sdk-core/plugins/signature_v2.rb +51 -0
- data/lib/aws-sdk-core/plugins/signature_v4.rb +139 -0
- data/lib/aws-sdk-core/plugins/stub_responses.rb +13 -11
- data/lib/aws-sdk-core/plugins/user_agent.rb +17 -6
- data/lib/aws-sdk-core/query/handler.rb +15 -16
- data/lib/aws-sdk-core/query/param_builder.rb +1 -1
- data/lib/aws-sdk-core/query.rb +5 -0
- data/lib/aws-sdk-core/resources/collection.rb +121 -0
- data/lib/aws-sdk-core/rest/handler.rb +1 -0
- data/lib/aws-sdk-core/rest/response/parser.rb +14 -14
- data/lib/aws-sdk-core/rest.rb +10 -0
- data/lib/aws-sdk-core/shared_config.rb +1 -1
- data/lib/aws-sdk-core/shared_credentials.rb +2 -0
- data/lib/aws-sdk-core/structure.rb +17 -12
- data/lib/aws-sdk-core/stubbing/data_applicator.rb +1 -1
- data/lib/aws-sdk-core/stubbing/empty_stub.rb +6 -2
- data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +1 -1
- data/lib/aws-sdk-core/stubbing/stub_data.rb +4 -0
- data/lib/aws-sdk-core/util.rb +39 -0
- data/lib/aws-sdk-core/version.rb +1 -1
- data/lib/aws-sdk-core/waiters/poller.rb +5 -9
- data/lib/aws-sdk-core/waiters/waiter.rb +1 -0
- data/lib/aws-sdk-core/waiters.rb +3 -0
- data/lib/aws-sdk-core/xml/builder.rb +2 -2
- data/lib/aws-sdk-core/xml/error_handler.rb +1 -2
- data/lib/aws-sdk-core/xml/parser/frame.rb +4 -4
- data/lib/aws-sdk-core/xml/parser.rb +1 -11
- data/lib/aws-sdk-core/xml.rb +9 -0
- data/lib/aws-sdk-core.rb +66 -454
- data/lib/aws-sdk-sts/client.rb +1439 -0
- data/lib/aws-sdk-sts/client_api.rb +264 -0
- data/lib/aws-sdk-sts/customizations.rb +0 -0
- data/lib/aws-sdk-sts/errors.rb +14 -0
- data/lib/aws-sdk-sts/resource.rb +23 -0
- data/lib/aws-sdk-sts/types.rb +919 -0
- data/lib/aws-sdk-sts.rb +45 -0
- data/lib/seahorse/client/base.rb +1 -7
- data/lib/seahorse/client/logging/formatter.rb +2 -0
- data/lib/seahorse/client/logging/handler.rb +2 -0
- data/lib/seahorse/client/net_http/connection_pool.rb +3 -0
- data/lib/seahorse/client/net_http/handler.rb +2 -0
- data/lib/seahorse/client/net_http/patches.rb +1 -0
- data/lib/seahorse/client/plugin.rb +66 -6
- data/lib/seahorse/client/plugins/endpoint.rb +14 -10
- data/lib/seahorse/client/plugins/logging.rb +17 -19
- data/lib/seahorse/client/plugins/net_http.rb +23 -15
- data/lib/seahorse/client/plugins/raise_response_errors.rb +4 -4
- data/lib/seahorse/client/plugins/response_target.rb +2 -0
- data/lib/seahorse/model/api.rb +4 -0
- data/lib/seahorse/model/shapes.rb +18 -2
- data/lib/seahorse/util.rb +0 -20
- data/lib/seahorse.rb +50 -60
- metadata +36 -557
- data/apis/acm/2015-12-08/api-2.json +0 -595
- data/apis/acm/2015-12-08/examples-1.json +0 -5
- data/apis/acm/2015-12-08/paginators-1.json +0 -10
- data/apis/apigateway/2015-07-09/api-2.json +0 -4733
- data/apis/apigateway/2015-07-09/examples-1.json +0 -5
- data/apis/apigateway/2015-07-09/paginators-1.json +0 -70
- data/apis/application-autoscaling/2016-02-06/api-2.json +0 -601
- data/apis/application-autoscaling/2016-02-06/examples-1.json +0 -257
- data/apis/application-autoscaling/2016-02-06/paginators-1.json +0 -22
- data/apis/appstream/2016-12-01/api-2.json +0 -944
- data/apis/appstream/2016-12-01/examples-1.json +0 -5
- data/apis/appstream/2016-12-01/paginators-1.json +0 -4
- data/apis/appstream/2016-12-01/waiters-2.json +0 -55
- data/apis/athena/2017-05-18/api-2.json +0 -615
- data/apis/athena/2017-05-18/examples-1.json +0 -5
- data/apis/athena/2017-05-18/paginators-1.json +0 -19
- data/apis/autoscaling/2011-01-01/api-2.json +0 -2172
- data/apis/autoscaling/2011-01-01/examples-1.json +0 -1396
- data/apis/autoscaling/2011-01-01/paginators-1.json +0 -52
- data/apis/autoscaling/2011-01-01/resources-1.json +0 -1624
- data/apis/autoscaling/2011-01-01/waiters-2.json +0 -62
- data/apis/batch/2016-08-10/api-2.json +0 -920
- data/apis/batch/2016-08-10/examples-1.json +0 -589
- data/apis/batch/2016-08-10/paginators-1.json +0 -4
- data/apis/budgets/2016-10-20/api-2.json +0 -697
- data/apis/budgets/2016-10-20/examples-1.json +0 -5
- data/apis/budgets/2016-10-20/paginators-1.json +0 -4
- data/apis/clouddirectory/2016-05-10/api-2.json +0 -3595
- data/apis/clouddirectory/2016-05-10/examples-1.json +0 -5
- data/apis/clouddirectory/2016-05-10/paginators-1.json +0 -94
- data/apis/cloudformation/2010-05-15/api-2.json +0 -1464
- data/apis/cloudformation/2010-05-15/examples-1.json +0 -5
- data/apis/cloudformation/2010-05-15/paginators-1.json +0 -37
- data/apis/cloudformation/2010-05-15/resources-1.json +0 -211
- data/apis/cloudformation/2010-05-15/waiters-2.json +0 -182
- data/apis/cloudfront/2016-01-28/api-2.json +0 -2219
- data/apis/cloudfront/2016-01-28/examples-1.json +0 -5
- data/apis/cloudfront/2016-01-28/paginators-1.json +0 -32
- data/apis/cloudfront/2016-01-28/waiters-2.json +0 -47
- data/apis/cloudfront/2016-08-01/api-2.json +0 -2548
- data/apis/cloudfront/2016-08-01/examples-1.json +0 -5
- data/apis/cloudfront/2016-08-01/paginators-1.json +0 -32
- data/apis/cloudfront/2016-08-01/waiters-2.json +0 -47
- data/apis/cloudfront/2016-08-20/api-2.json +0 -2586
- data/apis/cloudfront/2016-08-20/paginators-1.json +0 -32
- data/apis/cloudfront/2016-08-20/waiters-2.json +0 -47
- data/apis/cloudfront/2016-09-07/api-2.json +0 -2596
- data/apis/cloudfront/2016-09-07/examples-1.json +0 -5
- data/apis/cloudfront/2016-09-07/paginators-1.json +0 -32
- data/apis/cloudfront/2016-09-07/waiters-2.json +0 -47
- data/apis/cloudfront/2016-09-29/api-2.json +0 -2599
- data/apis/cloudfront/2016-09-29/examples-1.json +0 -5
- data/apis/cloudfront/2016-09-29/paginators-1.json +0 -32
- data/apis/cloudfront/2016-09-29/waiters-2.json +0 -47
- data/apis/cloudfront/2016-11-25/api-2.json +0 -2665
- data/apis/cloudfront/2016-11-25/examples-1.json +0 -5
- data/apis/cloudfront/2016-11-25/paginators-1.json +0 -32
- data/apis/cloudfront/2016-11-25/waiters-2.json +0 -47
- data/apis/cloudfront/2017-03-25/api-2.json +0 -2689
- data/apis/cloudfront/2017-03-25/examples-1.json +0 -83
- data/apis/cloudfront/2017-03-25/paginators-1.json +0 -32
- data/apis/cloudfront/2017-03-25/waiters-2.json +0 -47
- data/apis/cloudhsm/2014-05-30/api-2.json +0 -878
- data/apis/cloudhsm/2014-05-30/examples-1.json +0 -5
- data/apis/cloudsearch/2013-01-01/api-2.json +0 -2002
- data/apis/cloudsearch/2013-01-01/paginators-1.json +0 -20
- data/apis/cloudsearchdomain/2013-01-01/api-2.json +0 -374
- data/apis/cloudsearchdomain/2013-01-01/examples-1.json +0 -5
- data/apis/cloudtrail/2013-11-01/api-2.json +0 -912
- data/apis/cloudtrail/2013-11-01/examples-1.json +0 -5
- data/apis/cloudtrail/2013-11-01/paginators-1.json +0 -13
- data/apis/codebuild/2016-10-06/api-2.json +0 -704
- data/apis/codebuild/2016-10-06/examples-1.json +0 -5
- data/apis/codebuild/2016-10-06/paginators-1.json +0 -4
- data/apis/codecommit/2015-04-13/api-2.json +0 -1112
- data/apis/codecommit/2015-04-13/examples-1.json +0 -5
- data/apis/codecommit/2015-04-13/paginators-1.json +0 -19
- data/apis/codedeploy/2014-10-06/api-2.json +0 -2380
- data/apis/codedeploy/2014-10-06/examples-1.json +0 -5
- data/apis/codedeploy/2014-10-06/paginators-1.json +0 -34
- data/apis/codedeploy/2014-10-06/waiters-2.json +0 -30
- data/apis/codepipeline/2015-07-09/api-2.json +0 -1714
- data/apis/codepipeline/2015-07-09/examples-1.json +0 -5
- data/apis/codestar/2017-04-19/api-2.json +0 -755
- data/apis/codestar/2017-04-19/examples-1.json +0 -5
- data/apis/codestar/2017-04-19/paginators-1.json +0 -4
- data/apis/cognito-identity/2014-06-30/api-2.json +0 -943
- data/apis/cognito-identity/2014-06-30/examples-1.json +0 -5
- data/apis/cognito-identity/2014-06-30/paginators-1.json +0 -4
- data/apis/cognito-idp/2016-04-18/api-2.json +0 -3847
- data/apis/cognito-idp/2016-04-18/examples-1.json +0 -5
- data/apis/cognito-idp/2016-04-18/paginators-1.json +0 -4
- data/apis/cognito-sync/2014-06-30/api-2.json +0 -1875
- data/apis/config/2014-11-12/api-2.json +0 -1418
- data/apis/config/2014-11-12/examples-1.json +0 -5
- data/apis/config/2014-11-12/paginators-1.json +0 -10
- data/apis/cur/2017-01-06/api-2.json +0 -226
- data/apis/cur/2017-01-06/examples-1.json +0 -5
- data/apis/cur/2017-01-06/paginators-1.json +0 -9
- data/apis/datapipeline/2012-10-29/api-2.json +0 -1168
- data/apis/datapipeline/2012-10-29/paginators-1.json +0 -26
- data/apis/devicefarm/2015-06-23/api-2.json +0 -2312
- data/apis/devicefarm/2015-06-23/examples-1.json +0 -1242
- data/apis/devicefarm/2015-06-23/paginators-1.json +0 -77
- data/apis/directconnect/2012-10-25/api-2.json +0 -1351
- data/apis/directconnect/2012-10-25/examples-1.json +0 -5
- data/apis/directconnect/2012-10-25/paginators-1.json +0 -22
- data/apis/discovery/2015-11-01/api-2.json +0 -938
- data/apis/discovery/2015-11-01/examples-1.json +0 -5
- data/apis/discovery/2015-11-01/paginators-1.json +0 -4
- data/apis/dms/2016-01-01/api-2.json +0 -1881
- data/apis/dms/2016-01-01/examples-1.json +0 -1053
- data/apis/dms/2016-01-01/paginators-1.json +0 -64
- data/apis/ds/2015-04-16/api-2.json +0 -1972
- data/apis/ds/2015-04-16/examples-1.json +0 -5
- data/apis/dynamodb/2011-12-05/api-2.json +0 -802
- data/apis/dynamodb/2011-12-05/examples-1.json +0 -5
- data/apis/dynamodb/2011-12-05/paginators-1.json +0 -26
- data/apis/dynamodb/2011-12-05/waiters-2.json +0 -35
- data/apis/dynamodb/2012-08-10/api-2.json +0 -1405
- data/apis/dynamodb/2012-08-10/examples-1.json +0 -628
- data/apis/dynamodb/2012-08-10/paginators-1.json +0 -26
- data/apis/dynamodb/2012-08-10/resources-1.json +0 -136
- data/apis/dynamodb/2012-08-10/waiters-2.json +0 -35
- data/apis/ec2/2015-10-01/api-2.json +0 -13760
- data/apis/ec2/2015-10-01/examples-1.json +0 -5
- data/apis/ec2/2015-10-01/paginators-1.json +0 -138
- data/apis/ec2/2015-10-01/resources-1.json +0 -2582
- data/apis/ec2/2015-10-01/waiters-2.json +0 -593
- data/apis/ec2/2016-04-01/api-2.json +0 -14191
- data/apis/ec2/2016-04-01/examples-1.json +0 -3729
- data/apis/ec2/2016-04-01/paginators-1.json +0 -138
- data/apis/ec2/2016-04-01/resources-1.json +0 -2582
- data/apis/ec2/2016-04-01/waiters-2.json +0 -593
- data/apis/ec2/2016-09-15/api-2.json +0 -14415
- data/apis/ec2/2016-09-15/examples-1.json +0 -3740
- data/apis/ec2/2016-09-15/paginators-1.json +0 -138
- data/apis/ec2/2016-09-15/resources-1.json +0 -2582
- data/apis/ec2/2016-09-15/waiters-2.json +0 -593
- data/apis/ec2/2016-11-15/api-2.json +0 -15590
- data/apis/ec2/2016-11-15/examples-1.json +0 -3740
- data/apis/ec2/2016-11-15/paginators-1.json +0 -144
- data/apis/ec2/2016-11-15/resources-1.json +0 -2582
- data/apis/ec2/2016-11-15/waiters-2.json +0 -611
- data/apis/ecr/2015-09-21/api-2.json +0 -947
- data/apis/ecr/2015-09-21/examples-1.json +0 -215
- data/apis/ecr/2015-09-21/paginators-1.json +0 -22
- data/apis/ecs/2014-11-13/api-2.json +0 -1629
- data/apis/ecs/2014-11-13/examples-1.json +0 -883
- data/apis/ecs/2014-11-13/paginators-1.json +0 -40
- data/apis/ecs/2014-11-13/waiters-2.json +0 -93
- data/apis/elasticache/2015-02-02/api-2.json +0 -2550
- data/apis/elasticache/2015-02-02/examples-1.json +0 -3145
- data/apis/elasticache/2015-02-02/paginators-1.json +0 -76
- data/apis/elasticache/2015-02-02/waiters-2.json +0 -143
- data/apis/elasticbeanstalk/2010-12-01/api-2.json +0 -2332
- data/apis/elasticbeanstalk/2010-12-01/examples-1.json +0 -1109
- data/apis/elasticbeanstalk/2010-12-01/paginators-1.json +0 -25
- data/apis/elasticfilesystem/2015-02-01/api-2.json +0 -714
- data/apis/elasticfilesystem/2015-02-01/examples-1.json +0 -222
- data/apis/elasticloadbalancing/2012-06-01/api-2.json +0 -1629
- data/apis/elasticloadbalancing/2012-06-01/examples-1.json +0 -1036
- data/apis/elasticloadbalancing/2012-06-01/paginators-1.json +0 -18
- data/apis/elasticloadbalancing/2012-06-01/waiters-2.json +0 -49
- data/apis/elasticloadbalancingv2/2015-12-01/api-2.json +0 -1867
- data/apis/elasticloadbalancingv2/2015-12-01/examples-1.json +0 -1384
- data/apis/elasticloadbalancingv2/2015-12-01/paginators-1.json +0 -19
- data/apis/elasticloadbalancingv2/2015-12-01/waiters-2.json +0 -64
- data/apis/elasticmapreduce/2009-03-31/api-2.json +0 -2056
- data/apis/elasticmapreduce/2009-03-31/examples-1.json +0 -5
- data/apis/elasticmapreduce/2009-03-31/paginators-1.json +0 -37
- data/apis/elasticmapreduce/2009-03-31/waiters-2.json +0 -86
- data/apis/elastictranscoder/2012-09-25/api-2.json +0 -1483
- data/apis/elastictranscoder/2012-09-25/examples-1.json +0 -5
- data/apis/elastictranscoder/2012-09-25/paginators-1.json +0 -24
- data/apis/elastictranscoder/2012-09-25/waiters-2.json +0 -30
- data/apis/email/2010-12-01/api-2.json +0 -2212
- data/apis/email/2010-12-01/examples-1.json +0 -953
- data/apis/email/2010-12-01/paginators-1.json +0 -13
- data/apis/email/2010-12-01/waiters-2.json +0 -18
- data/apis/entitlement.marketplace/2017-01-11/api-2.json +0 -128
- data/apis/entitlement.marketplace/2017-01-11/examples-1.json +0 -5
- data/apis/entitlement.marketplace/2017-01-11/paginators-1.json +0 -4
- data/apis/es/2015-01-01/api-2.json +0 -862
- data/apis/es/2015-01-01/examples-1.json +0 -5
- data/apis/es/2015-01-01/paginators-1.json +0 -14
- data/apis/events/2015-10-07/api-2.json +0 -649
- data/apis/events/2015-10-07/examples-1.json +0 -5
- data/apis/events/2015-10-07/paginators-1.json +0 -4
- data/apis/firehose/2015-08-04/api-2.json +0 -866
- data/apis/firehose/2015-08-04/examples-1.json +0 -5
- data/apis/gamelift/2015-10-01/api-2.json +0 -2316
- data/apis/gamelift/2015-10-01/examples-1.json +0 -5
- data/apis/gamelift/2015-10-01/paginators-1.json +0 -4
- data/apis/glacier/2012-06-01/api-2.json +0 -1734
- data/apis/glacier/2012-06-01/examples-1.json +0 -806
- data/apis/glacier/2012-06-01/paginators-1.json +0 -28
- data/apis/glacier/2012-06-01/resources-1.json +0 -563
- data/apis/glacier/2012-06-01/waiters-2.json +0 -39
- data/apis/greengrass/2017-06-07/api-2.json +0 -3451
- data/apis/health/2016-08-04/api-2.json +0 -547
- data/apis/health/2016-08-04/examples-1.json +0 -5
- data/apis/health/2016-08-04/paginators-1.json +0 -31
- data/apis/iam/2010-05-08/api-2.json +0 -4832
- data/apis/iam/2010-05-08/examples-1.json +0 -1191
- data/apis/iam/2010-05-08/paginators-1.json +0 -198
- data/apis/iam/2010-05-08/resources-1.json +0 -1740
- data/apis/iam/2010-05-08/waiters-2.json +0 -39
- data/apis/importexport/2010-06-01/api-2.json +0 -667
- data/apis/importexport/2010-06-01/paginators-1.json +0 -11
- data/apis/inspector/2016-02-16/api-2.json +0 -2051
- data/apis/inspector/2016-02-16/examples-1.json +0 -1147
- data/apis/inspector/2016-02-16/paginators-1.json +0 -4
- data/apis/iot/2015-05-28/api-2.json +0 -2928
- data/apis/iot/2015-05-28/examples-1.json +0 -5
- data/apis/iot/2015-05-28/paginators-1.json +0 -4
- data/apis/iot-data/2015-05-28/api-2.json +0 -264
- data/apis/kinesis/2013-12-02/api-2.json +0 -890
- data/apis/kinesis/2013-12-02/examples-1.json +0 -5
- data/apis/kinesis/2013-12-02/paginators-1.json +0 -18
- data/apis/kinesis/2013-12-02/waiters-2.json +0 -30
- data/apis/kinesisanalytics/2015-08-14/api-2.json +0 -1175
- data/apis/kinesisanalytics/2015-08-14/examples-1.json +0 -5
- data/apis/kinesisanalytics/2015-08-14/paginators-1.json +0 -4
- data/apis/kms/2014-11-01/api-2.json +0 -1492
- data/apis/kms/2014-11-01/examples-1.json +0 -904
- data/apis/kms/2014-11-01/paginators-1.json +0 -32
- data/apis/lambda/2014-11-11/api-2.json +0 -668
- data/apis/lambda/2014-11-11/paginators-1.json +0 -16
- data/apis/lambda/2015-03-31/api-2.json +0 -1647
- data/apis/lambda/2015-03-31/examples-1.json +0 -614
- data/apis/lambda/2015-03-31/paginators-1.json +0 -16
- data/apis/lex-models/2017-04-19/api-2.json +0 -2033
- data/apis/lex-models/2017-04-19/examples-1.json +0 -758
- data/apis/lex-models/2017-04-19/paginators-1.json +0 -54
- data/apis/lightsail/2016-11-28/api-2.json +0 -2187
- data/apis/lightsail/2016-11-28/examples-1.json +0 -5
- data/apis/lightsail/2016-11-28/paginators-1.json +0 -4
- data/apis/logs/2014-03-28/api-2.json +0 -1246
- data/apis/logs/2014-03-28/examples-1.json +0 -5
- data/apis/logs/2014-03-28/paginators-1.json +0 -49
- data/apis/machinelearning/2014-12-12/api-2.json +0 -1978
- data/apis/machinelearning/2014-12-12/examples-1.json +0 -5
- data/apis/machinelearning/2014-12-12/paginators-1.json +0 -28
- data/apis/machinelearning/2014-12-12/waiters-2.json +0 -81
- data/apis/marketplacecommerceanalytics/2015-07-01/api-2.json +0 -171
- data/apis/marketplacecommerceanalytics/2015-07-01/examples-1.json +0 -5
- data/apis/marketplacecommerceanalytics/2015-07-01/paginators-1.json +0 -4
- data/apis/meteringmarketplace/2016-01-14/api-2.json +0 -263
- data/apis/meteringmarketplace/2016-01-14/examples-1.json +0 -5
- data/apis/monitoring/2010-08-01/api-2.json +0 -827
- data/apis/monitoring/2010-08-01/examples-1.json +0 -5
- data/apis/monitoring/2010-08-01/paginators-1.json +0 -24
- data/apis/monitoring/2010-08-01/resources-1.json +0 -346
- data/apis/monitoring/2010-08-01/waiters-2.json +0 -18
- data/apis/mturk-requester/2017-01-17/api-2.json +0 -1665
- data/apis/mturk-requester/2017-01-17/examples-1.json +0 -5
- data/apis/mturk-requester/2017-01-17/paginators-1.json +0 -54
- data/apis/opsworks/2013-02-18/api-2.json +0 -2839
- data/apis/opsworks/2013-02-18/examples-1.json +0 -5
- data/apis/opsworks/2013-02-18/paginators-1.json +0 -55
- data/apis/opsworks/2013-02-18/resources-1.json +0 -173
- data/apis/opsworks/2013-02-18/waiters-2.json +0 -295
- data/apis/opsworkscm/2016-11-01/api-2.json +0 -730
- data/apis/opsworkscm/2016-11-01/examples-1.json +0 -5
- data/apis/opsworkscm/2016-11-01/paginators-1.json +0 -4
- data/apis/organizations/2016-11-28/api-2.json +0 -2006
- data/apis/organizations/2016-11-28/examples-1.json +0 -1409
- data/apis/organizations/2016-11-28/paginators-1.json +0 -64
- data/apis/pinpoint/2016-12-01/api-2.json +0 -3949
- data/apis/pinpoint/2016-12-01/examples-1.json +0 -5
- data/apis/polly/2016-06-10/api-2.json +0 -539
- data/apis/polly/2016-06-10/examples-1.json +0 -171
- data/apis/polly/2016-06-10/paginators-1.json +0 -4
- data/apis/rds/2013-01-10/api-2.json +0 -2902
- data/apis/rds/2013-01-10/examples-1.json +0 -5
- data/apis/rds/2013-01-10/paginators-1.json +0 -97
- data/apis/rds/2013-02-12/api-2.json +0 -3058
- data/apis/rds/2013-02-12/examples-1.json +0 -5
- data/apis/rds/2013-02-12/paginators-1.json +0 -110
- data/apis/rds/2013-09-09/api-2.json +0 -3159
- data/apis/rds/2013-09-09/examples-1.json +0 -5
- data/apis/rds/2013-09-09/paginators-1.json +0 -110
- data/apis/rds/2013-09-09/waiters-2.json +0 -97
- data/apis/rds/2014-09-01/api-2.json +0 -3272
- data/apis/rds/2014-09-01/examples-1.json +0 -5
- data/apis/rds/2014-09-01/paginators-1.json +0 -4
- data/apis/rds/2014-10-31/api-2.json +0 -5187
- data/apis/rds/2014-10-31/examples-1.json +0 -1951
- data/apis/rds/2014-10-31/paginators-1.json +0 -110
- data/apis/rds/2014-10-31/resources-1.json +0 -3272
- data/apis/rds/2014-10-31/waiters-2.json +0 -90
- data/apis/redshift/2012-12-01/api-2.json +0 -3840
- data/apis/redshift/2012-12-01/examples-1.json +0 -5
- data/apis/redshift/2012-12-01/paginators-1.json +0 -94
- data/apis/redshift/2012-12-01/waiters-2.json +0 -97
- data/apis/rekognition/2016-06-27/api-2.json +0 -992
- data/apis/rekognition/2016-06-27/examples-1.json +0 -651
- data/apis/rekognition/2016-06-27/paginators-1.json +0 -16
- data/apis/resourcegroupstaggingapi/2017-01-26/api-2.json +0 -328
- data/apis/resourcegroupstaggingapi/2017-01-26/examples-1.json +0 -5
- data/apis/resourcegroupstaggingapi/2017-01-26/paginators-1.json +0 -20
- data/apis/route53/2013-04-01/api-2.json +0 -3312
- data/apis/route53/2013-04-01/examples-1.json +0 -762
- data/apis/route53/2013-04-01/paginators-1.json +0 -33
- data/apis/route53/2013-04-01/waiters-2.json +0 -18
- data/apis/route53domains/2014-05-15/api-2.json +0 -1323
- data/apis/route53domains/2014-05-15/examples-1.json +0 -5
- data/apis/route53domains/2014-05-15/paginators-1.json +0 -16
- data/apis/runtime.lex/2016-11-28/api-2.json +0 -390
- data/apis/runtime.lex/2016-11-28/examples-1.json +0 -5
- data/apis/runtime.lex/2016-11-28/paginators-1.json +0 -4
- data/apis/s3/2006-03-01/api-2.json +0 -5368
- data/apis/s3/2006-03-01/examples-1.json +0 -1876
- data/apis/s3/2006-03-01/paginators-1.json +0 -66
- data/apis/s3/2006-03-01/resources-1.json +0 -1176
- data/apis/s3/2006-03-01/waiters-2.json +0 -73
- data/apis/sdb/2009-04-15/api-2.json +0 -955
- data/apis/sdb/2009-04-15/paginators-1.json +0 -15
- data/apis/servicecatalog/2015-12-10/api-2.json +0 -2022
- data/apis/servicecatalog/2015-12-10/examples-1.json +0 -5
- data/apis/servicecatalog/2015-12-10/paginators-1.json +0 -4
- data/apis/shield/2016-06-02/api-2.json +0 -494
- data/apis/shield/2016-06-02/examples-1.json +0 -5
- data/apis/sms/2016-10-24/api-2.json +0 -612
- data/apis/sms/2016-10-24/examples-1.json +0 -5
- data/apis/sms/2016-10-24/paginators-1.json +0 -28
- data/apis/snowball/2016-06-30/api-2.json +0 -855
- data/apis/snowball/2016-06-30/examples-1.json +0 -442
- data/apis/snowball/2016-06-30/paginators-1.json +0 -16
- data/apis/sns/2010-03-31/api-2.json +0 -1145
- data/apis/sns/2010-03-31/examples-1.json +0 -5
- data/apis/sns/2010-03-31/paginators-1.json +0 -29
- data/apis/sns/2010-03-31/resources-1.json +0 -327
- data/apis/sqs/2012-11-05/api-2.json +0 -988
- data/apis/sqs/2012-11-05/examples-1.json +0 -5
- data/apis/sqs/2012-11-05/paginators-1.json +0 -7
- data/apis/sqs/2012-11-05/resources-1.json +0 -232
- data/apis/ssm/2014-11-06/api-2.json +0 -5317
- data/apis/ssm/2014-11-06/examples-1.json +0 -5
- data/apis/ssm/2014-11-06/paginators-1.json +0 -40
- data/apis/states/2016-11-23/api-2.json +0 -1021
- data/apis/states/2016-11-23/examples-1.json +0 -5
- data/apis/states/2016-11-23/paginators-1.json +0 -28
- data/apis/storagegateway/2013-06-30/api-2.json +0 -2591
- data/apis/storagegateway/2013-06-30/examples-1.json +0 -1381
- data/apis/storagegateway/2013-06-30/paginators-1.json +0 -52
- data/apis/streams.dynamodb/2012-08-10/api-2.json +0 -406
- data/apis/streams.dynamodb/2012-08-10/examples-1.json +0 -212
- data/apis/streams.dynamodb/2012-08-10/paginators-1.json +0 -4
- data/apis/sts/2011-06-15/api-2.json +0 -522
- data/apis/sts/2011-06-15/examples-1.json +0 -206
- data/apis/sts/2011-06-15/paginators-1.json +0 -4
- data/apis/support/2013-04-15/api-2.json +0 -772
- data/apis/support/2013-04-15/examples-1.json +0 -5
- data/apis/support/2013-04-15/paginators-1.json +0 -25
- data/apis/swf/2012-01-25/api-2.json +0 -2839
- data/apis/swf/2012-01-25/paginators-1.json +0 -46
- data/apis/waf/2015-08-24/api-2.json +0 -1959
- data/apis/waf/2015-08-24/examples-1.json +0 -1017
- data/apis/waf/2015-08-24/paginators-1.json +0 -4
- data/apis/waf-regional/2016-11-28/api-2.json +0 -2090
- data/apis/waf-regional/2016-11-28/examples-1.json +0 -1017
- data/apis/waf-regional/2016-11-28/paginators-1.json +0 -4
- data/apis/workdocs/2016-05-01/api-2.json +0 -2684
- data/apis/workdocs/2016-05-01/examples-1.json +0 -5
- data/apis/workdocs/2016-05-01/paginators-1.json +0 -25
- data/apis/workspaces/2015-04-08/api-2.json +0 -840
- data/apis/workspaces/2015-04-08/examples-1.json +0 -5
- data/apis/workspaces/2015-04-08/paginators-1.json +0 -20
- data/apis/xray/2016-04-12/api-2.json +0 -492
- data/apis/xray/2016-04-12/examples-1.json +0 -5
- data/apis/xray/2016-04-12/paginators-1.json +0 -4
- data/bin/aws.rb +0 -180
- data/endpoints.json +0 -1935
- data/lib/aws-sdk-core/acm.rb +0 -6
- data/lib/aws-sdk-core/api/builder.rb +0 -106
- data/lib/aws-sdk-core/api/customizations.rb +0 -262
- data/lib/aws-sdk-core/api/docs/builder.rb +0 -223
- data/lib/aws-sdk-core/api/docs/client_type_documenter.rb +0 -118
- data/lib/aws-sdk-core/api/docs/crosslink.rb +0 -43
- data/lib/aws-sdk-core/api/docs/docstring_provider.rb +0 -75
- data/lib/aws-sdk-core/api/docs/operation_documenter.rb +0 -151
- data/lib/aws-sdk-core/api/docs/param_formatter.rb +0 -163
- data/lib/aws-sdk-core/api/docs/request_syntax_example.rb +0 -22
- data/lib/aws-sdk-core/api/docs/response_structure_example.rb +0 -91
- data/lib/aws-sdk-core/api/docs/shared_example.rb +0 -100
- data/lib/aws-sdk-core/api/docs/utils.rb +0 -133
- data/lib/aws-sdk-core/api/shape_map.rb +0 -142
- data/lib/aws-sdk-core/apigateway.rb +0 -6
- data/lib/aws-sdk-core/applicationautoscaling.rb +0 -6
- data/lib/aws-sdk-core/applicationdiscoveryservice.rb +0 -6
- data/lib/aws-sdk-core/appstream.rb +0 -7
- data/lib/aws-sdk-core/athena.rb +0 -6
- data/lib/aws-sdk-core/autoscaling.rb +0 -8
- data/lib/aws-sdk-core/batch.rb +0 -6
- data/lib/aws-sdk-core/budgets.rb +0 -6
- data/lib/aws-sdk-core/checksums.rb +0 -51
- data/lib/aws-sdk-core/client.rb +0 -60
- data/lib/aws-sdk-core/client_waiters.rb +0 -120
- data/lib/aws-sdk-core/clouddirectory.rb +0 -6
- data/lib/aws-sdk-core/cloudformation.rb +0 -8
- data/lib/aws-sdk-core/cloudfront/cookie_signer.rb +0 -44
- data/lib/aws-sdk-core/cloudfront/signer.rb +0 -141
- data/lib/aws-sdk-core/cloudfront/url_signer.rb +0 -48
- data/lib/aws-sdk-core/cloudfront.rb +0 -17
- data/lib/aws-sdk-core/cloudhsm.rb +0 -5
- data/lib/aws-sdk-core/cloudsearch.rb +0 -5
- data/lib/aws-sdk-core/cloudsearchdomain.rb +0 -5
- data/lib/aws-sdk-core/cloudtrail.rb +0 -6
- data/lib/aws-sdk-core/cloudwatch.rb +0 -8
- data/lib/aws-sdk-core/cloudwatchevents.rb +0 -6
- data/lib/aws-sdk-core/cloudwatchlogs.rb +0 -6
- data/lib/aws-sdk-core/codebuild.rb +0 -6
- data/lib/aws-sdk-core/codecommit.rb +0 -6
- data/lib/aws-sdk-core/codedeploy.rb +0 -7
- data/lib/aws-sdk-core/codepipeline.rb +0 -5
- data/lib/aws-sdk-core/codestar.rb +0 -6
- data/lib/aws-sdk-core/cognitoidentity.rb +0 -6
- data/lib/aws-sdk-core/cognitoidentityprovider.rb +0 -6
- data/lib/aws-sdk-core/cognitosync.rb +0 -4
- data/lib/aws-sdk-core/configservice.rb +0 -6
- data/lib/aws-sdk-core/costandusagereportservice.rb +0 -6
- data/lib/aws-sdk-core/databasemigrationservice.rb +0 -6
- data/lib/aws-sdk-core/datapipeline.rb +0 -5
- data/lib/aws-sdk-core/devicefarm.rb +0 -6
- data/lib/aws-sdk-core/directconnect.rb +0 -6
- data/lib/aws-sdk-core/directoryservice.rb +0 -5
- data/lib/aws-sdk-core/dynamodb/attribute_value.rb +0 -110
- data/lib/aws-sdk-core/dynamodb.rb +0 -40
- data/lib/aws-sdk-core/dynamodbstreams.rb +0 -6
- data/lib/aws-sdk-core/ec2.rb +0 -8
- data/lib/aws-sdk-core/ecr.rb +0 -6
- data/lib/aws-sdk-core/ecs.rb +0 -7
- data/lib/aws-sdk-core/efs.rb +0 -5
- data/lib/aws-sdk-core/elasticache.rb +0 -7
- data/lib/aws-sdk-core/elasticbeanstalk.rb +0 -6
- data/lib/aws-sdk-core/elasticloadbalancing.rb +0 -7
- data/lib/aws-sdk-core/elasticloadbalancingv2.rb +0 -7
- data/lib/aws-sdk-core/elasticsearchservice.rb +0 -6
- data/lib/aws-sdk-core/elastictranscoder.rb +0 -7
- data/lib/aws-sdk-core/empty_structure.rb +0 -3
- data/lib/aws-sdk-core/emr.rb +0 -7
- data/lib/aws-sdk-core/endpoint_provider.rb +0 -104
- data/lib/aws-sdk-core/firehose.rb +0 -5
- data/lib/aws-sdk-core/gamelift.rb +0 -6
- data/lib/aws-sdk-core/glacier.rb +0 -8
- data/lib/aws-sdk-core/greengrass.rb +0 -4
- data/lib/aws-sdk-core/health.rb +0 -6
- data/lib/aws-sdk-core/iam.rb +0 -8
- data/lib/aws-sdk-core/importexport.rb +0 -5
- data/lib/aws-sdk-core/inspector.rb +0 -6
- data/lib/aws-sdk-core/iot.rb +0 -6
- data/lib/aws-sdk-core/iotdataplane.rb +0 -4
- data/lib/aws-sdk-core/kinesis.rb +0 -7
- data/lib/aws-sdk-core/kinesisanalytics.rb +0 -6
- data/lib/aws-sdk-core/kms.rb +0 -6
- data/lib/aws-sdk-core/lambda.rb +0 -6
- data/lib/aws-sdk-core/lambdapreview.rb +0 -5
- data/lib/aws-sdk-core/lex.rb +0 -6
- data/lib/aws-sdk-core/lexmodelbuildingservice.rb +0 -6
- data/lib/aws-sdk-core/lightsail.rb +0 -6
- data/lib/aws-sdk-core/machinelearning.rb +0 -7
- data/lib/aws-sdk-core/marketplacecommerceanalytics.rb +0 -6
- data/lib/aws-sdk-core/marketplaceentitlementservice.rb +0 -6
- data/lib/aws-sdk-core/marketplacemetering.rb +0 -5
- data/lib/aws-sdk-core/mturk.rb +0 -6
- data/lib/aws-sdk-core/opsworks.rb +0 -8
- data/lib/aws-sdk-core/opsworkscm.rb +0 -6
- data/lib/aws-sdk-core/organizations.rb +0 -6
- data/lib/aws-sdk-core/partitions/partition.rb +0 -95
- data/lib/aws-sdk-core/partitions/partition_list.rb +0 -60
- data/lib/aws-sdk-core/partitions/region.rb +0 -66
- data/lib/aws-sdk-core/partitions/service.rb +0 -74
- data/lib/aws-sdk-core/partitions.rb +0 -174
- data/lib/aws-sdk-core/pinpoint.rb +0 -5
- data/lib/aws-sdk-core/plugins/api_gateway_header.rb +0 -19
- data/lib/aws-sdk-core/plugins/csd_conditional_signing.rb +0 -30
- data/lib/aws-sdk-core/plugins/csd_switch_to_post.rb +0 -36
- data/lib/aws-sdk-core/plugins/dynamodb_crc32_validation.rb +0 -52
- data/lib/aws-sdk-core/plugins/dynamodb_extended_retries.rb +0 -22
- data/lib/aws-sdk-core/plugins/dynamodb_simple_attributes.rb +0 -208
- data/lib/aws-sdk-core/plugins/ec2_copy_encrypted_snapshot.rb +0 -56
- data/lib/aws-sdk-core/plugins/ec2_region_validation.rb +0 -17
- data/lib/aws-sdk-core/plugins/glacier_account_id.rb +0 -19
- data/lib/aws-sdk-core/plugins/glacier_api_version.rb +0 -19
- data/lib/aws-sdk-core/plugins/glacier_checksums.rb +0 -87
- data/lib/aws-sdk-core/plugins/machine_learning_predict_endpoint.rb +0 -20
- data/lib/aws-sdk-core/plugins/rds_cross_region_copying.rb +0 -69
- data/lib/aws-sdk-core/plugins/request_signer.rb +0 -150
- data/lib/aws-sdk-core/plugins/route_53_id_fix.rb +0 -55
- data/lib/aws-sdk-core/plugins/s3_accelerate.rb +0 -90
- data/lib/aws-sdk-core/plugins/s3_bucket_dns.rb +0 -86
- data/lib/aws-sdk-core/plugins/s3_bucket_name_restrictions.rb +0 -21
- data/lib/aws-sdk-core/plugins/s3_dualstack.rb +0 -67
- data/lib/aws-sdk-core/plugins/s3_expect_100_continue.rb +0 -27
- data/lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb +0 -21
- data/lib/aws-sdk-core/plugins/s3_host_id.rb +0 -26
- data/lib/aws-sdk-core/plugins/s3_http_200_errors.rb +0 -45
- data/lib/aws-sdk-core/plugins/s3_location_constraint.rb +0 -31
- data/lib/aws-sdk-core/plugins/s3_md5s.rb +0 -50
- data/lib/aws-sdk-core/plugins/s3_redirects.rb +0 -37
- data/lib/aws-sdk-core/plugins/s3_request_signer.rb +0 -166
- data/lib/aws-sdk-core/plugins/s3_sse_cpk.rb +0 -64
- data/lib/aws-sdk-core/plugins/s3_url_encoded_keys.rb +0 -93
- data/lib/aws-sdk-core/plugins/sqs_md5s.rb +0 -162
- data/lib/aws-sdk-core/plugins/sqs_queue_urls.rb +0 -34
- data/lib/aws-sdk-core/plugins/swf_read_timeouts.rb +0 -23
- data/lib/aws-sdk-core/polly/presigner.rb +0 -70
- data/lib/aws-sdk-core/polly.rb +0 -14
- data/lib/aws-sdk-core/rds/auth_token_generator.rb +0 -63
- data/lib/aws-sdk-core/rds.rb +0 -16
- data/lib/aws-sdk-core/redshift.rb +0 -7
- data/lib/aws-sdk-core/rekognition.rb +0 -6
- data/lib/aws-sdk-core/resourcegroupstaggingapi.rb +0 -6
- data/lib/aws-sdk-core/route53.rb +0 -7
- data/lib/aws-sdk-core/route53domains.rb +0 -6
- data/lib/aws-sdk-core/s3/bucket_region_cache.rb +0 -75
- data/lib/aws-sdk-core/s3/presigner.rb +0 -116
- data/lib/aws-sdk-core/s3.rb +0 -26
- data/lib/aws-sdk-core/service.rb +0 -4
- data/lib/aws-sdk-core/servicecatalog.rb +0 -6
- data/lib/aws-sdk-core/ses.rb +0 -7
- data/lib/aws-sdk-core/shield.rb +0 -5
- data/lib/aws-sdk-core/signers/base.rb +0 -31
- data/lib/aws-sdk-core/signers/s3.rb +0 -185
- data/lib/aws-sdk-core/signers/v2.rb +0 -51
- data/lib/aws-sdk-core/signers/v3.rb +0 -34
- data/lib/aws-sdk-core/signers/v4.rb +0 -234
- data/lib/aws-sdk-core/simpledb.rb +0 -5
- data/lib/aws-sdk-core/sms.rb +0 -6
- data/lib/aws-sdk-core/snowball.rb +0 -6
- data/lib/aws-sdk-core/sns.rb +0 -7
- data/lib/aws-sdk-core/sqs.rb +0 -7
- data/lib/aws-sdk-core/ssm.rb +0 -6
- data/lib/aws-sdk-core/states.rb +0 -6
- data/lib/aws-sdk-core/storagegateway.rb +0 -6
- data/lib/aws-sdk-core/sts.rb +0 -6
- data/lib/aws-sdk-core/support.rb +0 -6
- data/lib/aws-sdk-core/swf.rb +0 -5
- data/lib/aws-sdk-core/tree_hash.rb +0 -69
- data/lib/aws-sdk-core/waf.rb +0 -6
- data/lib/aws-sdk-core/wafregional.rb +0 -6
- data/lib/aws-sdk-core/waiters/null_provider.rb +0 -12
- data/lib/aws-sdk-core/waiters/provider.rb +0 -35
- data/lib/aws-sdk-core/workdocs.rb +0 -6
- data/lib/aws-sdk-core/workspaces.rb +0 -6
- data/lib/aws-sdk-core/xray.rb +0 -6
- data/lib/seahorse/client/plugins/restful_bindings.rb +0 -125
- data/service-models.json +0 -405
@@ -1,87 +0,0 @@
|
|
1
|
-
require 'openssl'
|
2
|
-
|
3
|
-
module Aws
|
4
|
-
module Plugins
|
5
|
-
|
6
|
-
# Computes the `:checksum` of the HTTP request body for operations
|
7
|
-
# that require the `X-Amz-Sha256-Tree-Hash` header. This includes:
|
8
|
-
#
|
9
|
-
# * `:complete_multipart_upload`
|
10
|
-
# * `:upload_archive`
|
11
|
-
# * `:upload_multipart_part`
|
12
|
-
#
|
13
|
-
# The `:upload_archive` and `:upload_multipart_part` operations
|
14
|
-
# accept a `:checksum` request parameter. If this param
|
15
|
-
# is present, then the checksum is assumed to be the proper
|
16
|
-
# tree hash of the file to be uploaded. If this param is
|
17
|
-
# not present, then the required tree hash checksum will
|
18
|
-
# be generated.
|
19
|
-
#
|
20
|
-
# The `:complete_multipart_upload` operation does not accept
|
21
|
-
# a checksum and this plugin will always compute this of the
|
22
|
-
# HTTP request body on your behalf.
|
23
|
-
class GlacierChecksums < Seahorse::Client::Plugin
|
24
|
-
|
25
|
-
CHECKSUM_OPERATIONS = [
|
26
|
-
:upload_archive,
|
27
|
-
:upload_multipart_part,
|
28
|
-
]
|
29
|
-
|
30
|
-
class Handler < Seahorse::Client::Handler
|
31
|
-
|
32
|
-
HASH = 'X-Amz-Content-Sha256'
|
33
|
-
|
34
|
-
TREE_HASH = 'X-Amz-Sha256-Tree-Hash'
|
35
|
-
|
36
|
-
def call(context)
|
37
|
-
unless context.http_request.headers[TREE_HASH]
|
38
|
-
populate_checksum_headers(context)
|
39
|
-
end
|
40
|
-
@handler.call(context)
|
41
|
-
end
|
42
|
-
|
43
|
-
private
|
44
|
-
|
45
|
-
def populate_checksum_headers(context)
|
46
|
-
compute_checksums(context.http_request.body) do |hash, tree_hash|
|
47
|
-
context.http_request.headers[HASH] = hash
|
48
|
-
context.http_request.headers[TREE_HASH] = tree_hash.digest
|
49
|
-
context[:tree_hash] = tree_hash
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
# Computes two checksums of the body. The tree hash is required
|
54
|
-
# by Glacier for operations where you upload a file. The other
|
55
|
-
# checksum is required by signature version 4. We compute both
|
56
|
-
# here so the sigv4 signer does not need to re-read the body.
|
57
|
-
def compute_checksums(body, &block)
|
58
|
-
|
59
|
-
tree_hash = TreeHash.new
|
60
|
-
digest = OpenSSL::Digest.new('sha256')
|
61
|
-
|
62
|
-
# if the body is empty/EOF, then we should compute the
|
63
|
-
# digests of the empty string
|
64
|
-
if body.size == 0
|
65
|
-
tree_hash.update('')
|
66
|
-
digest.update('')
|
67
|
-
end
|
68
|
-
|
69
|
-
# Rewind body before performing checksum computation.
|
70
|
-
body.rewind
|
71
|
-
|
72
|
-
while chunk = body.read(1024 * 1024) # read 1MB
|
73
|
-
tree_hash.update(chunk)
|
74
|
-
digest.update(chunk)
|
75
|
-
end
|
76
|
-
body.rewind
|
77
|
-
|
78
|
-
yield(digest.to_s, tree_hash)
|
79
|
-
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
|
-
handler(Handler, operations: CHECKSUM_OPERATIONS)
|
84
|
-
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module Aws
|
2
|
-
module Plugins
|
3
|
-
# @api private
|
4
|
-
class MachineLearningPredictEndpoint < Seahorse::Client::Plugin
|
5
|
-
|
6
|
-
class Handler < Seahorse::Client::Handler
|
7
|
-
|
8
|
-
def call(context)
|
9
|
-
endpoint = context.params.delete(:predict_endpoint)
|
10
|
-
context.http_request.endpoint = URI.parse(endpoint.to_s)
|
11
|
-
@handler.call(context)
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
15
|
-
|
16
|
-
handle(Handler, operations: [:predict])
|
17
|
-
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,69 +0,0 @@
|
|
1
|
-
require 'aws-sigv4'
|
2
|
-
|
3
|
-
module Aws
|
4
|
-
module Plugins
|
5
|
-
|
6
|
-
# This plugin populates the `:pre_signed_url` request param for the
|
7
|
-
# CopyDBSnapshot API.
|
8
|
-
#
|
9
|
-
# This parameter is required by RDS when copying an encrypted snapshot
|
10
|
-
# across regions. This plugin will be skipped if the `:pre_signed_url`
|
11
|
-
# parameter is provided by the user.
|
12
|
-
#
|
13
|
-
# @seahorse.client.option [String] :source_region The region which you are
|
14
|
-
# copying an encrypted snapshot from. This parameter must be present to
|
15
|
-
# have the plugin compute a presigned URL on your behalf.
|
16
|
-
class RDSCrossRegionCopying < Seahorse::Client::Plugin
|
17
|
-
|
18
|
-
# @api private
|
19
|
-
class Handler < Seahorse::Client::Handler
|
20
|
-
|
21
|
-
def call(context)
|
22
|
-
params = context.params
|
23
|
-
if params[:source_region] && !params[:pre_signed_url]
|
24
|
-
params[:pre_signed_url] = presigned_url(context, params)
|
25
|
-
params[:destination_region] = context.config.region
|
26
|
-
end
|
27
|
-
@handler.call(context)
|
28
|
-
end
|
29
|
-
|
30
|
-
private
|
31
|
-
def presigned_url(context, params)
|
32
|
-
# :source_region is not modeled in the api
|
33
|
-
source_region = params.delete(:source_region)
|
34
|
-
param_list = Aws::Query::ParamList.new
|
35
|
-
param_list.set('Action', context.operation.name)
|
36
|
-
param_list.set('DestinationRegion', context.config.region)
|
37
|
-
param_list.set('Version', context.config.api.metadata['apiVersion'])
|
38
|
-
Aws::Query::ParamBuilder.new(param_list).apply(
|
39
|
-
context.operation.input,
|
40
|
-
params
|
41
|
-
)
|
42
|
-
signer = Aws::Sigv4::Signer.new(
|
43
|
-
service: 'rds',
|
44
|
-
region: source_region,
|
45
|
-
credentials_provider: context.config.credentials
|
46
|
-
)
|
47
|
-
url = Aws::EndpointProvider.resolve(signer.region, 'rds')
|
48
|
-
url += "?#{param_list.to_s}"
|
49
|
-
signer.presign_url(
|
50
|
-
http_method: 'GET',
|
51
|
-
url: url,
|
52
|
-
body: '',
|
53
|
-
expires_in: 3600
|
54
|
-
).to_s
|
55
|
-
end
|
56
|
-
end
|
57
|
-
handler(
|
58
|
-
Handler,
|
59
|
-
step: :initialize,
|
60
|
-
operations: [
|
61
|
-
:copy_db_snapshot,
|
62
|
-
:create_db_instance_read_replica,
|
63
|
-
:copy_db_cluster_snapshot,
|
64
|
-
:create_db_cluster
|
65
|
-
]
|
66
|
-
)
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
@@ -1,150 +0,0 @@
|
|
1
|
-
module Aws
|
2
|
-
module Plugins
|
3
|
-
|
4
|
-
# @seahorse.client.option [required, Credentials] :credentials Your
|
5
|
-
# AWS credentials. The following locations will be searched in order
|
6
|
-
# for credentials:
|
7
|
-
#
|
8
|
-
# * `:access_key_id`, `:secret_access_key`, and `:session_token` options
|
9
|
-
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
|
10
|
-
# * `HOME/.aws/credentials` shared credentials file
|
11
|
-
# * EC2 instance profile credentials
|
12
|
-
#
|
13
|
-
# @seahorse.client.option [String] :profile Used when loading credentials
|
14
|
-
# from the shared credentials file at HOME/.aws/credentials. When not
|
15
|
-
# specified, 'default' is used.
|
16
|
-
#
|
17
|
-
# @seahorse.client.option [String] :access_key_id Used to set credentials
|
18
|
-
# statically.
|
19
|
-
#
|
20
|
-
# @seahorse.client.option [String] :secret_access_key Used to set
|
21
|
-
# credentials statically.
|
22
|
-
#
|
23
|
-
# @seahorse.client.option [String] :session_token Used to set credentials
|
24
|
-
# statically.
|
25
|
-
#
|
26
|
-
class RequestSigner < Seahorse::Client::Plugin
|
27
|
-
|
28
|
-
option(:access_key_id)
|
29
|
-
|
30
|
-
option(:secret_access_key)
|
31
|
-
|
32
|
-
option(:session_token)
|
33
|
-
|
34
|
-
option(:profile)
|
35
|
-
|
36
|
-
option(:credentials) do |config|
|
37
|
-
CredentialProviderChain.new(config).resolve
|
38
|
-
end
|
39
|
-
|
40
|
-
option(:instance_profile_credentials_retries, 0)
|
41
|
-
|
42
|
-
option(:instance_profile_credentials_timeout, 1)
|
43
|
-
|
44
|
-
# Intentionally not documented - this should go away when all
|
45
|
-
# services support signature version 4 in every region.
|
46
|
-
option(:signature_version) do |cfg|
|
47
|
-
cfg.api.metadata['signatureVersion']
|
48
|
-
end
|
49
|
-
|
50
|
-
option(:sigv4_name) do |cfg|
|
51
|
-
cfg.api.metadata['signingName'] || cfg.api.metadata['endpointPrefix']
|
52
|
-
end
|
53
|
-
|
54
|
-
option(:sigv4_region) do |cfg|
|
55
|
-
prefix = cfg.api.metadata['endpointPrefix']
|
56
|
-
if prefix.nil?
|
57
|
-
cfg.region
|
58
|
-
elsif cfg.endpoint.to_s.match(/#{prefix}\.amazonaws\.com/)
|
59
|
-
'us-east-1'
|
60
|
-
else
|
61
|
-
cfg.region
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
class Handler < Seahorse::Client::Handler
|
66
|
-
|
67
|
-
SIGNERS = {
|
68
|
-
'v4' => Signers::V4,
|
69
|
-
'v3https' => Signers::V3,
|
70
|
-
'v2' => Signers::V2,
|
71
|
-
's3' => Signers::S3,
|
72
|
-
}
|
73
|
-
|
74
|
-
STS_UNSIGNED_REQUESTS = Set.new(%w(
|
75
|
-
AssumeRoleWithSAML
|
76
|
-
AssumeRoleWithWebIdentity
|
77
|
-
))
|
78
|
-
|
79
|
-
COGNITO_IDENTITY_UNSIGNED_REQUESTS = Set.new(%w(
|
80
|
-
GetCredentialsForIdentity
|
81
|
-
GetId
|
82
|
-
GetOpenIdToken
|
83
|
-
UnlinkIdentity
|
84
|
-
))
|
85
|
-
|
86
|
-
def call(context)
|
87
|
-
sign_authenticated_requests(context) unless unsigned_request?(context)
|
88
|
-
@handler.call(context)
|
89
|
-
end
|
90
|
-
|
91
|
-
private
|
92
|
-
|
93
|
-
def sign_authenticated_requests(context)
|
94
|
-
require_credentials(context)
|
95
|
-
if signer = SIGNERS[context.config.signature_version]
|
96
|
-
require_credentials(context)
|
97
|
-
signer.sign(apply_authtype(context))
|
98
|
-
end
|
99
|
-
end
|
100
|
-
|
101
|
-
def require_credentials(context)
|
102
|
-
if missing_credentials?(context)
|
103
|
-
msg = 'unable to sign request without credentials set'
|
104
|
-
raise Errors::MissingCredentialsError, msg
|
105
|
-
end
|
106
|
-
end
|
107
|
-
|
108
|
-
def missing_credentials?(context)
|
109
|
-
context.config.credentials.nil? or
|
110
|
-
!context.config.credentials.set?
|
111
|
-
end
|
112
|
-
|
113
|
-
def unsigned_request?(context)
|
114
|
-
if context.config.api.metadata['endpointPrefix'] == 'sts'
|
115
|
-
STS_UNSIGNED_REQUESTS.include?(context.operation.name)
|
116
|
-
elsif context.config.api.metadata['endpointPrefix'] == 'cloudsearchdomain'
|
117
|
-
context.config.credentials.nil? || !context.config.credentials.set?
|
118
|
-
elsif context.config.api.metadata['endpointPrefix'] == 'cognito-identity'
|
119
|
-
COGNITO_IDENTITY_UNSIGNED_REQUESTS.include?(context.operation.name)
|
120
|
-
else
|
121
|
-
false
|
122
|
-
end
|
123
|
-
end
|
124
|
-
|
125
|
-
def apply_authtype(context)
|
126
|
-
if context.operation['authtype'].eql?('v4-unsigned-body') &&
|
127
|
-
context.http_request.endpoint.scheme.eql?('https')
|
128
|
-
context.http_request.headers['X-Amz-Content-Sha256'] = 'UNSIGNED-PAYLOAD'
|
129
|
-
end
|
130
|
-
context
|
131
|
-
end
|
132
|
-
|
133
|
-
end
|
134
|
-
|
135
|
-
def add_handlers(handlers, config)
|
136
|
-
# See the S3RequestSignerPlugin for Amazon S3 signature logic
|
137
|
-
unless config.sigv4_name == 's3'
|
138
|
-
operations = []
|
139
|
-
config.api.operation_names.each do |operation_name|
|
140
|
-
if config.api.operation(operation_name)['authtype'] != 'none'
|
141
|
-
operations << operation_name
|
142
|
-
end
|
143
|
-
end
|
144
|
-
handlers.add(Handler, step: :sign, operations: operations)
|
145
|
-
end
|
146
|
-
end
|
147
|
-
|
148
|
-
end
|
149
|
-
end
|
150
|
-
end
|
@@ -1,55 +0,0 @@
|
|
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, :delegation_set_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|delegationset)\//, '')
|
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
|
@@ -1,90 +0,0 @@
|
|
1
|
-
module Aws
|
2
|
-
module Plugins
|
3
|
-
|
4
|
-
# Provides support for using `Aws::S3::Client` with Amazon S3 Transfer
|
5
|
-
# Acceleration.
|
6
|
-
#
|
7
|
-
# Go here for more information about transfer acceleration:
|
8
|
-
# [http://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html](http://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html)
|
9
|
-
#
|
10
|
-
# @seahorse.client.option [Boolean] :use_accelerate_endpoint (false)
|
11
|
-
# When set to `true`, accelerated bucket endpoints will be used
|
12
|
-
# for all object operations. You must first enable
|
13
|
-
# accelerate for each bucket. [Go here for more information](http://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html).
|
14
|
-
#
|
15
|
-
class S3Accelerate < Seahorse::Client::Plugin
|
16
|
-
|
17
|
-
option(:use_accelerate_endpoint, false)
|
18
|
-
option(:use_dualstack_endpoint, false)
|
19
|
-
|
20
|
-
def add_handlers(handlers, config)
|
21
|
-
operations = config.api.operation_names - [
|
22
|
-
:create_bucket, :list_buckets, :delete_bucket,
|
23
|
-
]
|
24
|
-
handlers.add(OptionHandler, step: :initialize, operations: operations)
|
25
|
-
handlers.add(AccelerateHandler, step: :build, priority: 0, operations: operations)
|
26
|
-
end
|
27
|
-
|
28
|
-
# @api private
|
29
|
-
class OptionHandler < Seahorse::Client::Handler
|
30
|
-
def call(context)
|
31
|
-
accelerate = context.params.delete(:use_accelerate_endpoint)
|
32
|
-
accelerate = context.config.use_accelerate_endpoint if accelerate.nil?
|
33
|
-
context[:use_accelerate_endpoint] = accelerate
|
34
|
-
@handler.call(context)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
# @api private
|
39
|
-
class AccelerateHandler < Seahorse::Client::Handler
|
40
|
-
|
41
|
-
def call(context)
|
42
|
-
if context[:use_accelerate_endpoint]
|
43
|
-
if context[:use_dualstack_endpoint]
|
44
|
-
use_combined_accelerate_dualstack_endpoint(context)
|
45
|
-
else
|
46
|
-
use_accelerate_endpoint(context)
|
47
|
-
end
|
48
|
-
end
|
49
|
-
@handler.call(context)
|
50
|
-
end
|
51
|
-
|
52
|
-
private
|
53
|
-
|
54
|
-
def use_accelerate_endpoint(context)
|
55
|
-
bucket_name = context.params[:bucket]
|
56
|
-
validate_bucket_name!(bucket_name)
|
57
|
-
endpoint = URI.parse(context.http_request.endpoint.to_s)
|
58
|
-
endpoint.scheme = 'https'
|
59
|
-
endpoint.port = 443
|
60
|
-
endpoint.host = "#{bucket_name}.s3-accelerate.amazonaws.com"
|
61
|
-
context.http_request.endpoint = endpoint.to_s
|
62
|
-
end
|
63
|
-
|
64
|
-
def use_combined_accelerate_dualstack_endpoint(context)
|
65
|
-
bucket_name = context.params[:bucket]
|
66
|
-
validate_bucket_name!(bucket_name)
|
67
|
-
endpoint = URI.parse(context.http_request.endpoint.to_s)
|
68
|
-
endpoint.scheme = 'https'
|
69
|
-
endpoint.port = 443
|
70
|
-
endpoint.host = "#{bucket_name}.s3-accelerate.dualstack.amazonaws.com"
|
71
|
-
context.http_request.endpoint = endpoint.to_s
|
72
|
-
end
|
73
|
-
|
74
|
-
def validate_bucket_name!(bucket_name)
|
75
|
-
unless S3BucketDns.dns_compatible?(bucket_name, ssl = true)
|
76
|
-
msg = "unable to use `accelerate: true` on buckets with "
|
77
|
-
msg << "non-DNS compatible names"
|
78
|
-
raise ArgumentError, msg
|
79
|
-
end
|
80
|
-
if bucket_name.include?('.')
|
81
|
-
msg = "unable to use `accelerate: true` on buckets with dots"
|
82
|
-
msg << "in their name: #{bucket_name.inspect}"
|
83
|
-
raise ArgumentError, msg
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|
90
|
-
end
|
@@ -1,86 +0,0 @@
|
|
1
|
-
module Aws
|
2
|
-
module Plugins
|
3
|
-
|
4
|
-
# Amazon S3 requires DNS style addressing for buckets outside of
|
5
|
-
# the classic region when possible.
|
6
|
-
#
|
7
|
-
# @seahorse.client.option [Boolean] :force_path_style (false)
|
8
|
-
# When set to `true`, the bucket name is always left in the
|
9
|
-
# request URI and never moved to the host as a sub-domain.
|
10
|
-
#
|
11
|
-
class S3BucketDns < Seahorse::Client::Plugin
|
12
|
-
|
13
|
-
# When set to `false` DNS compatible bucket names are moved from
|
14
|
-
# the request URI path to the host as a subdomain, unless the request
|
15
|
-
# is using SSL and the bucket name contains a dot.
|
16
|
-
#
|
17
|
-
# When set to `true`, the bucket name is always forced to be part
|
18
|
-
# of the request URI path. This will not work with buckets outside
|
19
|
-
# the classic region.
|
20
|
-
option(:force_path_style, false)
|
21
|
-
|
22
|
-
def add_handlers(handlers, config)
|
23
|
-
handlers.add(Handler) unless config.force_path_style
|
24
|
-
end
|
25
|
-
|
26
|
-
# @api private
|
27
|
-
class Handler < Seahorse::Client::Handler
|
28
|
-
|
29
|
-
def call(context)
|
30
|
-
move_dns_compat_bucket_to_subdomain(context)
|
31
|
-
@handler.call(context)
|
32
|
-
end
|
33
|
-
|
34
|
-
private
|
35
|
-
|
36
|
-
def move_dns_compat_bucket_to_subdomain(context)
|
37
|
-
bucket_name = context.params[:bucket]
|
38
|
-
endpoint = context.http_request.endpoint
|
39
|
-
if
|
40
|
-
bucket_name &&
|
41
|
-
S3BucketDns.dns_compatible?(bucket_name, https?(endpoint)) &&
|
42
|
-
context.operation_name.to_s != 'get_bucket_location'
|
43
|
-
then
|
44
|
-
move_bucket_to_subdomain(bucket_name, endpoint)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
def move_bucket_to_subdomain(bucket_name, endpoint)
|
49
|
-
endpoint.host = "#{bucket_name}.#{endpoint.host}"
|
50
|
-
path = endpoint.path.sub("/#{bucket_name}", '')
|
51
|
-
path = "/#{path}" unless path.match(/^\//)
|
52
|
-
endpoint.path = path
|
53
|
-
end
|
54
|
-
|
55
|
-
def https?(uri)
|
56
|
-
uri.scheme == 'https'
|
57
|
-
end
|
58
|
-
|
59
|
-
end
|
60
|
-
|
61
|
-
class << self
|
62
|
-
|
63
|
-
# @param [String] bucket_name
|
64
|
-
# @param [Boolean] ssl
|
65
|
-
# @return [Boolean]
|
66
|
-
def dns_compatible?(bucket_name, ssl)
|
67
|
-
if valid_subdomain?(bucket_name)
|
68
|
-
bucket_name.match(/\./) && ssl ? false : true
|
69
|
-
else
|
70
|
-
false
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
private
|
75
|
-
|
76
|
-
def valid_subdomain?(bucket_name)
|
77
|
-
bucket_name.size < 64 &&
|
78
|
-
bucket_name =~ /^[a-z0-9][a-z0-9.-]+[a-z0-9]$/ &&
|
79
|
-
bucket_name !~ /(\d+\.){3}\d+/ &&
|
80
|
-
bucket_name !~ /[.-]{2}/
|
81
|
-
end
|
82
|
-
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
module Aws
|
2
|
-
module Plugins
|
3
|
-
# @api private
|
4
|
-
class S3BucketNameRestrictions < Seahorse::Client::Plugin
|
5
|
-
class Handler < Seahorse::Client::Handler
|
6
|
-
|
7
|
-
def call(context)
|
8
|
-
if context.params.key?(:bucket) && context.params[:bucket].include?('/')
|
9
|
-
msg = ":bucket option must not contain a forward-slash (/)"
|
10
|
-
raise ArgumentError, msg
|
11
|
-
end
|
12
|
-
@handler.call(context)
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
16
|
-
|
17
|
-
handler(Handler)
|
18
|
-
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,67 +0,0 @@
|
|
1
|
-
module Aws
|
2
|
-
module Plugins
|
3
|
-
|
4
|
-
# @api private
|
5
|
-
# @seahorse.client.option [Boolean] :use_dualstack_endpoint (false)
|
6
|
-
# When set to `true`, IPv6-compatible bucket endpoints will be used
|
7
|
-
# for all operations.
|
8
|
-
class S3Dualstack < Seahorse::Client::Plugin
|
9
|
-
|
10
|
-
option(:use_dualstack_endpoint, false)
|
11
|
-
option(:use_accelerate_endpoint, false)
|
12
|
-
|
13
|
-
def add_handlers(handlers, config)
|
14
|
-
handlers.add(OptionHandler, step: :initialize)
|
15
|
-
handlers.add(DualstackHandler, step: :build, priority: 0)
|
16
|
-
end
|
17
|
-
|
18
|
-
# @api private
|
19
|
-
class OptionHandler < Seahorse::Client::Handler
|
20
|
-
def call(context)
|
21
|
-
dualstack = context.params.delete(:use_dualstack_endpoint)
|
22
|
-
dualstack = context.config.use_dualstack_endpoint if dualstack.nil?
|
23
|
-
context[:use_dualstack_endpoint] = dualstack
|
24
|
-
@handler.call(context)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
# @api private
|
29
|
-
class DualstackHandler < Seahorse::Client::Handler
|
30
|
-
def call(context)
|
31
|
-
apply_dualstack_endpoint(context) if use_dualstack_endpoint?(context)
|
32
|
-
@handler.call(context)
|
33
|
-
end
|
34
|
-
|
35
|
-
private
|
36
|
-
def apply_dualstack_endpoint(context)
|
37
|
-
bucket_name = context.params[:bucket]
|
38
|
-
region = context.config.region
|
39
|
-
force_path_style = context.config.force_path_style
|
40
|
-
dns_suffix = EndpointProvider.dns_suffix_for(region)
|
41
|
-
|
42
|
-
if use_bucket_dns?(bucket_name, context)
|
43
|
-
host = "#{bucket_name}.s3.dualstack.#{region}.#{dns_suffix}"
|
44
|
-
else
|
45
|
-
host = "s3.dualstack.#{region}.#{dns_suffix}"
|
46
|
-
end
|
47
|
-
endpoint = URI.parse(context.http_request.endpoint.to_s)
|
48
|
-
endpoint.scheme = context.http_request.endpoint.scheme
|
49
|
-
endpoint.port = context.http_request.endpoint.port
|
50
|
-
endpoint.host = host
|
51
|
-
context.http_request.endpoint = endpoint.to_s
|
52
|
-
end
|
53
|
-
|
54
|
-
def use_bucket_dns?(bucket_name, context)
|
55
|
-
ssl = context.http_request.endpoint.scheme == "https"
|
56
|
-
bucket_name && S3BucketDns.dns_compatible?(bucket_name, ssl) &&
|
57
|
-
!context.config.force_path_style
|
58
|
-
end
|
59
|
-
|
60
|
-
def use_dualstack_endpoint?(context)
|
61
|
-
context[:use_dualstack_endpoint] && !context[:use_accelerate_endpoint]
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
@@ -1,27 +0,0 @@
|
|
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
|