aws-sdk-core 2.0.0.rc14 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/apis/AutoScaling.api.json +1943 -0
- data/apis/CloudFormation.api.json +785 -0
- data/apis/CloudFront.api.json +2581 -0
- data/apis/CloudSearch.api.json +1955 -0
- data/apis/CloudSearchDomain.api.json +349 -0
- data/apis/CloudTrail.api.json +559 -0
- data/apis/CloudWatch.api.json +917 -0
- data/apis/CloudWatchLogs.api.json +816 -0
- data/apis/CognitoIdentity.api.json +631 -0
- data/apis/CognitoSync.api.json +721 -0
- data/apis/DataPipeline.api.json +940 -0
- data/apis/DirectConnect.api.json +833 -0
- data/apis/DynamoDB.api.json +1210 -0
- data/apis/{dynamodb-2012-08-10.paginators.json → DynamoDB.paginators.json} +0 -1
- data/apis/EC2.api.json +9914 -0
- data/apis/{ec2-2014-06-15.resources.json → EC2.resources.json} +16 -0
- data/apis/EMR.api.json +1339 -0
- data/apis/ElastiCache.api.json +3410 -0
- data/apis/ElasticBeanstalk.api.json +1543 -0
- data/apis/ElasticLoadBalancing.api.json +2131 -0
- data/apis/ElasticTranscoder.api.json +1647 -0
- data/apis/Glacier.api.json +1456 -0
- data/apis/{glacier-2012-06-01.resources.json → Glacier.resources.json} +5 -9
- data/apis/IAM.api.json +4033 -0
- data/apis/{iam-2010-05-08.resources.json → IAM.resources.json} +1 -1
- data/apis/ImportExport.api.json +515 -0
- data/apis/Kinesis.api.json +706 -0
- data/apis/{kinesis-2013-12-02.paginators.json → Kinesis.paginators.json} +0 -6
- data/apis/OpsWorks.api.json +2555 -0
- data/apis/OpsWorks.resources.json +181 -0
- data/apis/RDS.api.json +4473 -0
- data/apis/Redshift.api.json +4482 -0
- data/apis/Route53.api.json +1935 -0
- data/apis/Route53Domains.api.json +1129 -0
- data/apis/{s3-2006-03-01.api.json → S3.api.json} +336 -942
- data/apis/{s3-2006-03-01.paginators.json → S3.paginators.json} +1 -1
- data/apis/{s3-2006-03-01.resources.json → S3.resources.json} +13 -2
- data/apis/SES.api.json +644 -0
- data/apis/SNS.api.json +1760 -0
- data/apis/SQS.api.json +1113 -0
- data/apis/{sqs-2012-11-05.resources.json → SQS.resources.json} +0 -10
- data/apis/STS.api.json +594 -0
- data/apis/SWF.api.json +2656 -0
- data/apis/SimpleDB.api.json +954 -0
- data/apis/StorageGateway.api.json +2311 -0
- data/apis/Support.api.json +869 -0
- data/bin/aws.rb +19 -0
- data/lib/aws-sdk-core/api/docstrings.rb +35 -0
- data/lib/aws-sdk-core/api/documenter.rb +241 -0
- data/lib/{aws/api/documentor.rb → aws-sdk-core/api/operation_documenter.rb} +9 -5
- data/lib/{aws/api/doc_example.rb → aws-sdk-core/api/operation_example.rb} +8 -7
- data/lib/{aws → aws-sdk-core}/api/service_customizations.rb +3 -1
- data/lib/aws-sdk-core/autoscaling.rb +5 -0
- data/lib/aws-sdk-core/client.rb +121 -0
- data/lib/aws-sdk-core/cloudformation.rb +5 -0
- data/lib/aws-sdk-core/cloudfront.rb +6 -0
- data/lib/aws-sdk-core/cloudsearch.rb +5 -0
- data/lib/aws-sdk-core/cloudsearchdomain.rb +4 -0
- data/lib/aws-sdk-core/cloudtrail.rb +5 -0
- data/lib/aws-sdk-core/cloudwatch.rb +5 -0
- data/lib/aws-sdk-core/cloudwatchlogs.rb +5 -0
- data/lib/aws-sdk-core/cognitoidentity.rb +4 -0
- data/lib/aws-sdk-core/cognitosync.rb +4 -0
- data/lib/{aws → aws-sdk-core}/credential_provider_chain.rb +4 -1
- data/lib/aws-sdk-core/datapipeline.rb +5 -0
- data/lib/aws-sdk-core/directconnect.rb +5 -0
- data/lib/aws-sdk-core/dynamodb/attribute_value.rb +87 -0
- data/lib/aws-sdk-core/dynamodb.rb +12 -0
- data/lib/aws-sdk-core/ec2.rb +7 -0
- data/lib/aws-sdk-core/elasticache.rb +5 -0
- data/lib/aws-sdk-core/elasticbeanstalk.rb +5 -0
- data/lib/aws-sdk-core/elasticloadbalancing.rb +5 -0
- data/lib/aws-sdk-core/elastictranscoder.rb +5 -0
- data/lib/{aws → aws-sdk-core}/empty_structure.rb +4 -3
- data/lib/aws-sdk-core/emr.rb +5 -0
- data/lib/{aws → aws-sdk-core}/endpoint_provider.rb +1 -0
- data/lib/{aws → aws-sdk-core}/errors.rb +18 -7
- data/lib/aws-sdk-core/glacier.rb +7 -0
- data/lib/aws-sdk-core/iam.rb +6 -0
- data/lib/aws-sdk-core/importexport.rb +5 -0
- data/lib/{aws → aws-sdk-core}/instance_profile_credentials.rb +1 -1
- data/lib/aws-sdk-core/kinesis.rb +5 -0
- data/lib/aws-sdk-core/opsworks.rb +6 -0
- data/lib/{aws → aws-sdk-core}/pageable_response.rb +1 -1
- data/lib/aws-sdk-core/plugins/csd_conditional_signing.rb +37 -0
- data/lib/aws-sdk-core/plugins/dynamodb_simple_attributes.rb +179 -0
- data/lib/{aws → aws-sdk-core}/plugins/global_configuration.rb +13 -3
- data/lib/{aws → aws-sdk-core}/plugins/protocols/json_rpc.rb +9 -7
- data/lib/{aws → aws-sdk-core}/plugins/regional_endpoint.rb +1 -1
- data/lib/{aws → aws-sdk-core}/plugins/request_signer.rb +13 -6
- data/lib/aws-sdk-core/plugins/response_paging.rb +25 -0
- data/lib/aws-sdk-core/plugins/s3_url_encoded_keys.rb +92 -0
- data/lib/{aws → aws-sdk-core}/plugins/user_agent.rb +1 -2
- data/lib/{aws → aws-sdk-core}/query/handler.rb +4 -5
- data/lib/aws-sdk-core/rds.rb +6 -0
- data/lib/aws-sdk-core/redshift.rb +6 -0
- data/lib/aws-sdk-core/route53.rb +5 -0
- data/lib/aws-sdk-core/route53domains.rb +4 -0
- data/lib/aws-sdk-core/s3/presigner.rb +64 -0
- data/lib/aws-sdk-core/s3.rb +13 -0
- data/lib/aws-sdk-core/service.rb +4 -0
- data/lib/aws-sdk-core/ses.rb +6 -0
- data/lib/{aws → aws-sdk-core}/signers/v4.rb +6 -5
- data/lib/aws-sdk-core/simpledb.rb +5 -0
- data/lib/aws-sdk-core/sns.rb +6 -0
- data/lib/aws-sdk-core/sqs.rb +6 -0
- data/lib/aws-sdk-core/storagegateway.rb +5 -0
- data/lib/{aws → aws-sdk-core}/structure.rb +49 -2
- data/lib/aws-sdk-core/sts.rb +4 -0
- data/lib/aws-sdk-core/support.rb +5 -0
- data/lib/aws-sdk-core/swf.rb +5 -0
- data/lib/aws-sdk-core/version.rb +3 -0
- data/lib/aws-sdk-core/waiters/errors.rb +30 -0
- data/lib/aws-sdk-core/waiters/null_provider.rb +12 -0
- data/lib/aws-sdk-core/waiters/provider.rb +54 -0
- data/lib/aws-sdk-core/waiters/waiter.rb +194 -0
- data/lib/{aws → aws-sdk-core}/xml/builder.rb +1 -0
- data/lib/aws-sdk-core/xml/default_list.rb +10 -0
- data/lib/{aws → aws-sdk-core}/xml/parser.rb +6 -1
- data/lib/aws-sdk-core.rb +288 -1
- data/lib/seahorse/client/base.rb +45 -20
- data/lib/seahorse/client/handler_list.rb +17 -3
- data/lib/seahorse/client/http/request.rb +0 -8
- data/lib/seahorse/client/param_converter.rb +2 -2
- data/lib/seahorse/client/plugins/restful_bindings.rb +1 -1
- data/lib/seahorse/client/request.rb +1 -1
- data/lib/seahorse/client/response.rb +0 -2
- data/lib/seahorse/client/xml/builder.rb +0 -1
- data/lib/seahorse/model/shape_map.rb +1 -0
- data/lib/seahorse/model/shapes.rb +11 -2
- data/lib/seahorse.rb +2 -3
- metadata +214 -187
- data/LICENSE.txt +0 -12
- data/README.md +0 -272
- data/apis/autoscaling-2011-01-01.api.json +0 -3063
- data/apis/cloudformation-2010-05-15.api.json +0 -1306
- data/apis/cloudfront-2014-01-31.api.json +0 -3478
- data/apis/cloudfront-2014-01-31.paginators.json +0 -32
- data/apis/cloudfront-2014-05-31.api.json +0 -3540
- data/apis/cloudfront-2014-05-31.waiters.json +0 -29
- data/apis/cloudsearch-2011-02-01.api.json +0 -2093
- data/apis/cloudsearch-2011-02-01.paginators.json +0 -13
- data/apis/cloudsearch-2013-01-01.api.json +0 -2655
- data/apis/cloudsearchdomain-2013-01-01.api.json +0 -508
- data/apis/cloudtrail-2013-11-01.api.json +0 -773
- data/apis/cognito-identity-2014-06-30.api.json +0 -884
- data/apis/cognito-sync-2014-06-30.api.json +0 -1029
- data/apis/datapipeline-2012-10-29.api.json +0 -1432
- data/apis/directconnect-2012-10-25.api.json +0 -1174
- data/apis/dynamodb-2011-12-05.api.json +0 -1208
- data/apis/dynamodb-2011-12-05.paginators.json +0 -26
- data/apis/dynamodb-2011-12-05.waiters.json +0 -27
- data/apis/dynamodb-2012-08-10.api.json +0 -1857
- data/apis/ec2-2014-06-15.api.json +0 -11670
- data/apis/elasticache-2014-03-24.api.json +0 -4789
- data/apis/elasticache-2014-07-15.api.json +0 -4826
- data/apis/elasticache-2014-07-15.paginators.json +0 -76
- data/apis/elasticbeanstalk-2010-12-01.api.json +0 -2442
- data/apis/elasticloadbalancing-2012-06-01.api.json +0 -2605
- data/apis/elasticmapreduce-2009-03-31.api.json +0 -2282
- data/apis/elastictranscoder-2012-09-25.api.json +0 -2478
- data/apis/email-2010-12-01.api.json +0 -954
- data/apis/glacier-2012-06-01.api.json +0 -2012
- data/apis/iam-2010-05-08.api.json +0 -5322
- data/apis/importexport-2010-06-01.api.json +0 -687
- data/apis/kinesis-2013-12-02.api.json +0 -769
- data/apis/logs-2014-03-28.api.json +0 -942
- data/apis/manifest.json +0 -259
- data/apis/monitoring-2010-08-01.api.json +0 -1338
- data/apis/opsworks-2013-02-18.api.json +0 -4348
- data/apis/rds-2013-01-10.api.json +0 -6074
- data/apis/rds-2013-01-10.paginators.json +0 -97
- data/apis/rds-2013-02-12.api.json +0 -6392
- data/apis/rds-2013-09-09.api.json +0 -6564
- data/apis/rds-2013-09-09.paginators.json +0 -110
- data/apis/redshift-2012-12-01.api.json +0 -6318
- data/apis/route53-2013-04-01.api.json +0 -2493
- data/apis/route53domains-2014-05-15.api.json +0 -1622
- data/apis/sdb-2009-04-15.api.json +0 -1178
- data/apis/sns-2010-03-31.api.json +0 -2275
- data/apis/sqs-2012-11-05.api.json +0 -1438
- data/apis/storagegateway-2013-06-30.api.json +0 -3153
- data/apis/sts-2011-06-15.api.json +0 -786
- data/apis/support-2013-04-15.api.json +0 -1379
- data/apis/swf-2012-01-25.api.json +0 -4463
- data/lib/aws/api/manifest.rb +0 -29
- data/lib/aws/api/manifest_builder.rb +0 -57
- data/lib/aws/api/minifier.rb +0 -42
- data/lib/aws/plugins/response_paging.rb +0 -20
- data/lib/aws/response_handler.rb +0 -38
- data/lib/aws/service.rb +0 -26
- data/lib/aws/service_builder.rb +0 -56
- data/lib/aws/version.rb +0 -3
- data/lib/aws.rb +0 -227
- data/lib/seahorse/client/plugins/api.rb +0 -11
- /data/apis/{autoscaling-2011-01-01.paginators.json → AutoScaling.paginators.json} +0 -0
- /data/apis/{cloudformation-2010-05-15.paginators.json → CloudFormation.paginators.json} +0 -0
- /data/apis/{cloudfront-2014-05-31.paginators.json → CloudFront.paginators.json} +0 -0
- /data/apis/{cloudfront-2014-01-31.waiters.json → CloudFront.waiters.json} +0 -0
- /data/apis/{cloudsearch-2013-01-01.paginators.json → CloudSearch.paginators.json} +0 -0
- /data/apis/{cloudtrail-2013-11-01.paginators.json → CloudTrail.paginators.json} +0 -0
- /data/apis/{monitoring-2010-08-01.paginators.json → CloudWatch.paginators.json} +0 -0
- /data/apis/{logs-2014-03-28.paginators.json → CloudWatchLogs.paginators.json} +0 -0
- /data/apis/{datapipeline-2012-10-29.paginators.json → DataPipeline.paginators.json} +0 -0
- /data/apis/{directconnect-2012-10-25.paginators.json → DirectConnect.paginators.json} +0 -0
- /data/apis/{dynamodb-2012-08-10.waiters.json → DynamoDB.waiters.json} +0 -0
- /data/apis/{ec2-2014-06-15.paginators.json → EC2.paginators.json} +0 -0
- /data/apis/{ec2-2014-06-15.waiters.json → EC2.waiters.json} +0 -0
- /data/apis/{elasticmapreduce-2009-03-31.paginators.json → EMR.paginators.json} +0 -0
- /data/apis/{elasticache-2014-03-24.paginators.json → ElastiCache.paginators.json} +0 -0
- /data/apis/{elasticbeanstalk-2010-12-01.paginators.json → ElasticBeanstalk.paginators.json} +0 -0
- /data/apis/{elasticloadbalancing-2012-06-01.paginators.json → ElasticLoadBalancing.paginators.json} +0 -0
- /data/apis/{elastictranscoder-2012-09-25.paginators.json → ElasticTranscoder.paginators.json} +0 -0
- /data/apis/{glacier-2012-06-01.paginators.json → Glacier.paginators.json} +0 -0
- /data/apis/{glacier-2012-06-01.waiters.json → Glacier.waiters.json} +0 -0
- /data/apis/{iam-2010-05-08.paginators.json → IAM.paginators.json} +0 -0
- /data/apis/{importexport-2010-06-01.paginators.json → ImportExport.paginators.json} +0 -0
- /data/apis/{opsworks-2013-02-18.paginators.json → OpsWorks.paginators.json} +0 -0
- /data/apis/{rds-2013-02-12.paginators.json → RDS.paginators.json} +0 -0
- /data/apis/{rds-2013-09-09.waiters.json → RDS.waiters.json} +0 -0
- /data/apis/{redshift-2012-12-01.paginators.json → Redshift.paginators.json} +0 -0
- /data/apis/{redshift-2012-12-01.waiters.json → Redshift.waiters.json} +0 -0
- /data/apis/{route53-2013-04-01.paginators.json → Route53.paginators.json} +0 -0
- /data/apis/{s3-2006-03-01.waiters.json → S3.waiters.json} +0 -0
- /data/apis/{email-2010-12-01.paginators.json → SES.paginators.json} +0 -0
- /data/apis/{email-2010-12-01.waiters.json → SES.waiters.json} +0 -0
- /data/apis/{sns-2010-03-31.paginators.json → SNS.paginators.json} +0 -0
- /data/apis/{sns-2010-03-31.resources.json → SNS.resources.json} +0 -0
- /data/apis/{sqs-2012-11-05.paginators.json → SQS.paginators.json} +0 -0
- /data/apis/{swf-2012-01-25.paginators.json → SWF.paginators.json} +0 -0
- /data/apis/{sdb-2009-04-15.paginators.json → SimpleDB.paginators.json} +0 -0
- /data/apis/{storagegateway-2013-06-30.paginators.json → StorageGateway.paginators.json} +0 -0
- /data/apis/{support-2013-04-15.paginators.json → Support.paginators.json} +0 -0
- /data/lib/{aws → aws-sdk-core}/api/customizer.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/credentials.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/builder.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/error_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/parser.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/rest_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/rpc_body_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/rpc_headers_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/simple_body_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/paging/null_pager.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/paging/null_provider.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/paging/pager.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/paging/provider.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/dynamodb_extended_retries.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/ec2_copy_encrypted_snapshot.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/glacier_account_id.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/glacier_api_version.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/glacier_checksums.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/protocols/ec2.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/protocols/query.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/protocols/rest_json.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/protocols/rest_xml.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/retry_errors.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/route_53_id_fix.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_bucket_dns.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_complete_multipart_upload_fix.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_expect_100_continue.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_get_bucket_location_fix.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_location_constraint.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_md5s.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_redirects.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_sse_cpk.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/sqs_queue_urls.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/swf_read_timeouts.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/query/ec2_param_builder.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/query/param.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/query/param_builder.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/query/param_list.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/rest_body_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/shared_credentials.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/signers/base.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/signers/handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/signers/s3.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/signers/v2.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/signers/v3.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/tree_hash.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/xml/error_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/xml/rest_handler.rb +0 -0
data/bin/aws.rb
CHANGED
|
@@ -94,6 +94,25 @@ end
|
|
|
94
94
|
|
|
95
95
|
require 'aws-sdk-core'
|
|
96
96
|
|
|
97
|
+
module Aws
|
|
98
|
+
class << self
|
|
99
|
+
SERVICE_MODULE_NAMES.each do |svc_name|
|
|
100
|
+
define_method(svc_name.downcase) do |options={}|
|
|
101
|
+
const_get(svc_name).const_get(:Client).new(options)
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
begin
|
|
108
|
+
# attempt to load aws-sdk-resources, checking first for source from
|
|
109
|
+
# a relative path in the repo, otherwise will check for the installed gem
|
|
110
|
+
lib = File.join(File.dirname(__FILE__), '..', '..', 'aws-sdk-resources', 'lib')
|
|
111
|
+
$LOAD_PATH.unshift(lib) if File.directory?(lib)
|
|
112
|
+
require 'aws-sdk-resources'
|
|
113
|
+
rescue LoadError
|
|
114
|
+
end
|
|
115
|
+
|
|
97
116
|
# configure the aws-sdk gem
|
|
98
117
|
|
|
99
118
|
cfg = {}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module Aws
|
|
2
|
+
module Api
|
|
3
|
+
# @api private
|
|
4
|
+
# This module loads the API documentation for the given API.
|
|
5
|
+
module Docstrings
|
|
6
|
+
|
|
7
|
+
def self.apply(client_class, path)
|
|
8
|
+
api = client_class.api.definition
|
|
9
|
+
docs = File.open(path, 'r', encoding: 'UTF-8') { |f| f.read }
|
|
10
|
+
docs = MultiJson.load(docs)
|
|
11
|
+
|
|
12
|
+
api['documentation'] = docs['service']
|
|
13
|
+
|
|
14
|
+
docs['operations'].each do |operation, doc|
|
|
15
|
+
api['operations'][operation]['documentation'] = doc
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
docs['shapes'].each do |shape_name, shape|
|
|
19
|
+
api['shapes'][shape_name]['documentation'] = shape['base']
|
|
20
|
+
shape['refs'].each do |ref,doc|
|
|
21
|
+
target_shape_name, member = ref.split('$')
|
|
22
|
+
target_shape = api['shapes'][target_shape_name]
|
|
23
|
+
case target_shape['type']
|
|
24
|
+
when 'structure' then target_shape['members'][member]['documentation'] = doc
|
|
25
|
+
when 'list' then target_shape[member]['documentation'] = doc
|
|
26
|
+
when 'map' then target_shape[member]['documentation'] = doc
|
|
27
|
+
else raise 'not handled'
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
client_class.set_api(Seahorse::Model::Api.new(api))
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
require 'multi_json'
|
|
2
|
+
require 'erb'
|
|
3
|
+
|
|
4
|
+
module Aws
|
|
5
|
+
module Api
|
|
6
|
+
class Documenter
|
|
7
|
+
|
|
8
|
+
def initialize(svc_module, docs_path)
|
|
9
|
+
@svc_module = svc_module
|
|
10
|
+
@svc_name = svc_module.name.split('::').last
|
|
11
|
+
@client_class = svc_module.const_get(:Client)
|
|
12
|
+
Aws::Api::Docstrings.apply(@client_class, docs_path)
|
|
13
|
+
@api = @client_class.api
|
|
14
|
+
@full_name = @api.metadata('serviceFullName')
|
|
15
|
+
@error_names = @api.operations.map {|_,o| o.errors.map(&:name) }
|
|
16
|
+
@error_names = @error_names.flatten.uniq.sort
|
|
17
|
+
@namespace = YARD::Registry['Aws']
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def apply
|
|
21
|
+
document_service
|
|
22
|
+
document_client
|
|
23
|
+
document_errors
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
private
|
|
27
|
+
|
|
28
|
+
def document_service
|
|
29
|
+
yard_mod = YARD::CodeObjects::ModuleObject.new(@namespace, @svc_name)
|
|
30
|
+
yard_mod.docstring = service_docstring
|
|
31
|
+
yard_mod.docstring.add_tag(YARD::Tags::Tag.new(:service, @svc_name))
|
|
32
|
+
@namespace = yard_mod
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def service_docstring
|
|
36
|
+
path = "doc-src/services/#{@svc_name}/service.md"
|
|
37
|
+
path = 'doc-src/services/default/service.md' unless File.exists?(path)
|
|
38
|
+
template = read(path)
|
|
39
|
+
svc_name = @svc_name
|
|
40
|
+
api = @api
|
|
41
|
+
full_name = @full_name
|
|
42
|
+
ERB.new(template).result(binding)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def document_errors
|
|
46
|
+
yard_mod = YARD::CodeObjects::ModuleObject.new(@namespace, 'Errors')
|
|
47
|
+
yard_mod.docstring = errors_docstring
|
|
48
|
+
|
|
49
|
+
base_error = YARD::CodeObjects::ClassObject.new(yard_mod, 'ServiceError')
|
|
50
|
+
base_error.docstring = "Base class for all Aws::#{@svc_name} errors."
|
|
51
|
+
base_error.superclass = YARD::Registry['Aws::Errors::ServiceError']
|
|
52
|
+
|
|
53
|
+
@error_names.each do |error_name|
|
|
54
|
+
error_klass = YARD::CodeObjects::ClassObject.new(yard_mod, error_name)
|
|
55
|
+
error_klass.superclass = base_error
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def errors_docstring
|
|
60
|
+
path = "doc-src/services/#{@svc_name}/errors.md"
|
|
61
|
+
path = 'doc-src/services/default/errors.md' unless File.exists?(path)
|
|
62
|
+
template = read(path)
|
|
63
|
+
svc_name = @svc_name
|
|
64
|
+
api = @api
|
|
65
|
+
full_name = @full_name
|
|
66
|
+
known_errors = @error_names
|
|
67
|
+
ERB.new(template).result(binding)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def document_client
|
|
71
|
+
yard_class = YARD::CodeObjects::ClassObject.new(@namespace, 'Client')
|
|
72
|
+
yard_class.superclass = YARD::Registry['Seahorse::Client::Base']
|
|
73
|
+
yard_class.docstring = client_docstring
|
|
74
|
+
document_client_constructor(yard_class)
|
|
75
|
+
document_client_operations(yard_class)
|
|
76
|
+
document_client_waiters(yard_class)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def client_docstring
|
|
80
|
+
path = "doc-src/services/#{@svc_name}/client.md"
|
|
81
|
+
path = 'doc-src/services/default/client.md' unless File.exists?(path)
|
|
82
|
+
render(path)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def render(path)
|
|
86
|
+
svc_name = @svc_name
|
|
87
|
+
api = @api
|
|
88
|
+
full_name = @full_name
|
|
89
|
+
ERB.new(File.read(path)).result(binding)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
def document_client_constructor(namespace)
|
|
93
|
+
constructor = YARD::CodeObjects::MethodObject.new(namespace, :initialize)
|
|
94
|
+
constructor.group = 'Constructor'
|
|
95
|
+
constructor.scope = :instance
|
|
96
|
+
constructor.parameters << ['options', '{}']
|
|
97
|
+
constructor.docstring = client_constructor_docstring
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def client_constructor_docstring
|
|
101
|
+
<<-DOCS.strip
|
|
102
|
+
Constructs an API client.
|
|
103
|
+
#{client_constructor_options}
|
|
104
|
+
@return [#{@client_class.name}] Returns an API client.
|
|
105
|
+
DOCS
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
def client_constructor_options
|
|
109
|
+
options = {}
|
|
110
|
+
@client_class.plugins.each do |plugin|
|
|
111
|
+
if p = YARD::Registry[plugin.name]
|
|
112
|
+
p.tags.each do |tag|
|
|
113
|
+
if tag.tag_name == 'seahorse_client_option'
|
|
114
|
+
option_name = tag.text.match(/.+(:\w+)/)[1]
|
|
115
|
+
option_text = "@option options " + tag.text.split("\n").join("\n ")
|
|
116
|
+
options[option_name] = option_text +
|
|
117
|
+
" See {#{plugin.name}} for more details."
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
options.sort_by { |k,v| k }.map(&:last).join("\n")
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
def document_client_operations(namespace)
|
|
126
|
+
@api.operations.each do |method_name, operation|
|
|
127
|
+
document_client_operation(namespace, method_name, operation)
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
def document_client_operation(namespace, method_name, operation)
|
|
132
|
+
m = YARD::CodeObjects::MethodObject.new(namespace, method_name)
|
|
133
|
+
m.group = 'Service Operations'
|
|
134
|
+
m.scope = :instance
|
|
135
|
+
m.parameters << ['params', '{}']
|
|
136
|
+
m.docstring = operation_docstring(method_name, operation)
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
def operation_docstring(method_name, operation)
|
|
140
|
+
|
|
141
|
+
documentor = OperationDocumenter.new(
|
|
142
|
+
svc_var_name: @svc_name.downcase,
|
|
143
|
+
method_name: method_name,
|
|
144
|
+
operation: operation)
|
|
145
|
+
|
|
146
|
+
tabs = Tabulator.new.tap do |t|
|
|
147
|
+
t.tab(method_name, 'Formatting Example') do
|
|
148
|
+
"<pre><code>#{documentor.example}</code></pre>"
|
|
149
|
+
end
|
|
150
|
+
t.tab(method_name, 'Request Parameters') do
|
|
151
|
+
documentor.input
|
|
152
|
+
end
|
|
153
|
+
t.tab(method_name, 'Response Structure') do
|
|
154
|
+
documentor.output
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
errors = (operation.errors || []).map { |shape| shape.name }
|
|
159
|
+
errors = errors.map { |e| "@raise [Errors::#{e}]" }.join("\n")
|
|
160
|
+
|
|
161
|
+
docstring = <<-DOCSTRING.strip
|
|
162
|
+
<p>Calls the #{operation.name} operation.<p>
|
|
163
|
+
#{documentor.api_ref(operation)}
|
|
164
|
+
#{tabs}
|
|
165
|
+
@param [Hash] params ({})
|
|
166
|
+
@return [PageableResponse]
|
|
167
|
+
#{errors}
|
|
168
|
+
DOCSTRING
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
def document_client_waiters(yard_class)
|
|
172
|
+
m = YARD::CodeObjects::MethodObject.new(yard_class, :wait_until)
|
|
173
|
+
m.scope = :instance
|
|
174
|
+
m.parameters << ['waiter_name', nil]
|
|
175
|
+
m.parameters << ['params', '{}']
|
|
176
|
+
m.docstring = YARD::Registry['Aws::Client#wait_until'].docstring
|
|
177
|
+
|
|
178
|
+
waiters = @client_class.waiters.waiter_names.sort.inject('') do |w,name|
|
|
179
|
+
operation = @client_class.waiters.waiter(name).send(:operation_name)
|
|
180
|
+
w << "<tr><td><tt>:#{name}</tt></td><td>{##{operation}}</td></tr>"
|
|
181
|
+
end
|
|
182
|
+
docstring = <<-DOCSTRING
|
|
183
|
+
Returns the list of supported waiters. The following table lists the supported
|
|
184
|
+
waiters and the client method they call:
|
|
185
|
+
<table>
|
|
186
|
+
<thead>
|
|
187
|
+
<tr><th>Waiter Name</th><th>Client Method</th></tr>
|
|
188
|
+
</thead>
|
|
189
|
+
<tbody>
|
|
190
|
+
#{waiters}
|
|
191
|
+
</tbody>
|
|
192
|
+
</table>
|
|
193
|
+
@return [Array<Symbol>] the list of supported waiters.
|
|
194
|
+
DOCSTRING
|
|
195
|
+
m = YARD::CodeObjects::MethodObject.new(yard_class, :waiter_names)
|
|
196
|
+
m.scope = :instance
|
|
197
|
+
m.docstring = docstring
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
class Tabulator
|
|
201
|
+
|
|
202
|
+
def initialize
|
|
203
|
+
@tabs = []
|
|
204
|
+
@tab_contents = []
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
def tab(method_name, tab_name, &block)
|
|
208
|
+
tab_class = tab_name.downcase.gsub(/[^a-z]+/i, '-')
|
|
209
|
+
tab_id = "#{method_name.to_s.gsub(/_/, '-')}-#{tab_class}"
|
|
210
|
+
class_names = ['tab-contents', tab_class]
|
|
211
|
+
@tabs << [tab_id, tab_name]
|
|
212
|
+
@tab_contents << "<div class=\"#{class_names.join(' ')}\" id=\"#{tab_id}\">"
|
|
213
|
+
@tab_contents << yield
|
|
214
|
+
@tab_contents << '</div>'
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
def to_html
|
|
218
|
+
lines = []
|
|
219
|
+
lines << '<div class="tab-box">'
|
|
220
|
+
lines << '<ul class="tabs">'
|
|
221
|
+
@tabs.each do |tab_id, tab_name|
|
|
222
|
+
lines << "<li data-tab-id=\"#{tab_id}\">#{tab_name}</li>"
|
|
223
|
+
end
|
|
224
|
+
lines << '</ul>'
|
|
225
|
+
lines.concat(@tab_contents)
|
|
226
|
+
lines << '</div>'
|
|
227
|
+
lines.join
|
|
228
|
+
end
|
|
229
|
+
alias inspect to_html
|
|
230
|
+
alias to_str to_html
|
|
231
|
+
alias to_s to_html
|
|
232
|
+
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
def read(path)
|
|
236
|
+
File.open(path, 'r', encoding: 'UTF-8') { |f| f.read }
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
end
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
module Aws
|
|
2
2
|
module Api
|
|
3
|
-
class
|
|
3
|
+
class OperationDocumenter
|
|
4
4
|
|
|
5
|
-
def initialize(
|
|
6
|
-
@operation = operation
|
|
7
|
-
@example =
|
|
5
|
+
def initialize(options)
|
|
6
|
+
@operation = options[:operation]
|
|
7
|
+
@example = OperationExample.new(options)
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
def input
|
|
@@ -50,7 +50,11 @@ module Aws
|
|
|
50
50
|
private
|
|
51
51
|
|
|
52
52
|
def params(shape, &block)
|
|
53
|
-
|
|
53
|
+
if shape && shape.name == 'AttributeValue'
|
|
54
|
+
['<p>An attribute value may be one of:<ul><li>`String`</li><li>`Numeric`</li><li>`IO`</li><li>`Set<String,Numeric,IO>`</li></ul></p>']
|
|
55
|
+
else
|
|
56
|
+
['<div class="params">', api_ref(shape)] + yield + ['</div>']
|
|
57
|
+
end
|
|
54
58
|
end
|
|
55
59
|
|
|
56
60
|
def param(shape, key_name, value_type, required, visited, &block)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
module Aws
|
|
2
2
|
module Api
|
|
3
|
-
class
|
|
3
|
+
class OperationExample
|
|
4
4
|
|
|
5
5
|
include Seahorse::Model::Shapes
|
|
6
6
|
|
|
7
|
-
def initialize(
|
|
8
|
-
@obj_name =
|
|
9
|
-
@method_name = method_name
|
|
10
|
-
@operation = operation
|
|
7
|
+
def initialize(options)
|
|
8
|
+
@obj_name = options[:svc_var_name]
|
|
9
|
+
@method_name = options[:method_name]
|
|
10
|
+
@operation = options[:operation]
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def to_str
|
|
@@ -46,7 +46,6 @@ module Aws
|
|
|
46
46
|
def multiline_map(shape, i, visited)
|
|
47
47
|
lines = ["{"]
|
|
48
48
|
lines << "#{i} #{key_name(shape)} => #{member(shape.value, i + ' ', visited)},"
|
|
49
|
-
#lines << "#{i} # repeated ..."
|
|
50
49
|
lines << "#{i}}"
|
|
51
50
|
lines.join("\n")
|
|
52
51
|
end
|
|
@@ -62,7 +61,6 @@ module Aws
|
|
|
62
61
|
def multiline_list(shape, i, visited)
|
|
63
62
|
lines = ["["]
|
|
64
63
|
lines << "#{i} #{member(shape.member, i + ' ', visited)},"
|
|
65
|
-
#lines << "#{i} # repeated ... "
|
|
66
64
|
lines << "#{i}]"
|
|
67
65
|
lines.join("\n")
|
|
68
66
|
end
|
|
@@ -73,6 +71,9 @@ module Aws
|
|
|
73
71
|
recursive << "#{i} # recursive #{shape.name} ..."
|
|
74
72
|
recursive << "#{i}}"
|
|
75
73
|
return recursive.join("\n")
|
|
74
|
+
elsif shape.name == 'AttributeValue'
|
|
75
|
+
msg='"value", #<String,Numeric,IO,Set>'
|
|
76
|
+
return msg
|
|
76
77
|
else
|
|
77
78
|
visited = visited + [shape.name]
|
|
78
79
|
end
|
|
@@ -78,12 +78,13 @@ module Aws
|
|
|
78
78
|
end
|
|
79
79
|
|
|
80
80
|
customize 'cloudsearchdomain' do
|
|
81
|
-
remove_plugin 'Aws::Plugins::RequestSigner'
|
|
82
81
|
remove_plugin 'Aws::Plugins::RegionalEndpoint'
|
|
82
|
+
add_plugin 'Aws::Plugins::CSDConditionalSigning'
|
|
83
83
|
end
|
|
84
84
|
|
|
85
85
|
customize 'dynamodb' do
|
|
86
86
|
add_plugin 'Aws::Plugins::DynamoDBExtendedRetries'
|
|
87
|
+
add_plugin 'Aws::Plugins::DynamoDBSimpleAttributes'
|
|
87
88
|
end
|
|
88
89
|
|
|
89
90
|
customize 'ec2' do
|
|
@@ -123,6 +124,7 @@ module Aws
|
|
|
123
124
|
add_plugin 'Aws::Plugins::S3Md5s'
|
|
124
125
|
add_plugin 'Aws::Plugins::S3Redirects'
|
|
125
126
|
add_plugin 'Aws::Plugins::S3SseCpk'
|
|
127
|
+
add_plugin 'Aws::Plugins::S3UrlEncodedKeys'
|
|
126
128
|
end
|
|
127
129
|
|
|
128
130
|
customize 'sqs' do
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
module Aws
|
|
2
|
+
|
|
3
|
+
# Base class for all {Aws} service clients.
|
|
4
|
+
class Client < Seahorse::Client::Base
|
|
5
|
+
|
|
6
|
+
# Waits until a particular condition is satisfied. This works by
|
|
7
|
+
# polling a client request and checking for particular response
|
|
8
|
+
# data or errors. Waiters each have a default duration max attempts
|
|
9
|
+
# which are configurable. Additionally, you can register callbacks
|
|
10
|
+
# and stop waiters by throwing `:success` or `:failure`.
|
|
11
|
+
#
|
|
12
|
+
# @example Basic usage
|
|
13
|
+
# client.wait_until(:waiter_name)
|
|
14
|
+
#
|
|
15
|
+
# @example Configuring interval and maximum attempts
|
|
16
|
+
# client.wait_until(:waiter_name) do |w|
|
|
17
|
+
# w.interval = 10 # number of seconds to sleep between attempts
|
|
18
|
+
# w.max_attempts = 6 # maximum number of polling attempts
|
|
19
|
+
# end
|
|
20
|
+
#
|
|
21
|
+
# @example Rescuing a failed wait
|
|
22
|
+
# begin
|
|
23
|
+
# client.wait_until(:waiter_name)
|
|
24
|
+
# rescue Aws::Waiters::Errors::WaiterFailed
|
|
25
|
+
# # gave up waiting
|
|
26
|
+
# end
|
|
27
|
+
#
|
|
28
|
+
# @example Waiting with progress callbacks
|
|
29
|
+
# client.wait_until(:waiter_name) do |w|
|
|
30
|
+
#
|
|
31
|
+
# # yields just before polling for change
|
|
32
|
+
# w.before_attempt do |attempt|
|
|
33
|
+
# # attempts - number of previous attempts made
|
|
34
|
+
# end
|
|
35
|
+
#
|
|
36
|
+
# # yields before sleeping
|
|
37
|
+
# w.before_wait do |attempt, prev_response|
|
|
38
|
+
# # attempts - number of previous attempts made
|
|
39
|
+
# # prev_response - the last client response received
|
|
40
|
+
# end
|
|
41
|
+
# end
|
|
42
|
+
#
|
|
43
|
+
# @example Throw :success or :failure to terminate early
|
|
44
|
+
# # wait for an hour, not for a number of requests
|
|
45
|
+
# client.wait_until(:waiter_name) do |waiter|
|
|
46
|
+
# one_hour = Time.now + 3600
|
|
47
|
+
# waiter.max_attempts = nil
|
|
48
|
+
# waiter.before_attempt do |attempt|
|
|
49
|
+
# throw(:failure, 'waited to long') if Time.now > one_hour
|
|
50
|
+
# end
|
|
51
|
+
# end
|
|
52
|
+
#
|
|
53
|
+
# @param [Symbol] waiter_name The name of the waiter. See {#waiter_names}
|
|
54
|
+
# for a full list of supported waiters.
|
|
55
|
+
# @param [Hash] params Additional request parameters. See the {#waiter_names}
|
|
56
|
+
# for a list of supported waiters and what request they call. The
|
|
57
|
+
# called request determines the list of accepted parameters.
|
|
58
|
+
# @return [Seahorse::Client::Response] Returns the client response from
|
|
59
|
+
# the successful polling request. If `:success` is thrown from a callback,
|
|
60
|
+
# then the 2nd argument to `#throw` is returned.
|
|
61
|
+
# @yieldparam [Waiters::Waiter] waiter Yields a {Waiters::Waiter Waiter}
|
|
62
|
+
# object that can be configured prior to waiting.
|
|
63
|
+
# @raise [Waiters::Errors::NoSuchWaiter] Raised when the named waiter
|
|
64
|
+
# is not defined.
|
|
65
|
+
# @raise [Waiters::Errors::WaiterFailed] Raised when one of the
|
|
66
|
+
# following conditions is met:
|
|
67
|
+
#
|
|
68
|
+
# * A failure condition is detected
|
|
69
|
+
# * The maximum number of attempts has been made without success
|
|
70
|
+
# * `:failure` is thrown from a callback
|
|
71
|
+
#
|
|
72
|
+
def wait_until(waiter_name, params = {}, &block)
|
|
73
|
+
waiter = self.class.waiters.waiter(waiter_name)
|
|
74
|
+
yield(waiter) if block_given?
|
|
75
|
+
waiter.wait(self, params)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Returns the list of supported waiters.
|
|
79
|
+
# @return [Array<Symbol>]
|
|
80
|
+
def waiter_names
|
|
81
|
+
self.class.waiters.waiter_names
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
class << self
|
|
85
|
+
|
|
86
|
+
# @return [Symbol]
|
|
87
|
+
# @api private
|
|
88
|
+
attr_accessor :identifier
|
|
89
|
+
|
|
90
|
+
# @return [Paging::Provider]
|
|
91
|
+
# @api private
|
|
92
|
+
attr_accessor :paginators
|
|
93
|
+
|
|
94
|
+
# @return [Waiters::Provider]
|
|
95
|
+
# @api private
|
|
96
|
+
attr_accessor :waiters
|
|
97
|
+
|
|
98
|
+
# @api private
|
|
99
|
+
def define(svc_name, options)
|
|
100
|
+
client_class = Class.new(self)
|
|
101
|
+
client_class.identifier = svc_name.downcase.to_sym
|
|
102
|
+
client_class.set_api(load_api(options[:api]))
|
|
103
|
+
Api::ServiceCustomizations.apply(client_class)
|
|
104
|
+
client_class
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
private
|
|
108
|
+
|
|
109
|
+
def load_api(api)
|
|
110
|
+
case api
|
|
111
|
+
when Seahorse::Model::Api then api
|
|
112
|
+
when Hash then Seahorse::Model::Api.new(api)
|
|
113
|
+
when String then Seahorse::Model::Api.new(Aws.load_json(api))
|
|
114
|
+
when nil then Seahorse::Model::Api.new({})
|
|
115
|
+
else raise ArgumentError, "invalid api definition #{api}"
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
end
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
Aws.add_service(:CloudFront, {
|
|
2
|
+
api: File.join(Aws::APIS_DIR, 'CloudFront.api.json'),
|
|
3
|
+
docs: File.join(Aws::APIS_DIR, 'CloudFront.docs.json'),
|
|
4
|
+
paginators: File.join(Aws::APIS_DIR, 'CloudFront.paginators.json'),
|
|
5
|
+
waiters: File.join(Aws::APIS_DIR, 'CloudFront.waiters.json'),
|
|
6
|
+
})
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
module Aws
|
|
2
|
+
# @api private
|
|
2
3
|
class CredentialProviderChain
|
|
3
4
|
|
|
4
5
|
def initialize(config)
|
|
@@ -8,7 +9,7 @@ module Aws
|
|
|
8
9
|
def resolve
|
|
9
10
|
providers.each do |method_name, options|
|
|
10
11
|
credentials = send(method_name, options.merge(config: @config))
|
|
11
|
-
return credentials if credentials.set?
|
|
12
|
+
return credentials if credentials && credentials.set?
|
|
12
13
|
end
|
|
13
14
|
nil
|
|
14
15
|
end
|
|
@@ -49,6 +50,8 @@ module Aws
|
|
|
49
50
|
|
|
50
51
|
def shared_credentials(options = {})
|
|
51
52
|
SharedCredentials.new(profile_name: options[:config].profile)
|
|
53
|
+
rescue Errors::NoSuchProfileError
|
|
54
|
+
nil
|
|
52
55
|
end
|
|
53
56
|
|
|
54
57
|
def instance_profile_credentials(*args)
|