@aws-cdk_cx-api.CloudAssembly

class CloudAssembly

LanguageType name
.NETAmazon.CDK.CXAPI.CloudAssembly
Javasoftware.amazon.awscdk.cxapi.CloudAssembly
Pythonaws_cdk.cx_api.CloudAssembly
TypeScript (source)@aws-cdk/cx-api » CloudAssembly

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 * as cx_api from '@aws-cdk/cx-api';
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 LoadManifestOptions

Reads a cloud assembly from the specified directory.

Properties

NameTypeDescription
artifactsCloudArtifact[]All artifacts included in this assembly.
directorystringThe root directory of the cloud assembly.
manifestAssemblyManifestThe raw assembly manifest.
nestedAssembliesNestedCloudAssemblyArtifact[]The nested assembly artifacts in this assembly.
runtimeRuntimeInfoRuntime information such as module versions used to synthesize this assembly.
stacksCloudFormationStackArtifact[]
stacksRecursivelyCloudFormationStackArtifact[]Returns all the stacks, including the ones in nested assemblies.
versionstringThe schema version of the assembly manifest.

artifacts

Type: CloudArtifact[]

All artifacts included in this assembly.


directory

Type: string

The root directory of the cloud assembly.


manifest

Type: AssemblyManifest

The raw assembly manifest.


nestedAssemblies

Type: NestedCloudAssemblyArtifact[]

The nested assembly artifacts in this assembly.


runtime

Type: RuntimeInfo

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


stacks

Type: CloudFormationStackArtifact[]


stacksRecursively

Type: CloudFormationStackArtifact[]

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


version

Type: string

The schema version of the assembly manifest.

Methods

NameDescription
getNestedAssembly(artifactId)Returns a nested assembly.
getNestedAssemblyArtifact(artifactId)Returns a nested assembly artifact.
getStack(stackName)⚠️Returns a CloudFormation stack artifact by name from this assembly.
getStackArtifact(artifactId)Returns a CloudFormation stack artifact from this assembly.
getStackByName(stackName)Returns a CloudFormation stack artifact from this assembly.
tree()Returns the tree metadata artifact from this assembly.
tryGetArtifact(id)Attempts to find an artifact with a specific identity.

getNestedAssembly(artifactId)

public getNestedAssembly(artifactId: string): CloudAssembly

Parameters

  • artifactId string — The artifact ID of the nested assembly.

Returns

  • CloudAssembly

Returns a nested assembly.


getNestedAssemblyArtifact(artifactId)

public getNestedAssemblyArtifact(artifactId: string): NestedCloudAssemblyArtifact

Parameters

  • artifactId string — The artifact ID of the nested assembly.

Returns

  • NestedCloudAssemblyArtifact

Returns a nested assembly artifact.


getStack(stackName)⚠️

public getStack(stackName: string): CloudFormationStackArtifact

⚠️ Deprecated: renamed to getStackByName (or getStackArtifact(id))

Parameters

  • stackName string

Returns

  • CloudFormationStackArtifact

Returns a CloudFormation stack artifact by name from this assembly.


getStackArtifact(artifactId)

public getStackArtifact(artifactId: string): CloudFormationStackArtifact

Parameters

  • artifactId string — the artifact id of the stack (can be obtained through stack.artifactId).

Returns

  • CloudFormationStackArtifact

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

  • CloudFormationStackArtifact

Returns a CloudFormation stack artifact from this assembly.

Will only search the current assembly.


tree()

public tree(): TreeCloudArtifact

Returns

  • TreeCloudArtifact

Returns the tree metadata artifact from this assembly.


tryGetArtifact(id)

public tryGetArtifact(id: string): CloudArtifact

Parameters

  • id string — The artifact ID.

Returns

  • CloudArtifact

Attempts to find an artifact with a specific identity.