aws-sdk-cloudformation 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,712 +1,710 @@
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 CloudFormation
10
- class Stack
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::CloudFormation
9
+ class Stack
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 :stack_name :name
28
+ # @return [String]
29
+ def name
30
+ @name
31
+ end
32
+ alias :stack_name :name
34
33
 
35
- # Unique identifier of the stack.
36
- # @return [String]
37
- def stack_id
38
- data.stack_id
39
- end
34
+ # Unique identifier of the stack.
35
+ # @return [String]
36
+ def stack_id
37
+ data.stack_id
38
+ end
40
39
 
41
- # The unique ID of the change set.
42
- # @return [String]
43
- def change_set_id
44
- data.change_set_id
45
- end
40
+ # The unique ID of the change set.
41
+ # @return [String]
42
+ def change_set_id
43
+ data.change_set_id
44
+ end
46
45
 
47
- # A user-defined description associated with the stack.
48
- # @return [String]
49
- def description
50
- data.description
51
- end
46
+ # A user-defined description associated with the stack.
47
+ # @return [String]
48
+ def description
49
+ data.description
50
+ end
52
51
 
53
- # A list of `Parameter` structures.
54
- # @return [Array<Types::Parameter>]
55
- def parameters
56
- data.parameters
57
- end
52
+ # A list of `Parameter` structures.
53
+ # @return [Array<Types::Parameter>]
54
+ def parameters
55
+ data.parameters
56
+ end
58
57
 
59
- # The time at which the stack was created.
60
- # @return [Time]
61
- def creation_time
62
- data.creation_time
63
- end
58
+ # The time at which the stack was created.
59
+ # @return [Time]
60
+ def creation_time
61
+ data.creation_time
62
+ end
64
63
 
65
- # The time the stack was last updated. This field will only be returned
66
- # if the stack has been updated at least once.
67
- # @return [Time]
68
- def last_updated_time
69
- data.last_updated_time
70
- end
64
+ # The time the stack was last updated. This field will only be returned
65
+ # if the stack has been updated at least once.
66
+ # @return [Time]
67
+ def last_updated_time
68
+ data.last_updated_time
69
+ end
71
70
 
72
- # Current status of the stack.
73
- # @return [String]
74
- def stack_status
75
- data.stack_status
76
- end
71
+ # Current status of the stack.
72
+ # @return [String]
73
+ def stack_status
74
+ data.stack_status
75
+ end
77
76
 
78
- # Success/failure message associated with the stack status.
79
- # @return [String]
80
- def stack_status_reason
81
- data.stack_status_reason
82
- end
77
+ # Success/failure message associated with the stack status.
78
+ # @return [String]
79
+ def stack_status_reason
80
+ data.stack_status_reason
81
+ end
83
82
 
84
- # Boolean to enable or disable rollback on stack creation failures:
85
- #
86
- # * `true`\: disable rollback
87
- #
88
- # * `false`\: enable rollback
89
- # @return [Boolean]
90
- def disable_rollback
91
- data.disable_rollback
92
- end
83
+ # Boolean to enable or disable rollback on stack creation failures:
84
+ #
85
+ # * `true`\: disable rollback
86
+ #
87
+ # * `false`\: enable rollback
88
+ # @return [Boolean]
89
+ def disable_rollback
90
+ data.disable_rollback
91
+ end
93
92
 
94
- # SNS topic ARNs to which stack related events are published.
95
- # @return [Array<String>]
96
- def notification_arns
97
- data.notification_arns
98
- end
93
+ # SNS topic ARNs to which stack related events are published.
94
+ # @return [Array<String>]
95
+ def notification_arns
96
+ data.notification_arns
97
+ end
99
98
 
100
- # The amount of time within which stack creation should complete.
101
- # @return [Integer]
102
- def timeout_in_minutes
103
- data.timeout_in_minutes
104
- end
99
+ # The amount of time within which stack creation should complete.
100
+ # @return [Integer]
101
+ def timeout_in_minutes
102
+ data.timeout_in_minutes
103
+ end
105
104
 
106
- # The capabilities allowed in the stack.
107
- # @return [Array<String>]
108
- def capabilities
109
- data.capabilities
110
- end
105
+ # The capabilities allowed in the stack.
106
+ # @return [Array<String>]
107
+ def capabilities
108
+ data.capabilities
109
+ end
111
110
 
112
- # A list of output structures.
113
- # @return [Array<Types::Output>]
114
- def outputs
115
- data.outputs
116
- end
111
+ # A list of output structures.
112
+ # @return [Array<Types::Output>]
113
+ def outputs
114
+ data.outputs
115
+ end
117
116
 
118
- # The Amazon Resource Name (ARN) of an AWS Identity and Access
119
- # Management (IAM) role that is associated with the stack. During a
120
- # stack operation, AWS CloudFormation uses this role's credentials to
121
- # make calls on your behalf.
122
- # @return [String]
123
- def role_arn
124
- data.role_arn
125
- end
117
+ # The Amazon Resource Name (ARN) of an AWS Identity and Access
118
+ # Management (IAM) role that is associated with the stack. During a
119
+ # stack operation, AWS CloudFormation uses this role's credentials to
120
+ # make calls on your behalf.
121
+ # @return [String]
122
+ def role_arn
123
+ data.role_arn
124
+ end
126
125
 
127
- # A list of `Tag`s that specify information about the stack.
128
- # @return [Array<Types::Tag>]
129
- def tags
130
- data.tags
131
- end
126
+ # A list of `Tag`s that specify information about the stack.
127
+ # @return [Array<Types::Tag>]
128
+ def tags
129
+ data.tags
130
+ end
132
131
 
133
- # @!endgroup
132
+ # @!endgroup
134
133
 
135
- # @return [Client]
136
- def client
137
- @client
138
- end
134
+ # @return [Client]
135
+ def client
136
+ @client
137
+ end
139
138
 
140
- # Loads, or reloads {#data} for the current {Stack}.
141
- # Returns `self` making it possible to chain methods.
142
- #
143
- # stack.reload.data
144
- #
145
- # @return [self]
146
- def load
147
- resp = @client.describe_stacks(stack_name: @name)
148
- @data = resp.stacks[0]
149
- self
150
- end
151
- alias :reload :load
152
-
153
- # @return [Types::Stack]
154
- # Returns the data for this {Stack}. Calls
155
- # {Client#describe_stacks} if {#data_loaded?} is `false`.
156
- def data
157
- load unless @data
158
- @data
159
- end
139
+ # Loads, or reloads {#data} for the current {Stack}.
140
+ # Returns `self` making it possible to chain methods.
141
+ #
142
+ # stack.reload.data
143
+ #
144
+ # @return [self]
145
+ def load
146
+ resp = @client.describe_stacks(stack_name: @name)
147
+ @data = resp.stacks[0]
148
+ self
149
+ end
150
+ alias :reload :load
151
+
152
+ # @return [Types::Stack]
153
+ # Returns the data for this {Stack}. Calls
154
+ # {Client#describe_stacks} if {#data_loaded?} is `false`.
155
+ def data
156
+ load unless @data
157
+ @data
158
+ end
160
159
 
161
- # @return [Boolean]
162
- # Returns `true` if this resource is loaded. Accessing attributes or
163
- # {#data} on an unloaded resource will trigger a call to {#load}.
164
- def data_loaded?
165
- !!@data
166
- end
160
+ # @return [Boolean]
161
+ # Returns `true` if this resource is loaded. Accessing attributes or
162
+ # {#data} on an unloaded resource will trigger a call to {#load}.
163
+ def data_loaded?
164
+ !!@data
165
+ end
167
166
 
168
- # @param [Hash] options ({})
169
- # @return [Boolean]
170
- # Returns `true` if the Stack exists.
171
- def exists?(options = {})
172
- begin
173
- wait_until_exists(options.merge(max_attempts: 1))
174
- true
175
- rescue Aws::Waiters::Errors::UnexpectedError => e
176
- raise e.error
177
- rescue Aws::Waiters::Errors::WaiterFailed
178
- false
179
- end
167
+ # @param [Hash] options ({})
168
+ # @return [Boolean]
169
+ # Returns `true` if the Stack exists.
170
+ def exists?(options = {})
171
+ begin
172
+ wait_until_exists(options.merge(max_attempts: 1))
173
+ true
174
+ rescue Aws::Waiters::Errors::UnexpectedError => e
175
+ raise e.error
176
+ rescue Aws::Waiters::Errors::WaiterFailed
177
+ false
180
178
  end
179
+ end
181
180
 
182
- # @param [Hash] options ({})
183
- # @option options [Integer] :max_attempts (20)
184
- # @option options [Float] :delay (5)
185
- # @option options [Proc] :before_attempt
186
- # @option options [Proc] :before_wait
187
- # @return [Stack]
188
- def wait_until_exists(options = {})
189
- options, params = separate_params_and_options(options)
190
- waiter = Waiters::StackExists.new(options)
191
- yield_waiter_and_warn(waiter, &Proc.new) if block_given?
192
- waiter.wait(params.merge(stack_name: @name))
193
- Stack.new({
194
- name: @name,
195
- client: @client
196
- })
197
- end
181
+ # @param [Hash] options ({})
182
+ # @option options [Integer] :max_attempts (20)
183
+ # @option options [Float] :delay (5)
184
+ # @option options [Proc] :before_attempt
185
+ # @option options [Proc] :before_wait
186
+ # @return [Stack]
187
+ def wait_until_exists(options = {})
188
+ options, params = separate_params_and_options(options)
189
+ waiter = Waiters::StackExists.new(options)
190
+ yield_waiter_and_warn(waiter, &Proc.new) if block_given?
191
+ waiter.wait(params.merge(stack_name: @name))
192
+ Stack.new({
193
+ name: @name,
194
+ client: @client
195
+ })
196
+ end
198
197
 
199
- # @!group Actions
198
+ # @!group Actions
199
+
200
+ # @example Request syntax with placeholder values
201
+ #
202
+ # stack.cancel_update()
203
+ # @param [Hash] options ({})
204
+ # @return [EmptyStructure]
205
+ def cancel_update(options = {})
206
+ options = options.merge(stack_name: @name)
207
+ resp = @client.cancel_update_stack(options)
208
+ resp.data
209
+ end
200
210
 
201
- # @example Request syntax with placeholder values
202
- #
203
- # stack.cancel_update()
204
- # @param [Hash] options ({})
205
- # @return [EmptyStructure]
206
- def cancel_update(options = {})
207
- options = options.merge(stack_name: @name)
208
- resp = @client.cancel_update_stack(options)
209
- resp.data
210
- end
211
+ # @example Request syntax with placeholder values
212
+ #
213
+ # stack.create({
214
+ # template_body: "TemplateBody",
215
+ # template_url: "TemplateURL",
216
+ # parameters: [
217
+ # {
218
+ # parameter_key: "ParameterKey",
219
+ # parameter_value: "ParameterValue",
220
+ # use_previous_value: false,
221
+ # },
222
+ # ],
223
+ # disable_rollback: false,
224
+ # timeout_in_minutes: 1,
225
+ # notification_arns: ["NotificationARN"],
226
+ # capabilities: ["CAPABILITY_IAM"], # accepts CAPABILITY_IAM, CAPABILITY_NAMED_IAM
227
+ # resource_types: ["ResourceType"],
228
+ # role_arn: "RoleARN",
229
+ # on_failure: "DO_NOTHING", # accepts DO_NOTHING, ROLLBACK, DELETE
230
+ # stack_policy_body: "StackPolicyBody",
231
+ # stack_policy_url: "StackPolicyURL",
232
+ # tags: [
233
+ # {
234
+ # key: "TagKey",
235
+ # value: "TagValue",
236
+ # },
237
+ # ],
238
+ # })
239
+ # @param [Hash] options ({})
240
+ # @option options [String] :template_body
241
+ # Structure containing the template body with a minimum length of 1 byte
242
+ # and a maximum length of 51,200 bytes. For more information, go to
243
+ # [Template Anatomy][1] in the AWS CloudFormation User Guide.
244
+ #
245
+ # Conditional: You must specify either the `TemplateBody` or the
246
+ # `TemplateURL` parameter, but not both.
247
+ #
248
+ #
249
+ #
250
+ # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html
251
+ # @option options [String] :template_url
252
+ # Location of file containing the template body. The URL must point to a
253
+ # template (max size: 460,800 bytes) that is located in an Amazon S3
254
+ # bucket. For more information, go to the [Template Anatomy][1] in the
255
+ # AWS CloudFormation User Guide.
256
+ #
257
+ # Conditional: You must specify either the `TemplateBody` or the
258
+ # `TemplateURL` parameter, but not both.
259
+ #
260
+ #
261
+ #
262
+ # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html
263
+ # @option options [Array<Types::Parameter>] :parameters
264
+ # A list of `Parameter` structures that specify input parameters for the
265
+ # stack. For more information, see the [Parameter][1] data type.
266
+ #
267
+ #
268
+ #
269
+ # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html
270
+ # @option options [Boolean] :disable_rollback
271
+ # Set to `true` to disable rollback of the stack if stack creation
272
+ # failed. You can specify either `DisableRollback` or `OnFailure`, but
273
+ # not both.
274
+ #
275
+ # Default: `false`
276
+ # @option options [Integer] :timeout_in_minutes
277
+ # The amount of time that can pass before the stack status becomes
278
+ # CREATE\_FAILED; if `DisableRollback` is not set or is set to `false`,
279
+ # the stack will be rolled back.
280
+ # @option options [Array<String>] :notification_arns
281
+ # The Simple Notification Service (SNS) topic ARNs to publish stack
282
+ # related events. You can find your SNS topic ARNs using the [SNS
283
+ # console][1] or your Command Line Interface (CLI).
284
+ #
285
+ #
286
+ #
287
+ # [1]: https://console.aws.amazon.com/sns
288
+ # @option options [Array<String>] :capabilities
289
+ # A list of values that you must specify before AWS CloudFormation can
290
+ # create certain stacks. Some stack templates might include resources
291
+ # that can affect permissions in your AWS account, for example, by
292
+ # creating new AWS Identity and Access Management (IAM) users. For those
293
+ # stacks, you must explicitly acknowledge their capabilities by
294
+ # specifying this parameter.
295
+ #
296
+ # The only valid values are `CAPABILITY_IAM` and `CAPABILITY_NAMED_IAM`.
297
+ # The following resources require you to specify this parameter: [
298
+ # AWS::IAM::AccessKey][1], [ AWS::IAM::Group][2], [
299
+ # AWS::IAM::InstanceProfile][3], [ AWS::IAM::Policy][4], [
300
+ # AWS::IAM::Role][5], [ AWS::IAM::User][6], and [
301
+ # AWS::IAM::UserToGroupAddition][7]. If your stack template contains
302
+ # these resources, we recommend that you review all permissions
303
+ # associated with them and edit their permissions if necessary.
304
+ #
305
+ # If you have IAM resources, you can specify either capability. If you
306
+ # have IAM resources with custom names, you must specify
307
+ # `CAPABILITY_NAMED_IAM`. If you don't specify this parameter, this
308
+ # action returns an `InsufficientCapabilities` error.
309
+ #
310
+ # For more information, see [Acknowledging IAM Resources in AWS
311
+ # CloudFormation Templates][8].
312
+ #
313
+ #
314
+ #
315
+ # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html
316
+ # [2]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html
317
+ # [3]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html
318
+ # [4]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html
319
+ # [5]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html
320
+ # [6]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html
321
+ # [7]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html
322
+ # [8]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities
323
+ # @option options [Array<String>] :resource_types
324
+ # The template resource types that you have permissions to work with for
325
+ # this create stack action, such as `AWS::EC2::Instance`, `AWS::EC2::*`,
326
+ # or `Custom::MyCustomInstance`. Use the following syntax to describe
327
+ # template resource types: `AWS::*` (for all AWS resource), `Custom::*`
328
+ # (for all custom resources), `Custom::logical_ID ` (for a specific
329
+ # custom resource), `AWS::service_name::*` (for all resources of a
330
+ # particular AWS service), and `AWS::service_name::resource_logical_ID `
331
+ # (for a specific AWS resource).
332
+ #
333
+ # If the list of resource types doesn't include a resource that you're
334
+ # creating, the stack creation fails. By default, AWS CloudFormation
335
+ # grants permissions to all resource types. AWS Identity and Access
336
+ # Management (IAM) uses this parameter for AWS CloudFormation-specific
337
+ # condition keys in IAM policies. For more information, see [Controlling
338
+ # Access with AWS Identity and Access Management][1].
339
+ #
340
+ #
341
+ #
342
+ # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html
343
+ # @option options [String] :role_arn
344
+ # The Amazon Resource Name (ARN) of an AWS Identity and Access
345
+ # Management (IAM) role that AWS CloudFormation assumes to create the
346
+ # stack. AWS CloudFormation uses the role's credentials to make calls
347
+ # on your behalf. AWS CloudFormation always uses this role for all
348
+ # future operations on the stack. As long as users have permission to
349
+ # operate on the stack, AWS CloudFormation uses this role even if the
350
+ # users don't have permission to pass it. Ensure that the role grants
351
+ # least privilege.
352
+ #
353
+ # If you don't specify a value, AWS CloudFormation uses the role that
354
+ # was previously associated with the stack. If no role is available, AWS
355
+ # CloudFormation uses a temporary session that is generated from your
356
+ # user credentials.
357
+ # @option options [String] :on_failure
358
+ # Determines what action will be taken if stack creation fails. This
359
+ # must be one of: DO\_NOTHING, ROLLBACK, or DELETE. You can specify
360
+ # either `OnFailure` or `DisableRollback`, but not both.
361
+ #
362
+ # Default: `ROLLBACK`
363
+ # @option options [String] :stack_policy_body
364
+ # Structure containing the stack policy body. For more information, go
365
+ # to [ Prevent Updates to Stack Resources][1] in the *AWS CloudFormation
366
+ # User Guide*. You can specify either the `StackPolicyBody` or the
367
+ # `StackPolicyURL` parameter, but not both.
368
+ #
369
+ #
370
+ #
371
+ # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html
372
+ # @option options [String] :stack_policy_url
373
+ # Location of a file containing the stack policy. The URL must point to
374
+ # a policy (maximum size: 16 KB) located in an S3 bucket in the same
375
+ # region as the stack. You can specify either the `StackPolicyBody` or
376
+ # the `StackPolicyURL` parameter, but not both.
377
+ # @option options [Array<Types::Tag>] :tags
378
+ # Key-value pairs to associate with this stack. AWS CloudFormation also
379
+ # propagates these tags to the resources created in the stack. A maximum
380
+ # number of 10 tags can be specified.
381
+ # @return [Types::CreateStackOutput]
382
+ def create(options = {})
383
+ options = options.merge(stack_name: @name)
384
+ resp = @client.create_stack(options)
385
+ resp.data
386
+ end
211
387
 
212
- # @example Request syntax with placeholder values
213
- #
214
- # stack.create({
215
- # template_body: "TemplateBody",
216
- # template_url: "TemplateURL",
217
- # parameters: [
218
- # {
219
- # parameter_key: "ParameterKey",
220
- # parameter_value: "ParameterValue",
221
- # use_previous_value: false,
222
- # },
223
- # ],
224
- # disable_rollback: false,
225
- # timeout_in_minutes: 1,
226
- # notification_arns: ["NotificationARN"],
227
- # capabilities: ["CAPABILITY_IAM"], # accepts CAPABILITY_IAM, CAPABILITY_NAMED_IAM
228
- # resource_types: ["ResourceType"],
229
- # role_arn: "RoleARN",
230
- # on_failure: "DO_NOTHING", # accepts DO_NOTHING, ROLLBACK, DELETE
231
- # stack_policy_body: "StackPolicyBody",
232
- # stack_policy_url: "StackPolicyURL",
233
- # tags: [
234
- # {
235
- # key: "TagKey",
236
- # value: "TagValue",
237
- # },
238
- # ],
239
- # })
240
- # @param [Hash] options ({})
241
- # @option options [String] :template_body
242
- # Structure containing the template body with a minimum length of 1 byte
243
- # and a maximum length of 51,200 bytes. For more information, go to
244
- # [Template Anatomy][1] in the AWS CloudFormation User Guide.
245
- #
246
- # Conditional: You must specify either the `TemplateBody` or the
247
- # `TemplateURL` parameter, but not both.
248
- #
249
- #
250
- #
251
- # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html
252
- # @option options [String] :template_url
253
- # Location of file containing the template body. The URL must point to a
254
- # template (max size: 460,800 bytes) that is located in an Amazon S3
255
- # bucket. For more information, go to the [Template Anatomy][1] in the
256
- # AWS CloudFormation User Guide.
257
- #
258
- # Conditional: You must specify either the `TemplateBody` or the
259
- # `TemplateURL` parameter, but not both.
260
- #
261
- #
262
- #
263
- # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html
264
- # @option options [Array<Types::Parameter>] :parameters
265
- # A list of `Parameter` structures that specify input parameters for the
266
- # stack. For more information, see the [Parameter][1] data type.
267
- #
268
- #
269
- #
270
- # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html
271
- # @option options [Boolean] :disable_rollback
272
- # Set to `true` to disable rollback of the stack if stack creation
273
- # failed. You can specify either `DisableRollback` or `OnFailure`, but
274
- # not both.
275
- #
276
- # Default: `false`
277
- # @option options [Integer] :timeout_in_minutes
278
- # The amount of time that can pass before the stack status becomes
279
- # CREATE\_FAILED; if `DisableRollback` is not set or is set to `false`,
280
- # the stack will be rolled back.
281
- # @option options [Array<String>] :notification_arns
282
- # The Simple Notification Service (SNS) topic ARNs to publish stack
283
- # related events. You can find your SNS topic ARNs using the [SNS
284
- # console][1] or your Command Line Interface (CLI).
285
- #
286
- #
287
- #
288
- # [1]: https://console.aws.amazon.com/sns
289
- # @option options [Array<String>] :capabilities
290
- # A list of values that you must specify before AWS CloudFormation can
291
- # create certain stacks. Some stack templates might include resources
292
- # that can affect permissions in your AWS account, for example, by
293
- # creating new AWS Identity and Access Management (IAM) users. For those
294
- # stacks, you must explicitly acknowledge their capabilities by
295
- # specifying this parameter.
296
- #
297
- # The only valid values are `CAPABILITY_IAM` and `CAPABILITY_NAMED_IAM`.
298
- # The following resources require you to specify this parameter: [
299
- # AWS::IAM::AccessKey][1], [ AWS::IAM::Group][2], [
300
- # AWS::IAM::InstanceProfile][3], [ AWS::IAM::Policy][4], [
301
- # AWS::IAM::Role][5], [ AWS::IAM::User][6], and [
302
- # AWS::IAM::UserToGroupAddition][7]. If your stack template contains
303
- # these resources, we recommend that you review all permissions
304
- # associated with them and edit their permissions if necessary.
305
- #
306
- # If you have IAM resources, you can specify either capability. If you
307
- # have IAM resources with custom names, you must specify
308
- # `CAPABILITY_NAMED_IAM`. If you don't specify this parameter, this
309
- # action returns an `InsufficientCapabilities` error.
310
- #
311
- # For more information, see [Acknowledging IAM Resources in AWS
312
- # CloudFormation Templates][8].
313
- #
314
- #
315
- #
316
- # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html
317
- # [2]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html
318
- # [3]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html
319
- # [4]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html
320
- # [5]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html
321
- # [6]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html
322
- # [7]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html
323
- # [8]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities
324
- # @option options [Array<String>] :resource_types
325
- # The template resource types that you have permissions to work with for
326
- # this create stack action, such as `AWS::EC2::Instance`, `AWS::EC2::*`,
327
- # or `Custom::MyCustomInstance`. Use the following syntax to describe
328
- # template resource types: `AWS::*` (for all AWS resource), `Custom::*`
329
- # (for all custom resources), `Custom::logical_ID ` (for a specific
330
- # custom resource), `AWS::service_name::*` (for all resources of a
331
- # particular AWS service), and `AWS::service_name::resource_logical_ID `
332
- # (for a specific AWS resource).
333
- #
334
- # If the list of resource types doesn't include a resource that you're
335
- # creating, the stack creation fails. By default, AWS CloudFormation
336
- # grants permissions to all resource types. AWS Identity and Access
337
- # Management (IAM) uses this parameter for AWS CloudFormation-specific
338
- # condition keys in IAM policies. For more information, see [Controlling
339
- # Access with AWS Identity and Access Management][1].
340
- #
341
- #
342
- #
343
- # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html
344
- # @option options [String] :role_arn
345
- # The Amazon Resource Name (ARN) of an AWS Identity and Access
346
- # Management (IAM) role that AWS CloudFormation assumes to create the
347
- # stack. AWS CloudFormation uses the role's credentials to make calls
348
- # on your behalf. AWS CloudFormation always uses this role for all
349
- # future operations on the stack. As long as users have permission to
350
- # operate on the stack, AWS CloudFormation uses this role even if the
351
- # users don't have permission to pass it. Ensure that the role grants
352
- # least privilege.
353
- #
354
- # If you don't specify a value, AWS CloudFormation uses the role that
355
- # was previously associated with the stack. If no role is available, AWS
356
- # CloudFormation uses a temporary session that is generated from your
357
- # user credentials.
358
- # @option options [String] :on_failure
359
- # Determines what action will be taken if stack creation fails. This
360
- # must be one of: DO\_NOTHING, ROLLBACK, or DELETE. You can specify
361
- # either `OnFailure` or `DisableRollback`, but not both.
362
- #
363
- # Default: `ROLLBACK`
364
- # @option options [String] :stack_policy_body
365
- # Structure containing the stack policy body. For more information, go
366
- # to [ Prevent Updates to Stack Resources][1] in the *AWS CloudFormation
367
- # User Guide*. You can specify either the `StackPolicyBody` or the
368
- # `StackPolicyURL` parameter, but not both.
369
- #
370
- #
371
- #
372
- # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html
373
- # @option options [String] :stack_policy_url
374
- # Location of a file containing the stack policy. The URL must point to
375
- # a policy (maximum size: 16 KB) located in an S3 bucket in the same
376
- # region as the stack. You can specify either the `StackPolicyBody` or
377
- # the `StackPolicyURL` parameter, but not both.
378
- # @option options [Array<Types::Tag>] :tags
379
- # Key-value pairs to associate with this stack. AWS CloudFormation also
380
- # propagates these tags to the resources created in the stack. A maximum
381
- # number of 10 tags can be specified.
382
- # @return [Types::CreateStackOutput]
383
- def create(options = {})
384
- options = options.merge(stack_name: @name)
385
- resp = @client.create_stack(options)
386
- resp.data
387
- end
388
+ # @example Request syntax with placeholder values
389
+ #
390
+ # stack.delete({
391
+ # retain_resources: ["LogicalResourceId"],
392
+ # role_arn: "RoleARN",
393
+ # })
394
+ # @param [Hash] options ({})
395
+ # @option options [Array<String>] :retain_resources
396
+ # For stacks in the `DELETE_FAILED` state, a list of resource logical
397
+ # IDs that are associated with the resources you want to retain. During
398
+ # deletion, AWS CloudFormation deletes the stack but does not delete the
399
+ # retained resources.
400
+ #
401
+ # Retaining resources is useful when you cannot delete a resource, such
402
+ # as a non-empty S3 bucket, but you want to delete the stack.
403
+ # @option options [String] :role_arn
404
+ # The Amazon Resource Name (ARN) of an AWS Identity and Access
405
+ # Management (IAM) role that AWS CloudFormation assumes to delete the
406
+ # stack. AWS CloudFormation uses the role's credentials to make calls
407
+ # on your behalf.
408
+ #
409
+ # If you don't specify a value, AWS CloudFormation uses the role that
410
+ # was previously associated with the stack. If no role is available, AWS
411
+ # CloudFormation uses a temporary session that is generated from your
412
+ # user credentials.
413
+ # @return [EmptyStructure]
414
+ def delete(options = {})
415
+ options = options.merge(stack_name: @name)
416
+ resp = @client.delete_stack(options)
417
+ resp.data
418
+ end
388
419
 
389
- # @example Request syntax with placeholder values
390
- #
391
- # stack.delete({
392
- # retain_resources: ["LogicalResourceId"],
393
- # role_arn: "RoleARN",
394
- # })
395
- # @param [Hash] options ({})
396
- # @option options [Array<String>] :retain_resources
397
- # For stacks in the `DELETE_FAILED` state, a list of resource logical
398
- # IDs that are associated with the resources you want to retain. During
399
- # deletion, AWS CloudFormation deletes the stack but does not delete the
400
- # retained resources.
401
- #
402
- # Retaining resources is useful when you cannot delete a resource, such
403
- # as a non-empty S3 bucket, but you want to delete the stack.
404
- # @option options [String] :role_arn
405
- # The Amazon Resource Name (ARN) of an AWS Identity and Access
406
- # Management (IAM) role that AWS CloudFormation assumes to delete the
407
- # stack. AWS CloudFormation uses the role's credentials to make calls
408
- # on your behalf.
409
- #
410
- # If you don't specify a value, AWS CloudFormation uses the role that
411
- # was previously associated with the stack. If no role is available, AWS
412
- # CloudFormation uses a temporary session that is generated from your
413
- # user credentials.
414
- # @return [EmptyStructure]
415
- def delete(options = {})
416
- options = options.merge(stack_name: @name)
417
- resp = @client.delete_stack(options)
418
- resp.data
419
- end
420
+ # @example Request syntax with placeholder values
421
+ #
422
+ # stack.update({
423
+ # template_body: "TemplateBody",
424
+ # template_url: "TemplateURL",
425
+ # use_previous_template: false,
426
+ # stack_policy_during_update_body: "StackPolicyDuringUpdateBody",
427
+ # stack_policy_during_update_url: "StackPolicyDuringUpdateURL",
428
+ # parameters: [
429
+ # {
430
+ # parameter_key: "ParameterKey",
431
+ # parameter_value: "ParameterValue",
432
+ # use_previous_value: false,
433
+ # },
434
+ # ],
435
+ # capabilities: ["CAPABILITY_IAM"], # accepts CAPABILITY_IAM, CAPABILITY_NAMED_IAM
436
+ # resource_types: ["ResourceType"],
437
+ # role_arn: "RoleARN",
438
+ # stack_policy_body: "StackPolicyBody",
439
+ # stack_policy_url: "StackPolicyURL",
440
+ # notification_arns: ["NotificationARN"],
441
+ # tags: [
442
+ # {
443
+ # key: "TagKey",
444
+ # value: "TagValue",
445
+ # },
446
+ # ],
447
+ # })
448
+ # @param [Hash] options ({})
449
+ # @option options [String] :template_body
450
+ # Structure containing the template body with a minimum length of 1 byte
451
+ # and a maximum length of 51,200 bytes. (For more information, go to
452
+ # [Template Anatomy][1] in the AWS CloudFormation User Guide.)
453
+ #
454
+ # Conditional: You must specify either the `TemplateBody` or the
455
+ # `TemplateURL` parameter, but not both.
456
+ #
457
+ #
458
+ #
459
+ # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html
460
+ # @option options [String] :template_url
461
+ # Location of file containing the template body. The URL must point to a
462
+ # template that is located in an Amazon S3 bucket. For more information,
463
+ # go to [Template Anatomy][1] in the AWS CloudFormation User Guide.
464
+ #
465
+ # Conditional: You must specify either the `TemplateBody` or the
466
+ # `TemplateURL` parameter, but not both.
467
+ #
468
+ #
469
+ #
470
+ # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html
471
+ # @option options [Boolean] :use_previous_template
472
+ # Reuse the existing template that is associated with the stack that you
473
+ # are updating.
474
+ # @option options [String] :stack_policy_during_update_body
475
+ # Structure containing the temporary overriding stack policy body. You
476
+ # can specify either the `StackPolicyDuringUpdateBody` or the
477
+ # `StackPolicyDuringUpdateURL` parameter, but not both.
478
+ #
479
+ # If you want to update protected resources, specify a temporary
480
+ # overriding stack policy during this update. If you do not specify a
481
+ # stack policy, the current policy that is associated with the stack
482
+ # will be used.
483
+ # @option options [String] :stack_policy_during_update_url
484
+ # Location of a file containing the temporary overriding stack policy.
485
+ # The URL must point to a policy (max size: 16KB) located in an S3
486
+ # bucket in the same region as the stack. You can specify either the
487
+ # `StackPolicyDuringUpdateBody` or the `StackPolicyDuringUpdateURL`
488
+ # parameter, but not both.
489
+ #
490
+ # If you want to update protected resources, specify a temporary
491
+ # overriding stack policy during this update. If you do not specify a
492
+ # stack policy, the current policy that is associated with the stack
493
+ # will be used.
494
+ # @option options [Array<Types::Parameter>] :parameters
495
+ # A list of `Parameter` structures that specify input parameters for the
496
+ # stack. For more information, see the [Parameter][1] data type.
497
+ #
498
+ #
499
+ #
500
+ # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html
501
+ # @option options [Array<String>] :capabilities
502
+ # A list of values that you must specify before AWS CloudFormation can
503
+ # update certain stacks. Some stack templates might include resources
504
+ # that can affect permissions in your AWS account, for example, by
505
+ # creating new AWS Identity and Access Management (IAM) users. For those
506
+ # stacks, you must explicitly acknowledge their capabilities by
507
+ # specifying this parameter.
508
+ #
509
+ # The only valid values are `CAPABILITY_IAM` and `CAPABILITY_NAMED_IAM`.
510
+ # The following resources require you to specify this parameter: [
511
+ # AWS::IAM::AccessKey][1], [ AWS::IAM::Group][2], [
512
+ # AWS::IAM::InstanceProfile][3], [ AWS::IAM::Policy][4], [
513
+ # AWS::IAM::Role][5], [ AWS::IAM::User][6], and [
514
+ # AWS::IAM::UserToGroupAddition][7]. If your stack template contains
515
+ # these resources, we recommend that you review all permissions
516
+ # associated with them and edit their permissions if necessary.
517
+ #
518
+ # If you have IAM resources, you can specify either capability. If you
519
+ # have IAM resources with custom names, you must specify
520
+ # `CAPABILITY_NAMED_IAM`. If you don't specify this parameter, this
521
+ # action returns an `InsufficientCapabilities` error.
522
+ #
523
+ # For more information, see [Acknowledging IAM Resources in AWS
524
+ # CloudFormation Templates][8].
525
+ #
526
+ #
527
+ #
528
+ # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html
529
+ # [2]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html
530
+ # [3]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html
531
+ # [4]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html
532
+ # [5]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html
533
+ # [6]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html
534
+ # [7]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html
535
+ # [8]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities
536
+ # @option options [Array<String>] :resource_types
537
+ # The template resource types that you have permissions to work with for
538
+ # this update stack action, such as `AWS::EC2::Instance`, `AWS::EC2::*`,
539
+ # or `Custom::MyCustomInstance`.
540
+ #
541
+ # If the list of resource types doesn't include a resource that you're
542
+ # updating, the stack update fails. By default, AWS CloudFormation
543
+ # grants permissions to all resource types. AWS Identity and Access
544
+ # Management (IAM) uses this parameter for AWS CloudFormation-specific
545
+ # condition keys in IAM policies. For more information, see [Controlling
546
+ # Access with AWS Identity and Access Management][1].
547
+ #
548
+ #
549
+ #
550
+ # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html
551
+ # @option options [String] :role_arn
552
+ # The Amazon Resource Name (ARN) of an AWS Identity and Access
553
+ # Management (IAM) role that AWS CloudFormation assumes to update the
554
+ # stack. AWS CloudFormation uses the role's credentials to make calls
555
+ # on your behalf. AWS CloudFormation always uses this role for all
556
+ # future operations on the stack. As long as users have permission to
557
+ # operate on the stack, AWS CloudFormation uses this role even if the
558
+ # users don't have permission to pass it. Ensure that the role grants
559
+ # least privilege.
560
+ #
561
+ # If you don't specify a value, AWS CloudFormation uses the role that
562
+ # was previously associated with the stack. If no role is available, AWS
563
+ # CloudFormation uses a temporary session that is generated from your
564
+ # user credentials.
565
+ # @option options [String] :stack_policy_body
566
+ # Structure containing a new stack policy body. You can specify either
567
+ # the `StackPolicyBody` or the `StackPolicyURL` parameter, but not both.
568
+ #
569
+ # You might update the stack policy, for example, in order to protect a
570
+ # new resource that you created during a stack update. If you do not
571
+ # specify a stack policy, the current policy that is associated with the
572
+ # stack is unchanged.
573
+ # @option options [String] :stack_policy_url
574
+ # Location of a file containing the updated stack policy. The URL must
575
+ # point to a policy (max size: 16KB) located in an S3 bucket in the same
576
+ # region as the stack. You can specify either the `StackPolicyBody` or
577
+ # the `StackPolicyURL` parameter, but not both.
578
+ #
579
+ # You might update the stack policy, for example, in order to protect a
580
+ # new resource that you created during a stack update. If you do not
581
+ # specify a stack policy, the current policy that is associated with the
582
+ # stack is unchanged.
583
+ # @option options [Array<String>] :notification_arns
584
+ # Amazon Simple Notification Service topic Amazon Resource Names (ARNs)
585
+ # that AWS CloudFormation associates with the stack. Specify an empty
586
+ # list to remove all notification topics.
587
+ # @option options [Array<Types::Tag>] :tags
588
+ # Key-value pairs to associate with this stack. AWS CloudFormation also
589
+ # propagates these tags to supported resources in the stack. You can
590
+ # specify a maximum number of 10 tags.
591
+ #
592
+ # If you don't specify this parameter, AWS CloudFormation doesn't
593
+ # modify the stack's tags. If you specify an empty value, AWS
594
+ # CloudFormation removes all associated tags.
595
+ # @return [Types::UpdateStackOutput]
596
+ def update(options = {})
597
+ options = options.merge(stack_name: @name)
598
+ resp = @client.update_stack(options)
599
+ resp.data
600
+ end
420
601
 
421
- # @example Request syntax with placeholder values
422
- #
423
- # stack.update({
424
- # template_body: "TemplateBody",
425
- # template_url: "TemplateURL",
426
- # use_previous_template: false,
427
- # stack_policy_during_update_body: "StackPolicyDuringUpdateBody",
428
- # stack_policy_during_update_url: "StackPolicyDuringUpdateURL",
429
- # parameters: [
430
- # {
431
- # parameter_key: "ParameterKey",
432
- # parameter_value: "ParameterValue",
433
- # use_previous_value: false,
434
- # },
435
- # ],
436
- # capabilities: ["CAPABILITY_IAM"], # accepts CAPABILITY_IAM, CAPABILITY_NAMED_IAM
437
- # resource_types: ["ResourceType"],
438
- # role_arn: "RoleARN",
439
- # stack_policy_body: "StackPolicyBody",
440
- # stack_policy_url: "StackPolicyURL",
441
- # notification_arns: ["NotificationARN"],
442
- # tags: [
443
- # {
444
- # key: "TagKey",
445
- # value: "TagValue",
446
- # },
447
- # ],
448
- # })
449
- # @param [Hash] options ({})
450
- # @option options [String] :template_body
451
- # Structure containing the template body with a minimum length of 1 byte
452
- # and a maximum length of 51,200 bytes. (For more information, go to
453
- # [Template Anatomy][1] in the AWS CloudFormation User Guide.)
454
- #
455
- # Conditional: You must specify either the `TemplateBody` or the
456
- # `TemplateURL` parameter, but not both.
457
- #
458
- #
459
- #
460
- # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html
461
- # @option options [String] :template_url
462
- # Location of file containing the template body. The URL must point to a
463
- # template that is located in an Amazon S3 bucket. For more information,
464
- # go to [Template Anatomy][1] in the AWS CloudFormation User Guide.
465
- #
466
- # Conditional: You must specify either the `TemplateBody` or the
467
- # `TemplateURL` parameter, but not both.
468
- #
469
- #
470
- #
471
- # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html
472
- # @option options [Boolean] :use_previous_template
473
- # Reuse the existing template that is associated with the stack that you
474
- # are updating.
475
- # @option options [String] :stack_policy_during_update_body
476
- # Structure containing the temporary overriding stack policy body. You
477
- # can specify either the `StackPolicyDuringUpdateBody` or the
478
- # `StackPolicyDuringUpdateURL` parameter, but not both.
479
- #
480
- # If you want to update protected resources, specify a temporary
481
- # overriding stack policy during this update. If you do not specify a
482
- # stack policy, the current policy that is associated with the stack
483
- # will be used.
484
- # @option options [String] :stack_policy_during_update_url
485
- # Location of a file containing the temporary overriding stack policy.
486
- # The URL must point to a policy (max size: 16KB) located in an S3
487
- # bucket in the same region as the stack. You can specify either the
488
- # `StackPolicyDuringUpdateBody` or the `StackPolicyDuringUpdateURL`
489
- # parameter, but not both.
490
- #
491
- # If you want to update protected resources, specify a temporary
492
- # overriding stack policy during this update. If you do not specify a
493
- # stack policy, the current policy that is associated with the stack
494
- # will be used.
495
- # @option options [Array<Types::Parameter>] :parameters
496
- # A list of `Parameter` structures that specify input parameters for the
497
- # stack. For more information, see the [Parameter][1] data type.
498
- #
499
- #
500
- #
501
- # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html
502
- # @option options [Array<String>] :capabilities
503
- # A list of values that you must specify before AWS CloudFormation can
504
- # update certain stacks. Some stack templates might include resources
505
- # that can affect permissions in your AWS account, for example, by
506
- # creating new AWS Identity and Access Management (IAM) users. For those
507
- # stacks, you must explicitly acknowledge their capabilities by
508
- # specifying this parameter.
509
- #
510
- # The only valid values are `CAPABILITY_IAM` and `CAPABILITY_NAMED_IAM`.
511
- # The following resources require you to specify this parameter: [
512
- # AWS::IAM::AccessKey][1], [ AWS::IAM::Group][2], [
513
- # AWS::IAM::InstanceProfile][3], [ AWS::IAM::Policy][4], [
514
- # AWS::IAM::Role][5], [ AWS::IAM::User][6], and [
515
- # AWS::IAM::UserToGroupAddition][7]. If your stack template contains
516
- # these resources, we recommend that you review all permissions
517
- # associated with them and edit their permissions if necessary.
518
- #
519
- # If you have IAM resources, you can specify either capability. If you
520
- # have IAM resources with custom names, you must specify
521
- # `CAPABILITY_NAMED_IAM`. If you don't specify this parameter, this
522
- # action returns an `InsufficientCapabilities` error.
523
- #
524
- # For more information, see [Acknowledging IAM Resources in AWS
525
- # CloudFormation Templates][8].
526
- #
527
- #
528
- #
529
- # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html
530
- # [2]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html
531
- # [3]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html
532
- # [4]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html
533
- # [5]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html
534
- # [6]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html
535
- # [7]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html
536
- # [8]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities
537
- # @option options [Array<String>] :resource_types
538
- # The template resource types that you have permissions to work with for
539
- # this update stack action, such as `AWS::EC2::Instance`, `AWS::EC2::*`,
540
- # or `Custom::MyCustomInstance`.
541
- #
542
- # If the list of resource types doesn't include a resource that you're
543
- # updating, the stack update fails. By default, AWS CloudFormation
544
- # grants permissions to all resource types. AWS Identity and Access
545
- # Management (IAM) uses this parameter for AWS CloudFormation-specific
546
- # condition keys in IAM policies. For more information, see [Controlling
547
- # Access with AWS Identity and Access Management][1].
548
- #
549
- #
550
- #
551
- # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html
552
- # @option options [String] :role_arn
553
- # The Amazon Resource Name (ARN) of an AWS Identity and Access
554
- # Management (IAM) role that AWS CloudFormation assumes to update the
555
- # stack. AWS CloudFormation uses the role's credentials to make calls
556
- # on your behalf. AWS CloudFormation always uses this role for all
557
- # future operations on the stack. As long as users have permission to
558
- # operate on the stack, AWS CloudFormation uses this role even if the
559
- # users don't have permission to pass it. Ensure that the role grants
560
- # least privilege.
561
- #
562
- # If you don't specify a value, AWS CloudFormation uses the role that
563
- # was previously associated with the stack. If no role is available, AWS
564
- # CloudFormation uses a temporary session that is generated from your
565
- # user credentials.
566
- # @option options [String] :stack_policy_body
567
- # Structure containing a new stack policy body. You can specify either
568
- # the `StackPolicyBody` or the `StackPolicyURL` parameter, but not both.
569
- #
570
- # You might update the stack policy, for example, in order to protect a
571
- # new resource that you created during a stack update. If you do not
572
- # specify a stack policy, the current policy that is associated with the
573
- # stack is unchanged.
574
- # @option options [String] :stack_policy_url
575
- # Location of a file containing the updated stack policy. The URL must
576
- # point to a policy (max size: 16KB) located in an S3 bucket in the same
577
- # region as the stack. You can specify either the `StackPolicyBody` or
578
- # the `StackPolicyURL` parameter, but not both.
579
- #
580
- # You might update the stack policy, for example, in order to protect a
581
- # new resource that you created during a stack update. If you do not
582
- # specify a stack policy, the current policy that is associated with the
583
- # stack is unchanged.
584
- # @option options [Array<String>] :notification_arns
585
- # Amazon Simple Notification Service topic Amazon Resource Names (ARNs)
586
- # that AWS CloudFormation associates with the stack. Specify an empty
587
- # list to remove all notification topics.
588
- # @option options [Array<Types::Tag>] :tags
589
- # Key-value pairs to associate with this stack. AWS CloudFormation also
590
- # propagates these tags to supported resources in the stack. You can
591
- # specify a maximum number of 10 tags.
592
- #
593
- # If you don't specify this parameter, AWS CloudFormation doesn't
594
- # modify the stack's tags. If you specify an empty value, AWS
595
- # CloudFormation removes all associated tags.
596
- # @return [Types::UpdateStackOutput]
597
- def update(options = {})
598
- options = options.merge(stack_name: @name)
599
- resp = @client.update_stack(options)
600
- resp.data
601
- end
602
+ # @!group Associations
602
603
 
603
- # @!group Associations
604
-
605
- # @example Request syntax with placeholder values
606
- #
607
- # events = stack.events()
608
- # @param [Hash] options ({})
609
- # @return [Event::Collection]
610
- def events(options = {})
611
- batches = Enumerator.new do |y|
612
- options = options.merge(stack_name: @name)
613
- resp = @client.describe_stack_events(options)
614
- resp.each_page do |page|
615
- batch = []
616
- page.data.stack_events.each do |s|
617
- batch << Event.new(
618
- id: s.event_id,
619
- data: s,
620
- client: @client
621
- )
622
- end
623
- y.yield(batch)
604
+ # @example Request syntax with placeholder values
605
+ #
606
+ # stack.events()
607
+ # @param [Hash] options ({})
608
+ # @return [Event::Collection]
609
+ def events(options = {})
610
+ batches = Enumerator.new do |y|
611
+ options = options.merge(stack_name: @name)
612
+ resp = @client.describe_stack_events(options)
613
+ resp.each_page do |page|
614
+ batch = []
615
+ page.data.stack_events.each do |s|
616
+ batch << Event.new(
617
+ id: s.event_id,
618
+ data: s,
619
+ client: @client
620
+ )
624
621
  end
622
+ y.yield(batch)
625
623
  end
626
- Event::Collection.new(batches)
627
624
  end
625
+ Event::Collection.new(batches)
626
+ end
628
627
 
629
- # @param [String] logical_id
630
- # @return [StackResource]
631
- def resource(logical_id)
632
- StackResource.new(
633
- stack_name: @name,
634
- logical_id: logical_id,
635
- client: @client
636
- )
637
- end
628
+ # @param [String] logical_id
629
+ # @return [StackResource]
630
+ def resource(logical_id)
631
+ StackResource.new(
632
+ stack_name: @name,
633
+ logical_id: logical_id,
634
+ client: @client
635
+ )
636
+ end
638
637
 
639
- # @example Request syntax with placeholder values
640
- #
641
- # resourcesummaries = stack.resource_summaries()
642
- # @param [Hash] options ({})
643
- # @return [StackResourceSummary::Collection]
644
- def resource_summaries(options = {})
645
- batches = Enumerator.new do |y|
646
- options = options.merge(stack_name: @name)
647
- resp = @client.list_stack_resources(options)
648
- resp.each_page do |page|
649
- batch = []
650
- page.data.stack_resource_summaries.each do |s|
651
- batch << StackResourceSummary.new(
652
- logical_id: s.logical_resource_id,
653
- stack_name: options[:stack_name],
654
- data: s,
655
- client: @client
656
- )
657
- end
658
- y.yield(batch)
638
+ # @example Request syntax with placeholder values
639
+ #
640
+ # stack.resource_summaries()
641
+ # @param [Hash] options ({})
642
+ # @return [StackResourceSummary::Collection]
643
+ def resource_summaries(options = {})
644
+ batches = Enumerator.new do |y|
645
+ options = options.merge(stack_name: @name)
646
+ resp = @client.list_stack_resources(options)
647
+ resp.each_page do |page|
648
+ batch = []
649
+ page.data.stack_resource_summaries.each do |s|
650
+ batch << StackResourceSummary.new(
651
+ logical_id: s.logical_resource_id,
652
+ stack_name: options[:stack_name],
653
+ data: s,
654
+ client: @client
655
+ )
659
656
  end
657
+ y.yield(batch)
660
658
  end
661
- StackResourceSummary::Collection.new(batches)
662
659
  end
660
+ StackResourceSummary::Collection.new(batches)
661
+ end
663
662
 
664
- # @deprecated
665
- # @api private
666
- def identifiers
667
- { name: @name }
668
- end
669
- deprecated(:identifiers)
663
+ # @deprecated
664
+ # @api private
665
+ def identifiers
666
+ { name: @name }
667
+ end
668
+ deprecated(:identifiers)
670
669
 
671
- private
670
+ private
672
671
 
673
- def extract_name(args, options)
674
- value = args[0] || options.delete(:name)
675
- case value
676
- when String then value
677
- when nil then raise ArgumentError, "missing required option :name"
678
- else
679
- msg = "expected :name to be a String, got #{value.class}"
680
- raise ArgumentError, msg
681
- end
672
+ def extract_name(args, options)
673
+ value = args[0] || options.delete(:name)
674
+ case value
675
+ when String then value
676
+ when nil then raise ArgumentError, "missing required option :name"
677
+ else
678
+ msg = "expected :name to be a String, got #{value.class}"
679
+ raise ArgumentError, msg
682
680
  end
681
+ end
683
682
 
684
- def yield_waiter_and_warn(waiter, &block)
685
- if !@waiter_block_warned
686
- msg = "pass options to configure the waiter; "
687
- msg << "yielding the waiter is deprecated"
688
- warn(msg)
689
- @waiter_block_warned = true
690
- end
691
- yield(waiter.waiter)
683
+ def yield_waiter_and_warn(waiter, &block)
684
+ if !@waiter_block_warned
685
+ msg = "pass options to configure the waiter; "
686
+ msg << "yielding the waiter is deprecated"
687
+ warn(msg)
688
+ @waiter_block_warned = true
692
689
  end
690
+ yield(waiter.waiter)
691
+ end
693
692
 
694
- def separate_params_and_options(options)
695
- opts = Set.new([:client, :max_attempts, :delay, :before_attempt, :before_wait])
696
- waiter_opts = {}
697
- waiter_params = {}
698
- options.each_pair do |key, value|
699
- if opts.include?(key)
700
- waiter_opts[key] = value
701
- else
702
- waiter_params[key] = value
703
- end
693
+ def separate_params_and_options(options)
694
+ opts = Set.new([:client, :max_attempts, :delay, :before_attempt, :before_wait])
695
+ waiter_opts = {}
696
+ waiter_params = {}
697
+ options.each_pair do |key, value|
698
+ if opts.include?(key)
699
+ waiter_opts[key] = value
700
+ else
701
+ waiter_params[key] = value
704
702
  end
705
- waiter_opts[:client] ||= @client
706
- [waiter_opts, waiter_params]
707
703
  end
708
-
709
- class Collection < Aws::Resources::Collection; end
704
+ waiter_opts[:client] ||= @client
705
+ [waiter_opts, waiter_params]
710
706
  end
707
+
708
+ class Collection < Aws::Resources::Collection; end
711
709
  end
712
710
  end