ICloudAssemblyDirectoryProducer
- class aws_cdk.cli_lib_alpha.ICloudAssemblyDirectoryProducer(*args, **kwargs)
Bases:
Protocol
(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.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
Methods
- produce(context)
(experimental) Synthesize a Cloud Assembly directory for a given context.
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:@jsii.implements(ICloudAssemblyDirectoryProducer) class MyProducer: def produce(self, context): app = cdk.App(context=context) # create stacks here return app.synth().directory
- Parameters:
context (
Mapping
[str
,Any
]) –- Stability:
experimental
- Return type:
str
Attributes
- working_directory
(experimental) The working directory used to run the Cloud Assembly from.
This is were a
cdk.context.json
files will be written.- Default:
current working directory
- Stability:
experimental