All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.services.codebuild.WindowsBuildImage Maven / Gradle / Ivy

There is a newer version: 1.204.0
Show newest version
package software.amazon.awscdk.services.codebuild;

/**
 * A CodeBuild image running Windows.
 * 
 * This class has a bunch of public constants that represent the most popular images.
 * 
 * You can also specify a custom image using one of the static methods:
 * 
 * - WindowsBuildImage.fromDockerHub(image)
 * - WindowsBuildImage.fromEcrRepository(repo[, tag])
 * - WindowsBuildImage.fromAsset(parent, id, props)
 * 
 * @see https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
 */
@javax.annotation.Generated(value = "jsii-pacmak/0.10.5 (build 46bc9b0)", date = "2019-05-06T20:55:05.129Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.codebuild.$Module.class, fqn = "@aws-cdk/aws-codebuild.WindowsBuildImage")
public class WindowsBuildImage extends software.amazon.jsii.JsiiObject implements software.amazon.awscdk.services.codebuild.IBuildImage {
    protected WindowsBuildImage(final software.amazon.jsii.JsiiObject.InitializationMode mode) {
        super(mode);
    }
    static {
        WIN_SERVER_CORE_2016_BASE = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.codebuild.WindowsBuildImage.class, "WIN_SERVER_CORE_2016_BASE", software.amazon.awscdk.services.codebuild.WindowsBuildImage.class);
    }

    /**
     * Uses an Docker image asset as a Windows build image.
     */
    public static software.amazon.awscdk.services.codebuild.WindowsBuildImage fromAsset(final software.amazon.awscdk.Construct scope, final java.lang.String id, final software.amazon.awscdk.assets.docker.DockerImageAssetProps props) {
        return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.codebuild.WindowsBuildImage.class, "fromAsset", software.amazon.awscdk.services.codebuild.WindowsBuildImage.class, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
    }

    /**
     * @return a Windows build image from a Docker Hub image.
     */
    public static software.amazon.awscdk.services.codebuild.WindowsBuildImage fromDockerHub(final java.lang.String name) {
        return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.codebuild.WindowsBuildImage.class, "fromDockerHub", software.amazon.awscdk.services.codebuild.WindowsBuildImage.class, new Object[] { java.util.Objects.requireNonNull(name, "name is required") });
    }

    /**
     * @return A Linux build image from an ECR repository.
     * 
     * NOTE: if the repository is external (i.e. imported), then we won't be able to add
     * a resource policy statement for it so CodeBuild can pull the image.
     * @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-ecr.html
     * @param repository The ECR repository.
     * @param tag Image tag (default "latest").
     */
    public static software.amazon.awscdk.services.codebuild.WindowsBuildImage fromEcrRepository(final software.amazon.awscdk.services.ecr.IRepository repository, @javax.annotation.Nullable final java.lang.String tag) {
        return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.codebuild.WindowsBuildImage.class, "fromEcrRepository", software.amazon.awscdk.services.codebuild.WindowsBuildImage.class, new Object[] { java.util.Objects.requireNonNull(repository, "repository is required"), tag });
    }

    /**
     * @return A Linux build image from an ECR repository.
     * 
     * NOTE: if the repository is external (i.e. imported), then we won't be able to add
     * a resource policy statement for it so CodeBuild can pull the image.
     * @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-ecr.html
     * @param repository The ECR repository.
     */
    public static software.amazon.awscdk.services.codebuild.WindowsBuildImage fromEcrRepository(final software.amazon.awscdk.services.ecr.IRepository repository) {
        return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.codebuild.WindowsBuildImage.class, "fromEcrRepository", software.amazon.awscdk.services.codebuild.WindowsBuildImage.class, new Object[] { java.util.Objects.requireNonNull(repository, "repository is required") });
    }

    /**
     * Make a buildspec to run the indicated script.
     */
    @Override
    @javax.annotation.Nullable
    public java.lang.Object runScriptBuildspec(final java.lang.String entrypoint) {
        return this.jsiiCall("runScriptBuildspec", java.lang.Object.class, new Object[] { java.util.Objects.requireNonNull(entrypoint, "entrypoint is required") });
    }

    /**
     * Allows the image a chance to validate whether the passed configuration is correct.
     */
    @Override
    public java.util.List validate(final software.amazon.awscdk.services.codebuild.BuildEnvironment buildEnvironment) {
        return this.jsiiCall("validate", java.util.List.class, new Object[] { java.util.Objects.requireNonNull(buildEnvironment, "buildEnvironment is required") });
    }
    public final static software.amazon.awscdk.services.codebuild.WindowsBuildImage WIN_SERVER_CORE_2016_BASE;

    /**
     * The default {@link ComputeType} to use with this image, if one was not specified in {@link BuildEnvironment#computeType} explicitly.
     */
    @Override
    public software.amazon.awscdk.services.codebuild.ComputeType getDefaultComputeType() {
        return this.jsiiGet("defaultComputeType", software.amazon.awscdk.services.codebuild.ComputeType.class);
    }

    @Override
    public java.lang.String getImageId() {
        return this.jsiiGet("imageId", java.lang.String.class);
    }

    /**
     * The type of build environment.
     */
    @Override
    public java.lang.String getType() {
        return this.jsiiGet("type", java.lang.String.class);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy