CloudAssemblyBuilder

class aws_cdk.cx_api.CloudAssemblyBuilder(outdir=None, *, asset_outdir=None, parent_builder=None)

Bases: object

Can be used to build a cloud assembly.

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.cx_api as cx_api

# cloud_assembly_builder_: cx_api.CloudAssemblyBuilder

cloud_assembly_builder = cx_api.CloudAssemblyBuilder("outdir",
    asset_outdir="assetOutdir",
    parent_builder=cloud_assembly_builder_
)

Initializes a cloud assembly builder.

Parameters:
  • outdir (Optional[str]) – The output directory, uses temporary directory if undefined.

  • asset_outdir (Optional[str]) – Use the given asset output directory. Default: - Same as the manifest outdir

  • parent_builder (Optional[CloudAssemblyBuilder]) – If this builder is for a nested assembly, the parent assembly builder. Default: - This is a root assembly

Methods

add_artifact(id, *, type, dependencies=None, display_name=None, environment=None, metadata=None, properties=None)

Adds an artifact into the cloud assembly.

Parameters:
  • id (str) – The ID of the artifact.

  • type (ArtifactType) – The type of artifact.

  • dependencies (Optional[Sequence[str]]) – IDs of artifacts that must be deployed before this artifact. Default: - no dependencies.

  • display_name (Optional[str]) – A string that represents this artifact. Should only be used in user interfaces. Default: - no display name

  • environment (Optional[str]) – The environment into which this artifact is deployed. Default: - no envrionment.

  • metadata (Optional[Mapping[str, Sequence[Union[MetadataEntry, Dict[str, Any]]]]]) – Associated metadata. Default: - no metadata.

  • properties (Union[AwsCloudFormationStackProperties, Dict[str, Any], AssetManifestProperties, TreeArtifactProperties, NestedCloudAssemblyProperties, None]) – The set of properties for this artifact (depends on type). Default: - no properties.

Return type:

None

add_missing(*, key, props, provider)

Reports that some context is missing in order for this cloud assembly to be fully synthesized.

Parameters:
Return type:

None

build_assembly(*, runtime_info=None)

Finalizes the cloud assembly into the output directory returns a CloudAssembly object that can be used to inspect the assembly.

Parameters:

runtime_info (Union[RuntimeInfo, Dict[str, Any], None]) – (deprecated) Include the specified runtime information (module versions) in manifest. Default: - if this option is not specified, runtime info will not be included

Return type:

CloudAssembly

create_nested_assembly(artifact_id, display_name)

Creates a nested cloud assembly.

Parameters:
  • artifact_id (str) –

  • display_name (str) –

Return type:

CloudAssemblyBuilder

delete()

Delete the cloud assembly directory.

Return type:

None

Attributes

asset_outdir

The directory where assets of this Cloud Assembly should be stored.

outdir

The root directory of the resulting cloud assembly.