aws_ddk_core.base.BaseStack¶
- class aws_ddk_core.base.BaseStack(*args: Any, **kwargs)¶
Base Stack to inherit from.
Includes configurable termination protection, synthesizer, permissions boundary and tags.
- __init__(scope: constructs.Construct, id: str, environment_id: str, termination_protection: Optional[bool] = None, permissions_boundary_arn: Optional[str] = None, synthesizer: Optional[aws_cdk.DefaultStackSynthesizer] = None, **kwargs: Any) None¶
Create a stack.
Includes termination protection settings, multi-level (application, environment, and stack-level) tags, and permissions boundary.
- Parameters
scope (Construct) – Scope within which this construct is defined
id (str) – Identifier of the stack
environment_id (str) – Identifier of the environment
termination_protection (str) – Stack termination protection
permissions_boundary_arn (Optional[str]) – ARN of the permissions boundary managed policy
synthesizer (Optional[DefaultStackSynthesizer]) – CDK synthesizer configuration https://docs.aws.amazon.com/cdk/v2/guide/bootstrapping.html#bootstrapping-synthesizers
kwargs (Any) – Additional arguments
Configuration (Supported DDK Environment) –
https (//awslabs.github.io/aws-ddk/release/latest/how-to/ddk-configuration.html) –
---------- –
prefix (str) – Prefix for stack identifier.
qualifier (str) – Qualifier to disambiguate multiple environments in the same account. You can use this and leave the other naming properties empty if you have deployed the bootstrap environment with standard names but only differnet qualifiers
termination_protection – If this value is set, stack termination protection will be enabled.
tags (Dict[str, str]) – Tag key/value pairs.
Methods
__init__(scope, id, environment_id[, ...])Create a stack.
add_dependency(target[, reason])Add a dependency between this stack and another stack.
add_transform(transform)Add a Transform to this stack.
export_value(exported_value, *[, name])Create a CloudFormation Export for a value.
format_arn(*, resource, service[, account, ...])Creates an ARN from components.
get_logical_id(element)Allocates a stack-unique CloudFormation-compatible logical identity for a specific resource.
is_construct(x)Checks if
xis a construct.is_stack(x)Return whether the given object is a Stack.
of(construct)Looks up the first stack scope in which
constructis defined.regional_fact(fact_name[, default_value])Look up a fact value for the given fact for the region of this stack.
rename_logical_id(old_id, new_id)Rename a generated logical identities.
report_missing_context_key(*, key, props, ...)Indicate that a context key was expected.
resolve(obj)Resolve a tokenized value in the context of the current stack.
split_arn(arn, arn_format)Splits the provided ARN into its components.
to_json_string(obj[, space])Convert an object, potentially containing tokens, to a JSON string.
to_string()Returns a string representation of this construct.
Attributes
accountThe AWS account into which this stack will be deployed.
artifact_idThe ID of the cloud assembly artifact for this stack.
availability_zonesReturns the list of AZs that are available in the AWS environment (account/region) associated with this stack.
bundling_requiredIndicates whether the stack requires bundling or not.
dependenciesReturn the stacks this stack depends on.
environmentThe environment coordinates in which this stack is deployed.
nestedIndicates if this is a nested stack, in which case
parentStackwill include a reference to it's parent.nested_stack_parentIf this is a nested stack, returns it's parent stack.
nested_stack_resourceIf this is a nested stack, this represents its
AWS::CloudFormation::Stackresource.nodeThe tree node.
notification_arnsReturns the list of notification Amazon Resource Names (ARNs) for the current stack.
partitionThe partition in which this stack is defined.
regionThe AWS region into which this stack will be deployed (e.g.
stack_idThe ID of the stack.
stack_nameThe concrete CloudFormation physical stack name.
synthesizerSynthesis method for this stack.
tagsTags to be applied to the stack.
template_fileThe name of the CloudFormation template file emitted to the output directory during synthesis.
template_optionsOptions for CloudFormation template (like version, transform, description).
termination_protectionWhether termination protection is enabled for this stack.
url_suffixThe Amazon domain suffix for the region in which this stack is defined.