@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:37.369Z") @Stability(value=Stable) public class WindowsBuildImage extends software.amazon.jsii.JsiiObject implements IBuildImage
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:
Example:
Repository ecrRepository;
Project.Builder.create(this, "Project")
.environment(BuildEnvironment.builder()
.buildImage(WindowsBuildImage.fromEcrRepository(ecrRepository, "v1.0", WindowsImageType.SERVER_2019))
// optional certificate to include in the build image
.certificate(BuildEnvironmentCertificate.builder()
.bucket(Bucket.fromBucketName(this, "Bucket", "my-bucket"))
.objectKey("path/to/cert.pem")
.build())
.build())
.build();
software.amazon.jsii.JsiiObject.InitializationModeIBuildImage.Jsii$Default, IBuildImage.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static IBuildImage |
WIN_SERVER_CORE_2019_BASE
The standard CodeBuild image `aws/codebuild/windows-base:2019-1.0`, which is based off Windows Server Core 2019.
|
static IBuildImage |
WINDOWS_BASE_2_0
The standard CodeBuild image `aws/codebuild/windows-base:2.0`, which is based off Windows Server Core 2016.
|
| Modifier | Constructor and Description |
|---|---|
protected |
WindowsBuildImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
WindowsBuildImage(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static IBuildImage |
fromAsset(software.constructs.Construct scope,
String id,
DockerImageAssetProps props)
Uses an Docker image asset as a Windows build image.
|
static IBuildImage |
fromAsset(software.constructs.Construct scope,
String id,
DockerImageAssetProps props,
WindowsImageType imageType)
Uses an Docker image asset as a Windows build image.
|
static IBuildImage |
fromDockerRegistry(String name) |
static IBuildImage |
fromDockerRegistry(String name,
DockerImageOptions options) |
static IBuildImage |
fromDockerRegistry(String name,
DockerImageOptions options,
WindowsImageType imageType) |
static IBuildImage |
fromEcrRepository(IRepository repository) |
static IBuildImage |
fromEcrRepository(IRepository repository,
String tagOrDigest) |
static IBuildImage |
fromEcrRepository(IRepository repository,
String tagOrDigest,
WindowsImageType imageType) |
ComputeType |
getDefaultComputeType()
The default
ComputeType to use with this image, if one was not specified in BuildEnvironment#computeType explicitly. |
String |
getImageId()
The Docker image identifier that the build environment uses.
|
ImagePullPrincipalType |
getImagePullPrincipalType()
The type of principal that CodeBuild will use to pull this build Docker image.
|
IRepository |
getRepository()
An optional ECR repository that the image is hosted in.
|
ISecret |
getSecretsManagerCredentials()
The secretsManagerCredentials for access to a private registry.
|
String |
getType()
The type of build environment.
|
BuildSpec |
runScriptBuildspec(String entrypoint)
Make a buildspec to run the indicated script.
|
List<String> |
validate(BuildEnvironment buildEnvironment)
Allows the image a chance to validate whether the passed configuration is correct.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final IBuildImage WIN_SERVER_CORE_2019_BASE
@Stability(value=Stable) public static final IBuildImage WINDOWS_BASE_2_0
protected WindowsBuildImage(software.amazon.jsii.JsiiObjectRef objRef)
protected WindowsBuildImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) @NotNull public static IBuildImage fromAsset(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DockerImageAssetProps props, @Nullable WindowsImageType imageType)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.imageType - @Stability(value=Stable) @NotNull public static IBuildImage fromAsset(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DockerImageAssetProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Stable) @NotNull public static IBuildImage fromDockerRegistry(@NotNull String name, @Nullable DockerImageOptions options, @Nullable WindowsImageType imageType)
name - This parameter is required.options - imageType - @Stability(value=Stable) @NotNull public static IBuildImage fromDockerRegistry(@NotNull String name, @Nullable DockerImageOptions options)
name - This parameter is required.options - @Stability(value=Stable) @NotNull public static IBuildImage fromDockerRegistry(@NotNull String name)
name - This parameter is required.@Stability(value=Stable) @NotNull public static IBuildImage fromEcrRepository(@NotNull IRepository repository, @Nullable String tagOrDigest, @Nullable WindowsImageType imageType)
repository - The ECR repository. This parameter is required.tagOrDigest - Image tag or digest (default "latest", digests must start with `sha256:`).imageType - @Stability(value=Stable) @NotNull public static IBuildImage fromEcrRepository(@NotNull IRepository repository, @Nullable String tagOrDigest)
repository - The ECR repository. This parameter is required.tagOrDigest - Image tag or digest (default "latest", digests must start with `sha256:`).@Stability(value=Stable) @NotNull public static IBuildImage fromEcrRepository(@NotNull IRepository repository)
repository - The ECR repository. This parameter is required.@Stability(value=Stable) @NotNull public BuildSpec runScriptBuildspec(@NotNull String entrypoint)
runScriptBuildspec in interface IBuildImageentrypoint - This parameter is required.@Stability(value=Stable) @NotNull public List<String> validate(@NotNull BuildEnvironment buildEnvironment)
validate in interface IBuildImagebuildEnvironment - This parameter is required.@Stability(value=Stable) @NotNull public ComputeType getDefaultComputeType()
ComputeType to use with this image, if one was not specified in BuildEnvironment#computeType explicitly.getDefaultComputeType in interface IBuildImage@Stability(value=Stable) @NotNull public String getImageId()
getImageId in interface IBuildImage@Stability(value=Stable) @NotNull public String getType()
getType in interface IBuildImage@Stability(value=Stable) @Nullable public ImagePullPrincipalType getImagePullPrincipalType()
getImagePullPrincipalType in interface IBuildImage@Stability(value=Stable) @Nullable public IRepository getRepository()
getRepository in interface IBuildImage@Stability(value=Stable) @Nullable public ISecret getSecretsManagerCredentials()
getSecretsManagerCredentials in interface IBuildImageCopyright © 2022. All rights reserved.