class CloudAssembly
| Language | Type name |
|---|---|
.NET | Amazon.CDK.CXAPI.CloudAssembly |
Go | github.com/aws/aws-cdk-go/awscdk/v2/cxapi#CloudAssembly |
Java | software.amazon.awscdk.cxapi.CloudAssembly |
Python | aws_cdk.cx_api.CloudAssembly |
TypeScript (source) | aws-cdk-lib » cx_api » CloudAssembly |
Implements
ICloud
Represents a deployable cloud application.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { cx_api } from 'aws-cdk-lib';
const cloudAssembly = new cx_api.CloudAssembly('directory', /* all optional props */ {
skipEnumCheck: false,
skipVersionCheck: false,
topoSort: false,
});
Initializer
new CloudAssembly(directory: string, loadOptions?: LoadManifestOptions)
Parameters
- directory
string— The root directory of the assembly. - loadOptions
LoadManifest Options
Reads a cloud assembly from the specified directory.
Properties
| Name | Type | Description |
|---|---|---|
| artifacts | Cloud[] | All artifacts included in this assembly. |
| directory | string | The root directory of the cloud assembly. |
| manifest | Assembly | The raw assembly manifest. |
| nested | Nested[] | The nested assembly artifacts in this assembly. |
| runtime | Runtime | Runtime information such as module versions used to synthesize this assembly. |
| stacks | Cloud[] | |
| stacks | Cloud[] | Returns all the stacks, including the ones in nested assemblies. |
| version | string | The schema version of the assembly manifest. |
artifacts
Type:
Cloud[]
All artifacts included in this assembly.
directory
Type:
string
The root directory of the cloud assembly.
manifest
Type:
Assembly
The raw assembly manifest.
nestedAssemblies
Type:
Nested[]
The nested assembly artifacts in this assembly.
runtime
Type:
Runtime
Runtime information such as module versions used to synthesize this assembly.
stacks
Type:
Cloud[]
stacksRecursively
Type:
Cloud[]
Returns all the stacks, including the ones in nested assemblies.
version
Type:
string
The schema version of the assembly manifest.
Methods
| Name | Description |
|---|---|
| get | Returns a nested assembly. |
| get | Returns a nested assembly artifact. |
| get | Returns a CloudFormation stack artifact from this assembly. |
| get | Returns a CloudFormation stack artifact from this assembly. |
| tree() | Returns the tree metadata artifact from this assembly. |
| try | Attempts to find an artifact with a specific identity. |
| static is | Return whether the given object is a CloudAssembly. |
getNestedAssembly(artifactId)
public getNestedAssembly(artifactId: string): CloudAssembly
Parameters
- artifactId
string— The artifact ID of the nested assembly.
Returns
Returns a nested assembly.
getNestedAssemblyArtifact(artifactId)
public getNestedAssemblyArtifact(artifactId: string): NestedCloudAssemblyArtifact
Parameters
- artifactId
string— The artifact ID of the nested assembly.
Returns
Returns a nested assembly artifact.
getStackArtifact(artifactId)
public getStackArtifact(artifactId: string): CloudFormationStackArtifact
Parameters
- artifactId
string— the artifact id of the stack (can be obtained throughstack.artifactId).
Returns
Returns a CloudFormation stack artifact from this assembly.
getStackByName(stackName)
public getStackByName(stackName: string): CloudFormationStackArtifact
Parameters
- stackName
string— the name of the CloudFormation stack.
Returns
Returns a CloudFormation stack artifact from this assembly.
Will only search the current assembly.
tree()
public tree(): TreeCloudArtifact
Returns
Returns the tree metadata artifact from this assembly.
tryGetArtifact(id)
public tryGetArtifact(id: string): CloudArtifact
Parameters
- id
string— The artifact ID.
Returns
Attempts to find an artifact with a specific identity.
static isCloudAssembly(x)
public static isCloudAssembly(x: any): boolean
Parameters
- x
any
Returns
boolean
Return whether the given object is a CloudAssembly.
We do attribute detection since we can't reliably use 'instanceof'.

.NET
Go
Java
Python
TypeScript (