BootstrapOptions

class aws_cdk.cli_lib_alpha.BootstrapOptions(*, 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, path_metadata=None, profile=None, proxy=None, role_arn=None, stacks=None, staging=None, strict=None, trace=None, verbose=None, version_reporting=None, bootstrap_bucket_name=None, bootstrap_customer_key=None, bootstrap_kms_key_id=None, cfn_execution_policy=None, custom_permissions_boundary=None, environments=None, example_permissions_boundary=None, execute=None, force=None, public_access_block_configuration=None, qualifier=None, show_template=None, template=None, termination_protection=None, toolkit_stack_name=None, trust=None, trust_for_lookup=None, use_previous_parameters=None)

Bases: SharedOptions

(experimental) Options to use with cdk bootstrap.

Parameters:
  • asset_metadata (Optional[bool]) – (experimental) Include “aws:asset:*” CloudFormation metadata for resources that use assets. Default: true

  • ca_bundle_path (Optional[str]) – (experimental) Path to CA certificate to use when validating HTTPS requests. Default: - read from AWS_CA_BUNDLE environment variable

  • color (Optional[bool]) – (experimental) Show colors and other style from console output. Default: - true unless the environment variable NO_COLOR is set

  • context (Optional[Mapping[str, str]]) – (experimental) Additional context. Default: - no additional context

  • debug (Optional[bool]) – (experimental) enable emission of additional debugging information, such as creation stack traces of tokens. Default: false

  • ec2_creds (Optional[bool]) – (experimental) Force trying to fetch EC2 instance credentials. Default: - guess EC2 instance status

  • ignore_errors (Optional[bool]) – (experimental) Ignores synthesis errors, which will likely produce an invalid output. Default: false

  • json (Optional[bool]) – (experimental) Use JSON output instead of YAML when templates are printed to STDOUT. Default: false

  • lookups (Optional[bool]) – (experimental) Perform context lookups. Synthesis fails if this is disabled and context lookups need to be performed Default: true

  • notices (Optional[bool]) – (experimental) Show relevant notices. Default: true

  • path_metadata (Optional[bool]) – (experimental) Include “aws:cdk:path” CloudFormation metadata for each resource. Default: true

  • profile (Optional[str]) – (experimental) Use the indicated AWS profile as the default environment. Default: - no profile is used

  • proxy (Optional[str]) – (experimental) Use the indicated proxy. Will read from HTTPS_PROXY environment if specified Default: - no proxy

  • role_arn (Optional[str]) – (experimental) Role to pass to CloudFormation for deployment. Default: - use the bootstrap cfn-exec role

  • stacks (Optional[Sequence[str]]) – (experimental) List of stacks to deploy. Default: - all stacks

  • staging (Optional[bool]) – (experimental) Copy assets to the output directory. Needed for local debugging the source files with SAM CLI Default: false

  • strict (Optional[bool]) – (experimental) Do not construct stacks with warnings. Default: false

  • trace (Optional[bool]) – (experimental) Print trace for stack warnings. Default: false

  • verbose (Optional[bool]) – (experimental) show debug logs. Default: false

  • version_reporting (Optional[bool]) – (experimental) Include “AWS::CDK::Metadata” resource in synthesized templates. Default: true

  • bootstrap_bucket_name (Optional[str]) – (experimental) The name of the CDK toolkit bucket; bucket will be created and must not exist Default: - auto-generated CloudFormation name

  • bootstrap_customer_key (Optional[str]) – (experimental) Create a Customer Master Key (CMK) for the bootstrap bucket (you will be charged but can customize permissions, modern bootstrapping only). Default: undefined

  • bootstrap_kms_key_id (Optional[str]) – (experimental) AWS KMS master key ID used for the SSE-KMS encryption. Default: undefined

  • cfn_execution_policy (Optional[str]) – (experimental) The Managed Policy ARNs that should be attached to the role performing deployments into this environment (may be repeated, modern bootstrapping only). Default: - none

  • custom_permissions_boundary (Optional[str]) – (experimental) Use the permissions boundary specified by name. Default: undefined

  • environments (Optional[Sequence[str]]) – (experimental) The target AWS environments to deploy the bootstrap stack to. Uses the following format: aws://<account-id>/<region> Default: - Bootstrap all environments referenced in the CDK app or determine an environment from local configuration.

  • example_permissions_boundary (Optional[bool]) – (experimental) Use the example permissions boundary. Default: undefined

  • execute (Optional[bool]) – (experimental) Whether to execute ChangeSet (–no-execute will NOT execute the ChangeSet). Default: true

  • force (Optional[bool]) – (experimental) Always bootstrap even if it would downgrade template version. Default: false

  • public_access_block_configuration (Optional[str]) – (experimental) Block public access configuration on CDK toolkit bucket (enabled by default). Default: undefined

  • qualifier (Optional[str]) – (experimental) String which must be unique for each bootstrap stack. You must configure it on your CDK app if you change this from the default. Default: undefined

  • show_template (Optional[bool]) – (experimental) Instead of actual bootstrapping, print the current CLI’s bootstrapping template to stdout for customization. Default: false

  • template (Optional[str]) – (experimental) Use the template from the given file instead of the built-in one (use –show-template to obtain an example).

  • termination_protection (Optional[bool]) – (experimental) Toggle CloudFormation termination protection on the bootstrap stacks. Default: false

  • toolkit_stack_name (Optional[str]) – (experimental) The name of the CDK toolkit stack to create.

  • trust (Optional[str]) – (experimental) The AWS account IDs that should be trusted to perform deployments into this environment (may be repeated, modern bootstrapping only). Default: undefined

  • trust_for_lookup (Optional[str]) – (experimental) The AWS account IDs that should be trusted to look up values in this environment (may be repeated, modern bootstrapping only). Default: undefined

  • use_previous_parameters (Optional[bool]) – (experimental) Use previous values for existing parameters (you must specify all parameters on every deployment if this is disabled). Default: true

Stability:

experimental

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.cli_lib_alpha as cli_lib_alpha

bootstrap_options = cli_lib_alpha.BootstrapOptions(
    asset_metadata=False,
    bootstrap_bucket_name="bootstrapBucketName",
    bootstrap_customer_key="bootstrapCustomerKey",
    bootstrap_kms_key_id="bootstrapKmsKeyId",
    ca_bundle_path="caBundlePath",
    cfn_execution_policy="cfnExecutionPolicy",
    color=False,
    context={
        "context_key": "context"
    },
    custom_permissions_boundary="customPermissionsBoundary",
    debug=False,
    ec2_creds=False,
    environments=["environments"],
    example_permissions_boundary=False,
    execute=False,
    force=False,
    ignore_errors=False,
    json=False,
    lookups=False,
    notices=False,
    path_metadata=False,
    profile="profile",
    proxy="proxy",
    public_access_block_configuration="publicAccessBlockConfiguration",
    qualifier="qualifier",
    role_arn="roleArn",
    show_template=False,
    stacks=["stacks"],
    staging=False,
    strict=False,
    template="template",
    termination_protection=False,
    toolkit_stack_name="toolkitStackName",
    trace=False,
    trust="trust",
    trust_for_lookup="trustForLookup",
    use_previous_parameters=False,
    verbose=False,
    version_reporting=False
)

Attributes

asset_metadata

*” CloudFormation metadata for resources that use assets.

Default:

true

Stability:

experimental

Type:

(experimental) Include “aws

Type:

asset

bootstrap_bucket_name

(experimental) The name of the CDK toolkit bucket;

bucket will be created and must not exist

Default:
  • auto-generated CloudFormation name

Stability:

experimental

bootstrap_customer_key

(experimental) Create a Customer Master Key (CMK) for the bootstrap bucket (you will be charged but can customize permissions, modern bootstrapping only).

Default:

undefined

Stability:

experimental

bootstrap_kms_key_id

(experimental) AWS KMS master key ID used for the SSE-KMS encryption.

Default:

undefined

Stability:

experimental

ca_bundle_path

(experimental) Path to CA certificate to use when validating HTTPS requests.

Default:
  • read from AWS_CA_BUNDLE environment variable

Stability:

experimental

cfn_execution_policy

(experimental) The Managed Policy ARNs that should be attached to the role performing deployments into this environment (may be repeated, modern bootstrapping only).

Default:
  • none

Stability:

experimental

color

(experimental) Show colors and other style from console output.

Default:
  • true unless the environment variable NO_COLOR is set

Stability:

experimental

context

(experimental) Additional context.

Default:
  • no additional context

Stability:

experimental

custom_permissions_boundary

(experimental) Use the permissions boundary specified by name.

Default:

undefined

Stability:

experimental

debug

(experimental) enable emission of additional debugging information, such as creation stack traces of tokens.

Default:

false

Stability:

experimental

ec2_creds

(experimental) Force trying to fetch EC2 instance credentials.

Default:
  • guess EC2 instance status

Stability:

experimental

environments

(experimental) The target AWS environments to deploy the bootstrap stack to.

Uses the following format: aws://<account-id>/<region>

Default:
  • Bootstrap all environments referenced in the CDK app or determine an environment from local configuration.

Stability:

experimental

Example:

"aws://123456789012/us-east-1"
example_permissions_boundary

(experimental) Use the example permissions boundary.

Default:

undefined

Stability:

experimental

execute

(experimental) Whether to execute ChangeSet (–no-execute will NOT execute the ChangeSet).

Default:

true

Stability:

experimental

force

(experimental) Always bootstrap even if it would downgrade template version.

Default:

false

Stability:

experimental

ignore_errors

(experimental) Ignores synthesis errors, which will likely produce an invalid output.

Default:

false

Stability:

experimental

json

(experimental) Use JSON output instead of YAML when templates are printed to STDOUT.

Default:

false

Stability:

experimental

lookups

(experimental) Perform context lookups.

Synthesis fails if this is disabled and context lookups need to be performed

Default:

true

Stability:

experimental

notices

(experimental) Show relevant notices.

Default:

true

Stability:

experimental

path_metadata

path” CloudFormation metadata for each resource.

Default:

true

Stability:

experimental

Type:

(experimental) Include “aws

Type:

cdk

profile

(experimental) Use the indicated AWS profile as the default environment.

Default:
  • no profile is used

Stability:

experimental

proxy

(experimental) Use the indicated proxy.

Will read from HTTPS_PROXY environment if specified

Default:
  • no proxy

Stability:

experimental

public_access_block_configuration

(experimental) Block public access configuration on CDK toolkit bucket (enabled by default).

Default:

undefined

Stability:

experimental

qualifier

(experimental) String which must be unique for each bootstrap stack.

You must configure it on your CDK app if you change this from the default.

Default:

undefined

Stability:

experimental

role_arn

(experimental) Role to pass to CloudFormation for deployment.

Default:
  • use the bootstrap cfn-exec role

Stability:

experimental

show_template

(experimental) Instead of actual bootstrapping, print the current CLI’s bootstrapping template to stdout for customization.

Default:

false

Stability:

experimental

stacks

(experimental) List of stacks to deploy.

Default:
  • all stacks

Stability:

experimental

staging

(experimental) Copy assets to the output directory.

Needed for local debugging the source files with SAM CLI

Default:

false

Stability:

experimental

strict

(experimental) Do not construct stacks with warnings.

Default:

false

Stability:

experimental

template

(experimental) Use the template from the given file instead of the built-in one (use –show-template to obtain an example).

Stability:

experimental

termination_protection

(experimental) Toggle CloudFormation termination protection on the bootstrap stacks.

Default:

false

Stability:

experimental

toolkit_stack_name

(experimental) The name of the CDK toolkit stack to create.

Stability:

experimental

trace

(experimental) Print trace for stack warnings.

Default:

false

Stability:

experimental

trust

(experimental) The AWS account IDs that should be trusted to perform deployments into this environment (may be repeated, modern bootstrapping only).

Default:

undefined

Stability:

experimental

trust_for_lookup

(experimental) The AWS account IDs that should be trusted to look up values in this environment (may be repeated, modern bootstrapping only).

Default:

undefined

Stability:

experimental

use_previous_parameters

(experimental) Use previous values for existing parameters (you must specify all parameters on every deployment if this is disabled).

Default:

true

Stability:

experimental

verbose

(experimental) show debug logs.

Default:

false

Stability:

experimental

version_reporting

(experimental) Include “AWS::CDK::Metadata” resource in synthesized templates.

Default:

true

Stability:

experimental