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,236 +1,234 @@
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 LaunchConfiguration
11
-
12
- extend Aws::Deprecations
13
-
14
- # @overload def initialize(name, options = {})
15
- # @param [String] name
16
- # @option options [Client] :client
17
- # @overload def initialize(options = {})
18
- # @option options [required, String] :name
19
- # @option options [Client] :client
20
- def initialize(*args)
21
- options = Hash === args.last ? args.pop.dup : {}
22
- @name = extract_name(args, options)
23
- @data = options.delete(:data)
24
- @client = options.delete(:client) || Client.new(options)
25
- end
8
+ module Aws::AutoScaling
9
+ class LaunchConfiguration
10
+
11
+ extend Aws::Deprecations
12
+
13
+ # @overload def initialize(name, options = {})
14
+ # @param [String] name
15
+ # @option options [Client] :client
16
+ # @overload def initialize(options = {})
17
+ # @option options [required, String] :name
18
+ # @option options [Client] :client
19
+ def initialize(*args)
20
+ options = Hash === args.last ? args.pop.dup : {}
21
+ @name = extract_name(args, options)
22
+ @data = options.delete(:data)
23
+ @client = options.delete(:client) || Client.new(options)
24
+ end
26
25
 
27
- # @!group Read-Only Attributes
26
+ # @!group Read-Only Attributes
28
27
 
29
- # @return [String]
30
- def name
31
- @name
32
- end
33
- alias :launch_configuration_name :name
28
+ # @return [String]
29
+ def name
30
+ @name
31
+ end
32
+ alias :launch_configuration_name :name
34
33
 
35
- # The Amazon Resource Name (ARN) of the launch configuration.
36
- # @return [String]
37
- def launch_configuration_arn
38
- data.launch_configuration_arn
39
- end
34
+ # The Amazon Resource Name (ARN) of the launch configuration.
35
+ # @return [String]
36
+ def launch_configuration_arn
37
+ data.launch_configuration_arn
38
+ end
40
39
 
41
- # The ID of the Amazon Machine Image (AMI).
42
- # @return [String]
43
- def image_id
44
- data.image_id
45
- end
40
+ # The ID of the Amazon Machine Image (AMI).
41
+ # @return [String]
42
+ def image_id
43
+ data.image_id
44
+ end
46
45
 
47
- # The name of the key pair.
48
- # @return [String]
49
- def key_name
50
- data.key_name
51
- end
46
+ # The name of the key pair.
47
+ # @return [String]
48
+ def key_name
49
+ data.key_name
50
+ end
52
51
 
53
- # The security groups to associate with the instances.
54
- # @return [Array<String>]
55
- def security_groups
56
- data.security_groups
57
- end
52
+ # The security groups to associate with the instances.
53
+ # @return [Array<String>]
54
+ def security_groups
55
+ data.security_groups
56
+ end
58
57
 
59
- # The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances
60
- # to. This parameter can only be used if you are launching EC2-Classic
61
- # instances. For more information, see [ClassicLink][1] in the *Amazon
62
- # Elastic Compute Cloud User Guide*.
63
- #
64
- #
65
- #
66
- # [1]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html
67
- # @return [String]
68
- def classic_link_vpc_id
69
- data.classic_link_vpc_id
70
- end
58
+ # The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances
59
+ # to. This parameter can only be used if you are launching EC2-Classic
60
+ # instances. For more information, see [ClassicLink][1] in the *Amazon
61
+ # Elastic Compute Cloud User Guide*.
62
+ #
63
+ #
64
+ #
65
+ # [1]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html
66
+ # @return [String]
67
+ def classic_link_vpc_id
68
+ data.classic_link_vpc_id
69
+ end
71
70
 
72
- # The IDs of one or more security groups for the VPC specified in
73
- # `ClassicLinkVPCId`. This parameter is required if you specify a
74
- # ClassicLink-enabled VPC, and cannot be used otherwise. For more
75
- # information, see [ClassicLink][1] in the *Amazon Elastic Compute Cloud
76
- # User Guide*.
77
- #
78
- #
79
- #
80
- # [1]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html
81
- # @return [Array<String>]
82
- def classic_link_vpc_security_groups
83
- data.classic_link_vpc_security_groups
84
- end
71
+ # The IDs of one or more security groups for the VPC specified in
72
+ # `ClassicLinkVPCId`. This parameter is required if you specify a
73
+ # ClassicLink-enabled VPC, and cannot be used otherwise. For more
74
+ # information, see [ClassicLink][1] in the *Amazon Elastic Compute Cloud
75
+ # User Guide*.
76
+ #
77
+ #
78
+ #
79
+ # [1]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html
80
+ # @return [Array<String>]
81
+ def classic_link_vpc_security_groups
82
+ data.classic_link_vpc_security_groups
83
+ end
85
84
 
86
- # The user data available to the instances.
87
- # @return [String]
88
- def user_data
89
- data.user_data
90
- end
85
+ # The user data available to the instances.
86
+ # @return [String]
87
+ def user_data
88
+ data.user_data
89
+ end
91
90
 
92
- # The instance type for the instances.
93
- # @return [String]
94
- def instance_type
95
- data.instance_type
96
- end
91
+ # The instance type for the instances.
92
+ # @return [String]
93
+ def instance_type
94
+ data.instance_type
95
+ end
97
96
 
98
- # The ID of the kernel associated with the AMI.
99
- # @return [String]
100
- def kernel_id
101
- data.kernel_id
102
- end
97
+ # The ID of the kernel associated with the AMI.
98
+ # @return [String]
99
+ def kernel_id
100
+ data.kernel_id
101
+ end
103
102
 
104
- # The ID of the RAM disk associated with the AMI.
105
- # @return [String]
106
- def ramdisk_id
107
- data.ramdisk_id
108
- end
103
+ # The ID of the RAM disk associated with the AMI.
104
+ # @return [String]
105
+ def ramdisk_id
106
+ data.ramdisk_id
107
+ end
109
108
 
110
- # A block device mapping, which specifies the block devices for the
111
- # instance.
112
- # @return [Array<Types::BlockDeviceMapping>]
113
- def block_device_mappings
114
- data.block_device_mappings
115
- end
109
+ # A block device mapping, which specifies the block devices for the
110
+ # instance.
111
+ # @return [Array<Types::BlockDeviceMapping>]
112
+ def block_device_mappings
113
+ data.block_device_mappings
114
+ end
116
115
 
117
- # Controls whether instances in this group are launched with detailed
118
- # (`true`) or basic (`false`) monitoring.
119
- # @return [Types::InstanceMonitoring]
120
- def instance_monitoring
121
- data.instance_monitoring
122
- end
116
+ # Controls whether instances in this group are launched with detailed
117
+ # (`true`) or basic (`false`) monitoring.
118
+ # @return [Types::InstanceMonitoring]
119
+ def instance_monitoring
120
+ data.instance_monitoring
121
+ end
123
122
 
124
- # The price to bid when launching Spot Instances.
125
- # @return [String]
126
- def spot_price
127
- data.spot_price
128
- end
123
+ # The price to bid when launching Spot Instances.
124
+ # @return [String]
125
+ def spot_price
126
+ data.spot_price
127
+ end
129
128
 
130
- # The name or Amazon Resource Name (ARN) of the instance profile
131
- # associated with the IAM role for the instance.
132
- # @return [String]
133
- def iam_instance_profile
134
- data.iam_instance_profile
135
- end
129
+ # The name or Amazon Resource Name (ARN) of the instance profile
130
+ # associated with the IAM role for the instance.
131
+ # @return [String]
132
+ def iam_instance_profile
133
+ data.iam_instance_profile
134
+ end
136
135
 
137
- # The creation date and time for the launch configuration.
138
- # @return [Time]
139
- def created_time
140
- data.created_time
141
- end
136
+ # The creation date and time for the launch configuration.
137
+ # @return [Time]
138
+ def created_time
139
+ data.created_time
140
+ end
142
141
 
143
- # Controls whether the instance is optimized for EBS I/O (`true`) or not
144
- # (`false`).
145
- # @return [Boolean]
146
- def ebs_optimized
147
- data.ebs_optimized
148
- end
142
+ # Controls whether the instance is optimized for EBS I/O (`true`) or not
143
+ # (`false`).
144
+ # @return [Boolean]
145
+ def ebs_optimized
146
+ data.ebs_optimized
147
+ end
149
148
 
150
- # \[EC2-VPC\] Indicates whether to assign a public IP address to each
151
- # instance.
152
- # @return [Boolean]
153
- def associate_public_ip_address
154
- data.associate_public_ip_address
155
- end
149
+ # \[EC2-VPC\] Indicates whether to assign a public IP address to each
150
+ # instance.
151
+ # @return [Boolean]
152
+ def associate_public_ip_address
153
+ data.associate_public_ip_address
154
+ end
156
155
 
157
- # The tenancy of the instance, either `default` or `dedicated`. An
158
- # instance with `dedicated` tenancy runs in an isolated, single-tenant
159
- # hardware and can only be launched into a VPC.
160
- # @return [String]
161
- def placement_tenancy
162
- data.placement_tenancy
163
- end
156
+ # The tenancy of the instance, either `default` or `dedicated`. An
157
+ # instance with `dedicated` tenancy runs in an isolated, single-tenant
158
+ # hardware and can only be launched into a VPC.
159
+ # @return [String]
160
+ def placement_tenancy
161
+ data.placement_tenancy
162
+ end
164
163
 
165
- # @!endgroup
164
+ # @!endgroup
166
165
 
167
- # @return [Client]
168
- def client
169
- @client
170
- end
166
+ # @return [Client]
167
+ def client
168
+ @client
169
+ end
171
170
 
172
- # Loads, or reloads {#data} for the current {LaunchConfiguration}.
173
- # Returns `self` making it possible to chain methods.
174
- #
175
- # launch_configuration.reload.data
176
- #
177
- # @return [self]
178
- def load
179
- resp = @client.describe_launch_configurations(launch_configuration_names: [@name])
180
- @data = resp.launchconfigurations[0]
181
- self
182
- end
183
- alias :reload :load
184
-
185
- # @return [Types::LaunchConfiguration]
186
- # Returns the data for this {LaunchConfiguration}. Calls
187
- # {Client#describe_launch_configurations} if {#data_loaded?} is `false`.
188
- def data
189
- load unless @data
190
- @data
191
- end
171
+ # Loads, or reloads {#data} for the current {LaunchConfiguration}.
172
+ # Returns `self` making it possible to chain methods.
173
+ #
174
+ # launch_configuration.reload.data
175
+ #
176
+ # @return [self]
177
+ def load
178
+ resp = @client.describe_launch_configurations(launch_configuration_names: [@name])
179
+ @data = resp.launchconfigurations[0]
180
+ self
181
+ end
182
+ alias :reload :load
183
+
184
+ # @return [Types::LaunchConfiguration]
185
+ # Returns the data for this {LaunchConfiguration}. Calls
186
+ # {Client#describe_launch_configurations} if {#data_loaded?} is `false`.
187
+ def data
188
+ load unless @data
189
+ @data
190
+ end
192
191
 
193
- # @return [Boolean]
194
- # Returns `true` if this resource is loaded. Accessing attributes or
195
- # {#data} on an unloaded resource will trigger a call to {#load}.
196
- def data_loaded?
197
- !!@data
198
- end
192
+ # @return [Boolean]
193
+ # Returns `true` if this resource is loaded. Accessing attributes or
194
+ # {#data} on an unloaded resource will trigger a call to {#load}.
195
+ def data_loaded?
196
+ !!@data
197
+ end
199
198
 
200
- # @!group Actions
201
-
202
- # @example Request syntax with placeholder values
203
- #
204
- # launch_configuration.delete()
205
- # @param [Hash] options ({})
206
- # @return [EmptyStructure]
207
- def delete(options = {})
208
- options = options.merge(launch_configuration_name: @name)
209
- resp = @client.delete_launch_configuration(options)
210
- resp.data
211
- end
199
+ # @!group Actions
200
+
201
+ # @example Request syntax with placeholder values
202
+ #
203
+ # launch_configuration.delete()
204
+ # @param [Hash] options ({})
205
+ # @return [EmptyStructure]
206
+ def delete(options = {})
207
+ options = options.merge(launch_configuration_name: @name)
208
+ resp = @client.delete_launch_configuration(options)
209
+ resp.data
210
+ end
212
211
 
213
- # @deprecated
214
- # @api private
215
- def identifiers
216
- { name: @name }
217
- end
218
- deprecated(:identifiers)
219
-
220
- private
221
-
222
- def extract_name(args, options)
223
- value = args[0] || options.delete(:name)
224
- case value
225
- when String then value
226
- when nil then raise ArgumentError, "missing required option :name"
227
- else
228
- msg = "expected :name to be a String, got #{value.class}"
229
- raise ArgumentError, msg
230
- end
231
- end
212
+ # @deprecated
213
+ # @api private
214
+ def identifiers
215
+ { name: @name }
216
+ end
217
+ deprecated(:identifiers)
232
218
 
233
- class Collection < Aws::Resources::Collection; end
219
+ private
220
+
221
+ def extract_name(args, options)
222
+ value = args[0] || options.delete(:name)
223
+ case value
224
+ when String then value
225
+ when nil then raise ArgumentError, "missing required option :name"
226
+ else
227
+ msg = "expected :name to be a String, got #{value.class}"
228
+ raise ArgumentError, msg
229
+ end
234
230
  end
231
+
232
+ class Collection < Aws::Resources::Collection; end
235
233
  end
236
234
  end
@@ -1,329 +1,327 @@
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 LifecycleHook
8
+ module Aws::AutoScaling
9
+ class LifecycleHook
11
10
 
12
- extend Aws::Deprecations
11
+ extend Aws::Deprecations
13
12
 
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
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
36
- alias :auto_scaling_group_name :group_name
31
+ # @return [String]
32
+ def group_name
33
+ @group_name
34
+ end
35
+ alias :auto_scaling_group_name :group_name
37
36
 
38
- # @return [String]
39
- def name
40
- @name
41
- end
42
- alias :lifecycle_hook_name :name
37
+ # @return [String]
38
+ def name
39
+ @name
40
+ end
41
+ alias :lifecycle_hook_name :name
43
42
 
44
- # The state of the EC2 instance to which you want to attach the
45
- # lifecycle hook. For a list of lifecycle hook types, see
46
- # DescribeLifecycleHookTypes.
47
- # @return [String]
48
- def lifecycle_transition
49
- data.lifecycle_transition
50
- end
43
+ # The state of the EC2 instance to which you want to attach the
44
+ # lifecycle hook. For a list of lifecycle hook types, see
45
+ # DescribeLifecycleHookTypes.
46
+ # @return [String]
47
+ def lifecycle_transition
48
+ data.lifecycle_transition
49
+ end
51
50
 
52
- # The ARN of the notification target that Auto Scaling uses to notify
53
- # you when an instance is in the transition state for the lifecycle
54
- # hook. This ARN target can be either an SQS queue or an SNS topic. The
55
- # notification message sent to the target includes the following:
56
- #
57
- # * Lifecycle action token
58
- #
59
- # * User account ID
60
- #
61
- # * Name of the Auto Scaling group
62
- #
63
- # * Lifecycle hook name
64
- #
65
- # * EC2 instance ID
66
- #
67
- # * Lifecycle transition
68
- #
69
- # * Notification metadata
70
- # @return [String]
71
- def notification_target_arn
72
- data.notification_target_arn
73
- end
51
+ # The ARN of the notification target that Auto Scaling uses to notify
52
+ # you when an instance is in the transition state for the lifecycle
53
+ # hook. This ARN target can be either an SQS queue or an SNS topic. The
54
+ # notification message sent to the target includes the following:
55
+ #
56
+ # * Lifecycle action token
57
+ #
58
+ # * User account ID
59
+ #
60
+ # * Name of the Auto Scaling group
61
+ #
62
+ # * Lifecycle hook name
63
+ #
64
+ # * EC2 instance ID
65
+ #
66
+ # * Lifecycle transition
67
+ #
68
+ # * Notification metadata
69
+ # @return [String]
70
+ def notification_target_arn
71
+ data.notification_target_arn
72
+ end
74
73
 
75
- # The ARN of the IAM role that allows the Auto Scaling group to publish
76
- # to the specified notification target.
77
- # @return [String]
78
- def role_arn
79
- data.role_arn
80
- end
74
+ # The ARN of the IAM role that allows the Auto Scaling group to publish
75
+ # to the specified notification target.
76
+ # @return [String]
77
+ def role_arn
78
+ data.role_arn
79
+ end
81
80
 
82
- # Additional information that you want to include any time Auto Scaling
83
- # sends a message to the notification target.
84
- # @return [String]
85
- def notification_metadata
86
- data.notification_metadata
87
- end
81
+ # Additional information that you want to include any time Auto Scaling
82
+ # sends a message to the notification target.
83
+ # @return [String]
84
+ def notification_metadata
85
+ data.notification_metadata
86
+ end
88
87
 
89
- # The maximum time, in seconds, that can elapse before the lifecycle
90
- # hook times out. The default is 3600 seconds (1 hour). When the
91
- # lifecycle hook times out, Auto Scaling performs the default action.
92
- # You can prevent the lifecycle hook from timing out by calling
93
- # RecordLifecycleActionHeartbeat.
94
- # @return [Integer]
95
- def heartbeat_timeout
96
- data.heartbeat_timeout
97
- end
88
+ # The maximum time, in seconds, that can elapse before the lifecycle
89
+ # hook times out. The default is 3600 seconds (1 hour). When the
90
+ # lifecycle hook times out, Auto Scaling performs the default action.
91
+ # You can prevent the lifecycle hook from timing out by calling
92
+ # RecordLifecycleActionHeartbeat.
93
+ # @return [Integer]
94
+ def heartbeat_timeout
95
+ data.heartbeat_timeout
96
+ end
98
97
 
99
- # The maximum time, in seconds, that an instance can remain in a
100
- # `Pending:Wait` or `Terminating:Wait` state. The maximum is 172800
101
- # seconds (48 hours) or 100 times `HeartbeatTimeout`, whichever is
102
- # smaller.
103
- # @return [Integer]
104
- def global_timeout
105
- data.global_timeout
106
- end
98
+ # The maximum time, in seconds, that an instance can remain in a
99
+ # `Pending:Wait` or `Terminating:Wait` state. The maximum is 172800
100
+ # seconds (48 hours) or 100 times `HeartbeatTimeout`, whichever is
101
+ # smaller.
102
+ # @return [Integer]
103
+ def global_timeout
104
+ data.global_timeout
105
+ end
107
106
 
108
- # Defines the action the Auto Scaling group should take when the
109
- # lifecycle hook timeout elapses or if an unexpected failure occurs. The
110
- # valid values are `CONTINUE` and `ABANDON`. The default value is
111
- # `CONTINUE`.
112
- # @return [String]
113
- def default_result
114
- data.default_result
115
- end
107
+ # Defines the action the Auto Scaling group should take when the
108
+ # lifecycle hook timeout elapses or if an unexpected failure occurs. The
109
+ # valid values are `CONTINUE` and `ABANDON`. The default value is
110
+ # `CONTINUE`.
111
+ # @return [String]
112
+ def default_result
113
+ data.default_result
114
+ end
116
115
 
117
- # @!endgroup
116
+ # @!endgroup
118
117
 
119
- # @return [Client]
120
- def client
121
- @client
122
- end
118
+ # @return [Client]
119
+ def client
120
+ @client
121
+ end
123
122
 
124
- # Loads, or reloads {#data} for the current {LifecycleHook}.
125
- # Returns `self` making it possible to chain methods.
126
- #
127
- # lifecycle_hook.reload.data
128
- #
129
- # @return [self]
130
- def load
131
- resp = @client.describe_lifecycle_hooks(
132
- auto_scaling_group_name: @group_name,
133
- lifecycle_hook_names: [@name]
134
- )
135
- @data = resp.lifecyclehooks[0]
136
- self
137
- end
138
- alias :reload :load
123
+ # Loads, or reloads {#data} for the current {LifecycleHook}.
124
+ # Returns `self` making it possible to chain methods.
125
+ #
126
+ # lifecycle_hook.reload.data
127
+ #
128
+ # @return [self]
129
+ def load
130
+ resp = @client.describe_lifecycle_hooks(
131
+ auto_scaling_group_name: @group_name,
132
+ lifecycle_hook_names: [@name]
133
+ )
134
+ @data = resp.lifecyclehooks[0]
135
+ self
136
+ end
137
+ alias :reload :load
139
138
 
140
- # @return [Types::LifecycleHook]
141
- # Returns the data for this {LifecycleHook}. Calls
142
- # {Client#describe_lifecycle_hooks} if {#data_loaded?} is `false`.
143
- def data
144
- load unless @data
145
- @data
146
- end
139
+ # @return [Types::LifecycleHook]
140
+ # Returns the data for this {LifecycleHook}. Calls
141
+ # {Client#describe_lifecycle_hooks} if {#data_loaded?} is `false`.
142
+ def data
143
+ load unless @data
144
+ @data
145
+ end
147
146
 
148
- # @return [Boolean]
149
- # Returns `true` if this resource is loaded. Accessing attributes or
150
- # {#data} on an unloaded resource will trigger a call to {#load}.
151
- def data_loaded?
152
- !!@data
153
- end
147
+ # @return [Boolean]
148
+ # Returns `true` if this resource is loaded. Accessing attributes or
149
+ # {#data} on an unloaded resource will trigger a call to {#load}.
150
+ def data_loaded?
151
+ !!@data
152
+ end
154
153
 
155
- # @!group Actions
154
+ # @!group Actions
156
155
 
157
- # @example Request syntax with placeholder values
158
- #
159
- # lifecycle_hook.complete({
160
- # lifecycle_action_token: "LifecycleActionToken",
161
- # lifecycle_action_result: "LifecycleActionResult", # required
162
- # instance_id: "XmlStringMaxLen19",
163
- # })
164
- # @param [Hash] options ({})
165
- # @option options [String] :lifecycle_action_token
166
- # A universally unique identifier (UUID) that identifies a specific
167
- # lifecycle action associated with an instance. Auto Scaling sends this
168
- # token to the notification target you specified when you created the
169
- # lifecycle hook.
170
- # @option options [required, String] :lifecycle_action_result
171
- # The action for the group to take. This parameter can be either
172
- # `CONTINUE` or `ABANDON`.
173
- # @option options [String] :instance_id
174
- # The ID of the instance.
175
- # @return [Types::CompleteLifecycleActionAnswer]
176
- def complete(options = {})
177
- options = options.merge(
178
- auto_scaling_group_name: @group_name,
179
- lifecycle_hook_name: @name
180
- )
181
- resp = @client.complete_lifecycle_action(options)
182
- resp.data
183
- end
156
+ # @example Request syntax with placeholder values
157
+ #
158
+ # lifecycle_hook.complete({
159
+ # lifecycle_action_token: "LifecycleActionToken",
160
+ # lifecycle_action_result: "LifecycleActionResult", # required
161
+ # instance_id: "XmlStringMaxLen19",
162
+ # })
163
+ # @param [Hash] options ({})
164
+ # @option options [String] :lifecycle_action_token
165
+ # A universally unique identifier (UUID) that identifies a specific
166
+ # lifecycle action associated with an instance. Auto Scaling sends this
167
+ # token to the notification target you specified when you created the
168
+ # lifecycle hook.
169
+ # @option options [required, String] :lifecycle_action_result
170
+ # The action for the group to take. This parameter can be either
171
+ # `CONTINUE` or `ABANDON`.
172
+ # @option options [String] :instance_id
173
+ # The ID of the instance.
174
+ # @return [Types::CompleteLifecycleActionAnswer]
175
+ def complete(options = {})
176
+ options = options.merge(
177
+ auto_scaling_group_name: @group_name,
178
+ lifecycle_hook_name: @name
179
+ )
180
+ resp = @client.complete_lifecycle_action(options)
181
+ resp.data
182
+ end
184
183
 
185
- # @example Request syntax with placeholder values
186
- #
187
- # lifecycle_hook.delete()
188
- # @param [Hash] options ({})
189
- # @return [Types::DeleteLifecycleHookAnswer]
190
- def delete(options = {})
191
- options = options.merge(
192
- auto_scaling_group_name: @group_name,
193
- lifecycle_hook_name: @name
194
- )
195
- resp = @client.delete_lifecycle_hook(options)
196
- resp.data
197
- end
184
+ # @example Request syntax with placeholder values
185
+ #
186
+ # lifecycle_hook.delete()
187
+ # @param [Hash] options ({})
188
+ # @return [Types::DeleteLifecycleHookAnswer]
189
+ def delete(options = {})
190
+ options = options.merge(
191
+ auto_scaling_group_name: @group_name,
192
+ lifecycle_hook_name: @name
193
+ )
194
+ resp = @client.delete_lifecycle_hook(options)
195
+ resp.data
196
+ end
198
197
 
199
- # @example Request syntax with placeholder values
200
- #
201
- # lifecycle_hook.put({
202
- # lifecycle_transition: "LifecycleTransition",
203
- # role_arn: "ResourceName",
204
- # notification_target_arn: "NotificationTargetResourceName",
205
- # notification_metadata: "XmlStringMaxLen1023",
206
- # heartbeat_timeout: 1,
207
- # default_result: "LifecycleActionResult",
208
- # })
209
- # @param [Hash] options ({})
210
- # @option options [String] :lifecycle_transition
211
- # The instance state to which you want to attach the lifecycle hook. For
212
- # a list of lifecycle hook types, see DescribeLifecycleHookTypes.
213
- #
214
- # This parameter is required for new lifecycle hooks, but optional when
215
- # updating existing hooks.
216
- # @option options [String] :role_arn
217
- # The ARN of the IAM role that allows the Auto Scaling group to publish
218
- # to the specified notification target.
219
- #
220
- # This parameter is required for new lifecycle hooks, but optional when
221
- # updating existing hooks.
222
- # @option options [String] :notification_target_arn
223
- # The ARN of the notification target that Auto Scaling will use to
224
- # notify you when an instance is in the transition state for the
225
- # lifecycle hook. This target can be either an SQS queue or an SNS
226
- # topic. If you specify an empty string, this overrides the current ARN.
227
- #
228
- # This operation uses the JSON format when sending notifications to an
229
- # Amazon SQS queue, and an email key/value pair format when sending
230
- # notifications to an Amazon SNS topic.
231
- #
232
- # When you specify a notification target, Auto Scaling sends it a test
233
- # message. Test messages contains the following additional key/value
234
- # pair: `"Event": "autoscaling:TEST_NOTIFICATION"`.
235
- # @option options [String] :notification_metadata
236
- # Contains additional information that you want to include any time Auto
237
- # Scaling sends a message to the notification target.
238
- # @option options [Integer] :heartbeat_timeout
239
- # The amount of time, in seconds, that can elapse before the lifecycle
240
- # hook times out. When the lifecycle hook times out, Auto Scaling
241
- # performs the default action. You can prevent the lifecycle hook from
242
- # timing out by calling RecordLifecycleActionHeartbeat. The default is
243
- # 3600 seconds (1 hour).
244
- # @option options [String] :default_result
245
- # Defines the action the Auto Scaling group should take when the
246
- # lifecycle hook timeout elapses or if an unexpected failure occurs.
247
- # This parameter can be either `CONTINUE` or `ABANDON`. The default
248
- # value is `ABANDON`.
249
- # @return [Types::PutLifecycleHookAnswer]
250
- def put(options = {})
251
- options = options.merge(
252
- auto_scaling_group_name: @group_name,
253
- lifecycle_hook_name: @name
254
- )
255
- resp = @client.put_lifecycle_hook(options)
256
- resp.data
257
- end
198
+ # @example Request syntax with placeholder values
199
+ #
200
+ # lifecycle_hook.put({
201
+ # lifecycle_transition: "LifecycleTransition",
202
+ # role_arn: "ResourceName",
203
+ # notification_target_arn: "NotificationTargetResourceName",
204
+ # notification_metadata: "XmlStringMaxLen1023",
205
+ # heartbeat_timeout: 1,
206
+ # default_result: "LifecycleActionResult",
207
+ # })
208
+ # @param [Hash] options ({})
209
+ # @option options [String] :lifecycle_transition
210
+ # The instance state to which you want to attach the lifecycle hook. For
211
+ # a list of lifecycle hook types, see DescribeLifecycleHookTypes.
212
+ #
213
+ # This parameter is required for new lifecycle hooks, but optional when
214
+ # updating existing hooks.
215
+ # @option options [String] :role_arn
216
+ # The ARN of the IAM role that allows the Auto Scaling group to publish
217
+ # to the specified notification target.
218
+ #
219
+ # This parameter is required for new lifecycle hooks, but optional when
220
+ # updating existing hooks.
221
+ # @option options [String] :notification_target_arn
222
+ # The ARN of the notification target that Auto Scaling will use to
223
+ # notify you when an instance is in the transition state for the
224
+ # lifecycle hook. This target can be either an SQS queue or an SNS
225
+ # topic. If you specify an empty string, this overrides the current ARN.
226
+ #
227
+ # This operation uses the JSON format when sending notifications to an
228
+ # Amazon SQS queue, and an email key/value pair format when sending
229
+ # notifications to an Amazon SNS topic.
230
+ #
231
+ # When you specify a notification target, Auto Scaling sends it a test
232
+ # message. Test messages contains the following additional key/value
233
+ # pair: `"Event": "autoscaling:TEST_NOTIFICATION"`.
234
+ # @option options [String] :notification_metadata
235
+ # Contains additional information that you want to include any time Auto
236
+ # Scaling sends a message to the notification target.
237
+ # @option options [Integer] :heartbeat_timeout
238
+ # The amount of time, in seconds, that can elapse before the lifecycle
239
+ # hook times out. When the lifecycle hook times out, Auto Scaling
240
+ # performs the default action. You can prevent the lifecycle hook from
241
+ # timing out by calling RecordLifecycleActionHeartbeat. The default is
242
+ # 3600 seconds (1 hour).
243
+ # @option options [String] :default_result
244
+ # Defines the action the Auto Scaling group should take when the
245
+ # lifecycle hook timeout elapses or if an unexpected failure occurs.
246
+ # This parameter can be either `CONTINUE` or `ABANDON`. The default
247
+ # value is `ABANDON`.
248
+ # @return [Types::PutLifecycleHookAnswer]
249
+ def put(options = {})
250
+ options = options.merge(
251
+ auto_scaling_group_name: @group_name,
252
+ lifecycle_hook_name: @name
253
+ )
254
+ resp = @client.put_lifecycle_hook(options)
255
+ resp.data
256
+ end
258
257
 
259
- # @example Request syntax with placeholder values
260
- #
261
- # lifecycle_hook.record_heartbeat({
262
- # lifecycle_action_token: "LifecycleActionToken",
263
- # instance_id: "XmlStringMaxLen19",
264
- # })
265
- # @param [Hash] options ({})
266
- # @option options [String] :lifecycle_action_token
267
- # A token that uniquely identifies a specific lifecycle action
268
- # associated with an instance. Auto Scaling sends this token to the
269
- # notification target you specified when you created the lifecycle hook.
270
- # @option options [String] :instance_id
271
- # The ID of the instance.
272
- # @return [Types::RecordLifecycleActionHeartbeatAnswer]
273
- def record_heartbeat(options = {})
274
- options = options.merge(
275
- auto_scaling_group_name: @group_name,
276
- lifecycle_hook_name: @name
277
- )
278
- resp = @client.record_lifecycle_action_heartbeat(options)
279
- resp.data
280
- end
258
+ # @example Request syntax with placeholder values
259
+ #
260
+ # lifecycle_hook.record_heartbeat({
261
+ # lifecycle_action_token: "LifecycleActionToken",
262
+ # instance_id: "XmlStringMaxLen19",
263
+ # })
264
+ # @param [Hash] options ({})
265
+ # @option options [String] :lifecycle_action_token
266
+ # A token that uniquely identifies a specific lifecycle action
267
+ # associated with an instance. Auto Scaling sends this token to the
268
+ # notification target you specified when you created the lifecycle hook.
269
+ # @option options [String] :instance_id
270
+ # The ID of the instance.
271
+ # @return [Types::RecordLifecycleActionHeartbeatAnswer]
272
+ def record_heartbeat(options = {})
273
+ options = options.merge(
274
+ auto_scaling_group_name: @group_name,
275
+ lifecycle_hook_name: @name
276
+ )
277
+ resp = @client.record_lifecycle_action_heartbeat(options)
278
+ resp.data
279
+ end
281
280
 
282
- # @!group Associations
281
+ # @!group Associations
283
282
 
284
- # @return [AutoScalingGroup]
285
- def group
286
- AutoScalingGroup.new(
287
- name: @group_name,
288
- client: @client
289
- )
290
- end
283
+ # @return [AutoScalingGroup]
284
+ def group
285
+ AutoScalingGroup.new(
286
+ name: @group_name,
287
+ client: @client
288
+ )
289
+ end
291
290
 
292
- # @deprecated
293
- # @api private
294
- def identifiers
295
- {
296
- group_name: @group_name,
297
- name: @name
298
- }
299
- end
300
- deprecated(:identifiers)
291
+ # @deprecated
292
+ # @api private
293
+ def identifiers
294
+ {
295
+ group_name: @group_name,
296
+ name: @name
297
+ }
298
+ end
299
+ deprecated(:identifiers)
301
300
 
302
- private
301
+ private
303
302
 
304
- def extract_group_name(args, options)
305
- value = args[0] || options.delete(:group_name)
306
- case value
307
- when String then value
308
- when nil then raise ArgumentError, "missing required option :group_name"
309
- else
310
- msg = "expected :group_name to be a String, got #{value.class}"
311
- raise ArgumentError, msg
312
- end
303
+ def extract_group_name(args, options)
304
+ value = args[0] || options.delete(:group_name)
305
+ case value
306
+ when String then value
307
+ when nil then raise ArgumentError, "missing required option :group_name"
308
+ else
309
+ msg = "expected :group_name to be a String, got #{value.class}"
310
+ raise ArgumentError, msg
313
311
  end
312
+ end
314
313
 
315
- def extract_name(args, options)
316
- value = args[1] || options.delete(:name)
317
- case value
318
- when String then value
319
- when nil then raise ArgumentError, "missing required option :name"
320
- else
321
- msg = "expected :name to be a String, got #{value.class}"
322
- raise ArgumentError, msg
323
- end
314
+ def extract_name(args, options)
315
+ value = args[1] || options.delete(:name)
316
+ case value
317
+ when String then value
318
+ when nil then raise ArgumentError, "missing required option :name"
319
+ else
320
+ msg = "expected :name to be a String, got #{value.class}"
321
+ raise ArgumentError, msg
324
322
  end
325
-
326
- class Collection < Aws::Resources::Collection; end
327
323
  end
324
+
325
+ class Collection < Aws::Resources::Collection; end
328
326
  end
329
327
  end