io.github.cdklabs.cdk.docker.image.deployment.Source Maven / Gradle / Ivy
Show all versions of cdk-docker-image-deployment Show documentation
package io.github.cdklabs.cdk.docker.image.deployment;
/**
* Specifies docker image deployment source.
*
* Usage:
*
*
* import * as path from 'path';
* const path = path.join(__dirname, 'path/to/directory');
* const sourceDirectory = Source.directory(path);
*
*
* or with additional assetOptions
*
*
* import * as path from 'path';
* const path = path.join(__dirname, 'path/to/directory');
* const sourceDirectory = Source.directory(path, {
* file: 'Dockerfile.api',
* buildArgs: {
* HTTP_PROXY: 'http://10.20.30.2:1234'
* }
* })
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-23T00:27:49.368Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.docker.image.deployment.$Module.class, fqn = "cdk-docker-image-deployment.Source")
public abstract class Source extends software.amazon.jsii.JsiiObject {
protected Source(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected Source(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
protected Source() {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this);
}
/**
* Uses a local image built from a Dockerfile in a local directory as the source.
*
* @param path
- path to the directory containing your Dockerfile (not a path to a file).
This parameter is required.
* @param assetOptions - specify any additional DockerImageAssetOptions (except
path
).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.docker.image.deployment.Source directory(final @org.jetbrains.annotations.NotNull java.lang.String path, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ecr.assets.DockerImageAssetOptions assetOptions) {
return software.amazon.jsii.JsiiObject.jsiiStaticCall(io.github.cdklabs.cdk.docker.image.deployment.Source.class, "directory", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.docker.image.deployment.Source.class), new Object[] { java.util.Objects.requireNonNull(path, "path is required"), assetOptions });
}
/**
* Uses a local image built from a Dockerfile in a local directory as the source.
*
* @param path
- path to the directory containing your Dockerfile (not a path to a file).
This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.docker.image.deployment.Source directory(final @org.jetbrains.annotations.NotNull java.lang.String path) {
return software.amazon.jsii.JsiiObject.jsiiStaticCall(io.github.cdklabs.cdk.docker.image.deployment.Source.class, "directory", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.docker.image.deployment.Source.class), new Object[] { java.util.Objects.requireNonNull(path, "path is required") });
}
/**
* Bind grants the CodeBuild role permissions to pull from a repository if necessary.
*
* Bind should be invoked by the caller to get the SourceConfig.
*
* @param scope This parameter is required.
* @param context This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public abstract @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.docker.image.deployment.SourceConfig bind(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.docker.image.deployment.SourceContext context);
/**
* A proxy class which represents a concrete javascript instance of this type.
*/
@software.amazon.jsii.Internal
private static final class Jsii$Proxy extends io.github.cdklabs.cdk.docker.image.deployment.Source {
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
/**
* Bind grants the CodeBuild role permissions to pull from a repository if necessary.
*
* Bind should be invoked by the caller to get the SourceConfig.
*
* @param scope This parameter is required.
* @param context This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.docker.image.deployment.SourceConfig bind(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.docker.image.deployment.SourceContext context) {
return software.amazon.jsii.Kernel.call(this, "bind", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.docker.image.deployment.SourceConfig.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(context, "context is required") });
}
}
}