aws-sdk 1.32.0 → 1.33.0

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: 4ae66f6230e1369795f201c43774b7f9dd9532f6
4
- data.tar.gz: deb83556fe23fc04b33b682558b00e1f73d1b776
3
+ metadata.gz: cbdc7d40671a2522444ad937c8b9199cae98f9e6
4
+ data.tar.gz: a9f25c8a2b65f0e5e9ee43e9d692c1959aa67424
5
5
  SHA512:
6
- metadata.gz: da5974b284fa7071253e97ae674fb27006736bcaa8777ee0b4462c751245747c02705ce6f94879a3219ce8722002191cc9c1af49c2dfb251847304e4c2ca57af
7
- data.tar.gz: de9a6d3e942d01cb7185c6c54e64189775470c1a2307bc18260ec3ad8f988d56e7e4dfcc2c55d454cfac9dbdad583334ceefb9dc03855e16ff1d831c6252d5ad
6
+ metadata.gz: 24e92c9e6d44d9678522e8dee9c8cf96748b9faba3ad2696fa93272b442725271912b1a2c0a8de12105b4eb326f0e7a173ebbfea8cfa71ea5ea33161d00fd026
7
+ data.tar.gz: 716613ced48f38e0a532e5d06183969f59f896188d1053a4e1ef2d03c1067f39e242b0f87da5f56d2fb438e5344e424939396cd4c1b2be971f5bfe80198bf30f
@@ -1,4 +1,4 @@
1
- # Copyright 2011-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1
+ # Copyright 2011-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License"). You
4
4
  # may not use this file except in compliance with the License. A copy of
@@ -14,18 +14,6 @@
14
14
  ---
15
15
  :api_version: '2013-10-15'
16
16
  :operations:
17
- - :name: ActivateLicense
18
- :method: :activate_license
19
- :inputs:
20
- DryRun:
21
- - :boolean
22
- LicenseId:
23
- - :string
24
- - :required
25
- Capacity:
26
- - :integer
27
- - :required
28
- :outputs: {}
29
17
  - :name: AllocateAddress
30
18
  :method: :allocate_address
31
19
  :inputs:
@@ -1121,18 +1109,6 @@
1121
1109
  :list: true
1122
1110
  type:
1123
1111
  :rename: :vpn_type
1124
- - :name: DeactivateLicense
1125
- :method: :deactivate_license
1126
- :inputs:
1127
- DryRun:
1128
- - :boolean
1129
- LicenseId:
1130
- - :string
1131
- - :required
1132
- Capacity:
1133
- - :integer
1134
- - :required
1135
- :outputs: {}
1136
1112
  - :name: DeleteCustomerGateway
1137
1113
  :method: :delete_customer_gateway
1138
1114
  :inputs:
@@ -2044,53 +2020,6 @@
2044
2020
  :index:
2045
2021
  :key: :key_name
2046
2022
  :name: :key_index
2047
- - :name: DescribeLicenses
2048
- :method: :describe_licenses
2049
- :inputs:
2050
- DryRun:
2051
- - :boolean
2052
- LicenseId:
2053
- - :list:
2054
- - :string
2055
- - :rename: licenseIds
2056
- Filter:
2057
- - :list:
2058
- - :structure:
2059
- Name:
2060
- - :string
2061
- Value:
2062
- - :list:
2063
- - :string
2064
- - :rename: Values
2065
- - :rename: filters
2066
- :outputs:
2067
- :children:
2068
- licenseSet:
2069
- :ignore: true
2070
- :children:
2071
- item:
2072
- :rename: :license_set
2073
- :list: true
2074
- :children:
2075
- capacitySet:
2076
- :ignore: true
2077
- :children:
2078
- item:
2079
- :rename: :capacity_set
2080
- :list: true
2081
- :children:
2082
- capacity:
2083
- :type: :integer
2084
- instanceCapacity:
2085
- :type: :integer
2086
- earliestAllowedDeactivationTime:
2087
- :type: :time
2088
- tagSet:
2089
- :ignore: true
2090
- :children:
2091
- item:
2092
- :rename: :tag_set
2093
- :list: true
2094
2023
  - :name: DescribeNetworkAcls
2095
2024
  :method: :describe_network_acls
2096
2025
  :inputs:
@@ -4468,10 +4397,6 @@
4468
4397
  - :boolean
4469
4398
  InstanceInitiatedShutdownBehavior:
4470
4399
  - :string
4471
- License:
4472
- - :structure:
4473
- Pool:
4474
- - :string
4475
4400
  PrivateIpAddress:
4476
4401
  - :string
4477
4402
  ClientToken:
@@ -4497,7 +4422,7 @@
4497
4422
  - :rename: groups
4498
4423
  DeleteOnTermination:
4499
4424
  - :boolean
4500
- PrivateIpAddressesSet:
4425
+ PrivateIpAddresses:
4501
4426
  - :list:
4502
4427
  - :structure:
4503
4428
  PrivateIpAddress:
@@ -1,4 +1,4 @@
1
- # Copyright 2011-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1
+ # Copyright 2011-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License"). You
4
4
  # may not use this file except in compliance with the License. A copy of
@@ -192,6 +192,20 @@
192
192
  :children:
193
193
  GetQueueUrlResult:
194
194
  :ignore: true
195
+ - :name: ListDeadLetterSourceQueues
196
+ :method: :list_dead_letter_source_queues
197
+ :inputs:
198
+ QueueUrl:
199
+ - :string
200
+ - :required
201
+ :outputs:
202
+ :children:
203
+ ListDeadLetterSourceQueuesResult:
204
+ :ignore: true
205
+ :children:
206
+ QueueUrl:
207
+ :list: true
208
+ :rename: :queue_urls
195
209
  - :name: ListQueues
196
210
  :method: :list_queues
197
211
  :inputs:
@@ -186,6 +186,12 @@ module AWS
186
186
  "#<#{self.class.name}>"
187
187
  end
188
188
 
189
+ # @api private
190
+ def to_yaml_properties
191
+ skip = %w(@config @credential_provider @http_handler)
192
+ instance_variables.map(&:to_s) - skip
193
+ end
194
+
189
195
  protected
190
196
 
191
197
  # @api private
@@ -67,7 +67,13 @@ module AWS
67
67
  # @return [nil]
68
68
  def const_missing constant
69
69
  const_missing_mutex.synchronize do
70
- const_set(constant, Class.new(Errors::Base) { extend LazyErrorClasses })
70
+ # It's possible the constant was defined by another thread while
71
+ # this thread was waiting on the mutex, check before setting.
72
+ if error_const_set?(constant)
73
+ const_get(constant)
74
+ else
75
+ const_set(constant, Class.new(Errors::Base) { extend LazyErrorClasses })
76
+ end
71
77
  end
72
78
  end
73
79
 
@@ -84,7 +90,19 @@ module AWS
84
90
  module_eval("#{self}::#{code.gsub('.Range','Range').gsub(".","::")}")
85
91
  end
86
92
 
87
- end
93
+ private
94
+
95
+ # @return [Boolean] Returns true if the constant is defined in the
96
+ # current module.
97
+ def error_const_set?(constant)
98
+ # Not using #const_defined? because in Ruby 1.9+, it returns true for
99
+ # constants not defined directly on the current module.
100
+ constant = constant.to_sym
101
+ # In Ruby 1.8, #constants returns an array of strings,
102
+ # in Ruby 1.9+, #constants returns an array of symbols.
103
+ constants.any? { |c| c.to_sym == constant }
104
+ end
88
105
 
106
+ end
89
107
  end
90
108
  end
@@ -52,6 +52,11 @@ module AWS
52
52
  "<#{self.class}>"
53
53
  end
54
54
 
55
+ # @api private
56
+ def to_yaml_properties
57
+ instance_variables.map(&:to_s) - %w(@config)
58
+ end
59
+
55
60
  end
56
61
  end
57
62
  end
@@ -40,7 +40,7 @@ module AWS
40
40
  # @attr [Boolean] ebs_optimized The instance must be in a stopped state to
41
41
  # change the ebs_optimized state.
42
42
  #
43
- # @attr [Boolean] api_termination_disabled True if the instance
43
+ # @attr [Boolean] api_termination_disabled? True if the instance
44
44
  # cannot be terminated using the {#terminate} method. This
45
45
  # attribute can be changed at any time.
46
46
  #
@@ -142,6 +142,18 @@ module AWS
142
142
  nil
143
143
  end
144
144
 
145
+ # @return [Boolean] Returns `true` if the resource exists.
146
+ def exists?
147
+ exists = false
148
+ SigningCertificateCollection.new(:config => config).each do |cert|
149
+ if cert.id == self.id
150
+ exists = true
151
+ break
152
+ end
153
+ end
154
+ exists
155
+ end
156
+
145
157
  # @api private
146
158
  protected
147
159
  def resource_identifiers
@@ -157,7 +169,7 @@ module AWS
157
169
  # have is fewer than one page of results.
158
170
  # @api private
159
171
  protected
160
- def get_resource attribute
172
+ def get_resource attribute = nil
161
173
  options = user ? { :user_name => user.name } : {}
162
174
  client.list_signing_certificates(options)
163
175
  end
@@ -21,8 +21,6 @@ module AWS
21
21
  #
22
22
  # @attr_reader [String] name The hosted zone name.
23
23
  #
24
- # @attr_reader [String] caller_reference
25
- #
26
24
  # @attr_reader [Integer] resource_record_set_count
27
25
  # The resource record set count.
28
26
  #
@@ -50,26 +48,36 @@ module AWS
50
48
  "/hostedzone/#{id}"
51
49
  end
52
50
 
53
- attribute :name, :static => true
51
+ define_attribute_type :list
54
52
 
55
- attribute :caller_reference, :static => true
53
+ define_attribute_type :get
56
54
 
57
- attribute :configuration, :from => :config, :static => true
55
+ list_attribute :name, :static => true
58
56
 
59
- attribute :resource_record_set_count
57
+ list_attribute :configuration, :from => :config, :static => true
60
58
 
61
- attribute :delegation_set, :static => true
59
+ list_attribute :resource_record_set_count
62
60
 
63
- populates_from :create_hosted_zone do |resp|
64
- resp[:hosted_zone] if resp[:hosted_zone][:id] == path
65
- end
61
+ get_attribute :delegation_set, :static => true
66
62
 
67
- populates_from :get_hosted_zone do |resp|
68
- resp[:hosted_zone] if resp[:hosted_zone][:id] == path
63
+ provider(:list_hosted_zones) do |provider|
64
+ provider.find do |resp|
65
+ resp.data[:hosted_zones].find do |detail|
66
+ detail[:hosted_zone][:id] == path
67
+ end
68
+ end
69
+ provider.provides *list_attributes.keys
69
70
  end
70
71
 
71
- populates_from :list_hosted_zones do |resp|
72
- resp.data[:hosted_zones].find { |detail| detail[:hosted_zone][:id] == path }
72
+ provider(:create_hosted_zone, :get_hosted_zone) do |provider|
73
+ provider.find do |resp|
74
+ if resp[:hosted_zone][:id] == path
75
+ resp[:hosted_zone][:delegation_set] = resp[:delegation_set]
76
+ resp[:hosted_zone]
77
+ end
78
+ end
79
+ provider.provides *list_attributes.keys
80
+ provider.provides *get_attributes.keys
73
81
  end
74
82
 
75
83
  # Deletes the hosted zone.
@@ -99,7 +107,7 @@ module AWS
99
107
  protected
100
108
 
101
109
  def resource_identifiers
102
- [[:id, id], [:name, name], [:caller_reference, caller_reference]]
110
+ [[:id, id], [:name, name]]
103
111
  end
104
112
 
105
113
  def get_resource attr_name = nil
@@ -41,6 +41,12 @@ module AWS
41
41
 
42
42
  now = Time.now.utc.strftime("%Y%m%dT%H%M%SZ")
43
43
 
44
+ one_week = 60 * 60 * 24 * 7
45
+ if options[:expires] - now.to_i > one_week
46
+ msg = "presigned URLs using sigv4 may not expire more than one week out"
47
+ raise ArgumentError, msg
48
+ end
49
+
44
50
  request = build_request(method, options)
45
51
 
46
52
  request.headers.clear
data/lib/aws/sns/topic.rb CHANGED
@@ -381,7 +381,7 @@ module AWS
381
381
 
382
382
  when endpoint =~ /^arn:/
383
383
  raise ArgumentError, "expected a queue ARN" unless
384
- endpoint =~ /^arn:aws:sqs:/
384
+ endpoint =~ /^arn:aws(.*?):sqs:/
385
385
  { :protocol => "sqs", :endpoint => endpoint }
386
386
  when endpoint.kind_of?(URI)
387
387
  { :protocol => endpoint.scheme,
@@ -32,7 +32,7 @@ module AWS
32
32
  #
33
33
  # @return [Topic] Returns a topic with the given Topic ARN.
34
34
  def [] topic_arn
35
- unless topic_arn =~ /^arn:aws:sns:/
35
+ unless topic_arn =~ /^arn:aws/
36
36
  raise ArgumentError, "invalid topic arn `#{topic_arn}`"
37
37
  end
38
38
  Topic.new(topic_arn, :config => config)
@@ -33,6 +33,10 @@ module AWS
33
33
  # url = "http://sqs.us-west-2.amazonaws.com/123456789012/myqueue"
34
34
  # sqs.queues[url].send_message("HELLO")
35
35
  #
36
+ # @example Accessing a queue in your account by name
37
+ #
38
+ # sqs.queues.named("myqueue").send_message("HELLO")
39
+ #
36
40
  class QueueCollection
37
41
 
38
42
  include Core::Collection::Simple
@@ -35,6 +35,15 @@ module AWS
35
35
  end
36
36
  end
37
37
 
38
+ # Two STS operations are un-signed
39
+ alias do_sign_request sign_request
40
+ def sign_request(req)
41
+ action = req.params.find { |param| param.name == 'Action' }.value
42
+ unsigned = %w( AssumeRoleWithWebIdentity AssumeRoleWithSAML )
43
+ do_sign_request(req) unless unsigned.include?(action)
44
+ req
45
+ end
46
+
38
47
  end
39
48
 
40
49
  class Client::V20110615 < Client
data/lib/aws/version.rb CHANGED
@@ -13,5 +13,5 @@
13
13
 
14
14
  module AWS
15
15
  # Current version of the AWS SDK for Ruby
16
- VERSION = '1.32.0'
16
+ VERSION = '1.33.0'
17
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.32.0
4
+ version: 1.33.0
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: 2014-01-09 00:00:00.000000000 Z
11
+ date: 2014-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: uuidtools