blib/lib/Paws/CloudFormation/CreateChangeSet.pm untested

filter: Statementstmt 0.0% 0 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 28 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::CloudFormation::CreateChangeSet;
3 use Moose;
4 has Capabilities => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
5 has ChangeSetName => (is => 'ro', isa => 'Str', required => 1);
6 has ChangeSetType => (is => 'ro', isa => 'Str');
7 has ClientToken => (is => 'ro', isa => 'Str');
8 has Description => (is => 'ro', isa => 'Str');
9 has IncludeNestedStacks => (is => 'ro', isa => 'Bool');
10 has NotificationARNs => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
11 has Parameters => (is => 'ro', isa => 'ArrayRef[Paws::CloudFormation::Parameter]');
12 has ResourcesToImport => (is => 'ro', isa => 'ArrayRef[Paws::CloudFormation::ResourceToImport]');
13 has ResourceTypes => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
14 has RoleARN => (is => 'ro', isa => 'Str');
15 has RollbackConfiguration => (is => 'ro', isa => 'Paws::CloudFormation::RollbackConfiguration');
16 has StackName => (is => 'ro', isa => 'Str', required => 1);
17 has Tags => (is => 'ro', isa => 'ArrayRef[Paws::CloudFormation::Tag]');
18 has TemplateBody => (is => 'ro', isa => 'Str');
19 has TemplateURL => (is => 'ro', isa => 'Str');
20 has UsePreviousTemplate => (is => 'ro', isa => 'Bool');
21  
22 use MooseX::ClassAttribute;
23  
24 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateChangeSet');
25 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::CloudFormation::CreateChangeSetOutput');
26 class_has _result_key => (isa => 'Str', is => 'ro', default => 'CreateChangeSetResult');
27 1;
28  
29 ### main pod documentation begin ###
30  
31 =head1 NAME
32  
33 Paws::CloudFormation::CreateChangeSet - Arguments for method CreateChangeSet on L<Paws::CloudFormation>
34  
35 =head1 DESCRIPTION
36  
37 This class represents the parameters used for calling the method CreateChangeSet on the
38 L<AWS CloudFormation|Paws::CloudFormation> service. Use the attributes of this class
39 as arguments to method CreateChangeSet.
40  
41 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateChangeSet.
42  
43 =head1 SYNOPSIS
44  
45 my $cloudformation = Paws->service('CloudFormation');
46 my $CreateChangeSetOutput = $cloudformation->CreateChangeSet(
47 ChangeSetName => 'MyChangeSetName',
48 StackName => 'MyStackNameOrId',
49 Capabilities => [
50 'CAPABILITY_IAM',
51 ... # values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, CAPABILITY_AUTO_EXPAND
52 ], # OPTIONAL
53 ChangeSetType => 'CREATE', # OPTIONAL
54 ClientToken => 'MyClientToken', # OPTIONAL
55 Description => 'MyDescription', # OPTIONAL
56 IncludeNestedStacks => 1, # OPTIONAL
57 NotificationARNs => [ 'MyNotificationARN', ... ], # OPTIONAL
58 Parameters => [
59 {
60 ParameterKey => 'MyParameterKey', # OPTIONAL
61 ParameterValue => 'MyParameterValue', # OPTIONAL
62 ResolvedValue => 'MyParameterValue', # OPTIONAL
63 UsePreviousValue => 1, # OPTIONAL
64 },
65 ...
66 ], # OPTIONAL
67 ResourceTypes => [
68 'MyResourceType', ... # min: 1, max: 256
69 ], # OPTIONAL
70 ResourcesToImport => [
71 {
72 LogicalResourceId => 'MyLogicalResourceId',
73 ResourceIdentifier => {
74 'MyResourceIdentifierPropertyKey' =>
75 'MyResourceIdentifierPropertyValue'
76 , # key: min: 1, max: 2048, value: min: 1, max: 2048
77 }, # min: 1, max: 256
78 ResourceType => 'MyResourceType', # min: 1, max: 256
79  
80 },
81 ...
82 ], # OPTIONAL
83 RoleARN => 'MyRoleARN', # OPTIONAL
84 RollbackConfiguration => {
85 MonitoringTimeInMinutes => 1, # max: 180; OPTIONAL
86 RollbackTriggers => [
87 {
88 Arn => 'MyArn',
89 Type => 'MyType',
90  
91 },
92 ...
93 ], # max: 5; OPTIONAL
94 }, # OPTIONAL
95 Tags => [
96 {
97 Key => 'MyTagKey', # min: 1, max: 128
98 Value => 'MyTagValue', # min: 1, max: 256
99  
100 },
101 ...
102 ], # OPTIONAL
103 TemplateBody => 'MyTemplateBody', # OPTIONAL
104 TemplateURL => 'MyTemplateURL', # OPTIONAL
105 UsePreviousTemplate => 1, # OPTIONAL
106 );
107  
108 # Results:
109 my $Id = $CreateChangeSetOutput->Id;
110 my $StackId = $CreateChangeSetOutput->StackId;
111  
112 # Returns a L<Paws::CloudFormation::CreateChangeSetOutput> object.
113  
114 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
115 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/cloudformation/CreateChangeSet>
116  
117 =head1 ATTRIBUTES
118  
119  
120 =head2 Capabilities => ArrayRef[Str|Undef]
121  
122 In some cases, you must explicitly acknowledge that your stack template
123 contains certain capabilities in order for AWS CloudFormation to create
124 the stack.
125  
126 =over
127  
128 =item *
129  
130 C<CAPABILITY_IAM> and C<CAPABILITY_NAMED_IAM>
131  
132 Some stack templates might include resources that can affect
133 permissions in your AWS account; for example, by creating new AWS
134 Identity and Access Management (IAM) users. For those stacks, you must
135 explicitly acknowledge this by specifying one of these capabilities.
136  
137 The following IAM resources require you to specify either the
138 C<CAPABILITY_IAM> or C<CAPABILITY_NAMED_IAM> capability.
139  
140 =over
141  
142 =item *
143  
144 If you have IAM resources, you can specify either capability.
145  
146 =item *
147  
148 If you have IAM resources with custom names, you I<must> specify
149 C<CAPABILITY_NAMED_IAM>.
150  
151 =item *
152  
153 If you don't specify either of these capabilities, AWS CloudFormation
154 returns an C<InsufficientCapabilities> error.
155  
156 =back
157  
158 If your stack template contains these resources, we recommend that you
159 review all permissions associated with them and edit their permissions
160 if necessary.
161  
162 =over
163  
164 =item *
165  
166 AWS::IAM::AccessKey
167 (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html)
168  
169 =item *
170  
171 AWS::IAM::Group
172 (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html)
173  
174 =item *
175  
176 AWS::IAM::InstanceProfile
177 (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html)
178  
179 =item *
180  
181 AWS::IAM::Policy
182 (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html)
183  
184 =item *
185  
186 AWS::IAM::Role
187 (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html)
188  
189 =item *
190  
191 AWS::IAM::User
192 (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html)
193  
194 =item *
195  
196 AWS::IAM::UserToGroupAddition
197 (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html)
198  
199 =back
200  
201 For more information, see Acknowledging IAM Resources in AWS
202 CloudFormation Templates
203 (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities).
204  
205 =item *
206  
207 C<CAPABILITY_AUTO_EXPAND>
208  
209 Some template contain macros. Macros perform custom processing on
210 templates; this can include simple actions like find-and-replace
211 operations, all the way to extensive transformations of entire
212 templates. Because of this, users typically create a change set from
213 the processed template, so that they can review the changes resulting
214 from the macros before actually creating the stack. If your stack
215 template contains one or more macros, and you choose to create a stack
216 directly from the processed template, without first reviewing the
217 resulting changes in a change set, you must acknowledge this
218 capability. This includes the AWS::Include
219 (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html)
220 and AWS::Serverless
221 (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html)
222 transforms, which are macros hosted by AWS CloudFormation.
223  
224 This capacity does not apply to creating change sets, and specifying it
225 when creating change sets has no effect.
226  
227 If you want to create a stack from a stack template that contains
228 macros I<and> nested stacks, you must create or update the stack
229 directly from the template using the CreateStack or UpdateStack action,
230 and specifying this capability.
231  
232 For more information on macros, see Using AWS CloudFormation Macros to
233 Perform Custom Processing on Templates
234 (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html).
235  
236 =back
237  
238  
239  
240  
241 =head2 B<REQUIRED> ChangeSetName => Str
242  
243 The name of the change set. The name must be unique among all change
244 sets that are associated with the specified stack.
245  
246 A change set name can contain only alphanumeric, case sensitive
247 characters and hyphens. It must start with an alphabetic character and
248 cannot exceed 128 characters.
249  
250  
251  
252 =head2 ChangeSetType => Str
253  
254 The type of change set operation. To create a change set for a new
255 stack, specify C<CREATE>. To create a change set for an existing stack,
256 specify C<UPDATE>. To create a change set for an import operation,
257 specify C<IMPORT>.
258  
259 If you create a change set for a new stack, AWS Cloudformation creates
260 a stack with a unique stack ID, but no template or resources. The stack
261 will be in the C<REVIEW_IN_PROGRESS>
262 (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-describing-stacks.html#d0e11995)
263 state until you execute the change set.
264  
265 By default, AWS CloudFormation specifies C<UPDATE>. You can't use the
266 C<UPDATE> type to create a change set for a new stack or the C<CREATE>
267 type to create a change set for an existing stack.
268  
269 Valid values are: C<"CREATE">, C<"UPDATE">, C<"IMPORT">
270  
271 =head2 ClientToken => Str
272  
273 A unique identifier for this C<CreateChangeSet> request. Specify this
274 token if you plan to retry requests so that AWS CloudFormation knows
275 that you're not attempting to create another change set with the same
276 name. You might retry C<CreateChangeSet> requests to ensure that AWS
277 CloudFormation successfully received them.
278  
279  
280  
281 =head2 Description => Str
282  
283 A description to help you identify this change set.
284  
285  
286  
287 =head2 IncludeNestedStacks => Bool
288  
289 Creates a change set for the all nested stacks specified in the
290 template. The default behavior of this action is set to C<False>. To
291 include nested sets in a change set, specify C<True>.
292  
293  
294  
295 =head2 NotificationARNs => ArrayRef[Str|Undef]
296  
297 The Amazon Resource Names (ARNs) of Amazon Simple Notification Service
298 (Amazon SNS) topics that AWS CloudFormation associates with the stack.
299 To remove all associated notification topics, specify an empty list.
300  
301  
302  
303 =head2 Parameters => ArrayRef[L<Paws::CloudFormation::Parameter>]
304  
305 A list of C<Parameter> structures that specify input parameters for the
306 change set. For more information, see the Parameter data type.
307  
308  
309  
310 =head2 ResourcesToImport => ArrayRef[L<Paws::CloudFormation::ResourceToImport>]
311  
312 The resources to import into your stack.
313  
314  
315  
316 =head2 ResourceTypes => ArrayRef[Str|Undef]
317  
318 The template resource types that you have permissions to work with if
319 you execute this change set, such as C<AWS::EC2::Instance>,
320 C<AWS::EC2::*>, or C<Custom::MyCustomInstance>.
321  
322 If the list of resource types doesn't include a resource type that
323 you're updating, the stack update fails. By default, AWS CloudFormation
324 grants permissions to all resource types. AWS Identity and Access
325 Management (IAM) uses this parameter for condition keys in IAM policies
326 for AWS CloudFormation. For more information, see Controlling Access
327 with AWS Identity and Access Management
328 (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html)
329 in the AWS CloudFormation User Guide.
330  
331  
332  
333 =head2 RoleARN => Str
334  
335 The Amazon Resource Name (ARN) of an AWS Identity and Access Management
336 (IAM) role that AWS CloudFormation assumes when executing the change
337 set. AWS CloudFormation uses the role's credentials to make calls on
338 your behalf. AWS CloudFormation uses this role for all future
339 operations on the stack. As long as users have permission to operate on
340 the stack, AWS CloudFormation uses this role even if the users don't
341 have permission to pass it. Ensure that the role grants least
342 privilege.
343  
344 If you don't specify a value, AWS CloudFormation uses the role that was
345 previously associated with the stack. If no role is available, AWS
346 CloudFormation uses a temporary session that is generated from your
347 user credentials.
348  
349  
350  
351 =head2 RollbackConfiguration => L<Paws::CloudFormation::RollbackConfiguration>
352  
353 The rollback triggers for AWS CloudFormation to monitor during stack
354 creation and updating operations, and for the specified monitoring
355 period afterwards.
356  
357  
358  
359 =head2 B<REQUIRED> StackName => Str
360  
361 The name or the unique ID of the stack for which you are creating a
362 change set. AWS CloudFormation generates the change set by comparing
363 this stack's information with the information that you submit, such as
364 a modified template or different parameter input values.
365  
366  
367  
368 =head2 Tags => ArrayRef[L<Paws::CloudFormation::Tag>]
369  
370 Key-value pairs to associate with this stack. AWS CloudFormation also
371 propagates these tags to resources in the stack. You can specify a
372 maximum of 50 tags.
373  
374  
375  
376 =head2 TemplateBody => Str
377  
378 A structure that contains the body of the revised template, with a
379 minimum length of 1 byte and a maximum length of 51,200 bytes. AWS
380 CloudFormation generates the change set by comparing this template with
381 the template of the stack that you specified.
382  
383 Conditional: You must specify only C<TemplateBody> or C<TemplateURL>.
384  
385  
386  
387 =head2 TemplateURL => Str
388  
389 The location of the file that contains the revised template. The URL
390 must point to a template (max size: 460,800 bytes) that is located in
391 an S3 bucket or a Systems Manager document. AWS CloudFormation
392 generates the change set by comparing this template with the stack that
393 you specified.
394  
395 Conditional: You must specify only C<TemplateBody> or C<TemplateURL>.
396  
397  
398  
399 =head2 UsePreviousTemplate => Bool
400  
401 Whether to reuse the template that is associated with the stack to
402 create the change set.
403  
404  
405  
406  
407 =head1 SEE ALSO
408  
409 This class forms part of L<Paws>, documenting arguments for method CreateChangeSet in L<Paws::CloudFormation>
410  
411 =head1 BUGS and CONTRIBUTIONS
412  
413 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
414  
415 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
416  
417 =cut
418