Interface ICloudFormationExecuteChangeSetActionProps
Properties for the CloudFormationExecuteChangeSetAction.
Inherited Members
Namespace: Amazon.CDK.AWS.CodePipeline.Actions
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICloudFormationExecuteChangeSetActionProps : ICommonAwsActionProps, ICommonActionProps
Syntax (vb)
Public Interface ICloudFormationExecuteChangeSetActionProps
Inherits ICommonAwsActionProps, ICommonActionProps
Remarks
ExampleMetadata: lit=aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts infused
Examples
// Source stage: read from repository
var repo = new Repository(stack, "TemplateRepo", new RepositoryProps {
RepositoryName = "template-repo"
});
var sourceOutput = new Artifact("SourceArtifact");
var source = new CodeCommitSourceAction(new CodeCommitSourceActionProps {
ActionName = "Source",
Repository = repo,
Output = sourceOutput,
Trigger = CodeCommitTrigger.POLL
});
IDictionary<string, object> sourceStage = new Dictionary<string, object> {
{ "stageName", "Source" },
{ "actions", new [] { source } }
};
// Deployment stage: create and deploy changeset with manual approval
var stackName = "OurStack";
var changeSetName = "StagedChangeSet";
IDictionary<string, object> prodStage = new Dictionary<string, object> {
{ "stageName", "Deploy" },
{ "actions", new [] {
new CloudFormationCreateReplaceChangeSetAction(new CloudFormationCreateReplaceChangeSetActionProps {
ActionName = "PrepareChanges",
StackName = stackName,
ChangeSetName = changeSetName,
AdminPermissions = true,
TemplatePath = sourceOutput.AtPath("template.yaml"),
RunOrder = 1
}),
new ManualApprovalAction(new ManualApprovalActionProps {
ActionName = "ApproveChanges",
RunOrder = 2
}),
new CloudFormationExecuteChangeSetAction(new CloudFormationExecuteChangeSetActionProps {
ActionName = "ExecuteChanges",
StackName = stackName,
ChangeSetName = changeSetName,
RunOrder = 3
}) } }
};
new Pipeline(stack, "Pipeline", new PipelineProps {
CrossAccountKeys = true,
Stages = new [] { sourceStage, prodStage }
});
Synopsis
Properties
Account | The AWS account this Action is supposed to operate in. |
ChangeSetName | Name of the change set to execute. |
Output | The name of the output artifact to generate. |
OutputFileName | A name for the filename in the output artifact to store the AWS CloudFormation call's result. |
Region | The AWS region the given Action resides in. |
StackName | The name of the stack to apply this action to. |
Properties
Account
The AWS account this Action is supposed to operate in.
virtual string Account { get; }
Property Value
System.String
Remarks
Note: if you specify the role
property,
this is ignored - the action will operate in the same region the passed role does.
Default: - action resides in the same account as the pipeline
ChangeSetName
Name of the change set to execute.
string ChangeSetName { get; }
Property Value
System.String
Output
The name of the output artifact to generate.
virtual Artifact_ Output { get; }
Property Value
Remarks
Only applied if outputFileName
is set as well.
Default: Automatically generated artifact name.
OutputFileName
A name for the filename in the output artifact to store the AWS CloudFormation call's result.
virtual string OutputFileName { get; }
Property Value
System.String
Remarks
The file will contain the result of the call to AWS CloudFormation (for example the call to UpdateStack or CreateChangeSet).
AWS CodePipeline adds the file to the output artifact after performing the specified action.
Default: No output artifact generated
Region
The AWS region the given Action resides in.
virtual string Region { get; }
Property Value
System.String
Remarks
Note that a cross-region Pipeline requires replication buckets to function correctly.
You can provide their names with the PipelineProps#crossRegionReplicationBuckets
property.
If you don't, the CodePipeline Construct will create new Stacks in your CDK app containing those buckets,
that you will need to cdk deploy
before deploying the main, Pipeline-containing Stack.
Default: the Action resides in the same region as the Pipeline
StackName
The name of the stack to apply this action to.
string StackName { get; }
Property Value
System.String