CloudAssembly

class aws_cdk.cx_api.CloudAssembly(directory)

Bases: object

Represents a deployable cloud application.

stability :stability: experimental

__init__(directory)

Reads a cloud assembly from the specified directory.

Parameters

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

stability :stability: experimental

Return type

None

Methods

get_stack(stack_name)

Returns a CloudFormation stack artifact by name from this assembly.

Parameters

stack_name (str) –

deprecated :deprecated: renamed to getStackByName (or getStackArtifact(id))

stability :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 :rtype: CloudFormationStackArtifact :return: a CloudFormationStackArtifact object.

stability :stability: experimental throws: :throws:: if there is no stack artifact with that id

get_stack_by_name(stack_name)

Returns a CloudFormation stack artifact from this assembly.

Parameters

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

return :rtype: CloudFormationStackArtifact :return: a CloudFormationStackArtifact object.

stability :stability: experimental throws: :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 :rtype: Optional[TreeCloudArtifact] :return: a TreeCloudArtifact object if there is one defined in the manifest, undefined otherwise.

stability :stability: experimental throws: :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 :rtype: Optional[CloudArtifact] :return: A CloudArtifact object or undefined if the artifact does not exist in this assembly.

stability :stability: experimental

Attributes

artifacts

All artifacts included in this assembly.

stability :stability: experimental

Return type

List[CloudArtifact]

directory

The root directory of the cloud assembly.

stability :stability: experimental

Return type

str

manifest

The raw assembly manifest.

stability :stability: experimental

Return type

AssemblyManifest

runtime

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

stability :stability: experimental

Return type

RuntimeInfo

stacks

return :rtype: List[CloudFormationStackArtifact] :return: all the CloudFormation stack artifacts that are included in this assembly.

stability :stability: experimental

version

The schema version of the assembly manifest.

stability :stability: experimental

Return type

str