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.104.0 (build e79254c)",
date="2024-10-31T19:12:55.085Z")
@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.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
(software.constructs.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 software.constructs.Construct scope, @NotNull IStage stage, @NotNull ActionBindOptions options) This is a renamed version of theIAction.bind
method. -
getDeploymentRole
-