aws-sdk-core 2.1.30 → 2.1.31

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7d8cb4090e4540174e0cebe44bb119b18a53062
4
- data.tar.gz: 967f9f5b25cec1c66cc561280ae8fedfea27da7e
3
+ metadata.gz: 9ef47ff238a5188d387a6365c5116429cef767e4
4
+ data.tar.gz: c252c77777dd2ca628d74eda4e959535724885f0
5
5
  SHA512:
6
- metadata.gz: 13e3639beacc6dad6c11dac0133159bdc0d069dd226afec0ad9b855468c6e4be578e9b4f59bc485d2c75207bcdf40207eb23e06d4415df4bb35d0175c025cd76
7
- data.tar.gz: 5868d5e1fc4b048425d95c8b90fd1236188f751c42f1fcf646a34099d84af7269db80d2f54d3ad3a1c40fc233664611e60cb9f63e0f8c3162feb9f6894cae143
6
+ metadata.gz: cc84bc97edae72edc900511b0f1d89908760e6c892f2085cd49fcef27b1b5bc7d0c2d8c4683e5bbae475b2a0e378591a96d9a587124b9e691626d1e44e7f8ac8
7
+ data.tar.gz: 712486e2dd3a271b869664b0f5a39dfde7963050c5666b2d6fe945771324b60fa13e0371d27a0985c81321292fd4d52c887ed557764cb9b1d22bd1eef5c611fb
@@ -1487,6 +1487,7 @@
1487
1487
  "min":1
1488
1488
  },
1489
1489
  "BlockDeviceEbsDeleteOnTermination":{"type":"boolean"},
1490
+ "BlockDeviceEbsEncrypted":{"type":"boolean"},
1490
1491
  "BlockDeviceEbsIops":{
1491
1492
  "type":"integer",
1492
1493
  "min":100,
@@ -1830,7 +1831,8 @@
1830
1831
  "VolumeSize":{"shape":"BlockDeviceEbsVolumeSize"},
1831
1832
  "VolumeType":{"shape":"BlockDeviceEbsVolumeType"},
1832
1833
  "DeleteOnTermination":{"shape":"BlockDeviceEbsDeleteOnTermination"},
1833
- "Iops":{"shape":"BlockDeviceEbsIops"}
1834
+ "Iops":{"shape":"BlockDeviceEbsIops"},
1835
+ "Encrypted":{"shape":"BlockDeviceEbsEncrypted"}
1834
1836
  }
1835
1837
  },
1836
1838
  "EbsOptimized":{"type":"boolean"},
@@ -5052,6 +5052,16 @@
5052
5052
  "AWSManagedPolicy"
5053
5053
  ]
5054
5054
  },
5055
+ "EvalDecisionDetailsType":{
5056
+ "type":"map",
5057
+ "key":{"shape":"EvalDecisionSourceType"},
5058
+ "value":{"shape":"PolicyEvaluationDecisionType"}
5059
+ },
5060
+ "EvalDecisionSourceType":{
5061
+ "type":"string",
5062
+ "min":3,
5063
+ "max":256
5064
+ },
5055
5065
  "EvaluationResult":{
5056
5066
  "type":"structure",
5057
5067
  "required":[
@@ -5064,7 +5074,8 @@
5064
5074
  "EvalResourceName":{"shape":"ResourceNameType"},
5065
5075
  "EvalDecision":{"shape":"PolicyEvaluationDecisionType"},
5066
5076
  "MatchedStatements":{"shape":"StatementListType"},
5067
- "MissingContextValues":{"shape":"ContextKeyNamesResultListType"}
5077
+ "MissingContextValues":{"shape":"ContextKeyNamesResultListType"},
5078
+ "EvalDecisionDetails":{"shape":"EvalDecisionDetailsType"}
5068
5079
  }
5069
5080
  },
5070
5081
  "EvaluationResultsListType":{
@@ -6129,6 +6140,7 @@
6129
6140
  "role",
6130
6141
  "aws-managed",
6131
6142
  "user-managed",
6143
+ "resource",
6132
6144
  "none"
6133
6145
  ]
6134
6146
  },
@@ -6437,6 +6449,9 @@
6437
6449
  "PolicyInputList":{"shape":"SimulationPolicyListType"},
6438
6450
  "ActionNames":{"shape":"ActionNameListType"},
6439
6451
  "ResourceArns":{"shape":"ResourceNameListType"},
6452
+ "ResourcePolicy":{"shape":"policyDocumentType"},
6453
+ "ResourceOwner":{"shape":"ResourceNameType"},
6454
+ "CallerArn":{"shape":"ResourceNameType"},
6440
6455
  "ContextEntries":{"shape":"ContextEntryListType"},
6441
6456
  "MaxItems":{"shape":"maxItemsType"},
6442
6457
  "Marker":{"shape":"markerType"}
@@ -6461,6 +6476,9 @@
6461
6476
  "PolicyInputList":{"shape":"SimulationPolicyListType"},
6462
6477
  "ActionNames":{"shape":"ActionNameListType"},
6463
6478
  "ResourceArns":{"shape":"ResourceNameListType"},
6479
+ "ResourcePolicy":{"shape":"policyDocumentType"},
6480
+ "ResourceOwner":{"shape":"ResourceNameType"},
6481
+ "CallerArn":{"shape":"ResourceNameType"},
6464
6482
  "ContextEntries":{"shape":"ContextEntryListType"},
6465
6483
  "MaxItems":{"shape":"maxItemsType"},
6466
6484
  "Marker":{"shape":"markerType"}
@@ -146,6 +146,7 @@ module Aws
146
146
  autoload :DynamoDBSimpleAttributes, 'aws-sdk-core/plugins/dynamodb_simple_attributes'
147
147
  autoload :DynamoDBCRC32Validation, 'aws-sdk-core/plugins/dynamodb_crc32_validation'
148
148
  autoload :EC2CopyEncryptedSnapshot, 'aws-sdk-core/plugins/ec2_copy_encrypted_snapshot'
149
+ autoload :EC2RegionValidation, 'aws-sdk-core/plugins/ec2_region_validation'
149
150
  autoload :GlacierAccountId, 'aws-sdk-core/plugins/glacier_account_id'
150
151
  autoload :GlacierApiVersion, 'aws-sdk-core/plugins/glacier_api_version'
151
152
  autoload :GlacierChecksums, 'aws-sdk-core/plugins/glacier_checksums'
@@ -34,8 +34,8 @@ module Aws
34
34
  # @param [Hash] definition
35
35
  # @return [Seahorse::Model::Api]
36
36
  def build(definition, options = {})
37
- docs = build_docstring_provider(options)
38
37
  api = build_api(definition)
38
+ docs = build_docstring_provider(api, options)
39
39
  shapes = build_shape_map(definition, api, docs)
40
40
  build_operations(definition, api, shapes, docs)
41
41
  build_struct_classes(shapes, options)
@@ -44,9 +44,11 @@ module Aws
44
44
 
45
45
  private
46
46
 
47
- def build_docstring_provider(options)
47
+ def build_docstring_provider(api, options)
48
48
  if options[:docs] && ENV['DOCSTRINGS']
49
- Docs::DocstringProvider.new(Json.load_file(options[:docs]))
49
+ docs = Json.load_file(options[:docs])
50
+ Customizations.apply_doc_customizations(api, docs)
51
+ Docs::DocstringProvider.new(docs)
50
52
  else
51
53
  Docs::NullDocstringProvider.new
52
54
  end
@@ -3,6 +3,7 @@ module Aws
3
3
  module Customizations
4
4
 
5
5
  @apis = {}
6
+ @docs = {}
6
7
  @plugins = {}
7
8
 
8
9
  class << self
@@ -11,6 +12,10 @@ module Aws
11
12
  @apis[prefix] = block
12
13
  end
13
14
 
15
+ def doc(prefix, &block)
16
+ @docs[prefix] = block
17
+ end
18
+
14
19
  def plugins(prefix, options)
15
20
  @plugins[prefix] = {
16
21
  add: options[:add] || [],
@@ -24,6 +29,11 @@ module Aws
24
29
  @apis[prefix].call(api) if @apis[prefix]
25
30
  end
26
31
 
32
+ def apply_doc_customizations(api, docs)
33
+ prefix = api.metadata['endpointPrefix']
34
+ @docs[prefix].call(docs) if @docs[prefix]
35
+ end
36
+
27
37
  def apply_plugins(client_class)
28
38
  prefix = client_class.api.metadata['endpointPrefix']
29
39
  if @plugins[prefix]
@@ -70,6 +80,7 @@ module Aws
70
80
 
71
81
  plugins('ec2', add: %w(
72
82
  Aws::Plugins::EC2CopyEncryptedSnapshot
83
+ Aws::Plugins::EC2RegionValidation
73
84
  ))
74
85
 
75
86
  api('glacier') do |api|
@@ -111,6 +122,11 @@ module Aws
111
122
  api['shapes']['Timestamp']['type'] = 'timestamp'
112
123
  end
113
124
 
125
+ doc('lambda') do |docs|
126
+ docs['shapes']['Blob']['refs']['UpdateFunctionCodeRequest$ZipFile'] =
127
+ "<p>.zip file containing your packaged source code.</p>"
128
+ end
129
+
114
130
  plugins('machinelearning', add: %w(
115
131
  Aws::Plugins::MachineLearningPredictEndpoint
116
132
  ))
@@ -69,7 +69,7 @@ module Aws
69
69
  # Retry loading credentials up to 3 times is the instance metadata
70
70
  # service is responding but is returning invalid JSON documents
71
71
  # in response to the GET profile credentials call.
72
- retry_errors([JSON::ParserError], max_retries: 3) do
72
+ retry_errors([JSON::ParserError, StandardError], max_retries: 3) do
73
73
  c = JSON.parse(get_credentials.to_s)
74
74
  @credentials = Credentials.new(
75
75
  c['AccessKeyId'],
@@ -97,6 +97,14 @@ module Aws
97
97
  @converters[shape_class][value_class] = converter || block
98
98
  end
99
99
 
100
+ def ensure_open(file)
101
+ if file.closed?
102
+ File.open(file.path, 'rb')
103
+ else
104
+ file
105
+ end
106
+ end
107
+
100
108
  # @api private
101
109
  def c(shape, value)
102
110
  if converter = converter_for(shape, value)
@@ -195,7 +203,8 @@ module Aws
195
203
  end
196
204
 
197
205
  add(BlobShape, IO)
198
- add(BlobShape, Tempfile)
206
+ add(BlobShape, File) { |file| ensure_open(file) }
207
+ add(BlobShape, Tempfile) { |tmpfile| ensure_open(tmpfile) }
199
208
  add(BlobShape, StringIO)
200
209
  add(BlobShape, String)
201
210
 
@@ -0,0 +1,17 @@
1
+ module Aws
2
+ module Plugins
3
+ # @api private
4
+ class EC2RegionValidation < Seahorse::Client::Plugin
5
+
6
+ def after_initialize(client)
7
+ if region = client.config.region
8
+ if matches = region.match(/^(\w+-\w+-\d+)[a-z]$/)
9
+ msg = ":region option must a region name, not an availability "
10
+ msg << "zone name; try `#{matches[1]}' instead of `#{matches[0]}'"
11
+ raise ArgumentError, msg
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -134,7 +134,7 @@ module Aws
134
134
  if @service_name == 's3'
135
135
  path
136
136
  else
137
- path.gsub(/[^\/]+/) { |segment| Seahorse::Util.uri_escape(segment) }
137
+ Seahorse::Util.uri_path_escape(path)
138
138
  end
139
139
  end
140
140
 
@@ -1,3 +1,3 @@
1
1
  module Aws
2
- VERSION = '2.1.30'
2
+ VERSION = '2.1.31'
3
3
  end
@@ -24,6 +24,10 @@ module Seahorse
24
24
  CGI.escape(string.encode('UTF-8')).gsub('+', '%20').gsub('%7E', '~')
25
25
  end
26
26
 
27
+ def uri_path_escape(path)
28
+ path.gsub(/[^\/]+/) { |part| uri_escape(part) }
29
+ end
30
+
27
31
  end
28
32
 
29
33
  @irregular_inflections = {}
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.30
4
+ version: 2.1.31
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-10-15 00:00:00.000000000 Z
11
+ date: 2015-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -256,6 +256,7 @@ files:
256
256
  - lib/aws-sdk-core/plugins/dynamodb_extended_retries.rb
257
257
  - lib/aws-sdk-core/plugins/dynamodb_simple_attributes.rb
258
258
  - lib/aws-sdk-core/plugins/ec2_copy_encrypted_snapshot.rb
259
+ - lib/aws-sdk-core/plugins/ec2_region_validation.rb
259
260
  - lib/aws-sdk-core/plugins/glacier_account_id.rb
260
261
  - lib/aws-sdk-core/plugins/glacier_api_version.rb
261
262
  - lib/aws-sdk-core/plugins/glacier_checksums.rb