DefaultStackSynthesizer
- Implements: IReusableStackSynthesizer, IBoundStackSynthesizer
Uses conventionally named roles and reify asset storage locations.
Initializers
import com.aliyun.ros.cdk.core.DefaultStackSynthesizer;
DefaultStackSynthesizer.Builder.create()
// .bucketPrefix(java.lang.String)
// .fileAssetsBucketName(java.lang.String)
// .qualifier(java.lang.String)
.build();
Name | Type | Description |
---|---|---|
bucketPrefix |
java.lang.String |
bucketPrefix to use while storing OSS Assets. |
fileAssetsBucketName |
java.lang.String |
Name of the OSS bucket to hold file assets. |
qualifier |
java.lang.String |
Qualifier to disambiguate multiple environments in the same account. |
bucketPrefix
Optional
- Type: java.lang.String
- Default: DefaultStackSynthesizer.DEFAULT_FILE_ASSET_PREFIX
bucketPrefix to use while storing OSS Assets.
fileAssetsBucketName
Optional
- Type: java.lang.String
- Default: DefaultStackSynthesizer.DEFAULT_FILE_ASSETS_BUCKET_NAME
Name of the OSS bucket to hold file assets.
You must supply this if you have given a non-standard name to the staging bucket.
The placeholders ${Qualifier}
, ${ALIYUN::AccountId}
and ${ALIYUN::Region}
will
be replaced with the values of qualifier and the stack's account and region,
respectively.
qualifier
Optional
- Type: java.lang.String
Qualifier to disambiguate multiple environments in the same account.
You can use this and leave the other naming properties empty if you have deployed the bootstrap environment with standard names but only differnet qualifiers.
Methods
Name | Description |
---|---|
addFileAsset |
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. |
reusableBind |
Produce a bound Stack Synthesizer for the given stack. |
synthesizeStackArtifacts |
No description. |
addFileAsset
public FileAssetLocation addFileAsset(FileAssetSource asset)
Register a File Asset.
Returns the parameters that can be used to refer to the asset inside the template.
The synthesizer must rely on some out-of-band mechanism to make sure the given files
are actually placed in the returned location before the deployment happens. This can
be by writing the instructions to the asset manifest (for use by the cdk-assets
tool),
by relying on the CLI to upload files (legacy behavior), or some other operator controlled
mechanism.
- Type: FileAssetSource
bind
public void bind(Stack stack)
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
public void synthesize(ISynthesisSession session)
Synthesize the associated stack to the session.
- Type: ISynthesisSession
reusableBind
public IBoundStackSynthesizer reusableBind(Stack stack)
Produce a bound Stack Synthesizer for the given stack.
This method may be called more than once on the same object.
- Type: Stack
synthesizeStackArtifacts
public void synthesizeStackArtifacts(ISynthesisSession session)
- Type: ISynthesisSession
Constants
Name | Type | Description |
---|---|---|
DEFAULT_FILE_ASSET_PREFIX |
java.lang.String |
Default file asset prefix. |
DEFAULT_FILE_ASSETS_BUCKET_NAME |
java.lang.String |
Default file assets bucket name. |
DEFAULT_QUALIFIER |
java.lang.String |
Default ARN qualifier. |
DEFAULT_FILE_ASSET_PREFIX
Required
public java.lang.String getDefaultFileAssetPrefix();
- Type: java.lang.String
Default file asset prefix.
DEFAULT_FILE_ASSETS_BUCKET_NAME
Required
public java.lang.String getDefaultFileAssetsBucketName();
- Type: java.lang.String
Default file assets bucket name.
DEFAULT_QUALIFIER
Required
public java.lang.String getDefaultQualifier();
- Type: java.lang.String
Default ARN qualifier.