aws-sdk-autoscaling 1.0.0.rc1 → 1.0.0.rc2

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.
@@ -1,219 +1,211 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
- module Aws
9
- module AutoScaling
10
- class LoadBalancer
11
-
12
- extend Aws::Deprecations
13
-
14
- # @overload def initialize(group_name, name, options = {})
15
- # @param [String] group_name
16
- # @param [String] name
17
- # @option options [Client] :client
18
- # @overload def initialize(options = {})
19
- # @option options [required, String] :group_name
20
- # @option options [required, String] :name
21
- # @option options [Client] :client
22
- def initialize(*args)
23
- options = Hash === args.last ? args.pop.dup : {}
24
- @group_name = extract_group_name(args, options)
25
- @name = extract_name(args, options)
26
- @data = options.delete(:data)
27
- @client = options.delete(:client) || Client.new(options)
28
- end
8
+ module Aws::AutoScaling
9
+ class LoadBalancer
10
+
11
+ extend Aws::Deprecations
12
+
13
+ # @overload def initialize(group_name, name, options = {})
14
+ # @param [String] group_name
15
+ # @param [String] name
16
+ # @option options [Client] :client
17
+ # @overload def initialize(options = {})
18
+ # @option options [required, String] :group_name
19
+ # @option options [required, String] :name
20
+ # @option options [Client] :client
21
+ def initialize(*args)
22
+ options = Hash === args.last ? args.pop.dup : {}
23
+ @group_name = extract_group_name(args, options)
24
+ @name = extract_name(args, options)
25
+ @data = options.delete(:data)
26
+ @client = options.delete(:client) || Client.new(options)
27
+ end
29
28
 
30
- # @!group Read-Only Attributes
29
+ # @!group Read-Only Attributes
31
30
 
32
- # @return [String]
33
- def group_name
34
- @group_name
35
- end
31
+ # @return [String]
32
+ def group_name
33
+ @group_name
34
+ end
36
35
 
37
- # @return [String]
38
- def name
39
- @name
40
- end
41
- alias :load_balancer_name :name
42
-
43
- # One of the following load balancer states:
44
- #
45
- # * `Adding` - The instances in the group are being registered with the
46
- # load balancer.
47
- #
48
- # * `Added` - All instances in the group are registered with the load
49
- # balancer.
50
- #
51
- # * `InService` - At least one instance in the group passed an ELB
52
- # health check.
53
- #
54
- # * `Removing` - The instances in the group are being deregistered from
55
- # the load balancer. If connection draining is enabled, Elastic Load
56
- # Balancing waits for in-flight requests to complete before
57
- # deregistering the instances.
58
- #
59
- # * `Removed` - All instances in the group are deregistered from the
60
- # load balancer.
61
- # @return [String]
62
- def state
63
- data.state
64
- end
36
+ # @return [String]
37
+ def name
38
+ @name
39
+ end
40
+ alias :load_balancer_name :name
41
+
42
+ # One of the following load balancer states:
43
+ #
44
+ # * `Adding` - The instances in the group are being registered with the
45
+ # load balancer.
46
+ #
47
+ # * `Added` - All instances in the group are registered with the load
48
+ # balancer.
49
+ #
50
+ # * `InService` - At least one instance in the group passed an ELB
51
+ # health check.
52
+ #
53
+ # * `Removing` - The instances in the group are being deregistered from
54
+ # the load balancer. If connection draining is enabled, Elastic Load
55
+ # Balancing waits for in-flight requests to complete before
56
+ # deregistering the instances.
57
+ #
58
+ # * `Removed` - All instances in the group are deregistered from the
59
+ # load balancer.
60
+ # @return [String]
61
+ def state
62
+ data.state
63
+ end
65
64
 
66
- # @!endgroup
65
+ # @!endgroup
67
66
 
68
- # @return [Client]
69
- def client
70
- @client
71
- end
67
+ # @return [Client]
68
+ def client
69
+ @client
70
+ end
72
71
 
73
- # @raise [Errors::ResourceNotLoadable]
74
- # @api private
75
- def load
76
- msg = "#load is not implemented, data only available via enumeration"
77
- raise Errors::ResourceNotLoadable, msg
78
- end
79
- alias :reload :load
80
-
81
- # @raise [Errors::ResourceNotLoadableError] Raises when {#data_loaded?} is `false`.
82
- # @return [Types::LoadBalancerState]
83
- # Returns the data for this {LoadBalancer}.
84
- def data
85
- load unless @data
86
- @data
87
- end
72
+ # @raise [NotImplementedError]
73
+ # @api private
74
+ def load
75
+ msg = "#load is not implemented, data only available via enumeration"
76
+ raise NotImplementedError, msg
77
+ end
78
+ alias :reload :load
79
+
80
+ # @raise [NotImplementedError] Raises when {#data_loaded?} is `false`.
81
+ # @return [Types::LoadBalancerState]
82
+ # Returns the data for this {LoadBalancer}.
83
+ def data
84
+ load unless @data
85
+ @data
86
+ end
88
87
 
89
- # @return [Boolean]
90
- # Returns `true` if this resource is loaded. Accessing attributes or
91
- # {#data} on an unloaded resource will trigger a call to {#load}.
92
- def data_loaded?
93
- !!@data
94
- end
88
+ # @return [Boolean]
89
+ # Returns `true` if this resource is loaded. Accessing attributes or
90
+ # {#data} on an unloaded resource will trigger a call to {#load}.
91
+ def data_loaded?
92
+ !!@data
93
+ end
95
94
 
96
- # @!group Actions
97
-
98
- # @example Request syntax with placeholder values
99
- #
100
- # load_balancer.attach()
101
- # @param [Hash] options ({})
102
- # @return [Types::AttachLoadBalancersResultType]
103
- def attach(options = {})
104
- options = Aws::Util.deep_merge(options,
105
- auto_scaling_group_name: @group_name,
106
- load_balancer_names: [@name]
107
- )
108
- resp = @client.attach_load_balancers(options)
109
- resp.data
110
- end
95
+ # @!group Actions
96
+
97
+ # @example Request syntax with placeholder values
98
+ #
99
+ # load_balancer.attach()
100
+ # @param [Hash] options ({})
101
+ # @return [Types::AttachLoadBalancersResultType]
102
+ def attach(options = {})
103
+ options = Aws::Util.deep_merge(options,
104
+ auto_scaling_group_name: @group_name,
105
+ load_balancer_names: [@name]
106
+ )
107
+ resp = @client.attach_load_balancers(options)
108
+ resp.data
109
+ end
111
110
 
112
- # @example Request syntax with placeholder values
113
- #
114
- # load_balancer.detach()
115
- # @param [Hash] options ({})
116
- # @return [Types::DetachLoadBalancersResultType]
117
- def detach(options = {})
118
- options = Aws::Util.deep_merge(options,
119
- auto_scaling_group_name: @group_name,
120
- load_balancer_names: [@name]
121
- )
122
- resp = @client.detach_load_balancers(options)
123
- resp.data
124
- end
111
+ # @example Request syntax with placeholder values
112
+ #
113
+ # load_balancer.detach()
114
+ # @param [Hash] options ({})
115
+ # @return [Types::DetachLoadBalancersResultType]
116
+ def detach(options = {})
117
+ options = Aws::Util.deep_merge(options,
118
+ auto_scaling_group_name: @group_name,
119
+ load_balancer_names: [@name]
120
+ )
121
+ resp = @client.detach_load_balancers(options)
122
+ resp.data
123
+ end
125
124
 
126
- # @!group Associations
125
+ # @!group Associations
127
126
 
128
- # @return [AutoScalingGroup]
129
- def group
130
- AutoScalingGroup.new(
131
- name: @group_name,
132
- client: @client
133
- )
134
- end
127
+ # @return [AutoScalingGroup]
128
+ def group
129
+ AutoScalingGroup.new(
130
+ name: @group_name,
131
+ client: @client
132
+ )
133
+ end
135
134
 
136
- # @deprecated
137
- # @api private
138
- def identifiers
139
- {
140
- group_name: @group_name,
141
- name: @name
142
- }
143
- end
144
- deprecated(:identifiers)
145
-
146
- private
147
-
148
- def extract_group_name(args, options)
149
- value = args[0] || options.delete(:group_name)
150
- case value
151
- when String then value
152
- when nil then raise ArgumentError, "missing required option :group_name"
153
- else
154
- msg = "expected :group_name to be a String, got #{value.class}"
155
- raise ArgumentError, msg
156
- end
135
+ # @deprecated
136
+ # @api private
137
+ def identifiers
138
+ {
139
+ group_name: @group_name,
140
+ name: @name
141
+ }
142
+ end
143
+ deprecated(:identifiers)
144
+
145
+ private
146
+
147
+ def extract_group_name(args, options)
148
+ value = args[0] || options.delete(:group_name)
149
+ case value
150
+ when String then value
151
+ when nil then raise ArgumentError, "missing required option :group_name"
152
+ else
153
+ msg = "expected :group_name to be a String, got #{value.class}"
154
+ raise ArgumentError, msg
157
155
  end
156
+ end
158
157
 
159
- def extract_name(args, options)
160
- value = args[1] || options.delete(:name)
161
- case value
162
- when String then value
163
- when nil then raise ArgumentError, "missing required option :name"
164
- else
165
- msg = "expected :name to be a String, got #{value.class}"
166
- raise ArgumentError, msg
167
- end
158
+ def extract_name(args, options)
159
+ value = args[1] || options.delete(:name)
160
+ case value
161
+ when String then value
162
+ when nil then raise ArgumentError, "missing required option :name"
163
+ else
164
+ msg = "expected :name to be a String, got #{value.class}"
165
+ raise ArgumentError, msg
168
166
  end
167
+ end
169
168
 
170
- class Collection < Aws::Resources::Collection
171
-
172
- # @!group Batch Actions
173
-
174
- # @example Request syntax with placeholder values
175
- #
176
- # load_balancer.batch_attach()
177
- # @param options ({})
178
- # @return [void]
179
- def batch_attach(options = {})
180
- batch_enum.each do |batch|
181
- params = Aws::Util.copy_hash(options)
182
- params[:auto_scaling_group_name] = batch[0].group_name
183
- params[:load_balancer_names] ||= []
184
- batch.each do |item|
185
- params[:load_balancer_names] << {
186
- name: item.name
187
- }
188
- end
189
- batch[0].client.attach_load_balancers(params)
169
+ class Collection < Aws::Resources::Collection
170
+
171
+ # @!group Batch Actions
172
+
173
+ # @param options ({})
174
+ # @return [void]
175
+ def batch_attach(options = {})
176
+ batch_enum.each do |batch|
177
+ params = Aws::Util.copy_hash(options)
178
+ params[:auto_scaling_group_name] = batch[0].group_name
179
+ params[:load_balancer_names] ||= []
180
+ batch.each do |item|
181
+ params[:load_balancer_names] << {
182
+ name: item.name
183
+ }
190
184
  end
191
- nil
185
+ batch[0].client.attach_load_balancers(params)
192
186
  end
187
+ nil
188
+ end
193
189
 
194
- # @example Request syntax with placeholder values
195
- #
196
- # load_balancer.batch_detach()
197
- # @param options ({})
198
- # @return [void]
199
- def batch_detach(options = {})
200
- batch_enum.each do |batch|
201
- params = Aws::Util.copy_hash(options)
202
- params[:auto_scaling_group_name] = batch[0].group_name
203
- params[:load_balancer_names] ||= []
204
- batch.each do |item|
205
- params[:load_balancer_names] << {
206
- name: item.name
207
- }
208
- end
209
- batch[0].client.detach_load_balancers(params)
190
+ # @param options ({})
191
+ # @return [void]
192
+ def batch_detach(options = {})
193
+ batch_enum.each do |batch|
194
+ params = Aws::Util.copy_hash(options)
195
+ params[:auto_scaling_group_name] = batch[0].group_name
196
+ params[:load_balancer_names] ||= []
197
+ batch.each do |item|
198
+ params[:load_balancer_names] << {
199
+ name: item.name
200
+ }
210
201
  end
211
- nil
202
+ batch[0].client.detach_load_balancers(params)
212
203
  end
204
+ nil
205
+ end
213
206
 
214
- # @!endgroup
207
+ # @!endgroup
215
208
 
216
- end
217
209
  end
218
210
  end
219
211
  end
@@ -1,199 +1,194 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
- module Aws
9
- module AutoScaling
10
- class NotificationConfiguration
11
-
12
- extend Aws::Deprecations
13
-
14
- # @overload def initialize(group_name, type, topic_arn, options = {})
15
- # @param [String] group_name
16
- # @param [String] type
17
- # @param [String] topic_arn
18
- # @option options [Client] :client
19
- # @overload def initialize(options = {})
20
- # @option options [required, String] :group_name
21
- # @option options [required, String] :type
22
- # @option options [required, String] :topic_arn
23
- # @option options [Client] :client
24
- def initialize(*args)
25
- options = Hash === args.last ? args.pop.dup : {}
26
- @group_name = extract_group_name(args, options)
27
- @type = extract_type(args, options)
28
- @topic_arn = extract_topic_arn(args, options)
29
- @data = options.delete(:data)
30
- @client = options.delete(:client) || Client.new(options)
31
- end
8
+ module Aws::AutoScaling
9
+ class NotificationConfiguration
10
+
11
+ extend Aws::Deprecations
12
+
13
+ # @overload def initialize(group_name, type, topic_arn, options = {})
14
+ # @param [String] group_name
15
+ # @param [String] type
16
+ # @param [String] topic_arn
17
+ # @option options [Client] :client
18
+ # @overload def initialize(options = {})
19
+ # @option options [required, String] :group_name
20
+ # @option options [required, String] :type
21
+ # @option options [required, String] :topic_arn
22
+ # @option options [Client] :client
23
+ def initialize(*args)
24
+ options = Hash === args.last ? args.pop.dup : {}
25
+ @group_name = extract_group_name(args, options)
26
+ @type = extract_type(args, options)
27
+ @topic_arn = extract_topic_arn(args, options)
28
+ @data = options.delete(:data)
29
+ @client = options.delete(:client) || Client.new(options)
30
+ end
32
31
 
33
- # @!group Read-Only Attributes
32
+ # @!group Read-Only Attributes
34
33
 
35
- # @return [String]
36
- def group_name
37
- @group_name
38
- end
39
- alias :auto_scaling_group_name :group_name
34
+ # @return [String]
35
+ def group_name
36
+ @group_name
37
+ end
38
+ alias :auto_scaling_group_name :group_name
40
39
 
41
- # @return [String]
42
- def type
43
- @type
44
- end
45
- alias :notification_type :type
40
+ # @return [String]
41
+ def type
42
+ @type
43
+ end
44
+ alias :notification_type :type
46
45
 
47
- # @return [String]
48
- def topic_arn
49
- @topic_arn
50
- end
46
+ # @return [String]
47
+ def topic_arn
48
+ @topic_arn
49
+ end
51
50
 
52
- # @!endgroup
51
+ # @!endgroup
53
52
 
54
- # @return [Client]
55
- def client
56
- @client
57
- end
53
+ # @return [Client]
54
+ def client
55
+ @client
56
+ end
58
57
 
59
- # @raise [Errors::ResourceNotLoadable]
60
- # @api private
61
- def load
62
- msg = "#load is not implemented, data only available via enumeration"
63
- raise Errors::ResourceNotLoadable, msg
64
- end
65
- alias :reload :load
66
-
67
- # @raise [Errors::ResourceNotLoadableError] Raises when {#data_loaded?} is `false`.
68
- # @return [Types::NotificationConfiguration]
69
- # Returns the data for this {NotificationConfiguration}.
70
- def data
71
- load unless @data
72
- @data
73
- end
58
+ # @raise [NotImplementedError]
59
+ # @api private
60
+ def load
61
+ msg = "#load is not implemented, data only available via enumeration"
62
+ raise NotImplementedError, msg
63
+ end
64
+ alias :reload :load
65
+
66
+ # @raise [NotImplementedError] Raises when {#data_loaded?} is `false`.
67
+ # @return [Types::NotificationConfiguration]
68
+ # Returns the data for this {NotificationConfiguration}.
69
+ def data
70
+ load unless @data
71
+ @data
72
+ end
74
73
 
75
- # @return [Boolean]
76
- # Returns `true` if this resource is loaded. Accessing attributes or
77
- # {#data} on an unloaded resource will trigger a call to {#load}.
78
- def data_loaded?
79
- !!@data
80
- end
74
+ # @return [Boolean]
75
+ # Returns `true` if this resource is loaded. Accessing attributes or
76
+ # {#data} on an unloaded resource will trigger a call to {#load}.
77
+ def data_loaded?
78
+ !!@data
79
+ end
81
80
 
82
- # @!group Actions
83
-
84
- # @example Request syntax with placeholder values
85
- #
86
- # notification_configuration.delete()
87
- # @param [Hash] options ({})
88
- # @return [EmptyStructure]
89
- def delete(options = {})
90
- options = options.merge(
91
- auto_scaling_group_name: @group_name,
92
- topic_arn: @topic_arn
93
- )
94
- resp = @client.delete_notification_configuration(options)
95
- resp.data
96
- end
81
+ # @!group Actions
82
+
83
+ # @example Request syntax with placeholder values
84
+ #
85
+ # notification_configuration.delete()
86
+ # @param [Hash] options ({})
87
+ # @return [EmptyStructure]
88
+ def delete(options = {})
89
+ options = options.merge(
90
+ auto_scaling_group_name: @group_name,
91
+ topic_arn: @topic_arn
92
+ )
93
+ resp = @client.delete_notification_configuration(options)
94
+ resp.data
95
+ end
97
96
 
98
- # @example Request syntax with placeholder values
99
- #
100
- # notification_configuration.put()
101
- # @param [Hash] options ({})
102
- # @return [EmptyStructure]
103
- def put(options = {})
104
- options = Aws::Util.deep_merge(options,
105
- auto_scaling_group_name: @name,
106
- topic_arn: @topic_arn,
107
- notification_types: [@notification_type]
108
- )
109
- resp = @client.put_notification_configuration(options)
110
- resp.data
111
- end
97
+ # @example Request syntax with placeholder values
98
+ #
99
+ # notification_configuration.put()
100
+ # @param [Hash] options ({})
101
+ # @return [EmptyStructure]
102
+ def put(options = {})
103
+ options = Aws::Util.deep_merge(options,
104
+ auto_scaling_group_name: @name,
105
+ topic_arn: @topic_arn,
106
+ notification_types: [@notification_type]
107
+ )
108
+ resp = @client.put_notification_configuration(options)
109
+ resp.data
110
+ end
112
111
 
113
- # @!group Associations
112
+ # @!group Associations
114
113
 
115
- # @return [AutoScalingGroup]
116
- def group
117
- AutoScalingGroup.new(
118
- name: @group_name,
119
- client: @client
120
- )
121
- end
114
+ # @return [AutoScalingGroup]
115
+ def group
116
+ AutoScalingGroup.new(
117
+ name: @group_name,
118
+ client: @client
119
+ )
120
+ end
122
121
 
123
- # @deprecated
124
- # @api private
125
- def identifiers
126
- {
127
- group_name: @group_name,
128
- type: @type,
129
- topic_arn: @topic_arn
130
- }
131
- end
132
- deprecated(:identifiers)
133
-
134
- private
135
-
136
- def extract_group_name(args, options)
137
- value = args[0] || options.delete(:group_name)
138
- case value
139
- when String then value
140
- when nil then raise ArgumentError, "missing required option :group_name"
141
- else
142
- msg = "expected :group_name to be a String, got #{value.class}"
143
- raise ArgumentError, msg
144
- end
122
+ # @deprecated
123
+ # @api private
124
+ def identifiers
125
+ {
126
+ group_name: @group_name,
127
+ type: @type,
128
+ topic_arn: @topic_arn
129
+ }
130
+ end
131
+ deprecated(:identifiers)
132
+
133
+ private
134
+
135
+ def extract_group_name(args, options)
136
+ value = args[0] || options.delete(:group_name)
137
+ case value
138
+ when String then value
139
+ when nil then raise ArgumentError, "missing required option :group_name"
140
+ else
141
+ msg = "expected :group_name to be a String, got #{value.class}"
142
+ raise ArgumentError, msg
145
143
  end
144
+ end
146
145
 
147
- def extract_type(args, options)
148
- value = args[1] || options.delete(:type)
149
- case value
150
- when String then value
151
- when nil then raise ArgumentError, "missing required option :type"
152
- else
153
- msg = "expected :type to be a String, got #{value.class}"
154
- raise ArgumentError, msg
155
- end
146
+ def extract_type(args, options)
147
+ value = args[1] || options.delete(:type)
148
+ case value
149
+ when String then value
150
+ when nil then raise ArgumentError, "missing required option :type"
151
+ else
152
+ msg = "expected :type to be a String, got #{value.class}"
153
+ raise ArgumentError, msg
156
154
  end
155
+ end
157
156
 
158
- def extract_topic_arn(args, options)
159
- value = args[2] || options.delete(:topic_arn)
160
- case value
161
- when String then value
162
- when nil then raise ArgumentError, "missing required option :topic_arn"
163
- else
164
- msg = "expected :topic_arn to be a String, got #{value.class}"
165
- raise ArgumentError, msg
166
- end
157
+ def extract_topic_arn(args, options)
158
+ value = args[2] || options.delete(:topic_arn)
159
+ case value
160
+ when String then value
161
+ when nil then raise ArgumentError, "missing required option :topic_arn"
162
+ else
163
+ msg = "expected :topic_arn to be a String, got #{value.class}"
164
+ raise ArgumentError, msg
167
165
  end
166
+ end
168
167
 
169
- class Collection < Aws::Resources::Collection
170
-
171
- # @!group Batch Actions
172
-
173
- # @example Request syntax with placeholder values
174
- #
175
- # notification_configuration.batch_put()
176
- # @param options ({})
177
- # @return [void]
178
- def batch_put(options = {})
179
- batch_enum.each do |batch|
180
- params = Aws::Util.copy_hash(options)
181
- params[:auto_scaling_group_name] = batch[0].name
182
- params[:topic_arn] = batch[0].topic_arn
183
- params[:notification_types] ||= []
184
- batch.each do |item|
185
- params[:notification_types] << {
186
- notification_type: item.notification_type
187
- }
188
- end
189
- batch[0].client.put_notification_configuration(params)
168
+ class Collection < Aws::Resources::Collection
169
+
170
+ # @!group Batch Actions
171
+
172
+ # @param options ({})
173
+ # @return [void]
174
+ def batch_put(options = {})
175
+ batch_enum.each do |batch|
176
+ params = Aws::Util.copy_hash(options)
177
+ params[:auto_scaling_group_name] = batch[0].name
178
+ params[:topic_arn] = batch[0].topic_arn
179
+ params[:notification_types] ||= []
180
+ batch.each do |item|
181
+ params[:notification_types] << {
182
+ notification_type: item.notification_type
183
+ }
190
184
  end
191
- nil
185
+ batch[0].client.put_notification_configuration(params)
192
186
  end
187
+ nil
188
+ end
193
189
 
194
- # @!endgroup
190
+ # @!endgroup
195
191
 
196
- end
197
192
  end
198
193
  end
199
194
  end