aws-sdk-core 2.8.4 → 3.129.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +1287 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/ca-bundle.crt +3615 -3541
- data/lib/aws-defaults/default_configuration.rb +153 -0
- data/lib/aws-defaults/defaults_mode_config_resolver.rb +107 -0
- data/lib/aws-defaults.rb +3 -0
- data/lib/aws-sdk-core/arn.rb +92 -0
- data/lib/aws-sdk-core/arn_parser.rb +40 -0
- data/lib/aws-sdk-core/assume_role_credentials.rb +20 -0
- data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +109 -0
- data/lib/aws-sdk-core/async_client_stubs.rb +82 -0
- data/lib/aws-sdk-core/binary/decode_handler.rb +58 -0
- data/lib/aws-sdk-core/binary/encode_handler.rb +34 -0
- data/lib/aws-sdk-core/binary/event_builder.rb +124 -0
- data/lib/aws-sdk-core/binary/event_parser.rb +136 -0
- data/lib/aws-sdk-core/binary/event_stream_decoder.rb +64 -0
- data/lib/aws-sdk-core/binary/event_stream_encoder.rb +55 -0
- data/lib/aws-sdk-core/binary.rb +8 -0
- data/lib/aws-sdk-core/client_side_monitoring/publisher.rb +51 -0
- data/lib/aws-sdk-core/client_side_monitoring/request_metrics.rb +199 -0
- data/lib/aws-sdk-core/client_stubs.rb +69 -12
- data/lib/aws-sdk-core/credential_provider.rb +2 -29
- data/lib/aws-sdk-core/credential_provider_chain.rb +111 -32
- data/lib/aws-sdk-core/credentials.rb +2 -0
- data/lib/aws-sdk-core/deprecations.rb +17 -11
- data/lib/aws-sdk-core/eager_loader.rb +2 -0
- data/lib/aws-sdk-core/ec2_metadata.rb +238 -0
- data/lib/aws-sdk-core/ecs_credentials.rb +20 -11
- data/lib/aws-sdk-core/endpoint_cache.rb +193 -0
- data/lib/aws-sdk-core/errors.rb +227 -18
- data/lib/aws-sdk-core/event_emitter.rb +64 -0
- data/lib/aws-sdk-core/ini_parser.rb +3 -0
- data/lib/aws-sdk-core/instance_profile_credentials.rb +237 -45
- data/lib/aws-sdk-core/json/builder.rb +6 -2
- data/lib/aws-sdk-core/json/error_handler.rb +21 -2
- data/lib/aws-sdk-core/json/handler.rb +24 -3
- data/lib/aws-sdk-core/json/json_engine.rb +12 -8
- data/lib/aws-sdk-core/json/oj_engine.rb +35 -6
- data/lib/aws-sdk-core/json/parser.rb +11 -1
- data/lib/aws-sdk-core/json.rb +15 -33
- data/lib/aws-sdk-core/log/formatter.rb +16 -4
- data/lib/aws-sdk-core/log/handler.rb +2 -0
- data/lib/aws-sdk-core/log/param_filter.rb +41 -15
- data/lib/aws-sdk-core/log/param_formatter.rb +2 -0
- data/lib/aws-sdk-core/pageable_response.rb +112 -47
- data/lib/aws-sdk-core/pager.rb +35 -25
- data/lib/aws-sdk-core/param_converter.rb +5 -3
- data/lib/aws-sdk-core/param_validator.rb +109 -26
- data/lib/aws-sdk-core/plugins/api_key.rb +56 -0
- data/lib/aws-sdk-core/plugins/apig_authorizer_token.rb +32 -0
- data/lib/aws-sdk-core/plugins/apig_credentials_configuration.rb +36 -0
- data/lib/aws-sdk-core/plugins/apig_user_agent.rb +39 -0
- data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +340 -0
- data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +283 -0
- data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +86 -0
- data/lib/aws-sdk-core/plugins/credentials_configuration.rb +81 -0
- data/lib/aws-sdk-core/plugins/defaults_mode.rb +40 -0
- data/lib/aws-sdk-core/plugins/endpoint_discovery.rb +168 -0
- data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +65 -0
- data/lib/aws-sdk-core/plugins/event_stream_configuration.rb +32 -0
- data/lib/aws-sdk-core/plugins/global_configuration.rb +21 -10
- data/lib/aws-sdk-core/plugins/helpful_socket_errors.rb +2 -0
- data/lib/aws-sdk-core/plugins/http_checksum.rb +64 -0
- data/lib/aws-sdk-core/plugins/idempotency_token.rb +3 -2
- data/lib/aws-sdk-core/plugins/invocation_id.rb +35 -0
- data/lib/aws-sdk-core/plugins/jsonvalue_converter.rb +31 -0
- data/lib/aws-sdk-core/plugins/logging.rb +20 -18
- data/lib/aws-sdk-core/plugins/param_converter.rb +11 -5
- data/lib/aws-sdk-core/plugins/param_validator.rb +10 -5
- data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +29 -0
- data/lib/aws-sdk-core/plugins/protocols/ec2.rb +4 -1
- data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +15 -12
- data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
- data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +18 -1
- data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +2 -0
- data/lib/aws-sdk-core/plugins/recursion_detection.rb +27 -0
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +96 -28
- data/lib/aws-sdk-core/plugins/response_paging.rb +8 -19
- data/lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb +139 -0
- data/lib/aws-sdk-core/plugins/retries/clock_skew.rb +100 -0
- data/lib/aws-sdk-core/plugins/retries/error_inspector.rb +146 -0
- data/lib/aws-sdk-core/plugins/retries/retry_quota.rb +59 -0
- data/lib/aws-sdk-core/plugins/retry_errors.rb +342 -82
- data/lib/aws-sdk-core/plugins/signature_v2.rb +53 -0
- data/lib/aws-sdk-core/plugins/signature_v4.rb +144 -0
- data/lib/aws-sdk-core/plugins/stub_responses.rb +44 -18
- data/lib/aws-sdk-core/plugins/transfer_encoding.rb +53 -0
- data/lib/aws-sdk-core/plugins/user_agent.rb +25 -10
- data/lib/aws-sdk-core/process_credentials.rb +81 -0
- data/lib/aws-sdk-core/query/ec2_param_builder.rb +11 -3
- data/lib/aws-sdk-core/query/handler.rb +22 -16
- data/lib/aws-sdk-core/query/param.rb +2 -0
- data/lib/aws-sdk-core/query/param_builder.rb +12 -4
- data/lib/aws-sdk-core/query/param_list.rb +2 -0
- data/lib/aws-sdk-core/query.rb +7 -0
- data/lib/aws-sdk-core/refreshing_credentials.rb +16 -3
- data/lib/aws-sdk-core/resources/collection.rb +123 -0
- data/lib/aws-sdk-core/rest/handler.rb +3 -0
- data/lib/aws-sdk-core/rest/request/body.rb +21 -1
- data/lib/aws-sdk-core/rest/request/builder.rb +4 -1
- data/lib/aws-sdk-core/rest/request/endpoint.rb +13 -6
- data/lib/aws-sdk-core/rest/request/headers.rb +38 -5
- data/lib/aws-sdk-core/rest/request/querystring_builder.rb +17 -2
- data/lib/aws-sdk-core/rest/response/body.rb +16 -1
- data/lib/aws-sdk-core/rest/response/headers.rb +13 -1
- data/lib/aws-sdk-core/rest/response/parser.rb +20 -14
- data/lib/aws-sdk-core/rest/response/status_code.rb +2 -0
- data/lib/aws-sdk-core/rest.rb +12 -0
- data/lib/aws-sdk-core/shared_config.rb +205 -69
- data/lib/aws-sdk-core/shared_credentials.rb +11 -1
- data/lib/aws-sdk-core/sso_credentials.rb +136 -0
- data/lib/aws-sdk-core/structure.rb +33 -13
- data/lib/aws-sdk-core/stubbing/data_applicator.rb +3 -1
- data/lib/aws-sdk-core/stubbing/empty_stub.rb +12 -3
- data/lib/aws-sdk-core/stubbing/protocols/api_gateway.rb +10 -0
- data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +3 -1
- data/lib/aws-sdk-core/stubbing/protocols/json.rb +3 -1
- data/lib/aws-sdk-core/stubbing/protocols/query.rb +4 -2
- data/lib/aws-sdk-core/stubbing/protocols/rest.rb +120 -2
- data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +8 -2
- data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +11 -7
- data/lib/aws-sdk-core/stubbing/stub_data.rb +18 -3
- data/lib/aws-sdk-core/stubbing/xml_error.rb +2 -0
- data/lib/aws-sdk-core/type_builder.rb +2 -0
- data/lib/aws-sdk-core/util.rb +72 -0
- data/lib/aws-sdk-core/waiters/errors.rb +2 -0
- data/lib/aws-sdk-core/waiters/poller.rb +7 -9
- data/lib/aws-sdk-core/waiters/waiter.rb +5 -2
- data/lib/aws-sdk-core/waiters.rb +5 -0
- data/lib/aws-sdk-core/xml/builder.rb +15 -7
- data/lib/aws-sdk-core/xml/default_list.rb +2 -0
- data/lib/aws-sdk-core/xml/default_map.rb +2 -0
- data/lib/aws-sdk-core/xml/doc_builder.rb +15 -4
- data/lib/aws-sdk-core/xml/error_handler.rb +30 -6
- data/lib/aws-sdk-core/xml/parser/engines/libxml.rb +2 -0
- data/lib/aws-sdk-core/xml/parser/engines/nokogiri.rb +2 -0
- data/lib/aws-sdk-core/xml/parser/engines/oga.rb +2 -0
- data/lib/aws-sdk-core/xml/parser/engines/ox.rb +7 -1
- data/lib/aws-sdk-core/xml/parser/engines/rexml.rb +4 -1
- data/lib/aws-sdk-core/xml/parser/frame.rb +31 -6
- data/lib/aws-sdk-core/xml/parser/parsing_error.rb +2 -0
- data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
- data/lib/aws-sdk-core/xml/parser.rb +8 -11
- data/lib/aws-sdk-core/xml.rb +11 -0
- data/lib/aws-sdk-core.rb +112 -440
- data/lib/aws-sdk-sso/client.rb +570 -0
- data/lib/aws-sdk-sso/client_api.rb +190 -0
- data/lib/aws-sdk-sso/customizations.rb +1 -0
- data/lib/aws-sdk-sso/errors.rb +102 -0
- data/lib/aws-sdk-sso/resource.rb +26 -0
- data/lib/aws-sdk-sso/types.rb +352 -0
- data/lib/aws-sdk-sso.rb +55 -0
- data/lib/aws-sdk-sts/client.rb +2315 -0
- data/lib/aws-sdk-sts/client_api.rb +344 -0
- data/lib/aws-sdk-sts/customizations.rb +4 -0
- data/lib/aws-sdk-sts/errors.rb +166 -0
- data/lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb +38 -0
- data/lib/aws-sdk-sts/presigner.rb +75 -0
- data/lib/aws-sdk-sts/resource.rb +26 -0
- data/lib/aws-sdk-sts/types.rb +1673 -0
- data/lib/aws-sdk-sts.rb +55 -0
- data/lib/seahorse/client/async_base.rb +52 -0
- data/lib/seahorse/client/async_response.rb +64 -0
- data/lib/seahorse/client/base.rb +8 -9
- data/lib/seahorse/client/block_io.rb +6 -2
- data/lib/seahorse/client/configuration.rb +16 -2
- data/lib/seahorse/client/events.rb +3 -1
- data/lib/seahorse/client/h2/connection.rb +250 -0
- data/lib/seahorse/client/h2/handler.rb +152 -0
- data/lib/seahorse/client/handler.rb +2 -0
- data/lib/seahorse/client/handler_builder.rb +2 -0
- data/lib/seahorse/client/handler_list.rb +2 -0
- data/lib/seahorse/client/handler_list_entry.rb +6 -4
- data/lib/seahorse/client/http/async_response.rb +44 -0
- data/lib/seahorse/client/http/headers.rb +2 -0
- data/lib/seahorse/client/http/request.rb +5 -3
- data/lib/seahorse/client/http/response.rb +18 -11
- data/lib/seahorse/client/logging/formatter.rb +9 -1
- data/lib/seahorse/client/logging/handler.rb +4 -0
- data/lib/seahorse/client/managed_file.rb +2 -0
- data/lib/seahorse/client/net_http/connection_pool.rb +46 -27
- data/lib/seahorse/client/net_http/handler.rb +29 -7
- data/lib/seahorse/client/net_http/patches.rb +18 -79
- data/lib/seahorse/client/networking_error.rb +30 -0
- data/lib/seahorse/client/plugin.rb +69 -6
- data/lib/seahorse/client/plugin_list.rb +2 -0
- data/lib/seahorse/client/plugins/content_length.rb +14 -3
- data/lib/seahorse/client/plugins/endpoint.rb +16 -10
- data/lib/seahorse/client/plugins/h2.rb +69 -0
- data/lib/seahorse/client/plugins/logging.rb +19 -19
- data/lib/seahorse/client/plugins/net_http.rb +58 -14
- data/lib/seahorse/client/plugins/operation_methods.rb +2 -0
- data/lib/seahorse/client/plugins/raise_response_errors.rb +6 -4
- data/lib/seahorse/client/plugins/request_callback.rb +110 -0
- data/lib/seahorse/client/plugins/response_target.rb +28 -10
- data/lib/seahorse/client/request.rb +2 -0
- data/lib/seahorse/client/request_context.rb +7 -0
- data/lib/seahorse/client/response.rb +5 -5
- data/lib/seahorse/model/api.rb +43 -0
- data/lib/seahorse/model/authorizer.rb +23 -0
- data/lib/seahorse/model/operation.rb +28 -0
- data/lib/seahorse/model/shapes.rb +71 -2
- data/lib/seahorse/util.rb +9 -22
- data/lib/seahorse/version.rb +2 -0
- data/lib/seahorse.rb +63 -60
- metadata +132 -520
- 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 -4523
- 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 -511
- 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 -820
- data/apis/appstream/2016-12-01/examples-1.json +0 -5
- data/apis/appstream/2016-12-01/waiters-2.json +0 -55
- data/apis/autoscaling/2011-01-01/api-2.json +0 -2172
- data/apis/autoscaling/2011-01-01/examples-1.json +0 -1395
- 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 -885
- data/apis/batch/2016-08-10/examples-1.json +0 -589
- 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 -3033
- data/apis/clouddirectory/2016-05-10/examples-1.json +0 -5
- data/apis/clouddirectory/2016-05-10/paginators-1.json +0 -84
- data/apis/cloudformation/2010-05-15/api-2.json +0 -1428
- data/apis/cloudformation/2010-05-15/examples-1.json +0 -158
- data/apis/cloudformation/2010-05-15/paginators-1.json +0 -27
- data/apis/cloudformation/2010-05-15/resources-1.json +0 -211
- data/apis/cloudformation/2010-05-15/waiters-2.json +0 -157
- 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/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 -907
- 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 -702
- 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 -2300
- data/apis/codedeploy/2014-10-06/examples-1.json +0 -5
- data/apis/codedeploy/2014-10-06/paginators-1.json +0 -4
- 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/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 -3325
- data/apis/cognito-idp/2016-04-18/examples-1.json +0 -5
- data/apis/cognito-sync/2014-06-30/api-2.json +0 -1875
- data/apis/config/2014-11-12/api-2.json +0 -1417
- 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 -2031
- data/apis/devicefarm/2015-06-23/examples-1.json +0 -1242
- data/apis/devicefarm/2015-06-23/paginators-1.json +0 -74
- data/apis/directconnect/2012-10-25/api-2.json +0 -1347
- 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 -867
- data/apis/discovery/2015-11-01/examples-1.json +0 -5
- data/apis/dms/2016-01-01/api-2.json +0 -1505
- data/apis/dms/2016-01-01/examples-1.json +0 -5
- 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 -15373
- 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 -1625
- 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 -2474
- data/apis/elasticache/2015-02-02/examples-1.json +0 -2968
- 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 -1590
- 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 -1823
- data/apis/elasticloadbalancingv2/2015-12-01/examples-1.json +0 -1384
- data/apis/elasticloadbalancingv2/2015-12-01/paginators-1.json +0 -19
- data/apis/elasticmapreduce/2009-03-31/api-2.json +0 -1794
- data/apis/elasticmapreduce/2009-03-31/examples-1.json +0 -5
- data/apis/elasticmapreduce/2009-03-31/paginators-1.json +0 -32
- data/apis/elasticmapreduce/2009-03-31/waiters-2.json +0 -67
- 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/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 -644
- data/apis/events/2015-10-07/examples-1.json +0 -5
- 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 -2256
- 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/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 -4730
- 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 -1965
- data/apis/inspector/2016-02-16/examples-1.json +0 -1140
- data/apis/iot/2015-05-28/api-2.json +0 -4347
- data/apis/iot/2015-05-28/examples-1.json +0 -5
- 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 -18
- data/apis/kinesisanalytics/2015-08-14/api-2.json +0 -1049
- data/apis/kinesisanalytics/2015-08-14/examples-1.json +0 -5
- data/apis/kms/2014-11-01/api-2.json +0 -1492
- data/apis/kms/2014-11-01/examples-1.json +0 -862
- 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 -1514
- data/apis/lambda/2015-03-31/examples-1.json +0 -614
- data/apis/lambda/2015-03-31/paginators-1.json +0 -16
- data/apis/lightsail/2016-11-28/api-2.json +0 -2137
- data/apis/lightsail/2016-11-28/examples-1.json +0 -5
- 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 -170
- data/apis/marketplacecommerceanalytics/2015-07-01/examples-1.json +0 -5
- 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 -811
- 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 -2607
- 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 -1989
- data/apis/organizations/2016-11-28/examples-1.json +0 -1398
- data/apis/organizations/2016-11-28/paginators-1.json +0 -4
- data/apis/pinpoint/2016-12-01/api-2.json +0 -2753
- data/apis/pinpoint/2016-12-01/examples-1.json +0 -5
- data/apis/polly/2016-06-10/api-2.json +0 -504
- data/apis/polly/2016-06-10/examples-1.json +0 -171
- 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 -5098
- data/apis/rds/2014-10-31/examples-1.json +0 -1861
- 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 -3775
- 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 -844
- data/apis/rekognition/2016-06-27/examples-1.json +0 -651
- data/apis/rekognition/2016-06-27/paginators-1.json +0 -16
- 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/paginators-1.json +0 -17
- data/apis/runtime.lex/2016-11-28/api-2.json +0 -243
- 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 -5
- 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 -1955
- data/apis/servicecatalog/2015-12-10/examples-1.json +0 -5
- 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 -834
- 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 -986
- 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 -5296
- 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 -2551
- 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/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 -1781
- 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 -491
- data/apis/xray/2016-04-12/examples-1.json +0 -5
- 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 -261
- 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 -5
- data/lib/aws-sdk-core/appstream.rb +0 -6
- data/lib/aws-sdk-core/autoscaling.rb +0 -8
- data/lib/aws-sdk-core/batch.rb +0 -5
- 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 -59
- 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 -5
- 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/cognitoidentity.rb +0 -6
- data/lib/aws-sdk-core/cognitoidentityprovider.rb +0 -5
- 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 -5
- 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 -108
- 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 -6
- 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/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 -5
- data/lib/aws-sdk-core/iot.rb +0 -5
- 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 -5
- 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/lightsail.rb +0 -5
- data/lib/aws-sdk-core/machinelearning.rb +0 -7
- data/lib/aws-sdk-core/marketplacecommerceanalytics.rb +0 -5
- 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 -209
- 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 -142
- 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_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 -92
- 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 -13
- data/lib/aws-sdk-core/rds.rb +0 -8
- data/lib/aws-sdk-core/redshift.rb +0 -7
- data/lib/aws-sdk-core/rekognition.rb +0 -6
- data/lib/aws-sdk-core/route53.rb +0 -7
- data/lib/aws-sdk-core/route53domains.rb +0 -5
- 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 -5
- 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 -184
- 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 -5
- 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/version.rb +0 -3
- 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 -5
- data/lib/seahorse/client/plugins/restful_bindings.rb +0 -127
- data/service-models.json +0 -381
@@ -0,0 +1,146 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Aws
|
4
|
+
module Plugins
|
5
|
+
module Retries
|
6
|
+
# @api private
|
7
|
+
# This class will be obsolete when APIs contain modeled exceptions
|
8
|
+
class ErrorInspector
|
9
|
+
EXPIRED_CREDS = Set.new(
|
10
|
+
[
|
11
|
+
'InvalidClientTokenId', # query services
|
12
|
+
'UnrecognizedClientException', # json services
|
13
|
+
'InvalidAccessKeyId', # s3
|
14
|
+
'AuthFailure', # ec2
|
15
|
+
'InvalidIdentityToken', # sts
|
16
|
+
'ExpiredToken', # route53
|
17
|
+
'ExpiredTokenException' # kinesis
|
18
|
+
]
|
19
|
+
)
|
20
|
+
|
21
|
+
THROTTLING_ERRORS = Set.new(
|
22
|
+
[
|
23
|
+
'Throttling', # query services
|
24
|
+
'ThrottlingException', # json services
|
25
|
+
'ThrottledException', # sns
|
26
|
+
'RequestThrottled', # sqs
|
27
|
+
'RequestThrottledException', # generic service
|
28
|
+
'ProvisionedThroughputExceededException', # dynamodb
|
29
|
+
'TransactionInProgressException', # dynamodb
|
30
|
+
'RequestLimitExceeded', # ec2
|
31
|
+
'BandwidthLimitExceeded', # cloud search
|
32
|
+
'LimitExceededException', # kinesis
|
33
|
+
'TooManyRequestsException', # batch
|
34
|
+
'PriorRequestNotComplete', # route53
|
35
|
+
'SlowDown', # s3
|
36
|
+
'EC2ThrottledException' # ec2
|
37
|
+
]
|
38
|
+
)
|
39
|
+
|
40
|
+
CHECKSUM_ERRORS = Set.new(
|
41
|
+
[
|
42
|
+
'CRC32CheckFailed' # dynamodb
|
43
|
+
]
|
44
|
+
)
|
45
|
+
|
46
|
+
NETWORKING_ERRORS = Set.new(
|
47
|
+
[
|
48
|
+
'RequestTimeout', # s3
|
49
|
+
'InternalError', # s3
|
50
|
+
'RequestTimeoutException', # glacier
|
51
|
+
'IDPCommunicationError' # sts
|
52
|
+
]
|
53
|
+
)
|
54
|
+
|
55
|
+
# See: https://github.com/aws/aws-sdk-net/blob/5810dfe401e0eac2e59d02276d4b479224b4538e/sdk/src/Core/Amazon.Runtime/Pipeline/RetryHandler/RetryPolicy.cs#L78
|
56
|
+
CLOCK_SKEW_ERRORS = Set.new(
|
57
|
+
[
|
58
|
+
'RequestTimeTooSkewed',
|
59
|
+
'RequestExpired',
|
60
|
+
'InvalidSignatureException',
|
61
|
+
'SignatureDoesNotMatch',
|
62
|
+
'AuthFailure',
|
63
|
+
'RequestInTheFuture'
|
64
|
+
]
|
65
|
+
)
|
66
|
+
|
67
|
+
def initialize(error, http_status_code)
|
68
|
+
@error = error
|
69
|
+
@name = extract_name(@error)
|
70
|
+
@http_status_code = http_status_code
|
71
|
+
end
|
72
|
+
|
73
|
+
def expired_credentials?
|
74
|
+
!!(EXPIRED_CREDS.include?(@name) || @name.match(/expired/i))
|
75
|
+
end
|
76
|
+
|
77
|
+
def throttling_error?
|
78
|
+
!!(THROTTLING_ERRORS.include?(@name) ||
|
79
|
+
@name.match(/throttl/i) ||
|
80
|
+
@http_status_code == 429) ||
|
81
|
+
modeled_throttling?
|
82
|
+
end
|
83
|
+
|
84
|
+
def checksum?
|
85
|
+
CHECKSUM_ERRORS.include?(@name)
|
86
|
+
end
|
87
|
+
|
88
|
+
def networking?
|
89
|
+
@error.is_a?(Seahorse::Client::NetworkingError) ||
|
90
|
+
@error.is_a?(Errors::NoSuchEndpointError) ||
|
91
|
+
NETWORKING_ERRORS.include?(@name)
|
92
|
+
end
|
93
|
+
|
94
|
+
def server?
|
95
|
+
(500..599).cover?(@http_status_code)
|
96
|
+
end
|
97
|
+
|
98
|
+
def endpoint_discovery?(context)
|
99
|
+
return false unless context.operation.endpoint_discovery
|
100
|
+
|
101
|
+
@http_status_code == 421 ||
|
102
|
+
@name == 'InvalidEndpointException' ||
|
103
|
+
@error.is_a?(Errors::EndpointDiscoveryError)
|
104
|
+
end
|
105
|
+
|
106
|
+
def modeled_retryable?
|
107
|
+
@error.is_a?(Errors::ServiceError) && @error.retryable?
|
108
|
+
end
|
109
|
+
|
110
|
+
def modeled_throttling?
|
111
|
+
@error.is_a?(Errors::ServiceError) && @error.throttling?
|
112
|
+
end
|
113
|
+
|
114
|
+
def clock_skew?(context)
|
115
|
+
CLOCK_SKEW_ERRORS.include?(@name) &&
|
116
|
+
context.config.clock_skew.clock_skewed?(context)
|
117
|
+
end
|
118
|
+
|
119
|
+
def retryable?(context)
|
120
|
+
server? ||
|
121
|
+
modeled_retryable? ||
|
122
|
+
throttling_error? ||
|
123
|
+
networking? ||
|
124
|
+
checksum? ||
|
125
|
+
endpoint_discovery?(context) ||
|
126
|
+
(expired_credentials? && refreshable_credentials?(context)) ||
|
127
|
+
clock_skew?(context)
|
128
|
+
end
|
129
|
+
|
130
|
+
private
|
131
|
+
|
132
|
+
def refreshable_credentials?(context)
|
133
|
+
context.config.credentials.respond_to?(:refresh!)
|
134
|
+
end
|
135
|
+
|
136
|
+
def extract_name(error)
|
137
|
+
if error.is_a?(Errors::ServiceError)
|
138
|
+
error.class.code || error.class.name.to_s
|
139
|
+
else
|
140
|
+
error.class.name.to_s
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Aws
|
4
|
+
module Plugins
|
5
|
+
module Retries
|
6
|
+
|
7
|
+
# @api private
|
8
|
+
# Used in 'standard' and 'adaptive' retry modes.
|
9
|
+
class RetryQuota
|
10
|
+
INITIAL_RETRY_TOKENS = 500
|
11
|
+
RETRY_COST = 5
|
12
|
+
NO_RETRY_INCREMENT = 1
|
13
|
+
TIMEOUT_RETRY_COST = 10
|
14
|
+
|
15
|
+
def initialize(opts = {})
|
16
|
+
@mutex = Mutex.new
|
17
|
+
@max_capacity = opts.fetch(:max_capacity, INITIAL_RETRY_TOKENS)
|
18
|
+
@available_capacity = @max_capacity
|
19
|
+
end
|
20
|
+
|
21
|
+
# check if there is sufficient capacity to retry
|
22
|
+
# and return it. If there is insufficient capacity
|
23
|
+
# return 0
|
24
|
+
# @return [Integer] The amount of capacity checked out
|
25
|
+
def checkout_capacity(error_inspector)
|
26
|
+
@mutex.synchronize do
|
27
|
+
capacity_amount = if error_inspector.networking?
|
28
|
+
TIMEOUT_RETRY_COST
|
29
|
+
else
|
30
|
+
RETRY_COST
|
31
|
+
end
|
32
|
+
|
33
|
+
# unable to acquire capacity
|
34
|
+
return 0 if capacity_amount > @available_capacity
|
35
|
+
|
36
|
+
@available_capacity -= capacity_amount
|
37
|
+
capacity_amount
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
# capacity_amount refers to the amount of capacity requested from
|
42
|
+
# the last retry. It can either be RETRY_COST, TIMEOUT_RETRY_COST,
|
43
|
+
# or unset.
|
44
|
+
def release(capacity_amount)
|
45
|
+
# Implementation note: The release() method is called for
|
46
|
+
# every API call. In the common case where the request is
|
47
|
+
# successful and we're at full capacity, we can avoid locking.
|
48
|
+
# We can't exceed max capacity so there's no work we have to do.
|
49
|
+
return if @available_capacity == @max_capacity
|
50
|
+
|
51
|
+
@mutex.synchronize do
|
52
|
+
@available_capacity += capacity_amount || NO_RETRY_INCREMENT
|
53
|
+
@available_capacity = [@available_capacity, @max_capacity].min
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -1,93 +1,369 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'set'
|
4
|
+
require_relative 'retries/error_inspector'
|
5
|
+
require_relative 'retries/retry_quota'
|
6
|
+
require_relative 'retries/client_rate_limiter'
|
7
|
+
require_relative 'retries/clock_skew'
|
2
8
|
|
3
9
|
module Aws
|
4
10
|
module Plugins
|
5
|
-
|
6
|
-
# @seahorse.client.option [Integer] :retry_limit (3)
|
7
|
-
# The maximum number of times to retry failed requests. Only
|
8
|
-
# ~ 500 level server errors and certain ~ 400 level client errors
|
9
|
-
# are retried. Generally, these are throttling errors, data
|
10
|
-
# checksum errors, networking errors, timeout errors and auth
|
11
|
-
# errors from expired credentials.
|
11
|
+
# @api private
|
12
12
|
class RetryErrors < Seahorse::Client::Plugin
|
13
|
+
# BEGIN LEGACY OPTIONS
|
14
|
+
EQUAL_JITTER = ->(delay) { (delay / 2) + Kernel.rand(0..(delay / 2)) }
|
15
|
+
FULL_JITTER = ->(delay) { Kernel.rand(0..delay) }
|
16
|
+
NO_JITTER = ->(delay) { delay }
|
17
|
+
|
18
|
+
JITTERS = {
|
19
|
+
none: NO_JITTER,
|
20
|
+
equal: EQUAL_JITTER,
|
21
|
+
full: FULL_JITTER
|
22
|
+
}
|
23
|
+
|
24
|
+
JITTERS.default_proc = lambda { |h, k|
|
25
|
+
raise KeyError,
|
26
|
+
"#{k} is not a named jitter function. Must be one of #{h.keys}"
|
27
|
+
}
|
28
|
+
|
29
|
+
DEFAULT_BACKOFF = lambda do |c|
|
30
|
+
delay = 2**c.retries * c.config.retry_base_delay
|
31
|
+
if (c.config.retry_max_delay || 0) > 0
|
32
|
+
delay = [delay, c.config.retry_max_delay].min
|
33
|
+
end
|
34
|
+
jitter = c.config.retry_jitter
|
35
|
+
jitter = JITTERS[jitter] if jitter.is_a?(Symbol)
|
36
|
+
delay = jitter.call(delay) if jitter
|
37
|
+
Kernel.sleep(delay)
|
38
|
+
end
|
13
39
|
|
14
|
-
option(
|
40
|
+
option(
|
41
|
+
:retry_limit,
|
42
|
+
default: 3,
|
43
|
+
doc_type: Integer,
|
44
|
+
docstring: <<-DOCS)
|
45
|
+
The maximum number of times to retry failed requests. Only
|
46
|
+
~ 500 level server errors and certain ~ 400 level client errors
|
47
|
+
are retried. Generally, these are throttling errors, data
|
48
|
+
checksum errors, networking errors, timeout errors, auth errors,
|
49
|
+
endpoint discovery, and errors from expired credentials.
|
50
|
+
This option is only used in the `legacy` retry mode.
|
51
|
+
DOCS
|
52
|
+
|
53
|
+
option(
|
54
|
+
:retry_max_delay,
|
55
|
+
default: 0,
|
56
|
+
doc_type: Integer,
|
57
|
+
docstring: <<-DOCS)
|
58
|
+
The maximum number of seconds to delay between retries (0 for no limit)
|
59
|
+
used by the default backoff function. This option is only used in the
|
60
|
+
`legacy` retry mode.
|
61
|
+
DOCS
|
62
|
+
|
63
|
+
option(
|
64
|
+
:retry_base_delay,
|
65
|
+
default: 0.3,
|
66
|
+
doc_type: Float,
|
67
|
+
docstring: <<-DOCS)
|
68
|
+
The base delay in seconds used by the default backoff function. This option
|
69
|
+
is only used in the `legacy` retry mode.
|
70
|
+
DOCS
|
71
|
+
|
72
|
+
option(
|
73
|
+
:retry_jitter,
|
74
|
+
default: :none,
|
75
|
+
doc_type: Symbol,
|
76
|
+
docstring: <<-DOCS)
|
77
|
+
A delay randomiser function used by the default backoff function.
|
78
|
+
Some predefined functions can be referenced by name - :none, :equal, :full,
|
79
|
+
otherwise a Proc that takes and returns a number. This option is only used
|
80
|
+
in the `legacy` retry mode.
|
81
|
+
|
82
|
+
@see https://www.awsarchitectureblog.com/2015/03/backoff.html
|
83
|
+
DOCS
|
84
|
+
|
85
|
+
option(
|
86
|
+
:retry_backoff,
|
87
|
+
default: DEFAULT_BACKOFF,
|
88
|
+
doc_type: Proc,
|
89
|
+
docstring: <<-DOCS)
|
90
|
+
A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
91
|
+
This option is only used in the `legacy` retry mode.
|
92
|
+
DOCS
|
93
|
+
|
94
|
+
# END LEGACY OPTIONS
|
95
|
+
|
96
|
+
option(
|
97
|
+
:retry_mode,
|
98
|
+
default: 'legacy',
|
99
|
+
doc_type: String,
|
100
|
+
docstring: <<-DOCS) do |cfg|
|
101
|
+
Specifies which retry algorithm to use. Values are:
|
102
|
+
|
103
|
+
* `legacy` - The pre-existing retry behavior. This is default value if
|
104
|
+
no retry mode is provided.
|
105
|
+
|
106
|
+
* `standard` - A standardized set of retry rules across the AWS SDKs.
|
107
|
+
This includes support for retry quotas, which limit the number of
|
108
|
+
unsuccessful retries a client can make.
|
109
|
+
|
110
|
+
* `adaptive` - An experimental retry mode that includes all the
|
111
|
+
functionality of `standard` mode along with automatic client side
|
112
|
+
throttling. This is a provisional mode that may change behavior
|
113
|
+
in the future.
|
114
|
+
|
115
|
+
DOCS
|
116
|
+
resolve_retry_mode(cfg)
|
117
|
+
end
|
15
118
|
|
16
|
-
option(
|
119
|
+
option(
|
120
|
+
:max_attempts,
|
121
|
+
default: 3,
|
122
|
+
doc_type: Integer,
|
123
|
+
docstring: <<-DOCS) do |cfg|
|
124
|
+
An integer representing the maximum number attempts that will be made for
|
125
|
+
a single request, including the initial attempt. For example,
|
126
|
+
setting this value to 5 will result in a request being retried up to
|
127
|
+
4 times. Used in `standard` and `adaptive` retry modes.
|
128
|
+
DOCS
|
129
|
+
resolve_max_attempts(cfg)
|
130
|
+
end
|
17
131
|
|
18
|
-
|
19
|
-
|
132
|
+
option(
|
133
|
+
:adaptive_retry_wait_to_fill,
|
134
|
+
default: true,
|
135
|
+
doc_type: 'Boolean',
|
136
|
+
docstring: <<-DOCS) do |cfg|
|
137
|
+
Used only in `adaptive` retry mode. When true, the request will sleep
|
138
|
+
until there is sufficent client side capacity to retry the request.
|
139
|
+
When false, the request will raise a `RetryCapacityNotAvailableError` and will
|
140
|
+
not retry instead of sleeping.
|
141
|
+
DOCS
|
142
|
+
resolve_adaptive_retry_wait_to_fill(cfg)
|
143
|
+
end
|
20
144
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
145
|
+
option(
|
146
|
+
:correct_clock_skew,
|
147
|
+
default: true,
|
148
|
+
doc_type: 'Boolean',
|
149
|
+
docstring: <<-DOCS) do |cfg|
|
150
|
+
Used only in `standard` and adaptive retry modes. Specifies whether to apply
|
151
|
+
a clock skew correction and retry requests with skewed client clocks.
|
152
|
+
DOCS
|
153
|
+
resolve_correct_clock_skew(cfg)
|
154
|
+
end
|
27
155
|
|
28
|
-
|
29
|
-
|
30
|
-
'ThrottlingException', # json services
|
31
|
-
'RequestThrottled', # sqs
|
32
|
-
'ProvisionedThroughputExceededException', # dynamodb
|
33
|
-
'RequestLimitExceeded', # ec2
|
34
|
-
'BandwidthLimitExceeded', # cloud search
|
35
|
-
'LimitExceededException', # kinesis
|
36
|
-
])
|
156
|
+
# @api private undocumented
|
157
|
+
option(:client_rate_limiter) { Retries::ClientRateLimiter.new }
|
37
158
|
|
38
|
-
|
39
|
-
|
40
|
-
])
|
159
|
+
# @api private undocumented
|
160
|
+
option(:retry_quota) { Retries::RetryQuota.new }
|
41
161
|
|
42
|
-
|
43
|
-
|
44
|
-
])
|
162
|
+
# @api private undocumented
|
163
|
+
option(:clock_skew) { Retries::ClockSkew.new }
|
45
164
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
165
|
+
def self.resolve_retry_mode(cfg)
|
166
|
+
default_mode_value =
|
167
|
+
if cfg.respond_to?(:defaults_mode_config_resolver)
|
168
|
+
cfg.defaults_mode_config_resolver.resolve(:retry_mode)
|
169
|
+
end
|
51
170
|
|
52
|
-
|
53
|
-
|
171
|
+
value = ENV['AWS_RETRY_MODE'] ||
|
172
|
+
Aws.shared_config.retry_mode(profile: cfg.profile) ||
|
173
|
+
default_mode_value ||
|
174
|
+
'legacy'
|
175
|
+
# Raise if provided value is not one of the retry modes
|
176
|
+
if value != 'legacy' && value != 'standard' && value != 'adaptive'
|
177
|
+
raise ArgumentError,
|
178
|
+
'Must provide either `legacy`, `standard`, or `adaptive` for '\
|
179
|
+
'retry_mode profile option or for ENV[\'AWS_RETRY_MODE\']'
|
54
180
|
end
|
181
|
+
value
|
182
|
+
end
|
55
183
|
|
56
|
-
|
57
|
-
|
184
|
+
def self.resolve_max_attempts(cfg)
|
185
|
+
value = (ENV['AWS_MAX_ATTEMPTS']) ||
|
186
|
+
Aws.shared_config.max_attempts(profile: cfg.profile) ||
|
187
|
+
'3'
|
188
|
+
value = value.to_i
|
189
|
+
# Raise if provided value is not a positive integer
|
190
|
+
if value <= 0
|
191
|
+
raise ArgumentError,
|
192
|
+
'Must provide a positive integer for max_attempts profile '\
|
193
|
+
'option or for ENV[\'AWS_MAX_ATTEMPTS\']'
|
58
194
|
end
|
195
|
+
value
|
196
|
+
end
|
59
197
|
|
60
|
-
|
61
|
-
|
198
|
+
def self.resolve_adaptive_retry_wait_to_fill(cfg)
|
199
|
+
value = ENV['AWS_ADAPTIVE_RETRY_WAIT_TO_FILL'] ||
|
200
|
+
Aws.shared_config.adaptive_retry_wait_to_fill(profile: cfg.profile) ||
|
201
|
+
'true'
|
202
|
+
# Raise if provided value is not true or false
|
203
|
+
if value != 'true' && value != 'false'
|
204
|
+
raise ArgumentError,
|
205
|
+
'Must provide either `true` or `false` for '\
|
206
|
+
'adaptive_retry_wait_to_fill profile option or for '\
|
207
|
+
'ENV[\'AWS_ADAPTIVE_RETRY_WAIT_TO_FILL\']'
|
62
208
|
end
|
209
|
+
value == 'true'
|
210
|
+
end
|
63
211
|
|
64
|
-
|
65
|
-
|
66
|
-
|
212
|
+
def self.resolve_correct_clock_skew(cfg)
|
213
|
+
value = ENV['AWS_CORRECT_CLOCK_SKEW'] ||
|
214
|
+
Aws.shared_config.correct_clock_skew(profile: cfg.profile) ||
|
215
|
+
'true'
|
216
|
+
# Raise if provided value is not true or false
|
217
|
+
if value != 'true' && value != 'false'
|
218
|
+
raise ArgumentError,
|
219
|
+
'Must provide either `true` or `false` for '\
|
220
|
+
'correct_clock_skew profile option or for '\
|
221
|
+
'ENV[\'AWS_CORRECT_CLOCK_SKEW\']'
|
67
222
|
end
|
223
|
+
value == 'true'
|
224
|
+
end
|
225
|
+
|
226
|
+
class Handler < Seahorse::Client::Handler
|
227
|
+
# Max backoff (in seconds)
|
228
|
+
MAX_BACKOFF = 20
|
229
|
+
|
230
|
+
def call(context)
|
231
|
+
context.metadata[:retries] ||= {}
|
232
|
+
config = context.config
|
68
233
|
|
69
|
-
|
70
|
-
(
|
234
|
+
get_send_token(config)
|
235
|
+
add_retry_headers(context)
|
236
|
+
response = @handler.call(context)
|
237
|
+
error_inspector = Retries::ErrorInspector.new(
|
238
|
+
response.error, response.context.http_response.status_code
|
239
|
+
)
|
240
|
+
|
241
|
+
request_bookkeeping(context, response, error_inspector)
|
242
|
+
|
243
|
+
if error_inspector.endpoint_discovery?(context)
|
244
|
+
key = config.endpoint_cache.extract_key(context)
|
245
|
+
config.endpoint_cache.delete(key)
|
246
|
+
end
|
247
|
+
|
248
|
+
# Clock correction needs to be updated from the response even when
|
249
|
+
# the request is not retryable but should only be updated
|
250
|
+
# in the case of clock skew errors
|
251
|
+
if error_inspector.clock_skew?(context)
|
252
|
+
config.clock_skew.update_clock_correction(context)
|
253
|
+
end
|
254
|
+
|
255
|
+
# Estimated skew needs to be updated on every request
|
256
|
+
config.clock_skew.update_estimated_skew(context)
|
257
|
+
|
258
|
+
return response unless retryable?(context, response, error_inspector)
|
259
|
+
|
260
|
+
return response if context.retries >= config.max_attempts - 1
|
261
|
+
|
262
|
+
context.metadata[:retries][:capacity_amount] =
|
263
|
+
config.retry_quota.checkout_capacity(error_inspector)
|
264
|
+
return response unless context.metadata[:retries][:capacity_amount] > 0
|
265
|
+
|
266
|
+
delay = exponential_backoff(context.retries)
|
267
|
+
Kernel.sleep(delay)
|
268
|
+
retry_request(context, error_inspector)
|
71
269
|
end
|
72
270
|
|
73
271
|
private
|
74
272
|
|
75
|
-
def
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
273
|
+
def get_send_token(config)
|
274
|
+
# either fail fast or block until a token becomes available
|
275
|
+
# must be configurable
|
276
|
+
# need a maximum rate at which we can send requests (max_send_rate)
|
277
|
+
# is unset until a throttle is seen
|
278
|
+
if config.retry_mode == 'adaptive'
|
279
|
+
config.client_rate_limiter.token_bucket_acquire(
|
280
|
+
1,
|
281
|
+
config.adaptive_retry_wait_to_fill
|
282
|
+
)
|
283
|
+
end
|
284
|
+
end
|
285
|
+
|
286
|
+
# maxsendrate is updated if on adaptive mode and based on response
|
287
|
+
# retry quota is updated if the request is successful (both modes)
|
288
|
+
def request_bookkeeping(context, response, error_inspector)
|
289
|
+
config = context.config
|
290
|
+
if response.successful?
|
291
|
+
config.retry_quota.release(
|
292
|
+
context.metadata[:retries][:capacity_amount]
|
293
|
+
)
|
294
|
+
end
|
295
|
+
|
296
|
+
if config.retry_mode == 'adaptive'
|
297
|
+
is_throttling_error = error_inspector.throttling_error?
|
298
|
+
config.client_rate_limiter.update_sending_rate(is_throttling_error)
|
80
299
|
end
|
81
300
|
end
|
82
301
|
|
302
|
+
def retryable?(context, response, error_inspector)
|
303
|
+
return false if response.successful?
|
304
|
+
|
305
|
+
error_inspector.retryable?(context) &&
|
306
|
+
context.http_response.body.respond_to?(:truncate)
|
307
|
+
end
|
308
|
+
|
309
|
+
def exponential_backoff(retries)
|
310
|
+
# for a transient error, use backoff
|
311
|
+
[Kernel.rand * 2**retries, MAX_BACKOFF].min
|
312
|
+
end
|
313
|
+
|
314
|
+
def retry_request(context, error)
|
315
|
+
context.retries += 1
|
316
|
+
context.config.credentials.refresh! if error.expired_credentials?
|
317
|
+
context.http_request.body.rewind
|
318
|
+
context.http_response.reset
|
319
|
+
call(context)
|
320
|
+
end
|
321
|
+
|
322
|
+
def add_retry_headers(context)
|
323
|
+
request_pairs = {
|
324
|
+
'attempt' => context.retries,
|
325
|
+
'max' => context.config.max_attempts
|
326
|
+
}
|
327
|
+
if (ttl = compute_request_ttl(context))
|
328
|
+
request_pairs['ttl'] = ttl
|
329
|
+
end
|
330
|
+
|
331
|
+
# create the request header
|
332
|
+
formatted_header = request_pairs.map { |k, v| "#{k}=#{v}" }.join('; ')
|
333
|
+
context.http_request.headers['amz-sdk-request'] = formatted_header
|
334
|
+
end
|
335
|
+
|
336
|
+
def compute_request_ttl(context)
|
337
|
+
return if context.operation.async
|
338
|
+
|
339
|
+
endpoint = context.http_request.endpoint
|
340
|
+
estimated_skew = context.config.clock_skew.estimated_skew(endpoint)
|
341
|
+
if context.config.respond_to?(:http_read_timeout)
|
342
|
+
read_timeout = context.config.http_read_timeout
|
343
|
+
end
|
344
|
+
|
345
|
+
if estimated_skew && read_timeout
|
346
|
+
(Time.now.utc + read_timeout + estimated_skew)
|
347
|
+
.strftime('%Y%m%dT%H%M%SZ')
|
348
|
+
end
|
349
|
+
end
|
83
350
|
end
|
84
351
|
|
85
|
-
class
|
352
|
+
class LegacyHandler < Seahorse::Client::Handler
|
86
353
|
|
87
354
|
def call(context)
|
88
355
|
response = @handler.call(context)
|
89
356
|
if response.error
|
90
|
-
|
357
|
+
error_inspector = Retries::ErrorInspector.new(
|
358
|
+
response.error, response.context.http_response.status_code
|
359
|
+
)
|
360
|
+
|
361
|
+
if error_inspector.endpoint_discovery?(context)
|
362
|
+
key = context.config.endpoint_cache.extract_key(context)
|
363
|
+
context.config.endpoint_cache.delete(key)
|
364
|
+
end
|
365
|
+
|
366
|
+
retry_if_possible(response, error_inspector)
|
91
367
|
else
|
92
368
|
response
|
93
369
|
end
|
@@ -95,21 +371,15 @@ module Aws
|
|
95
371
|
|
96
372
|
private
|
97
373
|
|
98
|
-
def retry_if_possible(response)
|
374
|
+
def retry_if_possible(response, error_inspector)
|
99
375
|
context = response.context
|
100
|
-
|
101
|
-
|
102
|
-
retry_request(context, error)
|
376
|
+
if should_retry?(context, error_inspector)
|
377
|
+
retry_request(context, error_inspector)
|
103
378
|
else
|
104
379
|
response
|
105
380
|
end
|
106
381
|
end
|
107
382
|
|
108
|
-
def error_for(response)
|
109
|
-
status_code = response.context.http_response.status_code
|
110
|
-
ErrorInspector.new(response.error, status_code)
|
111
|
-
end
|
112
|
-
|
113
383
|
def retry_request(context, error)
|
114
384
|
delay_retry(context)
|
115
385
|
context.retries += 1
|
@@ -124,21 +394,9 @@ module Aws
|
|
124
394
|
end
|
125
395
|
|
126
396
|
def should_retry?(context, error)
|
127
|
-
retryable?(context
|
128
|
-
|
129
|
-
|
130
|
-
end
|
131
|
-
|
132
|
-
def retryable?(context, error)
|
133
|
-
(error.expired_credentials? and refreshable_credentials?(context)) or
|
134
|
-
error.throttling_error? or
|
135
|
-
error.checksum? or
|
136
|
-
error.networking? or
|
137
|
-
error.server?
|
138
|
-
end
|
139
|
-
|
140
|
-
def refreshable_credentials?(context)
|
141
|
-
context.config.credentials.respond_to?(:refresh!)
|
397
|
+
error.retryable?(context) &&
|
398
|
+
context.retries < retry_limit(context) &&
|
399
|
+
response_truncatable?(context)
|
142
400
|
end
|
143
401
|
|
144
402
|
def retry_limit(context)
|
@@ -148,15 +406,17 @@ module Aws
|
|
148
406
|
def response_truncatable?(context)
|
149
407
|
context.http_response.body.respond_to?(:truncate)
|
150
408
|
end
|
151
|
-
|
152
409
|
end
|
153
410
|
|
154
411
|
def add_handlers(handlers, config)
|
155
|
-
if config.
|
412
|
+
if config.retry_mode == 'legacy'
|
413
|
+
if config.retry_limit > 0
|
414
|
+
handlers.add(LegacyHandler, step: :sign, priority: 99)
|
415
|
+
end
|
416
|
+
else
|
156
417
|
handlers.add(Handler, step: :sign, priority: 99)
|
157
418
|
end
|
158
419
|
end
|
159
|
-
|
160
420
|
end
|
161
421
|
end
|
162
422
|
end
|