CloudAssembly¶
-
class
aws_cdk.cx_api.
CloudAssembly
(directory, *, skip_enum_check=None, skip_version_check=None)¶ Bases:
object
Represents a deployable cloud application.
- 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 = cx_api.CloudAssembly("directory", skip_enum_check=False, skip_version_check=False )
Reads a cloud assembly from the specified directory.
- Parameters
directory (
str
) – The root directory of the assembly.skip_enum_check (
Optional
[bool
]) – Skip enum checks. This means you may read enum values you don’t know about yet. Make sure to always check the values of enums you encounter in the manifest. Default: falseskip_version_check (
Optional
[bool
]) – Skip the version check. This means you may read a newer cloud assembly than the CX API is designed to support, and your application may not be aware of all features that in use in the Cloud Assembly. Default: false
Methods
-
get_nested_assembly
(artifact_id)¶ Returns a nested assembly.
- Parameters
artifact_id (
str
) – The artifact ID of the nested assembly.- Return type
-
get_nested_assembly_artifact
(artifact_id)¶ Returns a nested assembly artifact.
- Parameters
artifact_id (
str
) – The artifact ID of the nested assembly.- Return type
-
get_stack
(stack_name)¶ (deprecated) Returns a CloudFormation stack artifact by name from this assembly.
- Parameters
stack_name (
str
) –- Deprecated
renamed to
getStackByName
(orgetStackArtifact(id)
)- Stability
deprecated
- Return type
-
get_stack_artifact
(artifact_id)¶ Returns a CloudFormation stack artifact from this assembly.
- Parameters
artifact_id (
str
) – the artifact id of the stack (can be obtained throughstack.artifactId
).- Return type
- Returns
a
CloudFormationStackArtifact
object.- Throws
if there is no stack artifact with that id
-
get_stack_by_name
(stack_name)¶ Returns a CloudFormation stack artifact from this assembly.
Will only search the current assembly.
- Parameters
stack_name (
str
) – the name of the CloudFormation stack.- Return type
- Returns
a
CloudFormationStackArtifact
object.- Throws
if there is more than one stack with the same stack name. You can use
getStackArtifact(stack.artifactId)
instead.
-
tree
()¶ Returns the tree metadata artifact from this assembly.
- Return type
Optional
[TreeCloudArtifact
]- Returns
a
TreeCloudArtifact
object if there is one defined in the manifest,undefined
otherwise.- Throws
if there is no metadata artifact by that name
-
try_get_artifact
(id)¶ Attempts to find an artifact with a specific identity.
- Parameters
id (
str
) – The artifact ID.- Return type
Optional
[CloudArtifact
]- Returns
A
CloudArtifact
object orundefined
if the artifact does not exist in this assembly.
Attributes
-
artifacts
¶ All artifacts included in this assembly.
- Return type
List
[CloudArtifact
]
-
directory
¶ The root directory of the cloud assembly.
- Return type
str
-
manifest
¶ The raw assembly manifest.
- Return type
-
nested_assemblies
¶ The nested assembly artifacts in this assembly.
- Return type
-
runtime
¶ Runtime information such as module versions used to synthesize this assembly.
- Return type
-
stacks
¶ all the CloudFormation stack artifacts that are included in this assembly.
- Type
return
- Return type
-
stacks_recursively
¶ Returns all the stacks, including the ones in nested assemblies.
- Return type
-
version
¶ The schema version of the assembly manifest.
- Return type
str