| 1 | |||
| 2 | package Paws::CloudFormation::CreateStack; | ||
| 3 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | has Capabilities => (is => 'ro', isa => 'ArrayRef[Str|Undef]'); | |
| 5 | 1 | has ClientRequestToken => (is => 'ro', isa => 'Str'); | |
| 6 | 1 | has DisableRollback => (is => 'ro', isa => 'Bool'); | |
| 7 | 1 | has EnableTerminationProtection => (is => 'ro', isa => 'Bool'); | |
| 8 | 1 | has NotificationARNs => (is => 'ro', isa => 'ArrayRef[Str|Undef]'); | |
| 9 | 1 | has OnFailure => (is => 'ro', isa => 'Str'); | |
| 10 | 1 | has Parameters => (is => 'ro', isa => 'ArrayRef[Paws::CloudFormation::Parameter]'); | |
| 11 | 1 | has ResourceTypes => (is => 'ro', isa => 'ArrayRef[Str|Undef]'); | |
| 12 | 1 | has RoleARN => (is => 'ro', isa => 'Str'); | |
| 13 | 1 | has RollbackConfiguration => (is => 'ro', isa => 'Paws::CloudFormation::RollbackConfiguration'); | |
| 14 | 1 | has StackName => (is => 'ro', isa => 'Str', required => 1); | |
| 15 | 1 | has StackPolicyBody => (is => 'ro', isa => 'Str'); | |
| 16 | 1 | has StackPolicyURL => (is => 'ro', isa => 'Str'); | |
| 17 | 1 | has Tags => (is => 'ro', isa => 'ArrayRef[Paws::CloudFormation::Tag]'); | |
| 18 | 1 | has TemplateBody => (is => 'ro', isa => 'Str'); | |
| 19 | 1 | has TemplateURL => (is => 'ro', isa => 'Str'); | |
| 20 | 1 | has TimeoutInMinutes => (is => 'ro', isa => 'Int'); | |
| 21 | |||
| 22 | 1 | ▶ | use MooseX::ClassAttribute; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 23 | |||
| 24 | 1 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateStack'); | |
| 25 | 1 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::CloudFormation::CreateStackOutput'); | |
| 26 | 1 | class_has _result_key => (isa => 'Str', is => 'ro', default => 'CreateStackResult'); | |
| 27 | 1 | 1; | |
| 28 | |||
| 29 | ### main pod documentation begin ### | ||
| 30 | |||
| 31 | =head1 NAME | ||
| 32 | |||
| 33 | Paws::CloudFormation::CreateStack - Arguments for method CreateStack on L<Paws::CloudFormation> | ||
| 34 | |||
| 35 | =head1 DESCRIPTION | ||
| 36 | |||
| 37 | This class represents the parameters used for calling the method CreateStack on the | ||
| 38 | L<AWS CloudFormation|Paws::CloudFormation> service. Use the attributes of this class | ||
| 39 | as arguments to method CreateStack. | ||
| 40 | |||
| 41 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateStack. | ||
| 42 | |||
| 43 | =head1 SYNOPSIS | ||
| 44 | |||
| 45 | my $cloudformation = Paws->service('CloudFormation'); | ||
| 46 | my $CreateStackOutput = $cloudformation->CreateStack( | ||
| 47 | StackName => 'MyStackName', | ||
| 48 | Capabilities => [ | ||
| 49 | 'CAPABILITY_IAM', | ||
| 50 | ... # values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, CAPABILITY_AUTO_EXPAND | ||
| 51 | ], # OPTIONAL | ||
| 52 | ClientRequestToken => 'MyClientRequestToken', # OPTIONAL | ||
| 53 | DisableRollback => 1, # OPTIONAL | ||
| 54 | EnableTerminationProtection => 1, # OPTIONAL | ||
| 55 | NotificationARNs => [ 'MyNotificationARN', ... ], # OPTIONAL | ||
| 56 | OnFailure => 'DO_NOTHING', # OPTIONAL | ||
| 57 | Parameters => [ | ||
| 58 | { | ||
| 59 | ParameterKey => 'MyParameterKey', # OPTIONAL | ||
| 60 | ParameterValue => 'MyParameterValue', # OPTIONAL | ||
| 61 | ResolvedValue => 'MyParameterValue', # OPTIONAL | ||
| 62 | UsePreviousValue => 1, # OPTIONAL | ||
| 63 | }, | ||
| 64 | ... | ||
| 65 | ], # OPTIONAL | ||
| 66 | ResourceTypes => [ | ||
| 67 | 'MyResourceType', ... # min: 1, max: 256 | ||
| 68 | ], # OPTIONAL | ||
| 69 | RoleARN => 'MyRoleARN', # OPTIONAL | ||
| 70 | RollbackConfiguration => { | ||
| 71 | MonitoringTimeInMinutes => 1, # max: 180; OPTIONAL | ||
| 72 | RollbackTriggers => [ | ||
| 73 | { | ||
| 74 | Arn => 'MyArn', | ||
| 75 | Type => 'MyType', | ||
| 76 | |||
| 77 | }, | ||
| 78 | ... | ||
| 79 | ], # max: 5; OPTIONAL | ||
| 80 | }, # OPTIONAL | ||
| 81 | StackPolicyBody => 'MyStackPolicyBody', # OPTIONAL | ||
| 82 | StackPolicyURL => 'MyStackPolicyURL', # OPTIONAL | ||
| 83 | Tags => [ | ||
| 84 | { | ||
| 85 | Key => 'MyTagKey', # min: 1, max: 128 | ||
| 86 | Value => 'MyTagValue', # min: 1, max: 256 | ||
| 87 | |||
| 88 | }, | ||
| 89 | ... | ||
| 90 | ], # OPTIONAL | ||
| 91 | TemplateBody => 'MyTemplateBody', # OPTIONAL | ||
| 92 | TemplateURL => 'MyTemplateURL', # OPTIONAL | ||
| 93 | TimeoutInMinutes => 1, # OPTIONAL | ||
| 94 | ); | ||
| 95 | |||
| 96 | # Results: | ||
| 97 | my $StackId = $CreateStackOutput->StackId; | ||
| 98 | |||
| 99 | # Returns a L<Paws::CloudFormation::CreateStackOutput> object. | ||
| 100 | |||
| 101 | 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. | ||
| 102 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/cloudformation/CreateStack> | ||
| 103 | |||
| 104 | =head1 ATTRIBUTES | ||
| 105 | |||
| 106 | |||
| 107 | =head2 Capabilities => ArrayRef[Str|Undef] | ||
| 108 | |||
| 109 | In some cases, you must explicitly acknowledge that your stack template | ||
| 110 | contains certain capabilities in order for AWS CloudFormation to create | ||
| 111 | the stack. | ||
| 112 | |||
| 113 | =over | ||
| 114 | |||
| 115 | =item * | ||
| 116 | |||
| 117 | C<CAPABILITY_IAM> and C<CAPABILITY_NAMED_IAM> | ||
| 118 | |||
| 119 | Some stack templates might include resources that can affect | ||
| 120 | permissions in your AWS account; for example, by creating new AWS | ||
| 121 | Identity and Access Management (IAM) users. For those stacks, you must | ||
| 122 | explicitly acknowledge this by specifying one of these capabilities. | ||
| 123 | |||
| 124 | The following IAM resources require you to specify either the | ||
| 125 | C<CAPABILITY_IAM> or C<CAPABILITY_NAMED_IAM> capability. | ||
| 126 | |||
| 127 | =over | ||
| 128 | |||
| 129 | =item * | ||
| 130 | |||
| 131 | If you have IAM resources, you can specify either capability. | ||
| 132 | |||
| 133 | =item * | ||
| 134 | |||
| 135 | If you have IAM resources with custom names, you I<must> specify | ||
| 136 | C<CAPABILITY_NAMED_IAM>. | ||
| 137 | |||
| 138 | =item * | ||
| 139 | |||
| 140 | If you don't specify either of these capabilities, AWS CloudFormation | ||
| 141 | returns an C<InsufficientCapabilities> error. | ||
| 142 | |||
| 143 | =back | ||
| 144 | |||
| 145 | If your stack template contains these resources, we recommend that you | ||
| 146 | review all permissions associated with them and edit their permissions | ||
| 147 | if necessary. | ||
| 148 | |||
| 149 | =over | ||
| 150 | |||
| 151 | =item * | ||
| 152 | |||
| 153 | AWS::IAM::AccessKey | ||
| 154 | (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html) | ||
| 155 | |||
| 156 | =item * | ||
| 157 | |||
| 158 | AWS::IAM::Group | ||
| 159 | (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html) | ||
| 160 | |||
| 161 | =item * | ||
| 162 | |||
| 163 | AWS::IAM::InstanceProfile | ||
| 164 | (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html) | ||
| 165 | |||
| 166 | =item * | ||
| 167 | |||
| 168 | AWS::IAM::Policy | ||
| 169 | (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html) | ||
| 170 | |||
| 171 | =item * | ||
| 172 | |||
| 173 | AWS::IAM::Role | ||
| 174 | (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html) | ||
| 175 | |||
| 176 | =item * | ||
| 177 | |||
| 178 | AWS::IAM::User | ||
| 179 | (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html) | ||
| 180 | |||
| 181 | =item * | ||
| 182 | |||
| 183 | AWS::IAM::UserToGroupAddition | ||
| 184 | (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html) | ||
| 185 | |||
| 186 | =back | ||
| 187 | |||
| 188 | For more information, see Acknowledging IAM Resources in AWS | ||
| 189 | CloudFormation Templates | ||
| 190 | (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). | ||
| 191 | |||
| 192 | =item * | ||
| 193 | |||
| 194 | C<CAPABILITY_AUTO_EXPAND> | ||
| 195 | |||
| 196 | Some template contain macros. Macros perform custom processing on | ||
| 197 | templates; this can include simple actions like find-and-replace | ||
| 198 | operations, all the way to extensive transformations of entire | ||
| 199 | templates. Because of this, users typically create a change set from | ||
| 200 | the processed template, so that they can review the changes resulting | ||
| 201 | from the macros before actually creating the stack. If your stack | ||
| 202 | template contains one or more macros, and you choose to create a stack | ||
| 203 | directly from the processed template, without first reviewing the | ||
| 204 | resulting changes in a change set, you must acknowledge this | ||
| 205 | capability. This includes the AWS::Include | ||
| 206 | (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) | ||
| 207 | and AWS::Serverless | ||
| 208 | (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) | ||
| 209 | transforms, which are macros hosted by AWS CloudFormation. | ||
| 210 | |||
| 211 | If you want to create a stack from a stack template that contains | ||
| 212 | macros I<and> nested stacks, you must create the stack directly from | ||
| 213 | the template using this capability. | ||
| 214 | |||
| 215 | You should only create stacks directly from a stack template that | ||
| 216 | contains macros if you know what processing the macro performs. | ||
| 217 | |||
| 218 | Each macro relies on an underlying Lambda service function for | ||
| 219 | processing stack templates. Be aware that the Lambda function owner can | ||
| 220 | update the function operation without AWS CloudFormation being | ||
| 221 | notified. | ||
| 222 | |||
| 223 | For more information, see Using AWS CloudFormation Macros to Perform | ||
| 224 | Custom Processing on Templates | ||
| 225 | (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html). | ||
| 226 | |||
| 227 | =back | ||
| 228 | |||
| 229 | |||
| 230 | |||
| 231 | |||
| 232 | =head2 ClientRequestToken => Str | ||
| 233 | |||
| 234 | A unique identifier for this C<CreateStack> request. Specify this token | ||
| 235 | if you plan to retry requests so that AWS CloudFormation knows that | ||
| 236 | you're not attempting to create a stack with the same name. You might | ||
| 237 | retry C<CreateStack> requests to ensure that AWS CloudFormation | ||
| 238 | successfully received them. | ||
| 239 | |||
| 240 | All events triggered by a given stack operation are assigned the same | ||
| 241 | client request token, which you can use to track operations. For | ||
| 242 | example, if you execute a C<CreateStack> operation with the token | ||
| 243 | C<token1>, then all the C<StackEvents> generated by that operation will | ||
| 244 | have C<ClientRequestToken> set as C<token1>. | ||
| 245 | |||
| 246 | In the console, stack operations display the client request token on | ||
| 247 | the Events tab. Stack operations that are initiated from the console | ||
| 248 | use the token format I<Console-StackOperation-ID>, which helps you | ||
| 249 | easily identify the stack operation . For example, if you create a | ||
| 250 | stack using the console, each stack event would be assigned the same | ||
| 251 | token in the following format: | ||
| 252 | C<Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002>. | ||
| 253 | |||
| 254 | |||
| 255 | |||
| 256 | =head2 DisableRollback => Bool | ||
| 257 | |||
| 258 | Set to C<true> to disable rollback of the stack if stack creation | ||
| 259 | failed. You can specify either C<DisableRollback> or C<OnFailure>, but | ||
| 260 | not both. | ||
| 261 | |||
| 262 | Default: C<false> | ||
| 263 | |||
| 264 | |||
| 265 | |||
| 266 | =head2 EnableTerminationProtection => Bool | ||
| 267 | |||
| 268 | Whether to enable termination protection on the specified stack. If a | ||
| 269 | user attempts to delete a stack with termination protection enabled, | ||
| 270 | the operation fails and the stack remains unchanged. For more | ||
| 271 | information, see Protecting a Stack From Being Deleted | ||
| 272 | (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html) | ||
| 273 | in the I<AWS CloudFormation User Guide>. Termination protection is | ||
| 274 | disabled on stacks by default. | ||
| 275 | |||
| 276 | For nested stacks | ||
| 277 | (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html), | ||
| 278 | termination protection is set on the root stack and cannot be changed | ||
| 279 | directly on the nested stack. | ||
| 280 | |||
| 281 | |||
| 282 | |||
| 283 | =head2 NotificationARNs => ArrayRef[Str|Undef] | ||
| 284 | |||
| 285 | The Simple Notification Service (SNS) topic ARNs to publish stack | ||
| 286 | related events. You can find your SNS topic ARNs using the SNS console | ||
| 287 | or your Command Line Interface (CLI). | ||
| 288 | |||
| 289 | |||
| 290 | |||
| 291 | =head2 OnFailure => Str | ||
| 292 | |||
| 293 | Determines what action will be taken if stack creation fails. This must | ||
| 294 | be one of: DO_NOTHING, ROLLBACK, or DELETE. You can specify either | ||
| 295 | C<OnFailure> or C<DisableRollback>, but not both. | ||
| 296 | |||
| 297 | Default: C<ROLLBACK> | ||
| 298 | |||
| 299 | Valid values are: C<"DO_NOTHING">, C<"ROLLBACK">, C<"DELETE"> | ||
| 300 | |||
| 301 | =head2 Parameters => ArrayRef[L<Paws::CloudFormation::Parameter>] | ||
| 302 | |||
| 303 | A list of C<Parameter> structures that specify input parameters for the | ||
| 304 | stack. For more information, see the Parameter | ||
| 305 | (https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html) | ||
| 306 | data type. | ||
| 307 | |||
| 308 | |||
| 309 | |||
| 310 | =head2 ResourceTypes => ArrayRef[Str|Undef] | ||
| 311 | |||
| 312 | The template resource types that you have permissions to work with for | ||
| 313 | this create stack action, such as C<AWS::EC2::Instance>, | ||
| 314 | C<AWS::EC2::*>, or C<Custom::MyCustomInstance>. Use the following | ||
| 315 | syntax to describe template resource types: C<AWS::*> (for all AWS | ||
| 316 | resource), C<Custom::*> (for all custom resources), | ||
| 317 | C<Custom::I<logical_ID> > (for a specific custom resource), | ||
| 318 | C<AWS::I<service_name>::*> (for all resources of a particular AWS | ||
| 319 | service), and C<AWS::I<service_name>::I<resource_logical_ID> > (for a | ||
| 320 | specific AWS resource). | ||
| 321 | |||
| 322 | If the list of resource types doesn't include a resource that you're | ||
| 323 | creating, the stack creation fails. By default, AWS CloudFormation | ||
| 324 | grants permissions to all resource types. AWS Identity and Access | ||
| 325 | Management (IAM) uses this parameter for AWS CloudFormation-specific | ||
| 326 | condition keys in IAM policies. For more information, see Controlling | ||
| 327 | Access with AWS Identity and Access Management | ||
| 328 | (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html). | ||
| 329 | |||
| 330 | |||
| 331 | |||
| 332 | =head2 RoleARN => Str | ||
| 333 | |||
| 334 | The Amazon Resource Name (ARN) of an AWS Identity and Access Management | ||
| 335 | (IAM) role that AWS CloudFormation assumes to create the stack. AWS | ||
| 336 | CloudFormation uses the role's credentials to make calls on your | ||
| 337 | behalf. AWS CloudFormation always uses this role for all future | ||
| 338 | operations on the stack. As long as users have permission to operate on | ||
| 339 | the stack, AWS CloudFormation uses this role even if the users don't | ||
| 340 | have permission to pass it. Ensure that the role grants least | ||
| 341 | privilege. | ||
| 342 | |||
| 343 | If you don't specify a value, AWS CloudFormation uses the role that was | ||
| 344 | previously associated with the stack. If no role is available, AWS | ||
| 345 | CloudFormation uses a temporary session that is generated from your | ||
| 346 | user credentials. | ||
| 347 | |||
| 348 | |||
| 349 | |||
| 350 | =head2 RollbackConfiguration => L<Paws::CloudFormation::RollbackConfiguration> | ||
| 351 | |||
| 352 | The rollback triggers for AWS CloudFormation to monitor during stack | ||
| 353 | creation and updating operations, and for the specified monitoring | ||
| 354 | period afterwards. | ||
| 355 | |||
| 356 | |||
| 357 | |||
| 358 | =head2 B<REQUIRED> StackName => Str | ||
| 359 | |||
| 360 | The name that is associated with the stack. The name must be unique in | ||
| 361 | the Region in which you are creating the stack. | ||
| 362 | |||
| 363 | A stack name can contain only alphanumeric characters (case sensitive) | ||
| 364 | and hyphens. It must start with an alphabetic character and cannot be | ||
| 365 | longer than 128 characters. | ||
| 366 | |||
| 367 | |||
| 368 | |||
| 369 | =head2 StackPolicyBody => Str | ||
| 370 | |||
| 371 | Structure containing the stack policy body. For more information, go to | ||
| 372 | Prevent Updates to Stack Resources | ||
| 373 | (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html) | ||
| 374 | in the I<AWS CloudFormation User Guide>. You can specify either the | ||
| 375 | C<StackPolicyBody> or the C<StackPolicyURL> parameter, but not both. | ||
| 376 | |||
| 377 | |||
| 378 | |||
| 379 | =head2 StackPolicyURL => Str | ||
| 380 | |||
| 381 | Location of a file containing the stack policy. The URL must point to a | ||
| 382 | policy (maximum size: 16 KB) located in an S3 bucket in the same Region | ||
| 383 | as the stack. You can specify either the C<StackPolicyBody> or the | ||
| 384 | C<StackPolicyURL> parameter, but not both. | ||
| 385 | |||
| 386 | |||
| 387 | |||
| 388 | =head2 Tags => ArrayRef[L<Paws::CloudFormation::Tag>] | ||
| 389 | |||
| 390 | Key-value pairs to associate with this stack. AWS CloudFormation also | ||
| 391 | propagates these tags to the resources created in the stack. A maximum | ||
| 392 | number of 50 tags can be specified. | ||
| 393 | |||
| 394 | |||
| 395 | |||
| 396 | =head2 TemplateBody => Str | ||
| 397 | |||
| 398 | Structure containing the template body with a minimum length of 1 byte | ||
| 399 | and a maximum length of 51,200 bytes. For more information, go to | ||
| 400 | Template Anatomy | ||
| 401 | (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html) | ||
| 402 | in the AWS CloudFormation User Guide. | ||
| 403 | |||
| 404 | Conditional: You must specify either the C<TemplateBody> or the | ||
| 405 | C<TemplateURL> parameter, but not both. | ||
| 406 | |||
| 407 | |||
| 408 | |||
| 409 | =head2 TemplateURL => Str | ||
| 410 | |||
| 411 | Location of file containing the template body. The URL must point to a | ||
| 412 | template (max size: 460,800 bytes) that is located in an Amazon S3 | ||
| 413 | bucket or a Systems Manager document. For more information, go to the | ||
| 414 | Template Anatomy | ||
| 415 | (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html) | ||
| 416 | in the AWS CloudFormation User Guide. | ||
| 417 | |||
| 418 | Conditional: You must specify either the C<TemplateBody> or the | ||
| 419 | C<TemplateURL> parameter, but not both. | ||
| 420 | |||
| 421 | |||
| 422 | |||
| 423 | =head2 TimeoutInMinutes => Int | ||
| 424 | |||
| 425 | The amount of time that can pass before the stack status becomes | ||
| 426 | CREATE_FAILED; if C<DisableRollback> is not set or is set to C<false>, | ||
| 427 | the stack will be rolled back. | ||
| 428 | |||
| 429 | |||
| 430 | |||
| 431 | |||
| 432 | =head1 SEE ALSO | ||
| 433 | |||
| 434 | This class forms part of L<Paws>, documenting arguments for method CreateStack in L<Paws::CloudFormation> | ||
| 435 | |||
| 436 | =head1 BUGS and CONTRIBUTIONS | ||
| 437 | |||
| 438 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 439 | |||
| 440 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 441 | |||
| 442 | =cut | ||
| 443 | |||