software.amazon.awscdk.services.apprunner.alpha.AssetSource Maven / Gradle / Ivy
Show all versions of apprunner-alpha Show documentation
package software.amazon.awscdk.services.apprunner.alpha;
/**
* (experimental) Represents the source from local assets.
*
* Example:
*
*
* // The code below shows an example of how to instantiate this type.
* // The values are placeholders you should change.
* import software.amazon.awscdk.services.apprunner.alpha.*;
* import software.amazon.awscdk.services.ecr.assets.*;
* DockerImageAsset dockerImageAsset;
* AssetSource assetSource = AssetSource.Builder.create()
* .asset(dockerImageAsset)
* // the properties below are optional
* .imageConfiguration(ImageConfiguration.builder()
* .environment(Map.of(
* "environmentKey", "environment"))
* .port(123)
* .startCommand("startCommand")
* .build())
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.60.1 (build 2799dc8)", date = "2022-07-13T22:14:11.911Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.apprunner.alpha.$Module.class, fqn = "@aws-cdk/aws-apprunner-alpha.AssetSource")
public class AssetSource extends software.amazon.awscdk.services.apprunner.alpha.Source {
protected AssetSource(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected AssetSource(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public AssetSource(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.apprunner.alpha.AssetProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* (experimental) Called when the Job is initialized to allow this object to bind.
*
* @param _scope This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.apprunner.alpha.SourceConfig bind(final @org.jetbrains.annotations.NotNull software.constructs.Construct _scope) {
return software.amazon.jsii.Kernel.call(this, "bind", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apprunner.alpha.SourceConfig.class), new Object[] { java.util.Objects.requireNonNull(_scope, "_scope is required") });
}
/**
* (experimental) A fluent builder for {@link software.amazon.awscdk.services.apprunner.alpha.AssetSource}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static Builder create() {
return new Builder();
}
private final software.amazon.awscdk.services.apprunner.alpha.AssetProps.Builder props;
private Builder() {
this.props = new software.amazon.awscdk.services.apprunner.alpha.AssetProps.Builder();
}
/**
* (experimental) Represents the docker image asset.
*
* @return {@code this}
* @param asset Represents the docker image asset. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder asset(final software.amazon.awscdk.services.ecr.assets.DockerImageAsset asset) {
this.props.asset(asset);
return this;
}
/**
* (experimental) The image configuration for the image built from the asset.
*
* Default: - no image configuration will be passed. The default `port` will be 8080.
*
* @return {@code this}
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-imageconfiguration.html#cfn-apprunner-service-imageconfiguration-port
* @param imageConfiguration The image configuration for the image built from the asset. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder imageConfiguration(final software.amazon.awscdk.services.apprunner.alpha.ImageConfiguration imageConfiguration) {
this.props.imageConfiguration(imageConfiguration);
return this;
}
/**
* @returns a newly built instance of {@link software.amazon.awscdk.services.apprunner.alpha.AssetSource}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public software.amazon.awscdk.services.apprunner.alpha.AssetSource build() {
return new software.amazon.awscdk.services.apprunner.alpha.AssetSource(
this.props.build()
);
}
}
}