aws-sdk-core 2.1.18 → 2.1.19
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/ec2/2015-04-15/paginators-1.json +3 -0
- data/apis/ec2/2015-04-15/resources-1.json +9 -0
- data/apis/ec2/2015-04-15/waiters-2.json +17 -0
- data/apis/storagegateway/2013-06-30/api-2.json +148 -2
- data/lib/aws-sdk-core/instance_profile_credentials.rb +40 -21
- data/lib/aws-sdk-core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 454a11cf15f51f441f688a7a76f49c8c94ff82b3
|
|
4
|
+
data.tar.gz: 1f56394ab40f5a1045e069af440f9942030133a6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d3a9664f63d9a4fb883b1fbb258cf3cb1bdaa36210f766e2acc9ef5fe248fdd6801715135348b03730f659bcfb7dee69ae0f991bf1d1ee44603c0ba53e3800cb
|
|
7
|
+
data.tar.gz: a36a97ee1fe699b938ce4a726bf30a0b3d6eba4e4a4bcd0cfd555bfb4cb315a2c4dc13bc4d1b571e3d614dd2d5fe4f46653860034038e9c1749c5b2a9371535b
|
|
@@ -2470,6 +2470,15 @@
|
|
|
2470
2470
|
}
|
|
2471
2471
|
}
|
|
2472
2472
|
},
|
|
2473
|
+
"waiters": {
|
|
2474
|
+
"Exists": {
|
|
2475
|
+
"waiterName": "VpcPeeringConnectionExists",
|
|
2476
|
+
"params": [
|
|
2477
|
+
{ "target": "VpcPeeringConnectionIds[]", "source": "identifier", "name": "Id" }
|
|
2478
|
+
],
|
|
2479
|
+
"path": "VpcPeeringConnections[0]"
|
|
2480
|
+
}
|
|
2481
|
+
},
|
|
2473
2482
|
"has": {
|
|
2474
2483
|
"AccepterVpc": {
|
|
2475
2484
|
"resource": {
|
|
@@ -499,6 +499,23 @@
|
|
|
499
499
|
"argument": "VpnConnections[].State"
|
|
500
500
|
}
|
|
501
501
|
]
|
|
502
|
+
},
|
|
503
|
+
"VpcPeeringConnectionExists": {
|
|
504
|
+
"delay": 15,
|
|
505
|
+
"operation": "DescribeVpcPeeringConnections",
|
|
506
|
+
"maxAttempts": 40,
|
|
507
|
+
"acceptors": [
|
|
508
|
+
{
|
|
509
|
+
"matcher": "status",
|
|
510
|
+
"expected": 200,
|
|
511
|
+
"state": "success"
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
"matcher": "error",
|
|
515
|
+
"expected": "InvalidVpcPeeringConnectionIDNotFound",
|
|
516
|
+
"state": "retry"
|
|
517
|
+
}
|
|
518
|
+
]
|
|
502
519
|
}
|
|
503
520
|
}
|
|
504
521
|
}
|
|
@@ -52,6 +52,27 @@
|
|
|
52
52
|
}
|
|
53
53
|
]
|
|
54
54
|
},
|
|
55
|
+
"AddTagsToResource":{
|
|
56
|
+
"name":"AddTagsToResource",
|
|
57
|
+
"http":{
|
|
58
|
+
"method":"POST",
|
|
59
|
+
"requestUri":"/"
|
|
60
|
+
},
|
|
61
|
+
"input":{"shape":"AddTagsToResourceInput"},
|
|
62
|
+
"output":{"shape":"AddTagsToResourceOutput"},
|
|
63
|
+
"errors":[
|
|
64
|
+
{
|
|
65
|
+
"shape":"InvalidGatewayRequestException",
|
|
66
|
+
"error":{"httpStatusCode":400},
|
|
67
|
+
"exception":true
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"shape":"InternalServerError",
|
|
71
|
+
"error":{"httpStatusCode":500},
|
|
72
|
+
"exception":true
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
},
|
|
55
76
|
"AddUploadBuffer":{
|
|
56
77
|
"name":"AddUploadBuffer",
|
|
57
78
|
"http":{
|
|
@@ -745,6 +766,27 @@
|
|
|
745
766
|
}
|
|
746
767
|
]
|
|
747
768
|
},
|
|
769
|
+
"ListTagsForResource":{
|
|
770
|
+
"name":"ListTagsForResource",
|
|
771
|
+
"http":{
|
|
772
|
+
"method":"POST",
|
|
773
|
+
"requestUri":"/"
|
|
774
|
+
},
|
|
775
|
+
"input":{"shape":"ListTagsForResourceInput"},
|
|
776
|
+
"output":{"shape":"ListTagsForResourceOutput"},
|
|
777
|
+
"errors":[
|
|
778
|
+
{
|
|
779
|
+
"shape":"InvalidGatewayRequestException",
|
|
780
|
+
"error":{"httpStatusCode":400},
|
|
781
|
+
"exception":true
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
"shape":"InternalServerError",
|
|
785
|
+
"error":{"httpStatusCode":500},
|
|
786
|
+
"exception":true
|
|
787
|
+
}
|
|
788
|
+
]
|
|
789
|
+
},
|
|
748
790
|
"ListVolumeInitiators":{
|
|
749
791
|
"name":"ListVolumeInitiators",
|
|
750
792
|
"http":{
|
|
@@ -808,6 +850,27 @@
|
|
|
808
850
|
}
|
|
809
851
|
]
|
|
810
852
|
},
|
|
853
|
+
"RemoveTagsFromResource":{
|
|
854
|
+
"name":"RemoveTagsFromResource",
|
|
855
|
+
"http":{
|
|
856
|
+
"method":"POST",
|
|
857
|
+
"requestUri":"/"
|
|
858
|
+
},
|
|
859
|
+
"input":{"shape":"RemoveTagsFromResourceInput"},
|
|
860
|
+
"output":{"shape":"RemoveTagsFromResourceOutput"},
|
|
861
|
+
"errors":[
|
|
862
|
+
{
|
|
863
|
+
"shape":"InvalidGatewayRequestException",
|
|
864
|
+
"error":{"httpStatusCode":400},
|
|
865
|
+
"exception":true
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
"shape":"InternalServerError",
|
|
869
|
+
"error":{"httpStatusCode":500},
|
|
870
|
+
"exception":true
|
|
871
|
+
}
|
|
872
|
+
]
|
|
873
|
+
},
|
|
811
874
|
"ResetCache":{
|
|
812
875
|
"name":"ResetCache",
|
|
813
876
|
"http":{
|
|
@@ -1108,6 +1171,23 @@
|
|
|
1108
1171
|
"GatewayARN":{"shape":"GatewayARN"}
|
|
1109
1172
|
}
|
|
1110
1173
|
},
|
|
1174
|
+
"AddTagsToResourceInput":{
|
|
1175
|
+
"type":"structure",
|
|
1176
|
+
"required":[
|
|
1177
|
+
"ResourceARN",
|
|
1178
|
+
"Tags"
|
|
1179
|
+
],
|
|
1180
|
+
"members":{
|
|
1181
|
+
"ResourceARN":{"shape":"ResourceARN"},
|
|
1182
|
+
"Tags":{"shape":"Tags"}
|
|
1183
|
+
}
|
|
1184
|
+
},
|
|
1185
|
+
"AddTagsToResourceOutput":{
|
|
1186
|
+
"type":"structure",
|
|
1187
|
+
"members":{
|
|
1188
|
+
"ResourceARN":{"shape":"ResourceARN"}
|
|
1189
|
+
}
|
|
1190
|
+
},
|
|
1111
1191
|
"AddUploadBufferInput":{
|
|
1112
1192
|
"type":"structure",
|
|
1113
1193
|
"required":[
|
|
@@ -1521,6 +1601,7 @@
|
|
|
1521
1601
|
"members":{
|
|
1522
1602
|
"GatewayARN":{"shape":"GatewayARN"},
|
|
1523
1603
|
"GatewayId":{"shape":"GatewayId"},
|
|
1604
|
+
"GatewayName":{"shape":"string"},
|
|
1524
1605
|
"GatewayTimezone":{"shape":"GatewayTimezone"},
|
|
1525
1606
|
"GatewayState":{"shape":"GatewayState"},
|
|
1526
1607
|
"GatewayNetworkInterfaces":{"shape":"GatewayNetworkInterfaces"},
|
|
@@ -1819,7 +1900,8 @@
|
|
|
1819
1900
|
"members":{
|
|
1820
1901
|
"GatewayARN":{"shape":"GatewayARN"},
|
|
1821
1902
|
"GatewayType":{"shape":"GatewayType"},
|
|
1822
|
-
"GatewayOperationalState":{"shape":"GatewayOperationalState"}
|
|
1903
|
+
"GatewayOperationalState":{"shape":"GatewayOperationalState"},
|
|
1904
|
+
"GatewayName":{"shape":"string"}
|
|
1823
1905
|
}
|
|
1824
1906
|
},
|
|
1825
1907
|
"GatewayName":{
|
|
@@ -1927,6 +2009,22 @@
|
|
|
1927
2009
|
"Disks":{"shape":"Disks"}
|
|
1928
2010
|
}
|
|
1929
2011
|
},
|
|
2012
|
+
"ListTagsForResourceInput":{
|
|
2013
|
+
"type":"structure",
|
|
2014
|
+
"members":{
|
|
2015
|
+
"ResourceARN":{"shape":"ResourceARN"},
|
|
2016
|
+
"Marker":{"shape":"Marker"},
|
|
2017
|
+
"Limit":{"shape":"PositiveIntObject"}
|
|
2018
|
+
}
|
|
2019
|
+
},
|
|
2020
|
+
"ListTagsForResourceOutput":{
|
|
2021
|
+
"type":"structure",
|
|
2022
|
+
"members":{
|
|
2023
|
+
"ResourceARN":{"shape":"ResourceARN"},
|
|
2024
|
+
"Marker":{"shape":"Marker"},
|
|
2025
|
+
"Tags":{"shape":"Tags"}
|
|
2026
|
+
}
|
|
2027
|
+
},
|
|
1930
2028
|
"ListVolumeInitiatorsInput":{
|
|
1931
2029
|
"type":"structure",
|
|
1932
2030
|
"required":["VolumeARN"],
|
|
@@ -2022,6 +2120,19 @@
|
|
|
2022
2120
|
"min":1,
|
|
2023
2121
|
"max":25
|
|
2024
2122
|
},
|
|
2123
|
+
"RemoveTagsFromResourceInput":{
|
|
2124
|
+
"type":"structure",
|
|
2125
|
+
"members":{
|
|
2126
|
+
"ResourceARN":{"shape":"ResourceARN"},
|
|
2127
|
+
"TagKeys":{"shape":"TagKeys"}
|
|
2128
|
+
}
|
|
2129
|
+
},
|
|
2130
|
+
"RemoveTagsFromResourceOutput":{
|
|
2131
|
+
"type":"structure",
|
|
2132
|
+
"members":{
|
|
2133
|
+
"ResourceARN":{"shape":"ResourceARN"}
|
|
2134
|
+
}
|
|
2135
|
+
},
|
|
2025
2136
|
"ResetCacheInput":{
|
|
2026
2137
|
"type":"structure",
|
|
2027
2138
|
"required":["GatewayARN"],
|
|
@@ -2035,6 +2146,11 @@
|
|
|
2035
2146
|
"GatewayARN":{"shape":"GatewayARN"}
|
|
2036
2147
|
}
|
|
2037
2148
|
},
|
|
2149
|
+
"ResourceARN":{
|
|
2150
|
+
"type":"string",
|
|
2151
|
+
"min":50,
|
|
2152
|
+
"max":500
|
|
2153
|
+
},
|
|
2038
2154
|
"RetrieveTapeArchiveInput":{
|
|
2039
2155
|
"type":"structure",
|
|
2040
2156
|
"required":[
|
|
@@ -2130,6 +2246,35 @@
|
|
|
2130
2246
|
"type":"list",
|
|
2131
2247
|
"member":{"shape":"StorediSCSIVolume"}
|
|
2132
2248
|
},
|
|
2249
|
+
"Tag":{
|
|
2250
|
+
"type":"structure",
|
|
2251
|
+
"required":[
|
|
2252
|
+
"Key",
|
|
2253
|
+
"Value"
|
|
2254
|
+
],
|
|
2255
|
+
"members":{
|
|
2256
|
+
"Key":{"shape":"TagKey"},
|
|
2257
|
+
"Value":{"shape":"TagValue"}
|
|
2258
|
+
}
|
|
2259
|
+
},
|
|
2260
|
+
"TagKey":{
|
|
2261
|
+
"type":"string",
|
|
2262
|
+
"min":1,
|
|
2263
|
+
"max":128,
|
|
2264
|
+
"pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$"
|
|
2265
|
+
},
|
|
2266
|
+
"TagKeys":{
|
|
2267
|
+
"type":"list",
|
|
2268
|
+
"member":{"shape":"TagKey"}
|
|
2269
|
+
},
|
|
2270
|
+
"TagValue":{
|
|
2271
|
+
"type":"string",
|
|
2272
|
+
"max":256
|
|
2273
|
+
},
|
|
2274
|
+
"Tags":{
|
|
2275
|
+
"type":"list",
|
|
2276
|
+
"member":{"shape":"Tag"}
|
|
2277
|
+
},
|
|
2133
2278
|
"Tape":{
|
|
2134
2279
|
"type":"structure",
|
|
2135
2280
|
"members":{
|
|
@@ -2263,7 +2408,8 @@
|
|
|
2263
2408
|
"UpdateGatewayInformationOutput":{
|
|
2264
2409
|
"type":"structure",
|
|
2265
2410
|
"members":{
|
|
2266
|
-
"GatewayARN":{"shape":"GatewayARN"}
|
|
2411
|
+
"GatewayARN":{"shape":"GatewayARN"},
|
|
2412
|
+
"GatewayName":{"shape":"string"}
|
|
2267
2413
|
}
|
|
2268
2414
|
},
|
|
2269
2415
|
"UpdateGatewaySoftwareNowInput":{
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
require 'json'
|
|
1
2
|
require 'time'
|
|
2
3
|
require 'net/http'
|
|
3
4
|
|
|
@@ -15,7 +16,7 @@ module Aws
|
|
|
15
16
|
# is not present, no responding or some other non-recoverable
|
|
16
17
|
# error.
|
|
17
18
|
# @api private
|
|
18
|
-
|
|
19
|
+
NETWORK_ERRORS = [
|
|
19
20
|
Errno::EHOSTUNREACH,
|
|
20
21
|
Errno::ECONNREFUSED,
|
|
21
22
|
Errno::EHOSTDOWN,
|
|
@@ -65,31 +66,33 @@ module Aws
|
|
|
65
66
|
end
|
|
66
67
|
|
|
67
68
|
def refresh
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
c
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
# Retry loading credentials up to 3 times is the instance metadata
|
|
70
|
+
# service is responding but is returning invalid JSON documents
|
|
71
|
+
# in response to the GET profile credentials call.
|
|
72
|
+
retry_errors([JSON::ParserError], max_retries: 3) do
|
|
73
|
+
c = JSON.parse(get_credentials.to_s)
|
|
74
|
+
@credentials = Credentials.new(
|
|
75
|
+
c['AccessKeyId'],
|
|
76
|
+
c['SecretAccessKey'],
|
|
77
|
+
c['Token']
|
|
78
|
+
)
|
|
79
|
+
@expiration = c['Expiration'] ? Time.parse(c['Expiration']) : nil
|
|
80
|
+
end
|
|
75
81
|
end
|
|
76
82
|
|
|
77
83
|
def get_credentials
|
|
78
|
-
|
|
84
|
+
# Retry loading credentials a configurable number of times if
|
|
85
|
+
# the instance metadata service is not responding.
|
|
79
86
|
begin
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
if failed_attempts < @retries
|
|
87
|
-
@backoff.call(failed_attempts)
|
|
88
|
-
failed_attempts += 1
|
|
89
|
-
retry
|
|
90
|
-
else
|
|
91
|
-
'{}'
|
|
87
|
+
retry_errors(NETWORK_ERRORS, max_retries: @retries) do
|
|
88
|
+
open_connection do |conn|
|
|
89
|
+
path = '/latest/meta-data/iam/security-credentials/'
|
|
90
|
+
profile_name = http_get(conn, path).lines.first.strip
|
|
91
|
+
http_get(conn, path + profile_name)
|
|
92
|
+
end
|
|
92
93
|
end
|
|
94
|
+
rescue
|
|
95
|
+
'{}'
|
|
93
96
|
end
|
|
94
97
|
end
|
|
95
98
|
|
|
@@ -111,5 +114,21 @@ module Aws
|
|
|
111
114
|
end
|
|
112
115
|
end
|
|
113
116
|
|
|
117
|
+
def retry_errors(error_classes, options = {}, &block)
|
|
118
|
+
max_retries = options[:max_retries]
|
|
119
|
+
retries = 0
|
|
120
|
+
begin
|
|
121
|
+
yield
|
|
122
|
+
rescue *error_classes => error
|
|
123
|
+
if retries < max_retries
|
|
124
|
+
@backoff.call(retries)
|
|
125
|
+
retries += 1
|
|
126
|
+
retry
|
|
127
|
+
else
|
|
128
|
+
raise
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
|
|
114
133
|
end
|
|
115
134
|
end
|
data/lib/aws-sdk-core/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: aws-sdk-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.19
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Amazon Web Services
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-09-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jmespath
|