IStackSynthesizer
- Implemented By: DefaultStackSynthesizer, StackSynthesizer, IBoundStackSynthesizer, IReusableStackSynthesizer, IStackSynthesizer
Encodes information how a certain Stack should be deployed.
Methods
Name | Description |
---|---|
add_file_asset |
Register a File Asset. |
bind |
Bind to the stack this environment is going to be used on. |
synthesize |
Synthesize the associated stack to the session. |
add_file_asset
def add_file_asset(
source_hash: str,
deploy_time: bool = None,
executable: typing.List[str] = None,
file_name: str = None,
packaging: FileAssetPackaging = None
) -> FileAssetLocation
Register a File Asset.
Returns the parameters that can be used to refer to the asset inside the template.
- Type: str
A hash on the content source.
This hash is used to uniquely identify this asset throughout the system. If this value doesn't change, the asset will not be rebuilt or republished.
- Type: bool
- Default: false
Whether or not the asset needs to exist beyond deployment time;
i.e. are copied over to a different location and not needed afterwards. Setting this property to true has an impact on the lifecycle of the asset, because we will assume that it is safe to delete after the ROS deployment succeeds.
For example, FC Function assets are copied over to FC during deployment. Therefore, it is not necessary to store the asset in OSS bucket, so we consider those deployTime assets.
- Type: typing.List[str]
- Default: Exactly one of
fileName
andexecutable
is required
An external command that will produce the packaged asset.
The command should produce the location of a ZIP file on stdout
.
- Type: str
- Default: Exactly one of
fileName
andexecutable
is required
The path, relative to the root of the cloud assembly, in which this asset source resides.
This can be a path to a file or a directory, depending on the packaging type.
- Type: FileAssetPackaging
- Default: Required if
fileName
is specified.
Which type of packaging to perform.
bind
def bind(
stack: Stack
) -> None
Bind to the stack this environment is going to be used on.
Must be called before any of the other methods are called.
- Type: Stack
synthesize
def synthesize(
session: ISynthesisSession
) -> None
Synthesize the associated stack to the session.
- Type: ISynthesisSession