CloudAssemblyBuilder
- class aws_cdk.cx_api.CloudAssemblyBuilder(outdir=None, *, asset_outdir=None, parent_builder=None)
Bases:
objectCan 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 outdirparent_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, additional_metadata_file=None, 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.additional_metadata_file (
Optional[str]) – A file with additional metadata entries. The schema of this file is exactly the same as the type of themetadatafield. In other words, that file contains an object mapping construct paths to arrays of metadata entries. Default: - no additional metadatadependencies (
Optional[Sequence[str]]) – IDs of artifacts that must be deployed before this artifact. Default: - no dependencies.display_name (
Optional[str]) – A string that can be shown to a user to uniquely identify this artifact inside a cloud assembly tree. Is used by the CLI to present a list of stacks to the user in a way that makes sense to them. Even though the property name “display name” doesn’t imply it, this field is used to select stacks as well, so all stacks should have a unique display name. Default: - no display nameenvironment (
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. Metadata can be stored directly in the assembly manifest, as well as in a separate file (seeadditionalMetadataFile). It should prefer to be stored in the additional file, as that will reduce the size of the assembly manifest in cases of a lot of metdata (which CDK does emit by default). Default: - no metadata.properties (
Union[AwsCloudFormationStackProperties,Dict[str,Any],AssetManifestProperties,TreeArtifactProperties,NestedCloudAssemblyProperties,FeatureFlagReportProperties,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:
key (
str) – The missing context key.props (
Union[AmiContextQuery,Dict[str,Any],AvailabilityZonesContextQuery,HostedZoneContextQuery,SSMParameterContextQuery,VpcContextQuery,EndpointServiceAvailabilityZonesContextQuery,LoadBalancerContextQuery,LoadBalancerListenerContextQuery,SecurityGroupContextQuery,KeyContextQuery,CcApiContextQuery,PluginContextQuery]) – A set of provider-specific options.provider (
ContextProvider) – The provider from which we expect this context key to be obtained.
- Return type:
None
- build_assembly(*, runtime_info=None)
Finalizes the cloud assembly into the output directory returns a
CloudAssemblyobject 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:
- create_nested_assembly(artifact_id, display_name)
Creates a nested cloud assembly.
- Parameters:
artifact_id (
str)display_name (
str)
- Return type:
- 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.