Class CloudFormationDeployStackSetActionProps
Properties for the CloudFormationDeployStackSetAction.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.CodePipeline.Actions
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CloudFormationDeployStackSetActionProps : Object, ICloudFormationDeployStackSetActionProps, ICommonAwsActionProps, ICommonActionProps, ICommonCloudFormationStackSetOptions
Syntax (vb)
Public Class CloudFormationDeployStackSetActionProps
Inherits Object
Implements ICloudFormationDeployStackSetActionProps, ICommonAwsActionProps, ICommonActionProps, ICommonCloudFormationStackSetOptions
Remarks
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
Cloud |
Properties
Action |
The physical, human-readable name of the Action. |
Cfn |
Indicates that the template can create and update resources, depending on the types of resources in the template. |
Deployment |
Determines how IAM roles are created and managed. |
Description | A description of the stack set. |
Failure |
The percentage of accounts per Region for which this stack operation can fail before AWS CloudFormation stops the operation in that Region. |
Max |
The maximum percentage of accounts in which to perform this operation at one time. |
Parameters | The template parameters for your stack set. |
Role | The Role in which context's this Action will be executing in. |
Run |
The runOrder property for this Action. |
Stack |
Specify where to create or update Stack Instances. |
Stack |
The name to associate with the stack set. |
Stack |
The AWS Region the StackSet is in. |
Template | The location of the template that defines the resources in the stack set. |
Variables |
The name of the namespace to use for variables emitted by this action. |
Constructors
CloudFormationDeployStackSetActionProps()
public CloudFormationDeployStackSetActionProps()
Properties
ActionName
The physical, human-readable name of the Action.
public string ActionName { get; set; }
Property Value
System.
Remarks
Note that Action names must be unique within a single Stage.
CfnCapabilities
Indicates that the template can create and update resources, depending on the types of resources in the template.
public CfnCapabilities[] CfnCapabilities { get; set; }
Property Value
Remarks
You must use this property if you have IAM resources in your stack template or you create a stack directly from a template containing macros.
Default: - the StackSet will have no IAM capabilities
DeploymentModel
Determines how IAM roles are created and managed.
public StackSetDeploymentModel DeploymentModel { get; set; }
Property Value
Remarks
The choices are:
If you want to deploy to all accounts that are a member of AWS Organizations Organizational Units (OUs), you must select Service Managed permissions.
Note: This parameter can only be changed when no stack instances exist in the stack set.
Default: StackSetDeploymentModel.selfManaged()
Description
A description of the stack set.
public string Description { get; set; }
Property Value
System.
Remarks
You can use this to describe the stack set’s purpose or other relevant information.
Default: - no description
FailureTolerancePercentage
The percentage of accounts per Region for which this stack operation can fail before AWS CloudFormation stops the operation in that Region.
public Nullable<double> FailureTolerancePercentage { get; set; }
Property Value
System.
Remarks
If the operation is stopped in a Region, AWS CloudFormation doesn't attempt the operation in subsequent Regions. When calculating the number of accounts based on the specified percentage, AWS CloudFormation rounds down to the next whole number.
Default: 0%
MaxAccountConcurrencyPercentage
The maximum percentage of accounts in which to perform this operation at one time.
public Nullable<double> MaxAccountConcurrencyPercentage { get; set; }
Property Value
System.
Remarks
When calculating the number of accounts based on the specified percentage, AWS CloudFormation rounds down to the next whole number. If rounding down would result in zero, AWS CloudFormation sets the number as one instead. Although you use this setting to specify the maximum, for large deployments the actual number of accounts acted upon concurrently may be lower due to service throttling.
Default: 1%
Parameters
The template parameters for your stack set.
public StackSetParameters Parameters { get; set; }
Property Value
Remarks
These parameters are shared between all instances of the stack set.
Default: - no parameters will be used
Role
The Role in which context's this Action will be executing in.
public IRole Role { get; set; }
Property Value
Remarks
The Pipeline's Role will assume this Role
(the required permissions for that will be granted automatically)
right before executing this Action.
This Action will be passed into your IAction.bind
method in the ActionBindOptions.role
property.
Default: a new Role will be generated
RunOrder
The runOrder property for this Action.
public Nullable<double> RunOrder { get; set; }
Property Value
System.
Remarks
RunOrder determines the relative order in which multiple Actions in the same Stage execute.
Default: 1
See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
StackInstances
Specify where to create or update Stack Instances.
public StackInstances StackInstances { get; set; }
Property Value
Remarks
You can specify either AWS Accounts Ids or AWS Organizations Organizational Units.
Default: - don't create or update any Stack Instances
StackSetName
The name to associate with the stack set.
public string StackSetName { get; set; }
Property Value
System.
Remarks
This name must be unique in the Region where it is created.
The name may only contain alphanumeric and hyphen characters. It must begin with an alphabetic character and be 128 characters or fewer.
StackSetRegion
The AWS Region the StackSet is in.
public string StackSetRegion { get; set; }
Property Value
System.
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: - same region as the Pipeline
Template
The location of the template that defines the resources in the stack set.
public StackSetTemplate Template { get; set; }
Property Value
Remarks
This must point to a template with a maximum size of 460,800 bytes.
Enter the path to the source artifact name and template file.
VariablesNamespace
The name of the namespace to use for variables emitted by this action.
public string VariablesNamespace { get; set; }
Property Value
System.
Remarks
Default: - a name will be generated, based on the stage and action names, if any of the action's variables were referenced - otherwise, no namespace will be set