Interface CfnComputeEnvironment.ILaunchTemplateSpecificationOverrideProperty
An object that represents a launch template to use in place of the default launch template.
Namespace: Amazon.CDK.AWS.Batch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface CfnComputeEnvironment.ILaunchTemplateSpecificationOverrideProperty
Syntax (vb)
Public Interface 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
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, |
Properties
LaunchTemplateId
The ID of the launch template.
string? LaunchTemplateId { get; }
Property Value
Remarks
Note: If you specify the launchTemplateId you can't specify the launchTemplateName as well.
LaunchTemplateName
The name of the launch template.
string? LaunchTemplateName { get; }
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.
string[]? TargetInstanceTypes { get; }
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.
string? UserdataType { get; }
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 .
string? Version { get; }
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