aws-sdk-cloudformation 1.41.0 → 1.131.0

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.
@@ -3,7 +3,7 @@
3
3
  # WARNING ABOUT GENERATED CODE
4
4
  #
5
5
  # This file is generated. See the contributing guide for more information:
6
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
@@ -75,40 +75,32 @@ module Aws::CloudFormation
75
75
  # ],
76
76
  # client_request_token: "ClientRequestToken",
77
77
  # enable_termination_protection: false,
78
+ # retain_except_on_create: false,
78
79
  # })
79
80
  # @param [Hash] options ({})
80
81
  # @option options [required, String] :stack_name
81
- # The name that is associated with the stack. The name must be unique in
82
+ # The name that's associated with the stack. The name must be unique in
82
83
  # the Region in which you are creating the stack.
83
84
  #
84
85
  # <note markdown="1"> A stack name can contain only alphanumeric characters (case sensitive)
85
- # and hyphens. It must start with an alphabetic character and cannot be
86
- # longer than 128 characters.
86
+ # and hyphens. It must start with an alphabetical character and can't
87
+ # be longer than 128 characters.
87
88
  #
88
89
  # </note>
89
90
  # @option options [String] :template_body
90
91
  # Structure containing the template body with a minimum length of 1 byte
91
- # and a maximum length of 51,200 bytes. For more information, go to
92
- # [Template Anatomy][1] in the AWS CloudFormation User Guide.
92
+ # and a maximum length of 51,200 bytes.
93
93
  #
94
94
  # Conditional: You must specify either the `TemplateBody` or the
95
95
  # `TemplateURL` parameter, but not both.
96
- #
97
- #
98
- #
99
- # [1]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html
100
96
  # @option options [String] :template_url
101
- # Location of file containing the template body. The URL must point to a
102
- # template (max size: 460,800 bytes) that is located in an Amazon S3
103
- # bucket. For more information, go to the [Template Anatomy][1] in the
104
- # AWS CloudFormation User Guide.
97
+ # The URL of a file containing the template body. The URL must point to
98
+ # a template (max size: 1 MB) that's located in an Amazon S3 bucket or
99
+ # a Systems Manager document. The location for an Amazon S3 bucket must
100
+ # start with `https://`.
105
101
  #
106
102
  # Conditional: You must specify either the `TemplateBody` or the
107
103
  # `TemplateURL` parameter, but not both.
108
- #
109
- #
110
- #
111
- # [1]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html
112
104
  # @option options [Array<Types::Parameter>] :parameters
113
105
  # A list of `Parameter` structures that specify input parameters for the
114
106
  # stack. For more information, see the [Parameter][1] data type.
@@ -123,29 +115,28 @@ module Aws::CloudFormation
123
115
  #
124
116
  # Default: `false`
125
117
  # @option options [Types::RollbackConfiguration] :rollback_configuration
126
- # The rollback triggers for AWS CloudFormation to monitor during stack
118
+ # The rollback triggers for CloudFormation to monitor during stack
127
119
  # creation and updating operations, and for the specified monitoring
128
120
  # period afterwards.
129
121
  # @option options [Integer] :timeout_in_minutes
130
122
  # The amount of time that can pass before the stack status becomes
131
- # CREATE\_FAILED; if `DisableRollback` is not set or is set to `false`,
123
+ # `CREATE_FAILED`; if `DisableRollback` is not set or is set to `false`,
132
124
  # the stack will be rolled back.
133
125
  # @option options [Array<String>] :notification_arns
134
- # The Simple Notification Service (SNS) topic ARNs to publish stack
135
- # related events. You can find your SNS topic ARNs using the SNS console
136
- # or your Command Line Interface (CLI).
126
+ # The Amazon SNS topic ARNs to publish stack related events. You can
127
+ # find your Amazon SNS topic ARNs using the Amazon SNS console or your
128
+ # Command Line Interface (CLI).
137
129
  # @option options [Array<String>] :capabilities
138
130
  # In some cases, you must explicitly acknowledge that your stack
139
- # template contains certain capabilities in order for AWS CloudFormation
140
- # to create the stack.
131
+ # template contains certain capabilities in order for CloudFormation to
132
+ # create the stack.
141
133
  #
142
134
  # * `CAPABILITY_IAM` and `CAPABILITY_NAMED_IAM`
143
135
  #
144
136
  # Some stack templates might include resources that can affect
145
- # permissions in your AWS account; for example, by creating new AWS
146
- # Identity and Access Management (IAM) users. For those stacks, you
147
- # must explicitly acknowledge this by specifying one of these
148
- # capabilities.
137
+ # permissions in your Amazon Web Services account; for example, by
138
+ # creating new IAM users. For those stacks, you must explicitly
139
+ # acknowledge this by specifying one of these capabilities.
149
140
  #
150
141
  # The following IAM resources require you to specify either the
151
142
  # `CAPABILITY_IAM` or `CAPABILITY_NAMED_IAM` capability.
@@ -155,29 +146,29 @@ module Aws::CloudFormation
155
146
  # * If you have IAM resources with custom names, you *must* specify
156
147
  # `CAPABILITY_NAMED_IAM`.
157
148
  #
158
- # * If you don't specify either of these capabilities, AWS
159
- # CloudFormation returns an `InsufficientCapabilities` error.
160
- #
149
+ # * If you don't specify either of these capabilities, CloudFormation
150
+ # returns an `InsufficientCapabilities` error.
161
151
  # If your stack template contains these resources, we recommend that
162
152
  # you review all permissions associated with them and edit their
163
153
  # permissions if necessary.
164
154
  #
165
- # * [ AWS::IAM::AccessKey][1]
155
+ # * [AWS::IAM::AccessKey][1]
166
156
  #
167
- # * [ AWS::IAM::Group][2]
157
+ # * [AWS::IAM::Group][2]
168
158
  #
169
- # * [ AWS::IAM::InstanceProfile][3]
159
+ # * [AWS::IAM::InstanceProfile][3]
170
160
  #
171
- # * [ AWS::IAM::Policy][4]
161
+ # * [ AWS::IAM::ManagedPolicy][4]
172
162
  #
173
- # * [ AWS::IAM::Role][5]
163
+ # * [AWS::IAM::Policy][5]
174
164
  #
175
- # * [ AWS::IAM::User][6]
165
+ # * [AWS::IAM::Role][6]
176
166
  #
177
- # * [ AWS::IAM::UserToGroupAddition][7]
167
+ # * [AWS::IAM::User][7]
178
168
  #
179
- # For more information, see [Acknowledging IAM Resources in AWS
180
- # CloudFormation Templates][8].
169
+ # * [AWS::IAM::UserToGroupAddition][8]
170
+ # For more information, see [Acknowledging IAM resources in
171
+ # CloudFormation templates][9].
181
172
  #
182
173
  # * `CAPABILITY_AUTO_EXPAND`
183
174
  #
@@ -190,83 +181,93 @@ module Aws::CloudFormation
190
181
  # your stack template contains one or more macros, and you choose to
191
182
  # create a stack directly from the processed template, without first
192
183
  # reviewing the resulting changes in a change set, you must
193
- # acknowledge this capability. This includes the [AWS::Include][9] and
194
- # [AWS::Serverless][10] transforms, which are macros hosted by AWS
184
+ # acknowledge this capability. This includes the [AWS::Include][10]
185
+ # and [AWS::Serverless][11] transforms, which are macros hosted by
195
186
  # CloudFormation.
196
187
  #
197
- # Change sets do not currently support nested stacks. If you want to
198
- # create a stack from a stack template that contains macros *and*
199
- # nested stacks, you must create the stack directly from the template
200
- # using this capability.
188
+ # If you want to create a stack from a stack template that contains
189
+ # macros *and* nested stacks, you must create the stack directly from
190
+ # the template using this capability.
201
191
  #
202
192
  # You should only create stacks directly from a stack template that
203
193
  # contains macros if you know what processing the macro performs.
204
194
  #
205
195
  # Each macro relies on an underlying Lambda service function for
206
196
  # processing stack templates. Be aware that the Lambda function owner
207
- # can update the function operation without AWS CloudFormation being
197
+ # can update the function operation without CloudFormation being
208
198
  # notified.
209
199
  #
210
- # For more information, see [Using AWS CloudFormation Macros to
211
- # Perform Custom Processing on Templates][11].
200
+ # For more information, see [Perform custom processing on
201
+ # CloudFormation templates with template macros][12].
202
+ #
203
+ # <note markdown="1"> Only one of the `Capabilities` and `ResourceType` parameters can be
204
+ # specified.
205
+ #
206
+ # </note>
212
207
  #
213
208
  #
214
209
  #
215
- # [1]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html
216
- # [2]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html
210
+ # [1]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-accesskey.html
211
+ # [2]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-group.html
217
212
  # [3]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html
218
- # [4]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html
219
- # [5]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html
220
- # [6]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html
221
- # [7]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html
222
- # [8]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities
223
- # [9]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html
224
- # [10]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html
225
- # [11]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html
213
+ # [4]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-managedpolicy.html
214
+ # [5]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html
215
+ # [6]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html
216
+ # [7]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-user.html
217
+ # [8]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-usertogroupaddition.html
218
+ # [9]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/control-access-with-iam.html#using-iam-capabilities
219
+ # [10]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-include.html
220
+ # [11]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html
221
+ # [12]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html
226
222
  # @option options [Array<String>] :resource_types
227
223
  # The template resource types that you have permissions to work with for
228
224
  # this create stack action, such as `AWS::EC2::Instance`, `AWS::EC2::*`,
229
225
  # or `Custom::MyCustomInstance`. Use the following syntax to describe
230
- # template resource types: `AWS::*` (for all AWS resource), `Custom::*`
231
- # (for all custom resources), `Custom::logical_ID ` (for a specific
232
- # custom resource), `AWS::service_name::*` (for all resources of a
233
- # particular AWS service), and `AWS::service_name::resource_logical_ID `
234
- # (for a specific AWS resource).
226
+ # template resource types: `AWS::*` (for all Amazon Web Services
227
+ # resources), `Custom::*` (for all custom resources),
228
+ # `Custom::logical_ID ` (for a specific custom resource),
229
+ # `AWS::service_name::*` (for all resources of a particular Amazon Web
230
+ # Services service), and `AWS::service_name::resource_logical_ID ` (for
231
+ # a specific Amazon Web Services resource).
235
232
  #
236
233
  # If the list of resource types doesn't include a resource that you're
237
- # creating, the stack creation fails. By default, AWS CloudFormation
238
- # grants permissions to all resource types. AWS Identity and Access
239
- # Management (IAM) uses this parameter for AWS CloudFormation-specific
240
- # condition keys in IAM policies. For more information, see [Controlling
241
- # Access with AWS Identity and Access Management][1].
234
+ # creating, the stack creation fails. By default, CloudFormation grants
235
+ # permissions to all resource types. IAM uses this parameter for
236
+ # CloudFormation-specific condition keys in IAM policies. For more
237
+ # information, see [Control access with Identity and Access
238
+ # Management][1].
239
+ #
240
+ # <note markdown="1"> Only one of the `Capabilities` and `ResourceType` parameters can be
241
+ # specified.
242
+ #
243
+ # </note>
242
244
  #
243
245
  #
244
246
  #
245
- # [1]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html
247
+ # [1]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/control-access-with-iam.html
246
248
  # @option options [String] :role_arn
247
- # The Amazon Resource Name (ARN) of an AWS Identity and Access
248
- # Management (IAM) role that AWS CloudFormation assumes to create the
249
- # stack. AWS CloudFormation uses the role's credentials to make calls
250
- # on your behalf. AWS CloudFormation always uses this role for all
251
- # future operations on the stack. As long as users have permission to
252
- # operate on the stack, AWS CloudFormation uses this role even if the
253
- # users don't have permission to pass it. Ensure that the role grants
254
- # least privilege.
255
- #
256
- # If you don't specify a value, AWS CloudFormation uses the role that
257
- # was previously associated with the stack. If no role is available, AWS
258
- # CloudFormation uses a temporary session that is generated from your
249
+ # The Amazon Resource Name (ARN) of an IAM role that CloudFormation
250
+ # assumes to create the stack. CloudFormation uses the role's
251
+ # credentials to make calls on your behalf. CloudFormation always uses
252
+ # this role for all future operations on the stack. Provided that users
253
+ # have permission to operate on the stack, CloudFormation uses this role
254
+ # even if the users don't have permission to pass it. Ensure that the
255
+ # role grants least privilege.
256
+ #
257
+ # If you don't specify a value, CloudFormation uses the role that was
258
+ # previously associated with the stack. If no role is available,
259
+ # CloudFormation uses a temporary session that's generated from your
259
260
  # user credentials.
260
261
  # @option options [String] :on_failure
261
262
  # Determines what action will be taken if stack creation fails. This
262
- # must be one of: DO\_NOTHING, ROLLBACK, or DELETE. You can specify
263
+ # must be one of: `DO_NOTHING`, `ROLLBACK`, or `DELETE`. You can specify
263
264
  # either `OnFailure` or `DisableRollback`, but not both.
264
265
  #
265
266
  # Default: `ROLLBACK`
266
267
  # @option options [String] :stack_policy_body
267
- # Structure containing the stack policy body. For more information, go
268
- # to [ Prevent Updates to Stack Resources][1] in the *AWS CloudFormation
269
- # User Guide*. You can specify either the `StackPolicyBody` or the
268
+ # Structure containing the stack policy body. For more information, see
269
+ # [Prevent updates to stack resources][1] in the *CloudFormation User
270
+ # Guide*. You can specify either the `StackPolicyBody` or the
270
271
  # `StackPolicyURL` parameter, but not both.
271
272
  #
272
273
  #
@@ -275,20 +276,21 @@ module Aws::CloudFormation
275
276
  # @option options [String] :stack_policy_url
276
277
  # Location of a file containing the stack policy. The URL must point to
277
278
  # a policy (maximum size: 16 KB) located in an S3 bucket in the same
278
- # Region as the stack. You can specify either the `StackPolicyBody` or
279
- # the `StackPolicyURL` parameter, but not both.
279
+ # Region as the stack. The location for an Amazon S3 bucket must start
280
+ # with `https://`. You can specify either the `StackPolicyBody` or the
281
+ # `StackPolicyURL` parameter, but not both.
280
282
  # @option options [Array<Types::Tag>] :tags
281
- # Key-value pairs to associate with this stack. AWS CloudFormation also
283
+ # Key-value pairs to associate with this stack. CloudFormation also
282
284
  # propagates these tags to the resources created in the stack. A maximum
283
285
  # number of 50 tags can be specified.
284
286
  # @option options [String] :client_request_token
285
287
  # A unique identifier for this `CreateStack` request. Specify this token
286
- # if you plan to retry requests so that AWS CloudFormation knows that
288
+ # if you plan to retry requests so that CloudFormation knows that
287
289
  # you're not attempting to create a stack with the same name. You might
288
- # retry `CreateStack` requests to ensure that AWS CloudFormation
290
+ # retry `CreateStack` requests to ensure that CloudFormation
289
291
  # successfully received them.
290
292
  #
291
- # All events triggered by a given stack operation are assigned the same
293
+ # All events initiated by a given stack operation are assigned the same
292
294
  # client request token, which you can use to track operations. For
293
295
  # example, if you execute a `CreateStack` operation with the token
294
296
  # `token1`, then all the `StackEvents` generated by that operation will
@@ -305,20 +307,28 @@ module Aws::CloudFormation
305
307
  # Whether to enable termination protection on the specified stack. If a
306
308
  # user attempts to delete a stack with termination protection enabled,
307
309
  # the operation fails and the stack remains unchanged. For more
308
- # information, see [Protecting a Stack From Being Deleted][1] in the
309
- # *AWS CloudFormation User Guide*. Termination protection is disabled on
310
- # stacks by default.
310
+ # information, see [Protect CloudFormation stacks from being deleted][1]
311
+ # in the *CloudFormation User Guide*. Termination protection is
312
+ # deactivated on stacks by default.
311
313
  #
312
314
  # For [nested stacks][2], termination protection is set on the root
313
- # stack and cannot be changed directly on the nested stack.
315
+ # stack and can't be changed directly on the nested stack.
316
+ #
314
317
  #
315
318
  #
319
+ # [1]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html
320
+ # [2]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html
321
+ # @option options [Boolean] :retain_except_on_create
322
+ # When set to `true`, newly created resources are deleted when the
323
+ # operation rolls back. This includes newly created resources marked
324
+ # with a deletion policy of `Retain`.
316
325
  #
317
- # [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html
318
- # [2]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html
326
+ # Default: `false`
319
327
  # @return [Stack]
320
328
  def create_stack(options = {})
321
- @client.create_stack(options)
329
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
330
+ @client.create_stack(options)
331
+ end
322
332
  Stack.new(
323
333
  name: options[:stack_name],
324
334
  client: @client
@@ -352,19 +362,37 @@ module Aws::CloudFormation
352
362
  # })
353
363
  # @param [Hash] options ({})
354
364
  # @option options [String] :stack_name
355
- # The name or the unique stack ID that is associated with the stack,
356
- # which are not always interchangeable:
365
+ # <note markdown="1"> If you don't pass a parameter to `StackName`, the API returns a
366
+ # response that describes all resources in the account, which can impact
367
+ # performance. This requires `ListStacks` and `DescribeStacks`
368
+ # permissions.
369
+ #
370
+ # Consider using the ListStacks API if you're not passing a parameter
371
+ # to `StackName`.
372
+ #
373
+ # The IAM policy below can be added to IAM policies when you want to
374
+ # limit resource-level permissions and avoid returning a response when
375
+ # no parameter is sent in the request:
376
+ #
377
+ # \{ "Version": "2012-10-17", "Statement": \[\{ "Effect":
378
+ # "Deny", "Action": "cloudformation:DescribeStacks",
379
+ # "NotResource": "arn:aws:cloudformation:*:*:stack/*/*" }\] }
380
+ #
381
+ # </note>
382
+ #
383
+ # The name or the unique stack ID that's associated with the stack,
384
+ # which aren't always interchangeable:
357
385
  #
358
386
  # * Running stacks: You can specify either the stack's name or its
359
387
  # unique stack ID.
360
388
  #
361
389
  # * Deleted stacks: You must specify the unique stack ID.
362
- #
363
- # Default: There is no default value.
364
390
  # @return [Stack::Collection]
365
391
  def stacks(options = {})
366
392
  batches = Enumerator.new do |y|
367
- resp = @client.describe_stacks(options)
393
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
394
+ @client.describe_stacks(options)
395
+ end
368
396
  resp.each_page do |page|
369
397
  batch = []
370
398
  page.data.stacks.each do |s|