Table of Contents

Class CliCredentialsStackSynthesizer

Namespace
Amazon.CDK
Assembly
Amazon.CDK.dll

A synthesizer that uses conventional asset locations, but not conventional deployment roles.

public class CliCredentialsStackSynthesizer : StackSynthesizer, IStackSynthesizer
Inheritance
CliCredentialsStackSynthesizer
Implements
Inherited Members

Examples

// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK;
             var cliCredentialsStackSynthesizer = new CliCredentialsStackSynthesizer(new CliCredentialsStackSynthesizerProps {
                 BucketPrefix = "bucketPrefix",
                 DockerTagPrefix = "dockerTagPrefix",
                 FileAssetsBucketName = "fileAssetsBucketName",
                 ImageAssetsRepositoryName = "imageAssetsRepositoryName",
                 Qualifier = "qualifier"
             });

Remarks

Instead of assuming the bootstrapped deployment roles, all stack operations will be performed using the CLI's current credentials.

    Be aware that your CLI credentials must be valid for the duration of the entire deployment. If you are using session credentials, make sure the session lifetime is long enough.

    By default, expects the environment to have been bootstrapped with just the staging resources of the Bootstrap Stack V2 (also known as "modern bootstrap stack"). You can override the default names using the synthesizer's construction properties.

    ExampleMetadata: fixture=_generated

    Constructors

    CliCredentialsStackSynthesizer(ICliCredentialsStackSynthesizerProps?)

    public CliCredentialsStackSynthesizer(ICliCredentialsStackSynthesizerProps? props = null)

    Parameters

    props ICliCredentialsStackSynthesizerProps

    Methods

    AddDockerImageAsset(IDockerImageAssetSource)

    Register a Docker Image Asset.

    public override IDockerImageAssetLocation AddDockerImageAsset(IDockerImageAssetSource asset)

    Parameters

    asset IDockerImageAssetSource

    Returns

    IDockerImageAssetLocation

    Remarks

    Returns the parameters that can be used to refer to the asset inside the template.

    AddFileAsset(IFileAssetSource)

    Register a File Asset.

    public override IFileAssetLocation AddFileAsset(IFileAssetSource asset)

    Parameters

    asset IFileAssetSource

    Returns

    IFileAssetLocation

    Remarks

    Returns the parameters that can be used to refer to the asset inside the template.

    Bind(Stack)

    Bind to the stack this environment is going to be used on.

    public override void Bind(Stack stack)

    Parameters

    stack Stack

    Remarks

    Must be called before any of the other methods are called.

    Synthesize(ISynthesisSession)

    Synthesize the associated stack to the session.

    public override void Synthesize(ISynthesisSession session)

    Parameters

    session ISynthesisSession