Class CloudFormationCreateUpdateStackAction
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.codepipeline.Action
software.amazon.awscdk.services.codepipeline.actions.Action
software.amazon.awscdk.services.codepipeline.actions.CloudFormationCreateUpdateStackAction
- All Implemented Interfaces:
IAction
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:48.357Z")
@Stability(Stable)
public class CloudFormationCreateUpdateStackAction
extends Action
CodePipeline action to deploy a stack.
Creates the stack if the specified stack doesn't exist. If the stack exists, AWS CloudFormation updates the stack. Use this action to update existing stacks.
AWS CodePipeline won't replace the stack, and will fail deployment if the
stack is in a failed state. Use ReplaceOnFailure
for an action that
will delete and recreate the stack to try and recover from failed states.
Use this action to automatically replace failed stacks without recovering or troubleshooting them. You would typically choose this mode for testing.
Example:
import software.amazon.awscdk.core.PhysicalName; // in stack for account 123456789012... Stack otherAccountStack; Role actionRole = Role.Builder.create(otherAccountStack, "ActionRole") .assumedBy(new AccountPrincipal("123456789012")) // the role has to have a physical name set .roleName(PhysicalName.GENERATE_IF_NEEDED) .build(); // in the pipeline stack... Artifact sourceOutput = new Artifact(); CloudFormationCreateUpdateStackAction.Builder.create() .actionName("CloudFormationCreateUpdate") .stackName("MyStackName") .adminPermissions(true) .templatePath(sourceOutput.atPath("template.yaml")) .role(actionRole) .build();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCloudFormationCreateUpdateStackAction
.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.codepipeline.IAction
IAction.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
CloudFormationCreateUpdateStackAction
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CloudFormationCreateUpdateStackAction
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionaddToDeploymentRolePolicy
(PolicyStatement statement) Add statement to the service role assumed by CloudFormation while executing this action.protected ActionConfig
bound
(Construct scope, IStage stage, ActionBindOptions options) This is a renamed version of theIAction.bind
method.Methods inherited from class software.amazon.awscdk.services.codepipeline.actions.Action
getProvidedActionProperties
Methods inherited from class software.amazon.awscdk.services.codepipeline.Action
bind, getActionProperties, onStateChange, onStateChange, onStateChange, variableExpression
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
CloudFormationCreateUpdateStackAction
protected CloudFormationCreateUpdateStackAction(software.amazon.jsii.JsiiObjectRef objRef) -
CloudFormationCreateUpdateStackAction
protected CloudFormationCreateUpdateStackAction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CloudFormationCreateUpdateStackAction
@Stability(Stable) public CloudFormationCreateUpdateStackAction(@NotNull CloudFormationCreateUpdateStackActionProps props) - Parameters:
props
- This parameter is required.
-
-
Method Details
-
addToDeploymentRolePolicy
@Stability(Stable) @NotNull public Boolean addToDeploymentRolePolicy(@NotNull PolicyStatement statement) Add statement to the service role assumed by CloudFormation while executing this action.- Parameters:
statement
- This parameter is required.
-
bound
@Stability(Stable) @NotNull protected ActionConfig bound(@NotNull Construct scope, @NotNull IStage stage, @NotNull ActionBindOptions options) This is a renamed version of theIAction.bind
method. -
getDeploymentRole
-