CloudFormationDeleteStackActionProps
- class aws_cdk.aws_codepipeline_actions.CloudFormationDeleteStackActionProps(*, action_name, run_order=None, variables_namespace=None, role=None, admin_permissions, stack_name, account=None, cfn_capabilities=None, deployment_role=None, extra_inputs=None, output=None, output_file_name=None, parameter_overrides=None, region=None, template_configuration=None)
Bases:
CommonAwsActionProps
Properties for the CloudFormationDeleteStackAction.
- Parameters:
action_name (
str
) – The physical, human-readable name of the Action. Note that Action names must be unique within a single Stage.run_order (
Union
[int
,float
,None
]) – The runOrder property for this Action. RunOrder determines the relative order in which multiple Actions in the same Stage execute. Default: 1variables_namespace (
Optional
[str
]) – The name of the namespace to use for variables emitted by this action. 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 setrole (
Optional
[IRole
]) – 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.bind
method in theActionBindOptions.role
property. Default: a new Role will be generatedadmin_permissions (
bool
) – Whether to grant full permissions to CloudFormation while deploying this template. Setting this totrue
affects the defaults forrole
andcapabilities
, 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, useaddToRolePolicy
andcapabilities
to control what the CloudFormation deployment is allowed to do.stack_name (
str
) – The name of the stack to apply this action to.account (
Optional
[str
]) – The AWS account this Action is supposed to operate in. Note: if you specify therole
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 pipelinecfn_capabilities (
Optional
[Sequence
[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_IAM
orNAMED_IAM
if your stack template contains AWS Identity and Access Management (IAM) resources. For more information, see the link below. Default: None, unlessadminPermissions
is truedeployment_role (
Optional
[IRole
]) – IAM role to assume when deploying changes. If not specified, a fresh role is created. The role is created with zero permissions unlessadminPermissions
is true, in which case the role will have full permissions. Default: A fresh role with full or no permissions (depending on the value ofadminPermissions
).extra_inputs (
Optional
[Sequence
[Artifact
]]) – The list of additional input Artifacts for this Action. This is especially useful when used in conjunction with theparameterOverrides
property. For example, if you have: parameterOverrides: { ‘Param1’: action1.outputArtifact.bucketName, ‘Param2’: action2.outputArtifact.objectKey, } , if the output Artifacts ofaction1
andaction2
were not used to set either thetemplateConfiguration
or thetemplatePath
properties, you need to make sure to include them in theextraInputs
- otherwise, you’ll get an “unrecognized Artifact” error during your Pipeline’s execution.output (
Optional
[Artifact
]) – The name of the output artifact to generate. Only applied ifoutputFileName
is set as well. Default: Automatically generated artifact name.output_file_name (
Optional
[str
]) – 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. Default: No output artifact generatedparameter_overrides (
Optional
[Mapping
[str
,Any
]]) – Additional template parameters. Template parameters specified here take precedence over template parameters found in the artifact specified by thetemplateConfiguration
property. 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. Default: No overridesregion (
Optional
[str
]) – 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#crossRegionReplicationBuckets
property. If you don’t, the CodePipeline Construct will create new Stacks in your CDK app containing those buckets, that you will need tocdk deploy
before deploying the main, Pipeline-containing Stack. Default: the Action resides in the same region as the Pipelinetemplate_configuration (
Optional
[ArtifactPath
]) – 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. Default: No template configuration based on input artifacts
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk as cdk from aws_cdk import aws_codepipeline as codepipeline from aws_cdk import aws_codepipeline_actions as codepipeline_actions from aws_cdk import aws_iam as iam # artifact: codepipeline.Artifact # artifact_path: codepipeline.ArtifactPath # parameter_overrides: Any # role: iam.Role cloud_formation_delete_stack_action_props = codepipeline_actions.CloudFormationDeleteStackActionProps( action_name="actionName", admin_permissions=False, stack_name="stackName", # the properties below are optional account="account", cfn_capabilities=[cdk.CfnCapabilities.NONE], deployment_role=role, extra_inputs=[artifact], output=artifact, output_file_name="outputFileName", parameter_overrides={ "parameter_overrides_key": parameter_overrides }, region="region", role=role, run_order=123, template_configuration=artifact_path, variables_namespace="variablesNamespace" )
Attributes
- account
The AWS account this Action is supposed to operate in.
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
- action_name
The physical, human-readable name of the Action.
Note that Action names must be unique within a single Stage.
- admin_permissions
Whether to grant full permissions to CloudFormation while deploying this template.
Setting this to
true
affects the defaults forrole
andcapabilities
, 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
addToRolePolicy
andcapabilities
to control what the CloudFormation deployment is allowed to do.
- cfn_capabilities
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 specify
ANONYMOUS_IAM
orNAMED_IAM
if your stack template contains AWS Identity and Access Management (IAM) resources. For more information, see the link below.- Default:
None, unless
adminPermissions
is true- See:
- deployment_role
IAM role to assume when deploying changes.
If not specified, a fresh role is created. The role is created with zero permissions unless
adminPermissions
is true, in which case the role will have full permissions.- Default:
A fresh role with full or no permissions (depending on the value of
adminPermissions
).
- extra_inputs
The list of additional input Artifacts for this Action.
This is especially useful when used in conjunction with the
parameterOverrides
property. For example, if you have:parameterOverrides: { ‘Param1’: action1.outputArtifact.bucketName, ‘Param2’: action2.outputArtifact.objectKey, }
, if the output Artifacts of
action1
andaction2
were not used to set either thetemplateConfiguration
or thetemplatePath
properties, you need to make sure to include them in theextraInputs
- otherwise, you’ll get an “unrecognized Artifact” error during your Pipeline’s execution.
- output
The name of the output artifact to generate.
Only applied if
outputFileName
is set as well.- Default:
Automatically generated artifact name.
- output_file_name
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.
- Default:
No output artifact generated
- parameter_overrides
Additional template parameters.
Template parameters specified here take precedence over template parameters found in the artifact specified by the
templateConfiguration
property.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.
- Default:
No overrides
- 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 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 tocdk deploy
before deploying the main, Pipeline-containing Stack.- Default:
the Action resides in the same region as the Pipeline
- 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 your
IAction.bind
method in theActionBindOptions.role
property.- Default:
a new Role will be generated
- run_order
The runOrder property for this Action.
RunOrder determines the relative order in which multiple Actions in the same Stage execute.
- stack_name
The name of the stack to apply this action to.
- template_configuration
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.
- Default:
No template configuration based on input artifacts
- variables_namespace
The name of the namespace to use for variables emitted by this action.
- 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