Class CloudFormationDeployStackInstancesAction
CodePipeline action to create/update Stack Instances of a StackSet.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.CodePipeline.Actions
Assembly: Amazon.CDK.AWS.CodePipeline.Actions.dll
Syntax (csharp)
public class CloudFormationDeployStackInstancesAction : Action, IAction
Syntax (vb)
Public Class CloudFormationDeployStackInstancesAction
Inherits Action
Implements IAction
Remarks
After the initial creation of a stack set, you can add new stack instances by using CloudFormationStackInstances. Template parameter values can be overridden at the stack instance level during create or update stack set instance operations.
Each stack set has one template and set of template parameters. When you update the template or template parameters, you update them for the entire set. Then all instance statuses are set to OUTDATED until the changes are deployed to that instance.
ExampleMetadata: infused
Examples
Pipeline pipeline;
Artifact sourceOutput;
pipeline.AddStage(new StageOptions {
StageName = "DeployStackSets",
Actions = new [] {
// First, update the StackSet itself with the newest template
new CloudFormationDeployStackSetAction(new CloudFormationDeployStackSetActionProps {
ActionName = "UpdateStackSet",
RunOrder = 1,
StackSetName = "MyStackSet",
Template = StackSetTemplate.FromArtifactPath(sourceOutput.AtPath("template.yaml")),
// Change this to 'StackSetDeploymentModel.organizations()' if you want to deploy to OUs
DeploymentModel = StackSetDeploymentModel.SelfManaged(),
// This deploys to a set of accounts
StackInstances = StackInstances.InAccounts(new [] { "111111111111" }, new [] { "us-east-1", "eu-west-1" })
}),
// Afterwards, update/create additional instances in other accounts
new CloudFormationDeployStackInstancesAction(new CloudFormationDeployStackInstancesActionProps {
ActionName = "AddMoreInstances",
RunOrder = 2,
StackSetName = "MyStackSet",
StackInstances = StackInstances.InAccounts(new [] { "222222222222", "333333333333" }, new [] { "us-east-1", "eu-west-1" })
}) }
});
Synopsis
Constructors
CloudFormationDeployStackInstancesAction(ICloudFormationDeployStackInstancesActionProps) | |
CloudFormationDeployStackInstancesAction(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CloudFormationDeployStackInstancesAction(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bound(Construct, IStage, IActionBindOptions) | This is a renamed version of the {@link IAction.bind} method. |
Constructors
CloudFormationDeployStackInstancesAction(ICloudFormationDeployStackInstancesActionProps)
public CloudFormationDeployStackInstancesAction(ICloudFormationDeployStackInstancesActionProps props)
Parameters
CloudFormationDeployStackInstancesAction(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CloudFormationDeployStackInstancesAction(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CloudFormationDeployStackInstancesAction(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CloudFormationDeployStackInstancesAction(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
Bound(Construct, IStage, IActionBindOptions)
This is a renamed version of the {@link IAction.bind} method.
protected override IActionConfig Bound(Construct scope, IStage stage, IActionBindOptions options)
Parameters
- scope Construct
- stage IStage
- options IActionBindOptions
Returns