Class CloudFormationCreateUpdateStackActionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CloudFormationCreateUpdateStackActionProps>
- Enclosing interface:
CloudFormationCreateUpdateStackActionProps
CloudFormationCreateUpdateStackActionProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCloudFormationCreateUpdateStackActionProps.getAccount()actionName(String actionName) Sets the value ofCommonActionProps.getActionName()adminPermissions(Boolean adminPermissions) Sets the value ofCloudFormationCreateUpdateStackActionProps.getAdminPermissions()build()Builds the configured instance.cfnCapabilities(List<? extends CfnCapabilities> cfnCapabilities) Sets the value ofCloudFormationCreateUpdateStackActionProps.getCfnCapabilities()deploymentRole(IRole deploymentRole) Sets the value ofCloudFormationCreateUpdateStackActionProps.getDeploymentRole()extraInputs(List<? extends Artifact> extraInputs) Sets the value ofCloudFormationCreateUpdateStackActionProps.getExtraInputs()Sets the value ofCloudFormationCreateUpdateStackActionProps.getOutput()outputFileName(String outputFileName) Sets the value ofCloudFormationCreateUpdateStackActionProps.getOutputFileName()parameterOverrides(Map<String, ? extends Object> parameterOverrides) Sets the value ofCloudFormationCreateUpdateStackActionProps.getParameterOverrides()Sets the value ofCloudFormationCreateUpdateStackActionProps.getRegion()replaceOnFailure(Boolean replaceOnFailure) Sets the value ofCloudFormationCreateUpdateStackActionProps.getReplaceOnFailure()Sets the value ofCommonAwsActionProps.getRole()Sets the value ofCommonActionProps.getRunOrder()Sets the value ofCloudFormationCreateUpdateStackActionProps.getStackName()templateConfiguration(ArtifactPath templateConfiguration) Sets the value ofCloudFormationCreateUpdateStackActionProps.getTemplateConfiguration()templatePath(ArtifactPath templatePath) Sets the value ofCloudFormationCreateUpdateStackActionProps.getTemplatePath()variablesNamespace(String variablesNamespace) Sets the value ofCommonActionProps.getVariablesNamespace()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
adminPermissions
@Stability(Stable) public CloudFormationCreateUpdateStackActionProps.Builder adminPermissions(Boolean adminPermissions) Sets the value ofCloudFormationCreateUpdateStackActionProps.getAdminPermissions()- Parameters:
adminPermissions- Whether to grant full permissions to CloudFormation while deploying this template. This parameter is required. Setting this totrueaffects the defaults forroleandcapabilities, if you don't specify any alternatives.The default role that will be created for you will have full (i.e.,
*) permissions on all resources, and the deployment will have named IAM capabilities (i.e., able to create all IAM resources).This is a shorthand that you can use if you fully trust the templates that are deployed in this pipeline. If you want more fine-grained permissions, use
addToRolePolicyandcapabilitiesto control what the CloudFormation deployment is allowed to do.- Returns:
this
-
stackName
@Stability(Stable) public CloudFormationCreateUpdateStackActionProps.Builder stackName(String stackName) Sets the value ofCloudFormationCreateUpdateStackActionProps.getStackName()- Parameters:
stackName- The name of the stack to apply this action to. This parameter is required.- Returns:
this
-
templatePath
@Stability(Stable) public CloudFormationCreateUpdateStackActionProps.Builder templatePath(ArtifactPath templatePath) Sets the value ofCloudFormationCreateUpdateStackActionProps.getTemplatePath()- Parameters:
templatePath- Input artifact with the CloudFormation template to deploy. This parameter is required.- Returns:
this
-
account
@Stability(Stable) public CloudFormationCreateUpdateStackActionProps.Builder account(String account) Sets the value ofCloudFormationCreateUpdateStackActionProps.getAccount()- Parameters:
account- The AWS account this Action is supposed to operate in. Note: if you specify theroleproperty, this is ignored - the action will operate in the same region the passed role does.- Returns:
this
-
cfnCapabilities
@Stability(Stable) public CloudFormationCreateUpdateStackActionProps.Builder cfnCapabilities(List<? extends CfnCapabilities> cfnCapabilities) Sets the value ofCloudFormationCreateUpdateStackActionProps.getCfnCapabilities()- Parameters:
cfnCapabilities- Acknowledge certain changes made as part of deployment. For stacks that contain certain resources, explicit acknowledgement is required that AWS CloudFormation might create or update those resources. For example, you must specifyANONYMOUS_IAMorNAMED_IAMif your stack template contains AWS Identity and Access Management (IAM) resources. For more information, see the link below.- Returns:
this
-
deploymentRole
@Stability(Stable) public CloudFormationCreateUpdateStackActionProps.Builder deploymentRole(IRole deploymentRole) Sets the value ofCloudFormationCreateUpdateStackActionProps.getDeploymentRole()- Parameters:
deploymentRole- IAM role to assume when deploying changes. If not specified, a fresh role is created. The role is created with zero permissions unlessadminPermissionsis true, in which case the role will have full permissions.- Returns:
this
-
extraInputs
@Stability(Stable) public CloudFormationCreateUpdateStackActionProps.Builder extraInputs(List<? extends Artifact> extraInputs) Sets the value ofCloudFormationCreateUpdateStackActionProps.getExtraInputs()- Parameters:
extraInputs- The list of additional input Artifacts for this Action. This is especially useful when used in conjunction with theparameterOverridesproperty. For example, if you have:parameterOverrides: { 'Param1': action1.outputArtifact.bucketName, 'Param2': action2.outputArtifact.objectKey, }
, if the output Artifacts of
action1andaction2were not used to set either thetemplateConfigurationor thetemplatePathproperties, you need to make sure to include them in theextraInputs- otherwise, you'll get an "unrecognized Artifact" error during your Pipeline's execution.- Returns:
this
-
output
@Stability(Stable) public CloudFormationCreateUpdateStackActionProps.Builder output(Artifact output) Sets the value ofCloudFormationCreateUpdateStackActionProps.getOutput()- Parameters:
output- The name of the output artifact to generate. Only applied ifoutputFileNameis set as well.- Returns:
this
-
outputFileName
@Stability(Stable) public CloudFormationCreateUpdateStackActionProps.Builder outputFileName(String outputFileName) Sets the value ofCloudFormationCreateUpdateStackActionProps.getOutputFileName()- Parameters:
outputFileName- A name for the filename in the output artifact to store the AWS CloudFormation call's result. 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.
- Returns:
this
-
parameterOverrides
@Stability(Stable) public CloudFormationCreateUpdateStackActionProps.Builder parameterOverrides(Map<String, ? extends Object> parameterOverrides) Sets the value ofCloudFormationCreateUpdateStackActionProps.getParameterOverrides()- Parameters:
parameterOverrides- Additional template parameters. Template parameters specified here take precedence over template parameters found in the artifact specified by thetemplateConfigurationproperty.We recommend that you use the template configuration file to specify most of your parameter values. Use parameter overrides to specify only dynamic parameter values (values that are unknown until you run the pipeline).
All parameter names must be present in the stack template.
Note: the entire object cannot be more than 1kB.
- Returns:
this
-
region
Sets the value ofCloudFormationCreateUpdateStackActionProps.getRegion()- Parameters:
region- The AWS region the given Action resides in. Note that a cross-region Pipeline requires replication buckets to function correctly. You can provide their names with thePipelineProps#crossRegionReplicationBucketsproperty. If you don't, the CodePipeline Construct will create new Stacks in your CDK app containing those buckets, that you will need tocdk deploybefore deploying the main, Pipeline-containing Stack.- Returns:
this
-
replaceOnFailure
@Stability(Stable) public CloudFormationCreateUpdateStackActionProps.Builder replaceOnFailure(Boolean replaceOnFailure) Sets the value ofCloudFormationCreateUpdateStackActionProps.getReplaceOnFailure()- Parameters:
replaceOnFailure- Replace the stack if it's in a failed state. If this is set to true and the stack is in a failed state (one of ROLLBACK_COMPLETE, ROLLBACK_FAILED, CREATE_FAILED, DELETE_FAILED, or UPDATE_ROLLBACK_FAILED), AWS CloudFormation deletes the stack and then creates a new stack.If this is not set to true and the stack is in a failed state, the deployment fails.
- Returns:
this
-
templateConfiguration
@Stability(Stable) public CloudFormationCreateUpdateStackActionProps.Builder templateConfiguration(ArtifactPath templateConfiguration) Sets the value ofCloudFormationCreateUpdateStackActionProps.getTemplateConfiguration()- Parameters:
templateConfiguration- Input artifact to use for template parameters values and stack policy. The template configuration file should contain a JSON object that should look like this:{ "Parameters": {...}, "Tags": {...}, "StackPolicy": {... }}. For more information, see AWS CloudFormation Artifacts.Note that if you include sensitive information, such as passwords, restrict access to this file.
- Returns:
this
-
role
Sets the value ofCommonAwsActionProps.getRole()- Parameters:
role- The Role in which context's this Action will be executing in. 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 yourIAction.bindmethod in theActionBindOptions.roleproperty.- Returns:
this
-
actionName
@Stability(Stable) public CloudFormationCreateUpdateStackActionProps.Builder actionName(String actionName) Sets the value ofCommonActionProps.getActionName()- Parameters:
actionName- The physical, human-readable name of the Action. This parameter is required. Note that Action names must be unique within a single Stage.- Returns:
this
-
runOrder
@Stability(Stable) public CloudFormationCreateUpdateStackActionProps.Builder runOrder(Number runOrder) Sets the value ofCommonActionProps.getRunOrder()- Parameters:
runOrder- The runOrder property for this Action. RunOrder determines the relative order in which multiple Actions in the same Stage execute.- Returns:
this
-
variablesNamespace
@Stability(Stable) public CloudFormationCreateUpdateStackActionProps.Builder variablesNamespace(String variablesNamespace) Sets the value ofCommonActionProps.getVariablesNamespace()- Parameters:
variablesNamespace- The name of the namespace to use for variables emitted by this action.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CloudFormationCreateUpdateStackActionProps>- Returns:
- a new instance of
CloudFormationCreateUpdateStackActionProps - Throws:
NullPointerException- if any required attribute was not provided
-