Class LinuxArmBuildImage
A CodeBuild image running aarch64 Linux.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.CodeBuild
Assembly: Amazon.CDK.AWS.CodeBuild.dll
Syntax (csharp)
public class LinuxArmBuildImage : DeputyBase, IBuildImage
Syntax (vb)
Public Class LinuxArmBuildImage
Inherits DeputyBase
Implements IBuildImage
Remarks
This class has a bunch of public constants that represent the CodeBuild ARM images.
You can also specify a custom image using the static method:
See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodeBuild;
var linuxArmBuildImage = LinuxArmBuildImage.FromCodeBuildImageId("id");
Synopsis
Constructors
LinuxArmBuildImage(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
LinuxArmBuildImage(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AMAZON_LINUX_2_STANDARD_1_0 | Image "aws/codebuild/amazonlinux2-aarch64-standard:1.0". |
AMAZON_LINUX_2_STANDARD_2_0 | Image "aws/codebuild/amazonlinux2-aarch64-standard:2.0". |
DefaultComputeType | The default {@link ComputeType} to use with this image, if one was not specified in {@link BuildEnvironment#computeType} explicitly. |
ImageId | The Docker image identifier that the build environment uses. |
ImagePullPrincipalType | The type of principal that CodeBuild will use to pull this build Docker image. |
Repository | An optional ECR repository that the image is hosted in. |
SecretsManagerCredentials | The secretsManagerCredentials for access to a private registry. |
Type | The type of build environment. |
Methods
FromCodeBuildImageId(String) | Uses a Docker image provided by CodeBuild. |
FromEcrRepository(IRepository, String) | Returns an ARM image running Linux from an ECR repository. |
RunScriptBuildspec(String) | Make a buildspec to run the indicated script. |
Validate(IBuildEnvironment) | Validates by checking the BuildEnvironment computeType as aarch64 images only support ComputeType.SMALL and ComputeType.LARGE. |
Constructors
LinuxArmBuildImage(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected LinuxArmBuildImage(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
LinuxArmBuildImage(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected LinuxArmBuildImage(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AMAZON_LINUX_2_STANDARD_1_0
Image "aws/codebuild/amazonlinux2-aarch64-standard:1.0".
public static IBuildImage AMAZON_LINUX_2_STANDARD_1_0 { get; }
Property Value
AMAZON_LINUX_2_STANDARD_2_0
Image "aws/codebuild/amazonlinux2-aarch64-standard:2.0".
public static IBuildImage AMAZON_LINUX_2_STANDARD_2_0 { get; }
Property Value
DefaultComputeType
The default {@link ComputeType} to use with this image, if one was not specified in {@link BuildEnvironment#computeType} explicitly.
public virtual ComputeType DefaultComputeType { get; }
Property Value
ImageId
The Docker image identifier that the build environment uses.
public virtual string ImageId { get; }
Property Value
System.String
ImagePullPrincipalType
The type of principal that CodeBuild will use to pull this build Docker image.
public virtual Nullable<ImagePullPrincipalType> ImagePullPrincipalType { get; }
Property Value
System.Nullable<ImagePullPrincipalType>
Repository
An optional ECR repository that the image is hosted in.
public virtual IRepository Repository { get; }
Property Value
SecretsManagerCredentials
The secretsManagerCredentials for access to a private registry.
public virtual ISecret SecretsManagerCredentials { get; }
Property Value
Type
The type of build environment.
public virtual string Type { get; }
Property Value
System.String
Methods
FromCodeBuildImageId(String)
Uses a Docker image provided by CodeBuild.
public static IBuildImage FromCodeBuildImageId(string id)
Parameters
- id System.String
The image identifier.
Returns
A Docker image provided by CodeBuild.
Remarks
Examples
"aws/codebuild/amazonlinux2-aarch64-standard:1.0";
FromEcrRepository(IRepository, String)
Returns an ARM image running Linux from an ECR repository.
public static IBuildImage FromEcrRepository(IRepository repository, string tagOrDigest = null)
Parameters
- repository IRepository
The ECR repository.
- tagOrDigest System.String
Image tag or digest (default "latest", digests must start with
sha256:
).
Returns
An aarch64 Linux build image from an ECR repository.
Remarks
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
RunScriptBuildspec(String)
Make a buildspec to run the indicated script.
public virtual BuildSpec RunScriptBuildspec(string entrypoint)
Parameters
- entrypoint System.String
Returns
Validate(IBuildEnvironment)
Validates by checking the BuildEnvironment computeType as aarch64 images only support ComputeType.SMALL and ComputeType.LARGE.
public virtual string[] Validate(IBuildEnvironment buildEnvironment)
Parameters
- buildEnvironment IBuildEnvironment
BuildEnvironment.
Returns
System.String[]