DeployOptions
- class aws_cdk.cloud_assembly_schema.DeployOptions(*, all=None, app=None, asset_metadata=None, ca_bundle_path=None, color=None, context=None, debug=None, ec2_creds=None, ignore_errors=None, json=None, lookups=None, notices=None, output=None, path_metadata=None, profile=None, proxy=None, role_arn=None, stacks=None, staging=None, strict=None, trace=None, verbose=None, version_reporting=None, change_set_name=None, ci=None, exclusively=None, execute=None, force=None, notification_arns=None, outputs_file=None, parameters=None, require_approval=None, reuse_assets=None, rollback=None, toolkit_stack_name=None, use_previous_parameters=None)
Bases:
DefaultCdkOptions
Options to use with cdk deploy.
- Parameters:
all (
Optional
[bool
]) – Deploy all stacks. Requried ifstacks
is not set Default: - falseapp (
Optional
[str
]) – command-line for executing your app or a cloud assembly directory e.g. “node bin/my-app.js” or “cdk.out”. Default: - read from cdk.jsonasset_metadata (
Optional
[bool
]) – Include “aws:asset:*” CloudFormation metadata for resources that use assets. Default: trueca_bundle_path (
Optional
[str
]) – Path to CA certificate to use when validating HTTPS requests. Default: - read from AWS_CA_BUNDLE environment variablecolor (
Optional
[bool
]) – Show colors and other style from console output. Default: truecontext (
Optional
[Mapping
[str
,str
]]) – Additional context. Default: - no additional contextdebug (
Optional
[bool
]) – enable emission of additional debugging information, such as creation stack traces of tokens. Default: falseec2_creds (
Optional
[bool
]) – Force trying to fetch EC2 instance credentials. Default: - guess EC2 instance statusignore_errors (
Optional
[bool
]) – Ignores synthesis errors, which will likely produce an invalid output. Default: falsejson (
Optional
[bool
]) – Use JSON output instead of YAML when templates are printed to STDOUT. Default: falselookups (
Optional
[bool
]) – Perform context lookups. Synthesis fails if this is disabled and context lookups need to be performed Default: truenotices (
Optional
[bool
]) – Show relevant notices. Default: trueoutput (
Optional
[str
]) – Emits the synthesized cloud assembly into a directory. Default: cdk.outpath_metadata (
Optional
[bool
]) – Include “aws:cdk:path” CloudFormation metadata for each resource. Default: trueprofile (
Optional
[str
]) – Use the indicated AWS profile as the default environment. Default: - no profile is usedproxy (
Optional
[str
]) – Use the indicated proxy. Will read from HTTPS_PROXY environment if specified Default: - no proxyrole_arn (
Optional
[str
]) – Role to pass to CloudFormation for deployment. Default: - use the bootstrap cfn-exec rolestacks (
Optional
[Sequence
[str
]]) – List of stacks to deploy. Requried ifall
is not set Default: - []staging (
Optional
[bool
]) – Copy assets to the output directory. Needed for local debugging the source files with SAM CLI Default: falsestrict (
Optional
[bool
]) – Do not construct stacks with warnings. Default: falsetrace (
Optional
[bool
]) – Print trace for stack warnings. Default: falseverbose (
Optional
[bool
]) – show debug logs. Default: falseversion_reporting (
Optional
[bool
]) – Include “AWS::CDK::Metadata” resource in synthesized templates. Default: truechange_set_name (
Optional
[str
]) – Optional name to use for the CloudFormation change set. If not provided, a name will be generated automatically. Default: - auto generate a nameci (
Optional
[bool
]) – Whether we are on a CI system. Default: falseexclusively (
Optional
[bool
]) – Only perform action on the given stack. Default: falseexecute (
Optional
[bool
]) – Whether to execute the ChangeSet Not providingexecute
parameter will result in execution of ChangeSet. Default: trueforce (
Optional
[bool
]) – Always deploy, even if templates are identical. Default: falsenotification_arns (
Optional
[Sequence
[str
]]) – ARNs of SNS topics that CloudFormation will notify with stack related events. Default: - no notificationsoutputs_file (
Optional
[str
]) – Path to file where stack outputs will be written after a successful deploy as JSON. Default: - Outputs are not written to any fileparameters (
Optional
[Mapping
[str
,str
]]) – Additional parameters for CloudFormation at deploy time. Default: {}require_approval (
Optional
[RequireApproval
]) – What kind of security changes require approval. Default: RequireApproval.Neverreuse_assets (
Optional
[Sequence
[str
]]) – Reuse the assets with the given asset IDs. Default: - do not reuse assetsrollback (
Optional
[bool
]) – Rollback failed deployments. Default: truetoolkit_stack_name (
Optional
[str
]) – Name of the toolkit stack to use/deploy. Default: CDKToolkituse_previous_parameters (
Optional
[bool
]) – Use previous values for unspecified parameters. If not set, all parameters must be specified for every deployment. Default: true
- ExampleMetadata:
infused
Example:
app = App() stack_under_test = Stack(app, "StackUnderTest") stack = Stack(app, "stack") test_case = IntegTest(app, "CustomizedDeploymentWorkflow", test_cases=[stack_under_test], diff_assets=True, stack_update_workflow=True, cdk_command_options=CdkCommands( deploy=DeployCommand( args=DeployOptions( require_approval=RequireApproval.NEVER, json=True ) ), destroy=DestroyCommand( args=DestroyOptions( force=True ) ) ) )
Attributes
- all
Deploy all stacks.
Requried if
stacks
is not set- Default:
false
- app
command-line for executing your app or a cloud assembly directory e.g. “node bin/my-app.js” or “cdk.out”.
- Default:
read from cdk.json
- asset_metadata
*” CloudFormation metadata for resources that use assets.
- Default:
true
- Type:
Include “aws
- Type:
asset
- ca_bundle_path
Path to CA certificate to use when validating HTTPS requests.
- Default:
read from AWS_CA_BUNDLE environment variable
- change_set_name
Optional name to use for the CloudFormation change set.
If not provided, a name will be generated automatically.
- Default:
auto generate a name
- ci
Whether we are on a CI system.
- Default:
false
- color
Show colors and other style from console output.
- Default:
true
- context
Additional context.
- Default:
no additional context
- debug
enable emission of additional debugging information, such as creation stack traces of tokens.
- Default:
false
- ec2_creds
Force trying to fetch EC2 instance credentials.
- Default:
guess EC2 instance status
- exclusively
Only perform action on the given stack.
- Default:
false
- execute
Whether to execute the ChangeSet Not providing
execute
parameter will result in execution of ChangeSet.- Default:
true
- force
Always deploy, even if templates are identical.
- Default:
false
- ignore_errors
Ignores synthesis errors, which will likely produce an invalid output.
- Default:
false
- json
Use JSON output instead of YAML when templates are printed to STDOUT.
- Default:
false
- lookups
Perform context lookups.
Synthesis fails if this is disabled and context lookups need to be performed
- Default:
true
- notices
Show relevant notices.
- Default:
true
- notification_arns
ARNs of SNS topics that CloudFormation will notify with stack related events.
- Default:
no notifications
- output
Emits the synthesized cloud assembly into a directory.
- Default:
cdk.out
- outputs_file
Path to file where stack outputs will be written after a successful deploy as JSON.
- Default:
Outputs are not written to any file
- parameters
Additional parameters for CloudFormation at deploy time.
- Default:
{}
- path_metadata
path” CloudFormation metadata for each resource.
- Default:
true
- Type:
Include “aws
- Type:
cdk
- profile
Use the indicated AWS profile as the default environment.
- Default:
no profile is used
- proxy
Use the indicated proxy.
Will read from HTTPS_PROXY environment if specified
- Default:
no proxy
- require_approval
What kind of security changes require approval.
- Default:
RequireApproval.Never
- reuse_assets
Reuse the assets with the given asset IDs.
- Default:
do not reuse assets
- role_arn
Role to pass to CloudFormation for deployment.
- Default:
use the bootstrap cfn-exec role
- rollback
Rollback failed deployments.
- Default:
true
- stacks
List of stacks to deploy.
Requried if
all
is not set- Default:
[]
- staging
Copy assets to the output directory.
Needed for local debugging the source files with SAM CLI
- Default:
false
- strict
Do not construct stacks with warnings.
- Default:
false
- toolkit_stack_name
Name of the toolkit stack to use/deploy.
- Default:
CDKToolkit
- trace
Print trace for stack warnings.
- Default:
false
- use_previous_parameters
Use previous values for unspecified parameters.
If not set, all parameters must be specified for every deployment.
- Default:
true
- verbose
show debug logs.
- Default:
false
- version_reporting
Include “AWS::CDK::Metadata” resource in synthesized templates.
- Default:
true