CloudFormationStackArtifact

class aws_cdk.cx_api.CloudFormationStackArtifact(assembly, artifact_id, *, type, dependencies=None, display_name=None, environment=None, metadata=None, properties=None)

Bases: aws_cdk.cx_api.CloudArtifact

Parameters
  • assembly (CloudAssembly) –

  • artifact_id (str) –

  • type (ArtifactType) – The type of artifact.

  • dependencies (Optional[Sequence[str]]) – IDs of artifacts that must be deployed before this artifact. Default: - no dependencies.

  • display_name (Optional[str]) – A string that represents this artifact. Should only be used in user interfaces. Default: - no display name

  • environment (Optional[str]) – The environment into which this artifact is deployed. Default: - no envrionment.

  • metadata (Optional[Mapping[str, Sequence[MetadataEntry]]]) – Associated metadata. Default: - no metadata.

  • properties (Union[AwsCloudFormationStackProperties, AssetManifestProperties, TreeArtifactProperties, NestedCloudAssemblyProperties, None]) – The set of properties for this artifact (depends on type). Default: - no properties.

Methods

find_metadata_by_type(type)
Parameters

type (str) –

Return type

List[MetadataEntryResult]

Returns

all the metadata entries of a specific type in this artifact.

Attributes

assembly
Return type

CloudAssembly

assets

Any assets associated with this stack.

Return type

List[Union[FileAssetMetadataEntry, ContainerImageAssetMetadataEntry]]

assume_role_arn

The role that needs to be assumed to deploy the stack.

Default
  • No role is assumed (current credentials are used)

Return type

Optional[str]

bootstrap_stack_version_ssm_parameter

Name of SSM parameter with bootstrap stack version.

Default
  • Discover SSM parameter by reading stack

Return type

Optional[str]

cloud_formation_execution_role_arn

The role that is passed to CloudFormation to execute the change set.

Default
  • No role is passed (currently assumed role/credentials are used)

Return type

Optional[str]

dependencies

Returns all the artifacts that this artifact depends on.

Return type

List[CloudArtifact]

display_name

A string that represents this stack.

Should only be used in user interfaces. If the stackName and artifactId are the same, it will just return that. Otherwise, it will return something like ” ()”

Return type

str

environment

The environment into which to deploy this artifact.

Return type

Environment

hierarchical_id

An identifier that shows where this artifact is located in the tree of nested assemblies, based on their manifests.

Defaults to the normal id. Should only be used in user interfaces.

Return type

str

id
Return type

str

manifest

The artifact’s manifest.

Return type

ArtifactManifest

messages

The set of messages extracted from the artifact’s metadata.

Return type

List[SynthesisMessage]

name

(deprecated) The physical name of this stack.

Deprecated

renamed to stackName

Stability

deprecated

Return type

str

original_name

The original name as defined in the CDK app.

Return type

str

parameters

CloudFormation parameters to pass to the stack.

Return type

Mapping[str, str]

requires_bootstrap_stack_version

Version of bootstrap stack required to deploy this stack.

Default
  • No bootstrap stack required

Return type

Union[int, float, None]

stack_name

The physical name of this stack.

Return type

str

stack_template_asset_object_url

If the stack template has already been included in the asset manifest, its asset URL.

Default
  • Not uploaded yet, upload just before deploying

Return type

Optional[str]

tags

CloudFormation tags to pass to the stack.

Return type

Mapping[str, str]

template

The CloudFormation template for this stack.

Return type

Any

template_file

The file name of the template.

Return type

str

template_full_path

Full path to the template file.

Return type

str

termination_protection

Whether termination protection is enabled for this stack.

Return type

Optional[bool]

validate_on_synth

Whether this stack should be validated by the CLI after synthesis.

Default
  • false

Return type

Optional[bool]

Static Methods

classmethod from_manifest(assembly, id, *, type, dependencies=None, display_name=None, environment=None, metadata=None, properties=None)

Returns a subclass of CloudArtifact based on the artifact type defined in the artifact manifest.

Parameters
  • assembly (CloudAssembly) – The cloud assembly from which to load the artifact.

  • id (str) – The artifact ID.

  • type (ArtifactType) – The type of artifact.

  • dependencies (Optional[Sequence[str]]) – IDs of artifacts that must be deployed before this artifact. Default: - no dependencies.

  • display_name (Optional[str]) – A string that represents this artifact. Should only be used in user interfaces. Default: - no display name

  • environment (Optional[str]) – The environment into which this artifact is deployed. Default: - no envrionment.

  • metadata (Optional[Mapping[str, Sequence[MetadataEntry]]]) – Associated metadata. Default: - no metadata.

  • properties (Union[AwsCloudFormationStackProperties, AssetManifestProperties, TreeArtifactProperties, NestedCloudAssemblyProperties, None]) – The set of properties for this artifact (depends on type). Default: - no properties.

Return type

Optional[CloudArtifact]

Returns

the CloudArtifact that matches the artifact type or undefined if it’s an artifact type that is unrecognized by this module.