aws-sdk-core 2.0.3 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/apis/CognitoIdentity.api.json +16 -4
  3. data/apis/EC2.paginators.json +3 -0
  4. data/apis/ElastiCache.api.json +164 -15
  5. data/apis/IAM.api.json +326 -1
  6. data/apis/IAM.resources.json +2 -29
  7. data/apis/Route53Domains.api.json +56 -0
  8. data/apis/S3.api.json +1 -1
  9. data/endpoints.json +62 -76
  10. data/lib/aws-sdk-core.rb +4 -14
  11. data/lib/aws-sdk-core/api/documenter.rb +1 -1
  12. data/lib/aws-sdk-core/api/service_customizations.rb +1 -0
  13. data/lib/aws-sdk-core/assume_role_credentials.rb +46 -0
  14. data/lib/aws-sdk-core/autoscaling.rb +3 -3
  15. data/lib/aws-sdk-core/cloudformation.rb +3 -3
  16. data/lib/aws-sdk-core/cloudfront.rb +4 -4
  17. data/lib/aws-sdk-core/cloudsearch.rb +3 -3
  18. data/lib/aws-sdk-core/cloudsearchdomain.rb +2 -2
  19. data/lib/aws-sdk-core/cloudtrail.rb +3 -3
  20. data/lib/aws-sdk-core/cloudwatch.rb +3 -3
  21. data/lib/aws-sdk-core/cloudwatchlogs.rb +3 -3
  22. data/lib/aws-sdk-core/cognitoidentity.rb +2 -2
  23. data/lib/aws-sdk-core/cognitosync.rb +2 -2
  24. data/lib/aws-sdk-core/datapipeline.rb +3 -3
  25. data/lib/aws-sdk-core/directconnect.rb +3 -3
  26. data/lib/aws-sdk-core/dynamodb.rb +4 -4
  27. data/lib/aws-sdk-core/ec2.rb +5 -5
  28. data/lib/aws-sdk-core/elasticache.rb +3 -3
  29. data/lib/aws-sdk-core/elasticbeanstalk.rb +3 -3
  30. data/lib/aws-sdk-core/elasticloadbalancing.rb +3 -3
  31. data/lib/aws-sdk-core/elastictranscoder.rb +4 -4
  32. data/lib/aws-sdk-core/emr.rb +3 -3
  33. data/lib/aws-sdk-core/endpoint_provider.rb +16 -78
  34. data/lib/aws-sdk-core/glacier.rb +5 -5
  35. data/lib/aws-sdk-core/iam.rb +4 -4
  36. data/lib/aws-sdk-core/importexport.rb +3 -3
  37. data/lib/aws-sdk-core/instance_profile_credentials.rb +13 -45
  38. data/lib/aws-sdk-core/kinesis.rb +3 -3
  39. data/lib/aws-sdk-core/opsworks.rb +4 -4
  40. data/lib/aws-sdk-core/pageable_response.rb +18 -0
  41. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +1 -5
  42. data/lib/aws-sdk-core/plugins/request_signer.rb +3 -9
  43. data/lib/aws-sdk-core/plugins/s3_region_detection.rb +157 -0
  44. data/lib/aws-sdk-core/plugins/stub_responses.rb +13 -1
  45. data/lib/aws-sdk-core/rds.rb +4 -4
  46. data/lib/aws-sdk-core/redshift.rb +4 -4
  47. data/lib/aws-sdk-core/refreshing_credentials.rb +73 -0
  48. data/lib/aws-sdk-core/route53.rb +3 -3
  49. data/lib/aws-sdk-core/route53domains.rb +2 -2
  50. data/lib/aws-sdk-core/s3.rb +24 -5
  51. data/lib/aws-sdk-core/s3/bucket_region_cache.rb +75 -0
  52. data/lib/aws-sdk-core/ses.rb +4 -4
  53. data/lib/aws-sdk-core/signers/v4.rb +1 -1
  54. data/lib/aws-sdk-core/simpledb.rb +3 -3
  55. data/lib/aws-sdk-core/sns.rb +4 -4
  56. data/lib/aws-sdk-core/sqs.rb +4 -4
  57. data/lib/aws-sdk-core/storagegateway.rb +3 -3
  58. data/lib/aws-sdk-core/sts.rb +2 -2
  59. data/lib/aws-sdk-core/support.rb +3 -3
  60. data/lib/aws-sdk-core/swf.rb +3 -3
  61. data/lib/aws-sdk-core/version.rb +1 -1
  62. metadata +6 -2
@@ -199,7 +199,7 @@
199
199
  { "name": "UserName" },
200
200
  { "name": "Id" }
201
201
  ],
202
- "shape": "AccessKeyMetadata",
202
+ "shape": "AccessKey",
203
203
  "actions": {
204
204
  "Activate": {
205
205
  "request": {
@@ -233,33 +233,6 @@
233
233
  }
234
234
  }
235
235
  },
236
- "AccessKeyPair": {
237
- "identifiers": [
238
- { "name": "UserName" },
239
- { "name": "Id" }
240
- ],
241
- "shape": "AccessKey",
242
- "hasOne": {
243
- "AccessKey": {
244
- "resource": {
245
- "type": "AccessKey",
246
- "identifiers": [
247
- { "target":"UserName", "sourceType":"identifier", "source":"UserName" },
248
- { "target":"Id", "sourceType":"identifier", "source":"Id" }
249
- ]
250
- }
251
- },
252
- "User": {
253
- "resource": {
254
- "type": "AccessKey",
255
- "identifiers": [
256
- { "target":"UserName", "sourceType":"identifier", "source":"UserName" },
257
- { "target":"Id", "sourceType":"identifier", "source":"Id" }
258
- ]
259
- }
260
- }
261
- }
262
- },
263
236
  "AccountAlias": {
264
237
  "identifiers": [
265
238
  { "name": "Name" }
@@ -830,7 +803,7 @@
830
803
  ]
831
804
  },
832
805
  "resource": {
833
- "type": "AccessKeyPair",
806
+ "type": "AccessKey",
834
807
  "identifiers": [
835
808
  { "target":"UserName", "sourceType":"identifier", "source":"Name" },
836
809
  { "target":"Id", "sourceType":"responsePath", "source":"AccessKey.AccessKeyId" }
@@ -30,6 +30,22 @@
30
30
  }
31
31
  ]
32
32
  },
33
+ "DisableDomainAutoRenew":{
34
+ "name":"DisableDomainAutoRenew",
35
+ "http":{
36
+ "method":"POST",
37
+ "requestUri":"/"
38
+ },
39
+ "input":{"shape":"DisableDomainAutoRenewRequest"},
40
+ "output":{"shape":"DisableDomainAutoRenewResponse"},
41
+ "errors":[
42
+ {
43
+ "shape":"InvalidInput",
44
+ "error":{"httpStatusCode":400},
45
+ "exception":true
46
+ }
47
+ ]
48
+ },
33
49
  "DisableDomainTransferLock":{
34
50
  "name":"DisableDomainTransferLock",
35
51
  "http":{
@@ -61,6 +77,22 @@
61
77
  }
62
78
  ]
63
79
  },
80
+ "EnableDomainAutoRenew":{
81
+ "name":"EnableDomainAutoRenew",
82
+ "http":{
83
+ "method":"POST",
84
+ "requestUri":"/"
85
+ },
86
+ "input":{"shape":"EnableDomainAutoRenewRequest"},
87
+ "output":{"shape":"EnableDomainAutoRenewResponse"},
88
+ "errors":[
89
+ {
90
+ "shape":"InvalidInput",
91
+ "error":{"httpStatusCode":400},
92
+ "exception":true
93
+ }
94
+ ]
95
+ },
64
96
  "EnableDomainTransferLock":{
65
97
  "name":"EnableDomainTransferLock",
66
98
  "http":{
@@ -646,6 +678,18 @@
646
678
  ]
647
679
  },
648
680
  "DNSSec":{"type":"string"},
681
+ "DisableDomainAutoRenewRequest":{
682
+ "type":"structure",
683
+ "required":["DomainName"],
684
+ "members":{
685
+ "DomainName":{"shape":"DomainName"}
686
+ }
687
+ },
688
+ "DisableDomainAutoRenewResponse":{
689
+ "type":"structure",
690
+ "members":{
691
+ }
692
+ },
649
693
  "DisableDomainTransferLockRequest":{
650
694
  "type":"structure",
651
695
  "required":["DomainName"],
@@ -726,6 +770,18 @@
726
770
  "type":"string",
727
771
  "max":254
728
772
  },
773
+ "EnableDomainAutoRenewRequest":{
774
+ "type":"structure",
775
+ "required":["DomainName"],
776
+ "members":{
777
+ "DomainName":{"shape":"DomainName"}
778
+ }
779
+ },
780
+ "EnableDomainAutoRenewResponse":{
781
+ "type":"structure",
782
+ "members":{
783
+ }
784
+ },
729
785
  "EnableDomainTransferLockRequest":{
730
786
  "type":"structure",
731
787
  "required":["DomainName"],
@@ -7,7 +7,7 @@
7
7
  "serviceAbbreviation":"Amazon S3",
8
8
  "serviceFullName":"Amazon Simple Storage Service",
9
9
  "signatureVersion":"v4",
10
- "v3Regions": [
10
+ "sigv2Regions": [
11
11
  "us-east-1",
12
12
  "us-west-1",
13
13
  "us-west-2",
@@ -1,77 +1,63 @@
1
- [
2
- {
3
- "priority": 500,
4
- "regionPrefix": "cn-",
5
- "rules": [
6
- {
7
- "services": ["iam", "sts"],
8
- "config": {
9
- "endpoint": "{scheme}://{service}.cn-north-1.amazonaws.com.cn"
10
- }
11
- },
12
- {
13
- "config": {
14
- "endpoint": "{scheme}://{service}.{region}.amazonaws.com.cn"
15
- }
16
- }
17
- ]
18
- },
19
- {
20
- "priority": 600,
21
- "regionPrefix": "us-gov-",
22
- "rules": [
23
- {
24
- "services": ["iam"],
25
- "config": {
26
- "endpoint": "{scheme}://{service}.us-gov.amazonaws.com"
27
- }
28
- },
29
- {
30
- "services": ["s3"],
31
- "config": {
32
- "endpoint": "{scheme}://{service}-{region}.amazonaws.com"
33
- }
34
- },
35
- {
36
- "config": {
37
- "endpoint": "{scheme}://{service}.{region}.amazonaws.com"
38
- }
39
- }
40
- ]
41
- },
42
- {
43
- "priority": 900,
44
- "regionPrefix": "us-east-1",
45
- "rules": [
46
- {
47
- "services": ["s3", "sdb"],
48
- "config": {
49
- "endpoint": "{scheme}://{service}.amazonaws.com"
50
- }
51
- }
52
- ]
53
- },
54
- {
55
- "priority": 999,
56
- "regionPrefix": "",
57
- "rules": [
58
- {
59
- "services": ["s3"],
60
- "config": {
61
- "endpoint": "{scheme}://{service}-{region}.amazonaws.com"
62
- }
63
- },
64
- {
65
- "services": ["cloudfront", "iam", "importexport", "route53", "sts"],
66
- "config": {
67
- "endpoint": "{scheme}://{service}.amazonaws.com"
68
- }
69
- },
70
- {
71
- "config": {
72
- "endpoint": "{scheme}://{service}.{region}.amazonaws.com"
73
- }
74
- }
75
- ]
1
+ {
2
+ "version": 2,
3
+ "endpoints": {
4
+ "*/*": {
5
+ "endpoint": "{service}.{region}.amazonaws.com"
6
+ },
7
+ "cn-north-1/*": {
8
+ "endpoint": "{service}.{region}.amazonaws.com.cn",
9
+ "signatureVersion": "v4"
10
+ },
11
+ "us-gov-west-1/iam": {
12
+ "endpoint": "iam.us-gov.amazonaws.com"
13
+ },
14
+ "us-gov-west-1/sts": {
15
+ "endpoint": "sts.us-gov.amazonaws.com"
16
+ },
17
+ "us-gov-west-1/s3": {
18
+ "endpoint": "s3-{region}.amazonaws.com"
19
+ },
20
+ "*/cloudfront": {
21
+ "endpoint": "cloudfront.amazonaws.com"
22
+ },
23
+ "*/iam": {
24
+ "endpoint": "iam.amazonaws.com"
25
+ },
26
+ "*/importexport": {
27
+ "endpoint": "importexport.amazonaws.com"
28
+ },
29
+ "*/route53": {
30
+ "endpoint": "route53.amazonaws.com"
31
+ },
32
+ "*/sts": {
33
+ "endpoint": "sts.amazonaws.com"
34
+ },
35
+ "us-east-1/sdb": {
36
+ "endpoint": "sdb.amazonaws.com"
37
+ },
38
+ "us-east-1/s3": {
39
+ "endpoint": "s3.amazonaws.com"
40
+ },
41
+ "us-west-1/s3": {
42
+ "endpoint": "s3-{region}.amazonaws.com"
43
+ },
44
+ "us-west-2/s3": {
45
+ "endpoint": "s3-{region}.amazonaws.com"
46
+ },
47
+ "eu-west-1/s3": {
48
+ "endpoint": "s3-{region}.amazonaws.com"
49
+ },
50
+ "ap-southeast-1/s3": {
51
+ "endpoint": "s3-{region}.amazonaws.com"
52
+ },
53
+ "ap-southeast-2/s3": {
54
+ "endpoint": "s3-{region}.amazonaws.com"
55
+ },
56
+ "ap-northeast-1/s3": {
57
+ "endpoint": "s3-{region}.amazonaws.com"
58
+ },
59
+ "sa-east-1/s3": {
60
+ "endpoint": "s3-{region}.amazonaws.com"
61
+ }
76
62
  }
77
- ]
63
+ }
@@ -12,10 +12,7 @@ Seahorse::Util.irregular_inflections({
12
12
  module Aws
13
13
 
14
14
  # @api private
15
- GEM_ROOT = File.dirname(File.dirname(__FILE__))
16
-
17
- # @api private
18
- APIS_DIR = File.join(GEM_ROOT, 'apis')
15
+ API_DIR = File.join(File.dirname(File.dirname(__FILE__)), 'apis')
19
16
 
20
17
  # @api private
21
18
  # services
@@ -67,6 +64,7 @@ module Aws
67
64
  autoload const_name, "aws-sdk-core/#{const_name.downcase}"
68
65
  end
69
66
 
67
+ autoload :AssumeRoleCredentials, 'aws-sdk-core/assume_role_credentials'
70
68
  autoload :Client, 'aws-sdk-core/client'
71
69
  autoload :ClientPaging, 'aws-sdk-core/client_paging'
72
70
  autoload :ClientStubs, 'aws-sdk-core/client_stubs'
@@ -79,6 +77,7 @@ module Aws
79
77
  autoload :InstanceProfileCredentials, 'aws-sdk-core/instance_profile_credentials'
80
78
  autoload :PageableResponse, 'aws-sdk-core/pageable_response'
81
79
  autoload :RestBodyHandler, 'aws-sdk-core/rest_body_handler'
80
+ autoload :RefreshingCredentials, 'aws-sdk-core/refreshing_credentials'
82
81
  autoload :Service, 'aws-sdk-core/service'
83
82
  autoload :SharedCredentials, 'aws-sdk-core/shared_credentials'
84
83
  autoload :Structure, 'aws-sdk-core/structure'
@@ -137,6 +136,7 @@ module Aws
137
136
  autoload :S3LocationConstraint, 'aws-sdk-core/plugins/s3_location_constraint'
138
137
  autoload :S3Md5s, 'aws-sdk-core/plugins/s3_md5s'
139
138
  autoload :S3Redirects, 'aws-sdk-core/plugins/s3_redirects'
139
+ autoload :S3RegionDetection, 'aws-sdk-core/plugins/s3_region_detection'
140
140
  autoload :S3SseCpk, 'aws-sdk-core/plugins/s3_sse_cpk'
141
141
  autoload :S3UrlEncodedKeys, 'aws-sdk-core/plugins/s3_url_encoded_keys'
142
142
  autoload :SQSQueueUrls, 'aws-sdk-core/plugins/sqs_queue_urls'
@@ -261,18 +261,8 @@ module Aws
261
261
 
262
262
  # build service client classes
263
263
  service_added do |name, svc_module, options|
264
-
265
264
  svc_module.const_set(:Client, Client.define(name, options))
266
265
  svc_module.const_set(:Errors, Module.new { extend Errors::DynamicErrors })
267
-
268
- # temporary workaround for issue with S3 waiter definition
269
- if name == 'S3'
270
- defs = svc_module::Client.waiters.instance_variable_get("@definitions")
271
- defs[:bucket_exists]['ignore_errors'] = ['NotFound']
272
- defs[:object_exists]['ignore_errors'] = ['NotFound']
273
- defs[:bucket_not_exists]['success_value'] = 'NotFound'
274
- defs[:object_not_exists]['success_value'] = 'NotFound'
275
- end
276
266
  end
277
267
 
278
268
  end
@@ -173,7 +173,7 @@ Constructs an API client.
173
173
  m.scope = :instance
174
174
  m.parameters << ['waiter_name', nil]
175
175
  m.parameters << ['params', '{}']
176
- m.docstring = YARD::Registry['Aws::Client#wait_until'].docstring
176
+ m.docstring = YARD::Registry['Aws::ClientWaiters#wait_until'].docstring
177
177
 
178
178
  waiters = @client_class.waiters.waiter_names.sort.inject('') do |w,name|
179
179
  operation = @client_class.waiters.waiter(name).send(:operation_name)
@@ -102,6 +102,7 @@ module Aws
102
102
  add_plugin 'Aws::Plugins::S3Redirects'
103
103
  add_plugin 'Aws::Plugins::S3SseCpk'
104
104
  add_plugin 'Aws::Plugins::S3UrlEncodedKeys'
105
+ add_plugin 'Aws::Plugins::S3RegionDetection'
105
106
  defs = client_class.waiters.instance_variable_get("@definitions")
106
107
  defs[:bucket_exists]['ignore_errors'] = ['NotFound']
107
108
  defs[:object_exists]['ignore_errors'] = ['NotFound']
@@ -0,0 +1,46 @@
1
+ module Aws
2
+
3
+ # An auto-refreshing credential provider that works by assuming
4
+ # a role via {Aws::STS::Client#assume_role}.
5
+ #
6
+ # role_credentials = Aws::AssumeRoleCredentials.new(
7
+ # client: Aws::STS::Client.new(...),
8
+ # role_arn: "linked::account::arn",
9
+ # role_session_name: "session-name"
10
+ # )
11
+ #
12
+ # ec2 = Aws::EC2::Client.new(credentials: role_credentials)
13
+ #
14
+ # If you omit `:client` option, a new {STS::Client} object will be
15
+ # constructed.
16
+ class AssumeRoleCredentials < Credentials
17
+
18
+ include RefreshingCredentials
19
+
20
+ # @option options [required, String] :role_arn
21
+ # @option options [required, String] :role_session_name
22
+ # @option options [String] :policy
23
+ # @option options [Integer] :duration_seconds
24
+ # @option options [String] :external_id
25
+ # @option opitons [STS::Client] :client
26
+ def initialize(options = {})
27
+ @options = options.dup
28
+ @client = @options.delete(:client) || STS::Client.new
29
+ super
30
+ end
31
+
32
+ # @return [STS::Client]
33
+ attr_reader :client
34
+
35
+ private
36
+
37
+ def refresh
38
+ creds = @client.assume_role(@options).credentials
39
+ @access_key_id = creds.access_key_id
40
+ @secret_access_key = creds.secret_access_key
41
+ @session_token = creds.session_token
42
+ @expiration = creds.expiration
43
+ end
44
+
45
+ end
46
+ end
@@ -1,5 +1,5 @@
1
1
  Aws.add_service(:AutoScaling, {
2
- api: File.join(Aws::APIS_DIR, 'AutoScaling.api.json'),
3
- docs: File.join(Aws::APIS_DIR, 'AutoScaling.docs.json'),
4
- paginators: File.join(Aws::APIS_DIR, 'AutoScaling.paginators.json'),
2
+ api: File.join(Aws::API_DIR, 'AutoScaling.api.json'),
3
+ docs: File.join(Aws::API_DIR, 'AutoScaling.docs.json'),
4
+ paginators: File.join(Aws::API_DIR, 'AutoScaling.paginators.json'),
5
5
  })
@@ -1,5 +1,5 @@
1
1
  Aws.add_service(:CloudFormation, {
2
- api: File.join(Aws::APIS_DIR, 'CloudFormation.api.json'),
3
- docs: File.join(Aws::APIS_DIR, 'CloudFormation.docs.json'),
4
- paginators: File.join(Aws::APIS_DIR, 'CloudFormation.paginators.json'),
2
+ api: File.join(Aws::API_DIR, 'CloudFormation.api.json'),
3
+ docs: File.join(Aws::API_DIR, 'CloudFormation.docs.json'),
4
+ paginators: File.join(Aws::API_DIR, 'CloudFormation.paginators.json'),
5
5
  })
@@ -1,6 +1,6 @@
1
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'),
2
+ api: File.join(Aws::API_DIR, 'CloudFront.api.json'),
3
+ docs: File.join(Aws::API_DIR, 'CloudFront.docs.json'),
4
+ paginators: File.join(Aws::API_DIR, 'CloudFront.paginators.json'),
5
+ waiters: File.join(Aws::API_DIR, 'CloudFront.waiters.json'),
6
6
  })
@@ -1,5 +1,5 @@
1
1
  Aws.add_service(:CloudSearch, {
2
- api: File.join(Aws::APIS_DIR, 'CloudSearch.api.json'),
3
- docs: File.join(Aws::APIS_DIR, 'CloudSearch.docs.json'),
4
- paginators: File.join(Aws::APIS_DIR, 'CloudSearch.paginators.json'),
2
+ api: File.join(Aws::API_DIR, 'CloudSearch.api.json'),
3
+ docs: File.join(Aws::API_DIR, 'CloudSearch.docs.json'),
4
+ paginators: File.join(Aws::API_DIR, 'CloudSearch.paginators.json'),
5
5
  })
@@ -1,4 +1,4 @@
1
1
  Aws.add_service(:CloudSearchDomain, {
2
- api: File.join(Aws::APIS_DIR, 'CloudSearchDomain.api.json'),
3
- docs: File.join(Aws::APIS_DIR, 'CloudSearchDomain.docs.json'),
2
+ api: File.join(Aws::API_DIR, 'CloudSearchDomain.api.json'),
3
+ docs: File.join(Aws::API_DIR, 'CloudSearchDomain.docs.json'),
4
4
  })