aws-sdk-core 2.3.23 → 3.89.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/VERSION +1 -0
- data/ca-bundle.crt +3615 -3541
- data/lib/aws-sdk-core.rb +106 -404
- data/lib/aws-sdk-core/arn.rb +77 -0
- data/lib/aws-sdk-core/arn_parser.rb +38 -0
- data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +101 -0
- data/lib/aws-sdk-core/async_client_stubs.rb +80 -0
- data/lib/aws-sdk-core/binary.rb +6 -0
- data/lib/aws-sdk-core/binary/decode_handler.rb +56 -0
- data/lib/aws-sdk-core/binary/encode_handler.rb +32 -0
- data/lib/aws-sdk-core/binary/event_builder.rb +122 -0
- data/lib/aws-sdk-core/binary/event_parser.rb +134 -0
- data/lib/aws-sdk-core/binary/event_stream_decoder.rb +62 -0
- data/lib/aws-sdk-core/binary/event_stream_encoder.rb +53 -0
- data/lib/aws-sdk-core/client_side_monitoring/publisher.rb +49 -0
- data/lib/aws-sdk-core/client_side_monitoring/request_metrics.rb +197 -0
- data/lib/aws-sdk-core/client_stubs.rb +73 -10
- data/lib/aws-sdk-core/credential_provider.rb +0 -29
- data/lib/aws-sdk-core/credential_provider_chain.rb +56 -6
- data/lib/aws-sdk-core/deprecations.rb +16 -10
- data/lib/aws-sdk-core/ecs_credentials.rb +14 -10
- data/lib/aws-sdk-core/endpoint_cache.rb +191 -0
- data/lib/aws-sdk-core/errors.rb +221 -11
- data/lib/aws-sdk-core/event_emitter.rb +62 -0
- data/lib/aws-sdk-core/ini_parser.rb +41 -0
- data/lib/aws-sdk-core/instance_profile_credentials.rb +133 -42
- data/lib/aws-sdk-core/json.rb +9 -10
- data/lib/aws-sdk-core/json/builder.rb +4 -2
- data/lib/aws-sdk-core/json/error_handler.rb +19 -2
- data/lib/aws-sdk-core/json/handler.rb +22 -3
- data/lib/aws-sdk-core/json/parser.rb +1 -1
- data/lib/aws-sdk-core/log/formatter.rb +7 -1
- 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 +60 -26
- data/lib/aws-sdk-core/plugins/api_key.rb +52 -0
- data/lib/aws-sdk-core/plugins/apig_authorizer_token.rb +30 -0
- data/lib/aws-sdk-core/plugins/apig_credentials_configuration.rb +34 -0
- data/lib/aws-sdk-core/plugins/apig_user_agent.rb +37 -0
- data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +280 -0
- data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +84 -0
- data/lib/aws-sdk-core/plugins/credentials_configuration.rb +62 -0
- data/lib/aws-sdk-core/plugins/endpoint_discovery.rb +160 -0
- data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +63 -0
- data/lib/aws-sdk-core/plugins/event_stream_configuration.rb +30 -0
- data/lib/aws-sdk-core/plugins/global_configuration.rb +19 -10
- data/lib/aws-sdk-core/plugins/helpful_socket_errors.rb +41 -0
- data/lib/aws-sdk-core/plugins/idempotency_token.rb +36 -0
- data/lib/aws-sdk-core/plugins/invocation_id.rb +33 -0
- data/lib/aws-sdk-core/plugins/jsonvalue_converter.rb +29 -0
- 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/api_gateway.rb +10 -0
- 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 +48 -19
- data/lib/aws-sdk-core/plugins/response_paging.rb +5 -18
- data/lib/aws-sdk-core/plugins/retry_errors.rb +102 -24
- data/lib/aws-sdk-core/plugins/signature_v2.rb +51 -0
- data/lib/aws-sdk-core/plugins/signature_v4.rb +141 -0
- data/lib/aws-sdk-core/plugins/stub_responses.rb +35 -18
- data/lib/aws-sdk-core/plugins/transfer_encoding.rb +53 -0
- data/lib/aws-sdk-core/plugins/user_agent.rb +23 -10
- data/lib/aws-sdk-core/process_credentials.rb +80 -0
- data/lib/aws-sdk-core/query.rb +5 -0
- data/lib/aws-sdk-core/query/ec2_param_builder.rb +9 -3
- data/lib/aws-sdk-core/query/handler.rb +20 -16
- data/lib/aws-sdk-core/query/param_builder.rb +10 -4
- data/lib/aws-sdk-core/refreshing_credentials.rb +1 -1
- data/lib/aws-sdk-core/resources/collection.rb +121 -0
- data/lib/aws-sdk-core/rest.rb +10 -0
- data/lib/aws-sdk-core/rest/handler.rb +1 -0
- data/lib/aws-sdk-core/rest/request/builder.rb +2 -1
- data/lib/aws-sdk-core/rest/request/endpoint.rb +11 -66
- data/lib/aws-sdk-core/rest/request/headers.rb +20 -1
- data/lib/aws-sdk-core/rest/request/querystring_builder.rb +103 -0
- data/lib/aws-sdk-core/rest/response/body.rb +14 -1
- data/lib/aws-sdk-core/rest/response/headers.rb +9 -0
- data/lib/aws-sdk-core/rest/response/parser.rb +18 -14
- data/lib/aws-sdk-core/shared_config.rb +451 -0
- data/lib/aws-sdk-core/shared_credentials.rb +16 -53
- data/lib/aws-sdk-core/structure.rb +22 -13
- data/lib/aws-sdk-core/stubbing/data_applicator.rb +1 -1
- data/lib/aws-sdk-core/stubbing/empty_stub.rb +10 -3
- data/lib/aws-sdk-core/stubbing/protocols/api_gateway.rb +8 -0
- data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +1 -1
- data/lib/aws-sdk-core/stubbing/protocols/rest.rb +99 -1
- data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +5 -1
- data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +9 -5
- data/lib/aws-sdk-core/stubbing/stub_data.rb +16 -3
- data/lib/aws-sdk-core/util.rb +66 -0
- data/lib/aws-sdk-core/waiters.rb +3 -0
- data/lib/aws-sdk-core/waiters/poller.rb +5 -7
- data/lib/aws-sdk-core/waiters/waiter.rb +3 -2
- data/lib/aws-sdk-core/xml.rb +9 -0
- data/lib/aws-sdk-core/xml/builder.rb +11 -5
- data/lib/aws-sdk-core/xml/error_handler.rb +27 -5
- data/lib/aws-sdk-core/xml/parser.rb +1 -11
- data/lib/aws-sdk-core/xml/parser/engines/ox.rb +5 -1
- data/lib/aws-sdk-core/xml/parser/frame.rb +6 -6
- data/lib/aws-sdk-sts.rb +45 -0
- data/lib/aws-sdk-sts/client.rb +2156 -0
- data/lib/aws-sdk-sts/client_api.rb +336 -0
- data/lib/aws-sdk-sts/customizations.rb +2 -0
- data/lib/aws-sdk-sts/errors.rb +142 -0
- data/lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb +32 -0
- data/lib/aws-sdk-sts/presigner.rb +67 -0
- data/lib/aws-sdk-sts/resource.rb +23 -0
- data/lib/aws-sdk-sts/types.rb +1504 -0
- data/lib/seahorse.rb +60 -60
- data/lib/seahorse/client/async_base.rb +50 -0
- data/lib/seahorse/client/async_response.rb +62 -0
- data/lib/seahorse/client/base.rb +5 -9
- data/lib/seahorse/client/configuration.rb +10 -2
- data/lib/seahorse/client/events.rb +1 -1
- data/lib/seahorse/client/h2/connection.rb +246 -0
- data/lib/seahorse/client/h2/handler.rb +151 -0
- data/lib/seahorse/client/handler_list_entry.rb +2 -2
- data/lib/seahorse/client/http/async_response.rb +42 -0
- data/lib/seahorse/client/http/response.rb +13 -8
- data/lib/seahorse/client/logging/formatter.rb +7 -1
- data/lib/seahorse/client/logging/handler.rb +2 -0
- data/lib/seahorse/client/net_http/connection_pool.rb +46 -28
- data/lib/seahorse/client/net_http/handler.rb +17 -3
- data/lib/seahorse/client/net_http/patches.rb +9 -1
- data/lib/seahorse/client/networking_error.rb +28 -0
- data/lib/seahorse/client/plugin.rb +67 -6
- data/lib/seahorse/client/plugin_list.rb +3 -1
- data/lib/seahorse/client/plugins/content_length.rb +7 -2
- data/lib/seahorse/client/plugins/endpoint.rb +14 -10
- data/lib/seahorse/client/plugins/h2.rb +64 -0
- 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 +10 -1
- data/lib/seahorse/client/request_context.rb +5 -0
- data/lib/seahorse/client/response.rb +9 -20
- data/lib/seahorse/model/api.rb +37 -0
- data/lib/seahorse/model/authorizer.rb +21 -0
- data/lib/seahorse/model/operation.rb +20 -0
- data/lib/seahorse/model/shapes.rb +44 -2
- data/lib/seahorse/util.rb +1 -21
- metadata +127 -360
- data/apis/acm/2015-12-08/api-2.json +0 -495
- 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 -3347
- data/apis/apigateway/2015-07-09/examples-1.json +0 -5
- data/apis/apigateway/2015-07-09/paginators-1.json +0 -52
- data/apis/application-autoscaling/2016-02-06/api-2.json +0 -502
- data/apis/application-autoscaling/2016-02-06/examples-1.json +0 -5
- data/apis/application-autoscaling/2016-02-06/paginators-1.json +0 -22
- data/apis/autoscaling/2011-01-01/api-2.json +0 -2038
- data/apis/autoscaling/2011-01-01/examples-1.json +0 -5
- data/apis/autoscaling/2011-01-01/paginators-1.json +0 -52
- data/apis/autoscaling/2011-01-01/resources-1.json +0 -1613
- data/apis/autoscaling/2011-01-01/waiters-2.json +0 -62
- data/apis/cloudformation/2010-05-15/api-2.json +0 -1299
- data/apis/cloudformation/2010-05-15/examples-1.json +0 -5
- data/apis/cloudformation/2010-05-15/paginators-1.json +0 -27
- data/apis/cloudformation/2010-05-15/resources-1.json +0 -202
- data/apis/cloudformation/2010-05-15/waiters-2.json +0 -235
- data/apis/cloudfront/2016-01-28/api-2.json +0 -2218
- 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/cloudhsm/2014-05-30/api-2.json +0 -877
- data/apis/cloudhsm/2014-05-30/examples-1.json +0 -5
- data/apis/cloudsearch/2013-01-01/api-2.json +0 -2001
- data/apis/cloudsearch/2013-01-01/paginators-1.json +0 -20
- data/apis/cloudsearchdomain/2013-01-01/api-2.json +0 -373
- data/apis/cloudsearchdomain/2013-01-01/examples-1.json +0 -5
- data/apis/cloudtrail/2013-11-01/api-2.json +0 -801
- data/apis/cloudtrail/2013-11-01/examples-1.json +0 -5
- data/apis/cloudtrail/2013-11-01/paginators-1.json +0 -7
- data/apis/codecommit/2015-04-13/api-2.json +0 -916
- data/apis/codecommit/2015-04-13/examples-1.json +0 -5
- data/apis/codecommit/2015-04-13/paginators-1.json +0 -14
- data/apis/codedeploy/2014-10-06/api-2.json +0 -1954
- data/apis/codedeploy/2014-10-06/examples-1.json +0 -5
- data/apis/codedeploy/2014-10-06/paginators-1.json +0 -34
- data/apis/codepipeline/2015-07-09/api-2.json +0 -1633
- data/apis/codepipeline/2015-07-09/examples-1.json +0 -902
- data/apis/cognito-identity/2014-06-30/api-2.json +0 -859
- data/apis/cognito-identity/2014-06-30/examples-1.json +0 -5
- data/apis/cognito-idp/2016-04-18/api-2.json +0 -1657
- data/apis/cognito-idp/2016-04-18/examples-1.json +0 -5
- data/apis/cognito-sync/2014-06-30/api-2.json +0 -1874
- data/apis/config/2014-11-12/api-2.json +0 -1303
- data/apis/config/2014-11-12/examples-1.json +0 -5
- data/apis/config/2014-11-12/paginators-1.json +0 -10
- data/apis/datapipeline/2012-10-29/api-2.json +0 -1167
- data/apis/datapipeline/2012-10-29/paginators-1.json +0 -26
- data/apis/devicefarm/2015-06-23/api-2.json +0 -1819
- data/apis/devicefarm/2015-06-23/examples-1.json +0 -5
- data/apis/devicefarm/2015-06-23/paginators-1.json +0 -74
- data/apis/directconnect/2012-10-25/api-2.json +0 -793
- 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 -556
- data/apis/discovery/2015-11-01/examples-1.json +0 -5
- data/apis/dms/2016-01-01/api-2.json +0 -1469
- data/apis/dms/2016-01-01/examples-1.json +0 -5
- data/apis/ds/2015-04-16/api-2.json +0 -1674
- data/apis/ds/2015-04-16/examples-1.json +0 -5
- data/apis/dynamodb/2012-08-10/api-2.json +0 -1200
- data/apis/dynamodb/2012-08-10/examples-1.json +0 -5
- 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 -13759
- 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 -13842
- data/apis/ec2/2016-04-01/examples-1.json +0 -5
- 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/ecr/2015-09-21/api-2.json +0 -849
- data/apis/ecr/2015-09-21/examples-1.json +0 -5
- data/apis/ecs/2014-11-13/api-2.json +0 -1396
- data/apis/ecs/2014-11-13/examples-1.json +0 -5
- 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 -2426
- data/apis/elasticache/2015-02-02/examples-1.json +0 -5
- 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 -1894
- 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 -713
- data/apis/elasticfilesystem/2015-02-01/examples-1.json +0 -5
- data/apis/elasticloadbalancing/2012-06-01/api-2.json +0 -2145
- data/apis/elasticloadbalancing/2012-06-01/paginators-1.json +0 -18
- data/apis/elasticloadbalancing/2012-06-01/waiters-2.json +0 -49
- data/apis/elasticmapreduce/2009-03-31/api-2.json +0 -1341
- 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 -1807
- 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 -1791
- data/apis/email/2010-12-01/examples-1.json +0 -5
- 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 -764
- data/apis/events/2015-10-07/api-2.json +0 -643
- data/apis/events/2015-10-07/examples-1.json +0 -5
- data/apis/firehose/2015-08-04/api-2.json +0 -719
- data/apis/gamelift/2015-10-01/api-2.json +0 -2307
- data/apis/gamelift/2015-10-01/examples-1.json +0 -5
- data/apis/glacier/2012-06-01/api-2.json +0 -2144
- 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/iam/2010-05-08/api-2.json +0 -4514
- data/apis/iam/2010-05-08/examples-1.json +0 -5
- 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 -666
- data/apis/importexport/2010-06-01/paginators-1.json +0 -11
- data/apis/inspector/2016-02-16/api-2.json +0 -1964
- data/apis/inspector/2016-02-16/examples-1.json +0 -5
- data/apis/iot-data/2015-05-28/api-2.json +0 -263
- data/apis/iot/2015-05-28/api-2.json +0 -3800
- data/apis/iot/2015-05-28/examples-1.json +0 -5
- data/apis/kinesis/2013-12-02/api-2.json +0 -822
- 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/kms/2014-11-01/api-2.json +0 -1209
- data/apis/kms/2014-11-01/examples-1.json +0 -5
- data/apis/kms/2014-11-01/paginators-1.json +0 -32
- data/apis/lambda/2014-11-11/api-2.json +0 -667
- data/apis/lambda/2014-11-11/paginators-1.json +0 -16
- data/apis/lambda/2015-03-31/api-2.json +0 -1342
- data/apis/lambda/2015-03-31/examples-1.json +0 -5
- data/apis/lambda/2015-03-31/paginators-1.json +0 -16
- data/apis/logs/2014-03-28/api-2.json +0 -1138
- 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 -1947
- 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 -120
- data/apis/marketplacecommerceanalytics/2015-07-01/examples-1.json +0 -5
- data/apis/meteringmarketplace/2016-01-14/api-2.json +0 -127
- data/apis/meteringmarketplace/2016-01-14/examples-1.json +0 -5
- data/apis/monitoring/2010-08-01/api-2.json +0 -790
- 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/opsworks/2013-02-18/api-2.json +0 -2606
- 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/rds/2014-10-31/api-2.json +0 -4757
- data/apis/rds/2014-10-31/examples-1.json +0 -5
- 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 -102
- data/apis/redshift/2012-12-01/api-2.json +0 -3768
- 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/route53/2013-04-01/api-2.json +0 -3245
- data/apis/route53/2013-04-01/examples-1.json +0 -5
- 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 -1197
- data/apis/route53domains/2014-05-15/paginators-1.json +0 -17
- data/apis/s3/2006-03-01/api-2.json +0 -4517
- 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 -954
- data/apis/sdb/2009-04-15/paginators-1.json +0 -15
- data/apis/servicecatalog/2015-12-10/api-2.json +0 -749
- data/apis/servicecatalog/2015-12-10/examples-1.json +0 -5
- data/apis/sns/2010-03-31/api-2.json +0 -1139
- 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 -950
- data/apis/sqs/2012-11-05/examples-1.json +0 -44
- data/apis/sqs/2012-11-05/paginators-1.json +0 -7
- data/apis/ssm/2014-11-06/api-2.json +0 -1742
- data/apis/ssm/2014-11-06/examples-1.json +0 -5
- data/apis/ssm/2014-11-06/paginators-1.json +0 -34
- data/apis/storagegateway/2013-06-30/api-2.json +0 -2275
- data/apis/storagegateway/2013-06-30/examples-1.json +0 -5
- data/apis/storagegateway/2013-06-30/paginators-1.json +0 -52
- data/apis/streams.dynamodb/2012-08-10/api-2.json +0 -397
- data/apis/streams.dynamodb/2012-08-10/examples-1.json +0 -5
- data/apis/sts/2011-06-15/api-2.json +0 -521
- data/apis/sts/2011-06-15/examples-1.json +0 -5
- data/apis/support/2013-04-15/api-2.json +0 -869
- data/apis/support/2013-04-15/paginators-1.json +0 -25
- data/apis/swf/2012-01-25/api-2.json +0 -2838
- 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 -5
- data/apis/workspaces/2015-04-08/api-2.json +0 -632
- data/apis/workspaces/2015-04-08/examples-1.json +0 -5
- data/apis/workspaces/2015-04-08/paginators-1.json +0 -20
- data/bin/aws.rb +0 -180
- data/endpoints.json +0 -1460
- 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 -217
- data/lib/aws-sdk-core/api/docs/builder.rb +0 -220
- data/lib/aws-sdk-core/api/docs/client_type_documenter.rb +0 -109
- data/lib/aws-sdk-core/api/docs/docstring_provider.rb +0 -75
- data/lib/aws-sdk-core/api/docs/operation_documenter.rb +0 -138
- 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/autoscaling.rb +0 -8
- data/lib/aws-sdk-core/checksums.rb +0 -51
- data/lib/aws-sdk-core/client.rb +0 -67
- data/lib/aws-sdk-core/client_waiters.rb +0 -120
- data/lib/aws-sdk-core/cloudformation.rb +0 -8
- data/lib/aws-sdk-core/cloudfront.rb +0 -15
- data/lib/aws-sdk-core/cloudfront/url_signer.rb +0 -167
- 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/codecommit.rb +0 -6
- data/lib/aws-sdk-core/codedeploy.rb +0 -6
- data/lib/aws-sdk-core/codepipeline.rb +0 -5
- data/lib/aws-sdk-core/cognitoidentity.rb +0 -5
- 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/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.rb +0 -40
- data/lib/aws-sdk-core/dynamodb/attribute_value.rb +0 -108
- data/lib/aws-sdk-core/dynamodbstreams.rb +0 -5
- data/lib/aws-sdk-core/ec2.rb +0 -8
- data/lib/aws-sdk-core/ecr.rb +0 -5
- 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 -6
- data/lib/aws-sdk-core/elasticsearchservice.rb +0 -4
- data/lib/aws-sdk-core/elastictranscoder.rb +0 -6
- 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 -95
- data/lib/aws-sdk-core/firehose.rb +0 -4
- data/lib/aws-sdk-core/gamelift.rb +0 -5
- data/lib/aws-sdk-core/glacier.rb +0 -7
- 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/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/machinelearning.rb +0 -6
- data/lib/aws-sdk-core/marketplacecommerceanalytics.rb +0 -5
- data/lib/aws-sdk-core/marketplacemetering.rb +0 -5
- data/lib/aws-sdk-core/opsworks.rb +0 -8
- data/lib/aws-sdk-core/partitions.rb +0 -174
- 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 -78
- data/lib/aws-sdk-core/partitions/service.rb +0 -84
- 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/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 -87
- 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/request_signer.rb +0 -138
- data/lib/aws-sdk-core/plugins/route_53_id_fix.rb +0 -55
- data/lib/aws-sdk-core/plugins/s3_accelerate.rb +0 -73
- 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_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/rds.rb +0 -8
- data/lib/aws-sdk-core/redshift.rb +0 -7
- data/lib/aws-sdk-core/route53.rb +0 -7
- data/lib/aws-sdk-core/route53domains.rb +0 -5
- data/lib/aws-sdk-core/s3.rb +0 -26
- data/lib/aws-sdk-core/s3/bucket_region_cache.rb +0 -75
- data/lib/aws-sdk-core/s3/presigner.rb +0 -113
- 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/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 -233
- data/lib/aws-sdk-core/simpledb.rb +0 -5
- data/lib/aws-sdk-core/sns.rb +0 -6
- data/lib/aws-sdk-core/sqs.rb +0 -6
- data/lib/aws-sdk-core/ssm.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 -5
- 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 -5
- 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/workspaces.rb +0 -6
- data/lib/seahorse/client/plugins/restful_bindings.rb +0 -127
- data/service-models.json +0 -285
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'securerandom'
|
2
|
+
|
3
|
+
module Aws
|
4
|
+
module Plugins
|
5
|
+
|
6
|
+
# @api private
|
7
|
+
class InvocationId < Seahorse::Client::Plugin
|
8
|
+
|
9
|
+
# @api private
|
10
|
+
class Handler < Seahorse::Client::Handler
|
11
|
+
|
12
|
+
def call(context)
|
13
|
+
apply_invocation_id(context)
|
14
|
+
@handler.call(context)
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def apply_invocation_id(context)
|
20
|
+
context.http_request.headers['amz-sdk-invocation-id'] = SecureRandom.uuid
|
21
|
+
if context[:input_event_emitter]
|
22
|
+
# only used for eventstreaming at input
|
23
|
+
context.http_request.headers['x-amz-content-sha256'] = 'STREAMING-AWS4-HMAC-SHA256-EVENTS'
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
handler(Handler, step: :initialize)
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Aws
|
2
|
+
module Plugins
|
3
|
+
|
4
|
+
# Converts input value to JSON Syntax for members with jsonvalue trait
|
5
|
+
class JsonvalueConverter < Seahorse::Client::Plugin
|
6
|
+
|
7
|
+
# @api private
|
8
|
+
class Handler < Seahorse::Client::Handler
|
9
|
+
|
10
|
+
def call(context)
|
11
|
+
context.operation.input.shape.members.each do |m, ref|
|
12
|
+
if ref['jsonvalue']
|
13
|
+
param_value = context.params[m]
|
14
|
+
unless param_value.respond_to?(:to_json)
|
15
|
+
raise ArgumentError, "The value of params[#{m}] is not JSON serializable."
|
16
|
+
end
|
17
|
+
context.params[m] = param_value.to_json
|
18
|
+
end
|
19
|
+
end
|
20
|
+
@handler.call(context)
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
handler(Handler, step: :initialize)
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
@@ -1,28 +1,28 @@
|
|
1
1
|
module Aws
|
2
2
|
module Plugins
|
3
|
-
|
4
|
-
# Enables logging for all requests. This plugin allows you to configure
|
5
|
-
# your logging device, the log format and the level to log messages at.
|
6
|
-
#
|
7
3
|
# @see Log::Formatter
|
8
|
-
#
|
9
|
-
# @seahorse.client.option [Logger] :logger (nil) The Logger instance
|
10
|
-
# to send log messages to. If this option is not set, logging
|
11
|
-
# will be disabled.
|
12
|
-
#
|
13
|
-
# @seahorse.client.option [Symbol] :log_level (:info) The log level
|
14
|
-
# to send messages to the logger at.
|
15
|
-
#
|
16
|
-
# @seahorse.client.option [Logging::LogFormatter] :log_formatter The log
|
17
|
-
# formatter. Defaults to {Seahorse::Client::Logging::Formatter.default}.
|
18
|
-
#
|
4
|
+
# @api private
|
19
5
|
class Logging < Seahorse::Client::Plugin
|
20
6
|
|
21
|
-
option(:logger
|
7
|
+
option(:logger,
|
8
|
+
doc_type: 'Logger',
|
9
|
+
docstring: <<-DOCS
|
10
|
+
The Logger instance to send log messages to. If this option
|
11
|
+
is not set, logging will be disabled.
|
12
|
+
DOCS
|
13
|
+
)
|
22
14
|
|
23
|
-
option(:log_level,
|
15
|
+
option(:log_level,
|
16
|
+
default: :info,
|
17
|
+
doc_type: Symbol,
|
18
|
+
docstring: 'The log level to send messages to the `:logger` at.'
|
19
|
+
)
|
24
20
|
|
25
|
-
option(:log_formatter
|
21
|
+
option(:log_formatter,
|
22
|
+
doc_type: 'Aws::Log::Formatter',
|
23
|
+
doc_default: literal('Aws::Log::Formatter.default'),
|
24
|
+
docstring: 'The log formatter.'
|
25
|
+
) do |config|
|
26
26
|
Log::Formatter.default if config.logger
|
27
27
|
end
|
28
28
|
|
@@ -1,12 +1,16 @@
|
|
1
1
|
module Aws
|
2
2
|
module Plugins
|
3
|
-
|
4
|
-
# @seahorse.client.option [Boolean] :convert_params (true)
|
5
|
-
# When `true`, an attempt is made to coerce request parameters
|
6
|
-
# into the required types.
|
3
|
+
# @api private
|
7
4
|
class ParamConverter < Seahorse::Client::Plugin
|
8
5
|
|
9
|
-
option(:convert_params,
|
6
|
+
option(:convert_params,
|
7
|
+
default: true,
|
8
|
+
doc_type: 'Boolean',
|
9
|
+
docstring: <<-DOCS
|
10
|
+
When `true`, an attempt is made to coerce request parameters into
|
11
|
+
the required types.
|
12
|
+
DOCS
|
13
|
+
)
|
10
14
|
|
11
15
|
def add_handlers(handlers, config)
|
12
16
|
handlers.add(Handler, step: :initialize) if config.convert_params
|
@@ -1,12 +1,15 @@
|
|
1
1
|
module Aws
|
2
2
|
module Plugins
|
3
|
-
|
4
|
-
# @seahorse.client.option [Boolean] :validate_params (true)
|
5
|
-
# When `true`, request parameters are validated before
|
6
|
-
# sending the request.
|
3
|
+
# @api private
|
7
4
|
class ParamValidator < Seahorse::Client::Plugin
|
8
5
|
|
9
|
-
option(:validate_params,
|
6
|
+
option(:validate_params,
|
7
|
+
default: true,
|
8
|
+
doc_type: 'Boolean',
|
9
|
+
docstring: <<-DOCS)
|
10
|
+
When `true`, request parameters are validated before
|
11
|
+
sending the request.
|
12
|
+
DOCS
|
10
13
|
|
11
14
|
def add_handlers(handlers, config)
|
12
15
|
if config.validate_params
|
@@ -1,20 +1,21 @@
|
|
1
1
|
module Aws
|
2
2
|
module Plugins
|
3
3
|
module Protocols
|
4
|
-
|
5
|
-
# @seahorse.client.option [Boolean] :simple_json (false)
|
6
|
-
# Disables request parameter conversion, validation, and formatting.
|
7
|
-
# Also disable response data type conversions. This option is useful
|
8
|
-
# when you want to ensure the highest level of performance by
|
9
|
-
# avoiding overhead of walking request parameters and response data
|
10
|
-
# structures.
|
11
|
-
#
|
12
|
-
# When `:simple_json` is enabled, the request parameters hash must
|
13
|
-
# be formatted exactly as the DynamoDB API expects.
|
14
|
-
#
|
15
4
|
class JsonRpc < Seahorse::Client::Plugin
|
16
5
|
|
17
|
-
option(:simple_json,
|
6
|
+
option(:simple_json,
|
7
|
+
default: false,
|
8
|
+
doc_type: 'Boolean',
|
9
|
+
docstring: <<-DOCS)
|
10
|
+
Disables request parameter conversion, validation, and formatting.
|
11
|
+
Also disable response data type conversions. This option is useful
|
12
|
+
when you want to ensure the highest level of performance by
|
13
|
+
avoiding overhead of walking request parameters and response data
|
14
|
+
structures.
|
15
|
+
|
16
|
+
When `:simple_json` is enabled, the request parameters hash must
|
17
|
+
be formatted exactly as the DynamoDB API expects.
|
18
|
+
DOCS
|
18
19
|
|
19
20
|
option(:validate_params) { |config| !config.simple_json }
|
20
21
|
|
@@ -1,38 +1,67 @@
|
|
1
1
|
module Aws
|
2
2
|
module Plugins
|
3
|
-
|
4
|
-
# @seahorse.client.option [required, String] :region
|
5
|
-
# The AWS region to connect to. The region is used to construct
|
6
|
-
# the client endpoint. Defaults to `ENV['AWS_REGION']`.
|
7
|
-
# Also checks `AMAZON_REGION` and `AWS_DEFAULT_REGION`.
|
8
|
-
#
|
9
|
-
# @seahorse.client.option [String] :endpoint A default endpoint is
|
10
|
-
# constructed from the `:region`.
|
11
|
-
#
|
3
|
+
# @api private
|
12
4
|
class RegionalEndpoint < Seahorse::Client::Plugin
|
13
5
|
|
14
6
|
# raised when region is not configured
|
15
7
|
MISSING_REGION = 'missing required configuration option :region'
|
16
8
|
|
17
|
-
option(:
|
18
|
-
|
19
|
-
|
20
|
-
|
9
|
+
option(:profile)
|
10
|
+
|
11
|
+
option(:region,
|
12
|
+
required: true,
|
13
|
+
doc_type: String,
|
14
|
+
docstring: <<-DOCS) do |cfg|
|
15
|
+
The AWS region to connect to. The configured `:region` is
|
16
|
+
used to determine the service `:endpoint`. When not passed,
|
17
|
+
a default `:region` is search for in the following locations:
|
18
|
+
|
19
|
+
* `Aws.config[:region]`
|
20
|
+
* `ENV['AWS_REGION']`
|
21
|
+
* `ENV['AMAZON_REGION']`
|
22
|
+
* `ENV['AWS_DEFAULT_REGION']`
|
23
|
+
* `~/.aws/credentials`
|
24
|
+
* `~/.aws/config`
|
25
|
+
DOCS
|
26
|
+
resolve_region(cfg)
|
27
|
+
end
|
21
28
|
|
22
|
-
option(:
|
23
|
-
|
24
|
-
|
29
|
+
option(:regional_endpoint, false)
|
30
|
+
|
31
|
+
option(:endpoint, doc_type: String, docstring: <<-DOCS) do |cfg|
|
32
|
+
The client endpoint is normally constructed from the `:region`
|
33
|
+
option. You should only configure an `:endpoint` when connecting
|
34
|
+
to test endpoints. This should be avalid HTTP(S) URI.
|
35
|
+
DOCS
|
36
|
+
endpoint_prefix = cfg.api.metadata['endpointPrefix']
|
37
|
+
if cfg.region && endpoint_prefix
|
38
|
+
if cfg.respond_to?(:sts_regional_endpoints)
|
39
|
+
sts_regional = cfg.sts_regional_endpoints
|
40
|
+
end
|
41
|
+
Aws::Partitions::EndpointProvider.resolve(
|
42
|
+
cfg.region,
|
43
|
+
endpoint_prefix,
|
44
|
+
sts_regional
|
45
|
+
)
|
25
46
|
end
|
26
47
|
end
|
27
48
|
|
28
49
|
def after_initialize(client)
|
29
50
|
if client.config.region.nil? or client.config.region == ''
|
30
|
-
|
31
|
-
msg << "export region name to ENV['AWS_REGION']"
|
32
|
-
raise Errors::MissingRegionError, msg
|
51
|
+
raise Errors::MissingRegionError
|
33
52
|
end
|
34
53
|
end
|
35
54
|
|
55
|
+
private
|
56
|
+
|
57
|
+
def self.resolve_region(cfg)
|
58
|
+
keys = %w(AWS_REGION AMAZON_REGION AWS_DEFAULT_REGION)
|
59
|
+
env_region = ENV.values_at(*keys).compact.first
|
60
|
+
env_region = nil if env_region == ''
|
61
|
+
cfg_region = Aws.shared_config.region(profile: cfg.profile)
|
62
|
+
env_region || cfg_region
|
63
|
+
end
|
64
|
+
|
36
65
|
end
|
37
66
|
end
|
38
67
|
end
|
@@ -1,35 +1,22 @@
|
|
1
1
|
module Aws
|
2
2
|
module Plugins
|
3
|
+
# @api private
|
3
4
|
class ResponsePaging < Seahorse::Client::Plugin
|
4
5
|
|
5
|
-
def add_handlers(handlers, config)
|
6
|
-
handlers.add(Handler,
|
7
|
-
operations: pageable_operations(config),
|
8
|
-
step: :initialize,
|
9
|
-
priority: 90)
|
10
|
-
end
|
11
|
-
|
12
|
-
private
|
13
|
-
|
14
|
-
def pageable_operations(config)
|
15
|
-
config.api.operations.inject([]) do |pageable, (name, operation)|
|
16
|
-
pageable << name if operation[:pager]
|
17
|
-
pageable
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
# @api private
|
22
6
|
class Handler < Seahorse::Client::Handler
|
23
7
|
|
24
8
|
def call(context)
|
25
9
|
context[:original_params] = context.params
|
26
10
|
resp = @handler.call(context)
|
27
11
|
resp.extend(PageableResponse)
|
28
|
-
resp.pager = context.operation[:pager]
|
12
|
+
resp.pager = context.operation[:pager] || Aws::Pager::NullPager.new
|
29
13
|
resp
|
30
14
|
end
|
31
15
|
|
32
16
|
end
|
17
|
+
|
18
|
+
handle(Handler, step: :initialize, priority: 90)
|
19
|
+
|
33
20
|
end
|
34
21
|
end
|
35
22
|
end
|
@@ -2,18 +2,67 @@ require 'set'
|
|
2
2
|
|
3
3
|
module Aws
|
4
4
|
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.
|
5
|
+
# @api private
|
12
6
|
class RetryErrors < Seahorse::Client::Plugin
|
13
7
|
|
14
|
-
|
8
|
+
EQUAL_JITTER = lambda { |delay| (delay / 2) + Kernel.rand(0..(delay/2))}
|
9
|
+
FULL_JITTER = lambda { |delay| Kernel.rand(0..delay) }
|
10
|
+
NO_JITTER = lambda { |delay| delay }
|
11
|
+
|
12
|
+
JITTERS = {
|
13
|
+
none: NO_JITTER,
|
14
|
+
equal: EQUAL_JITTER,
|
15
|
+
full: FULL_JITTER
|
16
|
+
}
|
17
|
+
|
18
|
+
JITTERS.default_proc = lambda { |h,k|
|
19
|
+
raise KeyError, "#{k} is not a named jitter function. Must be one of #{h.keys}"
|
20
|
+
}
|
21
|
+
|
22
|
+
DEFAULT_BACKOFF = lambda do |c|
|
23
|
+
delay = 2 ** c.retries * c.config.retry_base_delay
|
24
|
+
delay = [delay, c.config.retry_max_delay].min if (c.config.retry_max_delay || 0) > 0
|
25
|
+
jitter = c.config.retry_jitter
|
26
|
+
jitter = JITTERS[jitter] if Symbol === jitter
|
27
|
+
delay = jitter.call(delay) if jitter
|
28
|
+
Kernel.sleep(delay)
|
29
|
+
end
|
15
30
|
|
16
|
-
option(:
|
31
|
+
option(:retry_limit,
|
32
|
+
default: 3,
|
33
|
+
doc_type: Integer,
|
34
|
+
docstring: <<-DOCS)
|
35
|
+
The maximum number of times to retry failed requests. Only
|
36
|
+
~ 500 level server errors and certain ~ 400 level client errors
|
37
|
+
are retried. Generally, these are throttling errors, data
|
38
|
+
checksum errors, networking errors, timeout errors and auth
|
39
|
+
errors from expired credentials.
|
40
|
+
DOCS
|
41
|
+
|
42
|
+
option(:retry_max_delay,
|
43
|
+
default: 0,
|
44
|
+
doc_type: Integer,
|
45
|
+
docstring: <<-DOCS)
|
46
|
+
The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
|
47
|
+
DOCS
|
48
|
+
|
49
|
+
option(:retry_base_delay,
|
50
|
+
default: 0.3,
|
51
|
+
doc_type: Float,
|
52
|
+
docstring: <<-DOCS)
|
53
|
+
The base delay in seconds used by the default backoff function.
|
54
|
+
DOCS
|
55
|
+
|
56
|
+
option(:retry_jitter,
|
57
|
+
default: :none,
|
58
|
+
doc_type: Symbol,
|
59
|
+
docstring: <<-DOCS)
|
60
|
+
A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.
|
61
|
+
|
62
|
+
@see https://www.awsarchitectureblog.com/2015/03/backoff.html
|
63
|
+
DOCS
|
64
|
+
|
65
|
+
option(:retry_backoff, DEFAULT_BACKOFF)
|
17
66
|
|
18
67
|
# @api private
|
19
68
|
class ErrorInspector
|
@@ -23,15 +72,22 @@ module Aws
|
|
23
72
|
'UnrecognizedClientException', # json services
|
24
73
|
'InvalidAccessKeyId', # s3
|
25
74
|
'AuthFailure', # ec2
|
75
|
+
'InvalidIdentityToken', # sts
|
76
|
+
'ExpiredToken', # route53
|
26
77
|
])
|
27
78
|
|
28
79
|
THROTTLING_ERRORS = Set.new([
|
29
80
|
'Throttling', # query services
|
30
81
|
'ThrottlingException', # json services
|
31
82
|
'RequestThrottled', # sqs
|
83
|
+
'RequestThrottledException',
|
32
84
|
'ProvisionedThroughputExceededException', # dynamodb
|
85
|
+
'TransactionInProgressException', # dynamodb
|
33
86
|
'RequestLimitExceeded', # ec2
|
34
87
|
'BandwidthLimitExceeded', # cloud search
|
88
|
+
'LimitExceededException', # kinesis
|
89
|
+
'TooManyRequestsException', # batch
|
90
|
+
'PriorRequestNotComplete', # route53
|
35
91
|
])
|
36
92
|
|
37
93
|
CHECKSUM_ERRORS = Set.new([
|
@@ -39,7 +95,8 @@ module Aws
|
|
39
95
|
])
|
40
96
|
|
41
97
|
NETWORKING_ERRORS = Set.new([
|
42
|
-
'RequestTimeout',
|
98
|
+
'RequestTimeout', # s3
|
99
|
+
'IDPCommunicationError', # sts
|
43
100
|
])
|
44
101
|
|
45
102
|
def initialize(error, http_status_code)
|
@@ -53,7 +110,7 @@ module Aws
|
|
53
110
|
end
|
54
111
|
|
55
112
|
def throttling_error?
|
56
|
-
!!(THROTTLING_ERRORS.include?(@name) || @name.match(/throttl/i))
|
113
|
+
!!(THROTTLING_ERRORS.include?(@name) || @name.match(/throttl/i) || @http_status_code == 429)
|
57
114
|
end
|
58
115
|
|
59
116
|
def checksum?
|
@@ -62,6 +119,7 @@ module Aws
|
|
62
119
|
|
63
120
|
def networking?
|
64
121
|
@error.is_a?(Seahorse::Client::NetworkingError) ||
|
122
|
+
@error.is_a?(Errors::NoSuchEndpointError) ||
|
65
123
|
NETWORKING_ERRORS.include?(@name)
|
66
124
|
end
|
67
125
|
|
@@ -69,8 +127,40 @@ module Aws
|
|
69
127
|
(500..599).include?(@http_status_code)
|
70
128
|
end
|
71
129
|
|
130
|
+
def endpoint_discovery?(context)
|
131
|
+
return false unless context.operation.endpoint_discovery
|
132
|
+
|
133
|
+
if @http_status_code == 421 ||
|
134
|
+
extract_name(@error) == 'InvalidEndpointException'
|
135
|
+
@error = Errors::EndpointDiscoveryError.new
|
136
|
+
end
|
137
|
+
|
138
|
+
# When endpoint discovery error occurs
|
139
|
+
# evict the endpoint from cache
|
140
|
+
if @error.is_a?(Errors::EndpointDiscoveryError)
|
141
|
+
key = context.config.endpoint_cache.extract_key(context)
|
142
|
+
context.config.endpoint_cache.delete(key)
|
143
|
+
true
|
144
|
+
else
|
145
|
+
false
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
def retryable?(context)
|
150
|
+
(expired_credentials? and refreshable_credentials?(context)) or
|
151
|
+
throttling_error? or
|
152
|
+
checksum? or
|
153
|
+
networking? or
|
154
|
+
server? or
|
155
|
+
endpoint_discovery?(context)
|
156
|
+
end
|
157
|
+
|
72
158
|
private
|
73
159
|
|
160
|
+
def refreshable_credentials?(context)
|
161
|
+
context.config.credentials.respond_to?(:refresh!)
|
162
|
+
end
|
163
|
+
|
74
164
|
def extract_name(error)
|
75
165
|
if error.is_a?(Errors::ServiceError)
|
76
166
|
error.class.code
|
@@ -123,23 +213,11 @@ module Aws
|
|
123
213
|
end
|
124
214
|
|
125
215
|
def should_retry?(context, error)
|
126
|
-
retryable?(context
|
216
|
+
error.retryable?(context) and
|
127
217
|
context.retries < retry_limit(context) and
|
128
218
|
response_truncatable?(context)
|
129
219
|
end
|
130
220
|
|
131
|
-
def retryable?(context, error)
|
132
|
-
(error.expired_credentials? and refreshable_credentials?(context)) or
|
133
|
-
error.throttling_error? or
|
134
|
-
error.checksum? or
|
135
|
-
error.networking? or
|
136
|
-
error.server?
|
137
|
-
end
|
138
|
-
|
139
|
-
def refreshable_credentials?(context)
|
140
|
-
context.config.credentials.respond_to?(:refresh!)
|
141
|
-
end
|
142
|
-
|
143
221
|
def retry_limit(context)
|
144
222
|
context.config.retry_limit
|
145
223
|
end
|