Class CfnComputeEnvironment.Ec2ConfigurationObjectProperty
Provides information used to select Amazon Machine Images (AMIs) for instances in the compute environment.
Inherited Members
Namespace: Amazon.CDK.AWS.Batch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnComputeEnvironment.Ec2ConfigurationObjectProperty : CfnComputeEnvironment.IEc2ConfigurationObjectProperty
Syntax (vb)
Public Class CfnComputeEnvironment.Ec2ConfigurationObjectProperty 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
Ec2ConfigurationObjectProperty() | Provides information used to select Amazon Machine Images (AMIs) for instances in the compute environment. |
Properties
ImageIdOverride | The AMI ID used for instances launched in the compute environment that match the image type. |
ImageKubernetesVersion | The Kubernetes version for the compute environment. |
ImageType | The image type to match with the instance type to select an AMI. |
Constructors
Ec2ConfigurationObjectProperty()
Provides information used to select Amazon Machine Images (AMIs) for instances in the compute environment.
public Ec2ConfigurationObjectProperty()
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"
};
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
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 <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html#ecs-optimized-ami-linux-variants.html">Amazon ECS-optimized Amazon Linux 2 AMI</a> in the <em>Amazon Elastic Container Service Developer Guide</em> .
ImageKubernetesVersion
The Kubernetes version for the compute environment.
public string? ImageKubernetesVersion { get; set; }
Property Value
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
Remarks
The supported values are different for ECS
and EKS
resources.
Amazon Linux 2023 does not support <code>A1</code> instances.
Amazon Linux 2023 does not support <code>A1</code> instances.