software.amazon.awscdk.cli.lib.alpha.ICloudAssemblyDirectoryProducer Maven / Gradle / Ivy
Show all versions of cdk-cli-lib-alpha Show documentation
package software.amazon.awscdk.cli.lib.alpha;
/**
* (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.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-10-05T03:43:53.007Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.cli.lib.alpha.$Module.class, fqn = "@aws-cdk/cli-lib-alpha.ICloudAssemblyDirectoryProducer")
@software.amazon.jsii.Jsii.Proxy(ICloudAssemblyDirectoryProducer.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface ICloudAssemblyDirectoryProducer extends software.amazon.jsii.JsiiSerializable {
/**
* (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
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getWorkingDirectory() {
return null;
}
/**
* (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
*/
@software.amazon.jsii.Optional
default void setWorkingDirectory(final @org.jetbrains.annotations.Nullable java.lang.String value) {
throw new UnsupportedOperationException("'void " + getClass().getCanonicalName() + "#setWorkingDirectory(@org.jetbrains.annotations.Nullable java.lang.String)' is not implemented!");
}
/**
* (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:
*
*
* public class MyProducer implements ICloudAssemblyDirectoryProducer {
* public Promise produce(Map<String, Object> context) {
* App app = App.Builder.create().context(context).build();
* // create stacks here
* return app.synth().getDirectory();
* }
* }
*
*
* @param context This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.lang.String produce(final @org.jetbrains.annotations.NotNull java.util.Map context);
/**
* A proxy class which represents a concrete javascript instance of this type.
*/
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.awscdk.cli.lib.alpha.ICloudAssemblyDirectoryProducer.Jsii$Default {
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
/**
* (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
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public final @org.jetbrains.annotations.Nullable java.lang.String getWorkingDirectory() {
return software.amazon.jsii.Kernel.get(this, "workingDirectory", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* (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
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public final void setWorkingDirectory(final @org.jetbrains.annotations.Nullable java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "workingDirectory", value);
}
/**
* (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:
*
*
* public class MyProducer implements ICloudAssemblyDirectoryProducer {
* public Promise produce(Map<String, Object> context) {
* App app = App.Builder.create().context(context).build();
* // create stacks here
* return app.synth().getDirectory();
* }
* }
*
*
* @param context This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public final @org.jetbrains.annotations.NotNull java.lang.String produce(final @org.jetbrains.annotations.NotNull java.util.Map context) {
return software.amazon.jsii.Kernel.asyncCall(this, "produce", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(context, "context is required") });
}
}
/**
* Internal default implementation for {@link ICloudAssemblyDirectoryProducer}.
*/
@software.amazon.jsii.Internal
interface Jsii$Default extends ICloudAssemblyDirectoryProducer {
/**
* (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
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getWorkingDirectory() {
return software.amazon.jsii.Kernel.get(this, "workingDirectory", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* (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
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default void setWorkingDirectory(final @org.jetbrains.annotations.Nullable java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "workingDirectory", value);
}
/**
* (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:
*
*
* public class MyProducer implements ICloudAssemblyDirectoryProducer {
* public Promise produce(Map<String, Object> context) {
* App app = App.Builder.create().context(context).build();
* // create stacks here
* return app.synth().getDirectory();
* }
* }
*
*
* @param context This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
default @org.jetbrains.annotations.NotNull java.lang.String produce(final @org.jetbrains.annotations.NotNull java.util.Map context) {
return software.amazon.jsii.Kernel.asyncCall(this, "produce", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(context, "context is required") });
}
}
}