Interface ICloudAssemblyDirectoryProducer
(experimental) A class returning the path to a Cloud Assembly Directory when its produce
method is invoked with the current context AWS CDK apps might need to be synthesized multiple times with additional context values before they are ready.
Namespace: Amazon.CDK.Cli.Lib.Alpha
Assembly: Amazon.CDK.Cli.Lib.Alpha.dll
Syntax (csharp)
public interface ICloudAssemblyDirectoryProducer
Syntax (vb)
Public Interface ICloudAssemblyDirectoryProducer
Remarks
When running the CLI from inside a directory, this is implemented by invoking the app multiple times.
Here the produce()
method provides this multi-pass ability.
Stability: Experimental
Synopsis
Properties
WorkingDirectory | (experimental) The working directory used to run the Cloud Assembly from. |
Methods
Produce(IDictionary<String, Object>) | (experimental) Synthesize a Cloud Assembly directory for a given context. |
Properties
WorkingDirectory
(experimental) The working directory used to run the Cloud Assembly from.
virtual string WorkingDirectory { get; set; }
Property Value
System.String
Remarks
This is were a cdk.context.json
files will be written.
Default: - current working directory
Stability: Experimental
Methods
Produce(IDictionary<String, Object>)
(experimental) Synthesize a Cloud Assembly directory for a given context.
string Produce(IDictionary<string, object> context)
Parameters
- context System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.String
Remarks
For all features to work correctly, cdk.App()
must be instantiated with the received context values in the method body.
Usually obtained similar to this:
class MyProducer : ICloudAssemblyDirectoryProducer
{
public Promise Produce(IDictionary<string, object> context)
{
var app = new App(new AppProps { Context = context });
// create stacks here
return app.Synth().Directory;
}
}
Stability: Experimental