# CloudAssemblyBuilder

Can be used to build a cloud assembly.

- Source: [`cx-api/lib/legacy-moved.ts`](https://github.com/aws/aws-cdk/blob/v2.276.0/packages/aws-cdk-lib/cx-api/lib/legacy-moved.ts#L624)
- Type last changed: v2.80.0 · 20 May 2023

## Example

```ts
// 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';

declare const cloudAssemblyBuilder_: cx_api.CloudAssemblyBuilder;
const cloudAssemblyBuilder = new cx_api.CloudAssemblyBuilder(/* all optional props */ 'outdir', /* all optional props */ {
  assetOutdir: 'assetOutdir',
  parentBuilder: cloudAssemblyBuilder_,
});
```

## Initializer

```ts
new CloudAssemblyBuilder(outdir?: string, props?: CloudAssemblyBuilderProps)
```

## Properties

- `assetOutdir`: string — The directory where assets of this Cloud Assembly should be stored.

- `outdir`: string — The root directory of the resulting cloud assembly.

## Methods

- `addArtifact(id: string, manifest: ArtifactManifest): void` — Adds an artifact into the cloud assembly.

  **Parameters**

  - `id` — - The ID of the artifact.
  - `manifest` — - The artifact manifest.

- `addMissing(missing: MissingContext): void` — Reports that some context is missing in order for this cloud assembly to be fully synthesized.

  **Parameters**

  - `missing` — - Missing context information.

- `buildAssembly(options?: AssemblyBuildOptions): CloudAssembly` — Finalizes the cloud assembly into the output directory returns a `CloudAssembly` object that can be used to inspect the assembly.

- `createNestedAssembly(artifactId: string, displayName: string): CloudAssemblyBuilder // chainable` — Creates a nested cloud assembly.

- `delete(): void` — Delete the cloud assembly directory.
