Class CfnComputeEnvironment.Ec2ConfigurationObjectProperty
Provides information used to select Amazon Machine Images (AMIs) for instances in the compute environment.
Inheritance
Namespace: Amazon.CDK.AWS.Batch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Ec2ConfigurationObjectProperty : Object, CfnComputeEnvironment.IEc2ConfigurationObjectProperty
Syntax (vb)
Public Class Ec2ConfigurationObjectProperty
Inherits Object
Implements CfnComputeEnvironment.IEc2ConfigurationObjectProperty
Remarks
If Ec2Configuration
isn't specified, the default is ECS_AL2
( Amazon Linux 2 ).
This object isn't applicable to jobs that are running on Fargate resources.
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.Batch;
var ec2ConfigurationObjectProperty = new Ec2ConfigurationObjectProperty {
ImageType = "imageType",
// the properties below are optional
ImageIdOverride = "imageIdOverride",
ImageKubernetesVersion = "imageKubernetesVersion"
};
Synopsis
Constructors
Ec2Configuration |
Properties
Image |
The AMI ID used for instances launched in the compute environment that match the image type. |
Image |
The Kubernetes version for the compute environment. |
Image |
The image type to match with the instance type to select an AMI. |
Constructors
Ec2ConfigurationObjectProperty()
public Ec2ConfigurationObjectProperty()
Properties
ImageIdOverride
The AMI ID used for instances launched in the compute environment that match the image type.
public string ImageIdOverride { get; set; }
Property Value
System.
Remarks
This setting overrides the imageId
set in the computeResource
object.
The AMI that you choose for a compute environment must match the architecture of the instance types that you intend to use for that compute environment. For example, if your compute environment uses A1 instance types, the compute resource AMI that you choose must support ARM instances. Amazon ECS vends both x86 and ARM versions of the Amazon ECS-optimized Amazon Linux 2 AMI. For more information, see Amazon ECS-optimized Amazon Linux 2 AMI in the Amazon Elastic Container Service Developer Guide .
ImageKubernetesVersion
The Kubernetes version for the compute environment.
public string ImageKubernetesVersion { get; set; }
Property Value
System.
Remarks
If you don't specify a value, the latest version that AWS Batch supports is used.
ImageType
The image type to match with the instance type to select an AMI.
public string ImageType { get; set; }
Property Value
System.
Remarks
The supported values are different for ECS
and EKS
resources.
Amazon Linux 2023 does not support <code>A1</code> instances.