CloudAssembly

class aws_cdk.cx_api.CloudAssembly(directory)

Bases: object

Represents a deployable cloud application.

Reads a cloud assembly from the specified directory.

Parameters

directory (str) – The root directory of the assembly.

Methods

get_nested_assembly(artifact_id)

Returns a nested assembly.

Parameters

artifact_id (str) – The artifact ID of the nested assembly.

Return type

CloudAssembly

get_nested_assembly_artifact(artifact_id)

Returns a nested assembly artifact.

Parameters

artifact_id (str) – The artifact ID of the nested assembly.

Return type

NestedCloudAssemblyArtifact

get_stack(stack_name)

(deprecated) Returns a CloudFormation stack artifact by name from this assembly.

Parameters

stack_name (str) –

Deprecated

renamed to getStackByName (or getStackArtifact(id))

Stability

deprecated

Return type

CloudFormationStackArtifact

get_stack_artifact(artifact_id)

Returns a CloudFormation stack artifact from this assembly.

Parameters

artifact_id (str) – the artifact id of the stack (can be obtained through stack.artifactId).

Return type

CloudFormationStackArtifact

Returns

a CloudFormationStackArtifact object.

Throws

if there is no stack artifact with that id

get_stack_by_name(stack_name)

Returns a CloudFormation stack artifact from this assembly.

Will only search the current assembly.

Parameters

stack_name (str) – the name of the CloudFormation stack.

Return type

CloudFormationStackArtifact

Returns

a CloudFormationStackArtifact object.

Throws

if there is more than one stack with the same stack name. You can use getStackArtifact(stack.artifactId) instead.

tree()

Returns the tree metadata artifact from this assembly.

Return type

Optional[TreeCloudArtifact]

Returns

a TreeCloudArtifact object if there is one defined in the manifest, undefined otherwise.

Throws

if there is no metadata artifact by that name

try_get_artifact(id)

Attempts to find an artifact with a specific identity.

Parameters

id (str) – The artifact ID.

Return type

Optional[CloudArtifact]

Returns

A CloudArtifact object or undefined if the artifact does not exist in this assembly.

Attributes

artifacts

All artifacts included in this assembly.

Return type

List[CloudArtifact]

directory

The root directory of the cloud assembly.

Return type

str

manifest

The raw assembly manifest.

Return type

AssemblyManifest

nested_assemblies

The nested assembly artifacts in this assembly.

Return type

List[NestedCloudAssemblyArtifact]

runtime

Runtime information such as module versions used to synthesize this assembly.

Return type

RuntimeInfo

stacks

all the CloudFormation stack artifacts that are included in this assembly.

Type

return

Return type

List[CloudFormationStackArtifact]

stacks_recursively

Returns all the stacks, including the ones in nested assemblies.

Return type

List[CloudFormationStackArtifact]

version

The schema version of the assembly manifest.

Return type

str