Class CfnComputeEnvironment.LaunchTemplateSpecificationOverrideProperty
An object that represents a launch template to use in place of the default launch template.
Inherited Members
Namespace: Amazon.CDK.AWS.Batch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnComputeEnvironment.LaunchTemplateSpecificationOverrideProperty : CfnComputeEnvironment.ILaunchTemplateSpecificationOverrideProperty
Syntax (vb)
Public Class CfnComputeEnvironment.LaunchTemplateSpecificationOverrideProperty Implements CfnComputeEnvironment.ILaunchTemplateSpecificationOverrideProperty
Remarks
You must specify either the launch template ID or launch template name in the request, but not both.
If security groups are specified using both the securityGroupIds parameter of CreateComputeEnvironment and the launch template, the values in the securityGroupIds parameter of CreateComputeEnvironment will be used.
You can define up to ten (10) overrides for each compute environment.
This object isn't applicable to jobs that are running on Fargate resources. > To unset all override templates for a compute environment, you can pass an empty array to the <a href="https://docs.aws.amazon.com/batch/latest/APIReference/API_UpdateComputeEnvironment.html">UpdateComputeEnvironment.overrides</a> parameter, or not include the <code>overrides</code> parameter when submitting the <code>UpdateComputeEnvironment</code> API operation.
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 launchTemplateSpecificationOverrideProperty = new LaunchTemplateSpecificationOverrideProperty {
LaunchTemplateId = "launchTemplateId",
LaunchTemplateName = "launchTemplateName",
TargetInstanceTypes = new [] { "targetInstanceTypes" },
UserdataType = "userdataType",
Version = "version"
};
Synopsis
Constructors
| LaunchTemplateSpecificationOverrideProperty() | An object that represents a launch template to use in place of the default launch template. |
Properties
| LaunchTemplateId | The ID of the launch template. |
| LaunchTemplateName | The name of the launch template. |
| TargetInstanceTypes | The instance type or family that this override launch template should be applied to. |
| UserdataType | The EKS node initialization process to use. |
| Version | The version number of the launch template, |
Constructors
LaunchTemplateSpecificationOverrideProperty()
An object that represents a launch template to use in place of the default launch template.
public LaunchTemplateSpecificationOverrideProperty()
Remarks
You must specify either the launch template ID or launch template name in the request, but not both.
If security groups are specified using both the securityGroupIds parameter of CreateComputeEnvironment and the launch template, the values in the securityGroupIds parameter of CreateComputeEnvironment will be used.
You can define up to ten (10) overrides for each compute environment.
This object isn't applicable to jobs that are running on Fargate resources. > To unset all override templates for a compute environment, you can pass an empty array to the <a href="https://docs.aws.amazon.com/batch/latest/APIReference/API_UpdateComputeEnvironment.html">UpdateComputeEnvironment.overrides</a> parameter, or not include the <code>overrides</code> parameter when submitting the <code>UpdateComputeEnvironment</code> API operation.
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 launchTemplateSpecificationOverrideProperty = new LaunchTemplateSpecificationOverrideProperty {
LaunchTemplateId = "launchTemplateId",
LaunchTemplateName = "launchTemplateName",
TargetInstanceTypes = new [] { "targetInstanceTypes" },
UserdataType = "userdataType",
Version = "version"
};
Properties
LaunchTemplateId
The ID of the launch template.
public string? LaunchTemplateId { get; set; }
Property Value
Remarks
Note: If you specify the launchTemplateId you can't specify the launchTemplateName as well.
LaunchTemplateName
The name of the launch template.
public string? LaunchTemplateName { get; set; }
Property Value
Remarks
Note: If you specify the launchTemplateName you can't specify the launchTemplateId as well.
TargetInstanceTypes
The instance type or family that this override launch template should be applied to.
public string[]? TargetInstanceTypes { get; set; }
Property Value
string[]
Remarks
This parameter is required when defining a launch template override.
Information included in this parameter must meet the following requirements:
UserdataType
The EKS node initialization process to use.
public string? UserdataType { get; set; }
Property Value
Remarks
You only need to specify this value if you are using a custom AMI. The default value is EKS_BOOTSTRAP_SH . If imageType is a custom AMI based on EKS_AL2023 or EKS_AL2023_NVIDIA then you must choose EKS_NODEADM .
Version
The version number of the launch template, $Default , or $Latest .
public string? Version { get; set; }
Property Value
Remarks
If the value is $Default , the default version of the launch template is used. If the value is $Latest , the latest version of the launch template is used.
If the AMI ID that's used in a compute environment is from the launch template, the AMI isn't changed when the compute environment is updated. It's only changed if the <code>updateToLatestImageVersion</code> parameter for the compute environment is set to <code>true</code> . During an infrastructure update, if either <code>$Default</code> or <code>$Latest</code> is specified, AWS Batch re-evaluates the launch template version, and it might use a different version of the launch template. This is the case even if the launch template isn't specified in the update. When updating a compute environment, changing the launch template requires an infrastructure update of the compute environment. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html">Updating compute environments</a> in the <em>AWS Batch User Guide</em> .
Default: $Default
Latest: $Latest