Skip to content

Commit d9d8149

Browse files
author
awstools
committed
feat(client-batch): Add userdataType to LaunchTemplateSpecification and LaunchTemplateSpecificationOverride.
1 parent af7066f commit d9d8149

File tree

5 files changed

+86
-3
lines changed

5 files changed

+86
-3
lines changed

clients/client-batch/src/commands/CreateComputeEnvironmentCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,10 @@ export interface CreateComputeEnvironmentCommandOutput extends CreateComputeEnvi
170170
* targetInstanceTypes: [
171171
* "STRING_VALUE",
172172
* ],
173+
* userdataType: "EKS_BOOTSTRAP_SH" || "EKS_NODEADM",
173174
* },
174175
* ],
176+
* userdataType: "EKS_BOOTSTRAP_SH" || "EKS_NODEADM",
175177
* },
176178
* ec2Configuration: [ // Ec2ConfigurationList
177179
* { // Ec2Configuration

clients/client-batch/src/commands/DescribeComputeEnvironmentsCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,10 @@ export interface DescribeComputeEnvironmentsCommandOutput
102102
* // targetInstanceTypes: [
103103
* // "STRING_VALUE",
104104
* // ],
105+
* // userdataType: "EKS_BOOTSTRAP_SH" || "EKS_NODEADM",
105106
* // },
106107
* // ],
108+
* // userdataType: "EKS_BOOTSTRAP_SH" || "EKS_NODEADM",
107109
* // },
108110
* // ec2Configuration: [ // Ec2ConfigurationList
109111
* // { // Ec2Configuration

clients/client-batch/src/commands/UpdateComputeEnvironmentCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@ export interface UpdateComputeEnvironmentCommandOutput extends UpdateComputeEnvi
7272
* targetInstanceTypes: [
7373
* "STRING_VALUE",
7474
* ],
75+
* userdataType: "EKS_BOOTSTRAP_SH" || "EKS_NODEADM",
7576
* },
7677
* ],
78+
* userdataType: "EKS_BOOTSTRAP_SH" || "EKS_NODEADM",
7779
* },
7880
* ec2Configuration: [ // Ec2ConfigurationList
7981
* { // Ec2Configuration

clients/client-batch/src/models/models_0.ts

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,22 @@ export interface Ec2Configuration {
419419
* <code>P4</code> and <code>G4</code>) and can be used for all non Amazon Web Services Graviton-based
420420
* instance types.</p>
421421
* </dd>
422+
* <dt>EKS_AL2023</dt>
423+
* <dd>
424+
* <p>
425+
* <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html">Amazon
426+
* Linux 2023</a>: Batch supports Amazon Linux 2023.</p>
427+
* <note>
428+
* <p>Amazon Linux 2023 does not support <code>A1</code> instances.</p>
429+
* </note>
430+
* </dd>
431+
* <dt>EKS_AL2023_NVIDIA</dt>
432+
* <dd>
433+
* <p>
434+
* <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html">Amazon
435+
* Linux 2023 (accelerated)</a>: GPU instance families and can be used for all non Amazon Web Services
436+
* Graviton-based instance types.</p>
437+
* </dd>
422438
* </dl>
423439
* </dd>
424440
* </dl>
@@ -450,6 +466,20 @@ export interface Ec2Configuration {
450466
imageKubernetesVersion?: string | undefined;
451467
}
452468

469+
/**
470+
* @public
471+
* @enum
472+
*/
473+
export const UserdataType = {
474+
EKS_BOOTSTRAP_SH: "EKS_BOOTSTRAP_SH",
475+
EKS_NODEADM: "EKS_NODEADM",
476+
} as const;
477+
478+
/**
479+
* @public
480+
*/
481+
export type UserdataType = (typeof UserdataType)[keyof typeof UserdataType];
482+
453483
/**
454484
* <p>An object that represents a launch template to use in place of the default launch template. You must specify either the launch template ID or launch template name in the request, but not
455485
* both.</p>
@@ -532,6 +562,15 @@ export interface LaunchTemplateSpecificationOverride {
532562
* @public
533563
*/
534564
targetInstanceTypes?: string[] | undefined;
565+
566+
/**
567+
* <p>The EKS node initialization process to use. You only need to specify this value if you are
568+
* using a custom AMI. The default value is <code>EKS_BOOTSTRAP_SH</code>. If
569+
* <i>imageType</i> is a custom AMI based on EKS_AL2023 or EKS_AL2023_NVIDIA then you
570+
* must choose <code>EKS_NODEADM</code>.</p>
571+
* @public
572+
*/
573+
userdataType?: UserdataType | undefined;
535574
}
536575

537576
/**
@@ -593,6 +632,15 @@ export interface LaunchTemplateSpecification {
593632
* @public
594633
*/
595634
overrides?: LaunchTemplateSpecificationOverride[] | undefined;
635+
636+
/**
637+
* <p>The EKS node initialization process to use. You only need to specify this value if you are
638+
* using a custom AMI. The default value is <code>EKS_BOOTSTRAP_SH</code>. If
639+
* <i>imageType</i> is a custom AMI based on EKS_AL2023 or EKS_AL2023_NVIDIA then you
640+
* must choose <code>EKS_NODEADM</code>.</p>
641+
* @public
642+
*/
643+
userdataType?: UserdataType | undefined;
596644
}
597645

598646
/**
@@ -1635,7 +1683,7 @@ export type CEStatus = (typeof CEStatus)[keyof typeof CEStatus];
16351683
*/
16361684
export interface UpdatePolicy {
16371685
/**
1638-
* <p>Specifies whether jobs are automatically terminated when the computer environment
1686+
* <p>Specifies whether jobs are automatically terminated when the compute environment
16391687
* infrastructure is updated. The default value is <code>false</code>.</p>
16401688
* @public
16411689
*/

codegen/sdk-codegen/aws-models/batch.json

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4138,7 +4138,7 @@
41384138
"target": "com.amazonaws.batch#ImageType",
41394139
"traits": {
41404140
"smithy.api#clientOptional": {},
4141-
"smithy.api#documentation": "<p>The image type to match with the instance type to select an AMI. The supported values are\n different for <code>ECS</code> and <code>EKS</code> resources.</p>\n <dl>\n <dt>ECS</dt>\n <dd>\n <p>If the <code>imageIdOverride</code> parameter isn't specified, then a recent <a href=\"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html#al2ami\">Amazon ECS-optimized Amazon Linux 2 AMI</a> (<code>ECS_AL2</code>) is used. If a new image type is\n specified in an update, but neither an <code>imageId</code> nor a <code>imageIdOverride</code>\n parameter is specified, then the latest Amazon ECS optimized AMI for that image type that's\n supported by Batch is used.</p>\n <dl>\n <dt>ECS_AL2</dt>\n <dd>\n <p>\n <a href=\"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html#al2ami\">Amazon Linux\n 2</a>: Default for all non-GPU instance families.</p>\n </dd>\n <dt>ECS_AL2_NVIDIA</dt>\n <dd>\n <p>\n <a href=\"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html#gpuami\">Amazon Linux 2\n (GPU)</a>: Default for all GPU instance families (for example <code>P4</code> and\n <code>G4</code>) and can be used for all non Amazon Web Services Graviton-based instance types.</p>\n </dd>\n <dt>ECS_AL2023</dt>\n <dd>\n <p>\n <a href=\"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html\">Amazon Linux 2023</a>: Batch\n supports Amazon Linux 2023.</p>\n <note>\n <p>Amazon Linux 2023 does not support <code>A1</code> instances.</p>\n </note>\n </dd>\n <dt>ECS_AL1</dt>\n <dd>\n <p>\n <a href=\"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html#alami\">Amazon Linux</a>. Amazon Linux has\n reached the end-of-life of standard support. For more information, see <a href=\"http://aws.amazon.com/amazon-linux-ami/\">Amazon Linux AMI</a>.</p>\n </dd>\n </dl>\n </dd>\n <dt>EKS</dt>\n <dd>\n <p>If the <code>imageIdOverride</code> parameter isn't specified, then a recent <a href=\"https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html\">Amazon EKS-optimized Amazon Linux\n AMI</a> (<code>EKS_AL2</code>) is used. If a new image type is specified in an update,\n but neither an <code>imageId</code> nor a <code>imageIdOverride</code> parameter is specified,\n then the latest Amazon EKS optimized AMI for that image type that Batch supports is used.</p>\n <dl>\n <dt>EKS_AL2</dt>\n <dd>\n <p>\n <a href=\"https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html\">Amazon\n Linux 2</a>: Default for all non-GPU instance families.</p>\n </dd>\n <dt>EKS_AL2_NVIDIA</dt>\n <dd>\n <p>\n <a href=\"https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html\">Amazon\n Linux 2 (accelerated)</a>: Default for all GPU instance families (for example,\n <code>P4</code> and <code>G4</code>) and can be used for all non Amazon Web Services Graviton-based\n instance types.</p>\n </dd>\n </dl>\n </dd>\n </dl>",
4141+
"smithy.api#documentation": "<p>The image type to match with the instance type to select an AMI. The supported values are\n different for <code>ECS</code> and <code>EKS</code> resources.</p>\n <dl>\n <dt>ECS</dt>\n <dd>\n <p>If the <code>imageIdOverride</code> parameter isn't specified, then a recent <a href=\"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html#al2ami\">Amazon ECS-optimized Amazon Linux 2 AMI</a> (<code>ECS_AL2</code>) is used. If a new image type is\n specified in an update, but neither an <code>imageId</code> nor a <code>imageIdOverride</code>\n parameter is specified, then the latest Amazon ECS optimized AMI for that image type that's\n supported by Batch is used.</p>\n <dl>\n <dt>ECS_AL2</dt>\n <dd>\n <p>\n <a href=\"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html#al2ami\">Amazon Linux\n 2</a>: Default for all non-GPU instance families.</p>\n </dd>\n <dt>ECS_AL2_NVIDIA</dt>\n <dd>\n <p>\n <a href=\"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html#gpuami\">Amazon Linux 2\n (GPU)</a>: Default for all GPU instance families (for example <code>P4</code> and\n <code>G4</code>) and can be used for all non Amazon Web Services Graviton-based instance types.</p>\n </dd>\n <dt>ECS_AL2023</dt>\n <dd>\n <p>\n <a href=\"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html\">Amazon Linux 2023</a>: Batch\n supports Amazon Linux 2023.</p>\n <note>\n <p>Amazon Linux 2023 does not support <code>A1</code> instances.</p>\n </note>\n </dd>\n <dt>ECS_AL1</dt>\n <dd>\n <p>\n <a href=\"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html#alami\">Amazon Linux</a>. Amazon Linux has\n reached the end-of-life of standard support. For more information, see <a href=\"http://aws.amazon.com/amazon-linux-ami/\">Amazon Linux AMI</a>.</p>\n </dd>\n </dl>\n </dd>\n <dt>EKS</dt>\n <dd>\n <p>If the <code>imageIdOverride</code> parameter isn't specified, then a recent <a href=\"https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html\">Amazon EKS-optimized Amazon Linux\n AMI</a> (<code>EKS_AL2</code>) is used. If a new image type is specified in an update,\n but neither an <code>imageId</code> nor a <code>imageIdOverride</code> parameter is specified,\n then the latest Amazon EKS optimized AMI for that image type that Batch supports is used.</p>\n <dl>\n <dt>EKS_AL2</dt>\n <dd>\n <p>\n <a href=\"https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html\">Amazon\n Linux 2</a>: Default for all non-GPU instance families.</p>\n </dd>\n <dt>EKS_AL2_NVIDIA</dt>\n <dd>\n <p>\n <a href=\"https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html\">Amazon\n Linux 2 (accelerated)</a>: Default for all GPU instance families (for example,\n <code>P4</code> and <code>G4</code>) and can be used for all non Amazon Web Services Graviton-based\n instance types.</p>\n </dd>\n <dt>EKS_AL2023</dt>\n <dd>\n <p>\n <a href=\"https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html\">Amazon\n Linux 2023</a>: Batch supports Amazon Linux 2023.</p>\n <note>\n <p>Amazon Linux 2023 does not support <code>A1</code> instances.</p>\n </note>\n </dd>\n <dt>EKS_AL2023_NVIDIA</dt>\n <dd>\n <p>\n <a href=\"https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html\">Amazon\n Linux 2023 (accelerated)</a>: GPU instance families and can be used for all non Amazon Web Services\n Graviton-based instance types.</p>\n </dd>\n </dl>\n </dd>\n </dl>",
41424142
"smithy.api#required": {}
41434143
}
41444144
},
@@ -6356,6 +6356,12 @@
63566356
"traits": {
63576357
"smithy.api#documentation": "<p>A launch template to use in place of the default launch template. You must specify either the launch template ID or launch template name in the request, but not both.</p>\n <p>You can specify up to ten (10) launch template overrides that are associated to unique instance types or families for each compute environment.</p>\n <note>\n <p>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.</p>\n </note>"
63586358
}
6359+
},
6360+
"userdataType": {
6361+
"target": "com.amazonaws.batch#UserdataType",
6362+
"traits": {
6363+
"smithy.api#documentation": "<p>The EKS node initialization process to use. You only need to specify this value if you are\n using a custom AMI. The default value is <code>EKS_BOOTSTRAP_SH</code>. If\n <i>imageType</i> is a custom AMI based on EKS_AL2023 or EKS_AL2023_NVIDIA then you\n must choose <code>EKS_NODEADM</code>.</p>"
6364+
}
63596365
}
63606366
},
63616367
"traits": {
@@ -6388,6 +6394,12 @@
63886394
"traits": {
63896395
"smithy.api#documentation": "<p>The instance type or family that this override launch template should be applied to.</p>\n <p>This parameter is required when defining a launch template override.</p>\n <p>Information included in this parameter must meet the following requirements:</p>\n <ul>\n <li>\n <p>Must be a valid Amazon EC2 instance type or family.</p>\n </li>\n <li>\n <p>\n <code>optimal</code> isn't allowed.</p>\n </li>\n <li>\n <p>\n <code>targetInstanceTypes</code> can target only instance types and families that are included within the <a href=\"https://docs.aws.amazon.com/batch/latest/APIReference/API_ComputeResource.html#Batch-Type-ComputeResource-instanceTypes\">\n <code>ComputeResource.instanceTypes</code>\n </a> set. <code>targetInstanceTypes</code> doesn't need to include all of the instances from the <code>instanceType</code> set, but at least a subset. For example, if <code>ComputeResource.instanceTypes</code> includes <code>[m5, g5]</code>, <code>targetInstanceTypes</code> can include <code>[m5.2xlarge]</code> and <code>[m5.large]</code> but not <code>[c5.large]</code>.</p>\n </li>\n <li>\n <p>\n <code>targetInstanceTypes</code> included within the same launch template override or across launch template overrides can't overlap for the same compute environment. For example, you can't define one launch template override to target an instance family and another define an instance type within this same family.</p>\n </li>\n </ul>"
63906396
}
6397+
},
6398+
"userdataType": {
6399+
"target": "com.amazonaws.batch#UserdataType",
6400+
"traits": {
6401+
"smithy.api#documentation": "<p>The EKS node initialization process to use. You only need to specify this value if you are\n using a custom AMI. The default value is <code>EKS_BOOTSTRAP_SH</code>. If\n <i>imageType</i> is a custom AMI based on EKS_AL2023 or EKS_AL2023_NVIDIA then you\n must choose <code>EKS_NODEADM</code>.</p>"
6402+
}
63916403
}
63926404
},
63936405
"traits": {
@@ -9199,7 +9211,7 @@
91999211
"terminateJobsOnUpdate": {
92009212
"target": "com.amazonaws.batch#Boolean",
92019213
"traits": {
9202-
"smithy.api#documentation": "<p>Specifies whether jobs are automatically terminated when the computer environment\n infrastructure is updated. The default value is <code>false</code>.</p>"
9214+
"smithy.api#documentation": "<p>Specifies whether jobs are automatically terminated when the compute environment\n infrastructure is updated. The default value is <code>false</code>.</p>"
92039215
}
92049216
},
92059217
"jobExecutionTimeoutMinutes": {
@@ -9268,6 +9280,23 @@
92689280
"smithy.api#output": {}
92699281
}
92709282
},
9283+
"com.amazonaws.batch#UserdataType": {
9284+
"type": "enum",
9285+
"members": {
9286+
"EKS_BOOTSTRAP_SH": {
9287+
"target": "smithy.api#Unit",
9288+
"traits": {
9289+
"smithy.api#enumValue": "EKS_BOOTSTRAP_SH"
9290+
}
9291+
},
9292+
"EKS_NODEADM": {
9293+
"target": "smithy.api#Unit",
9294+
"traits": {
9295+
"smithy.api#enumValue": "EKS_NODEADM"
9296+
}
9297+
}
9298+
}
9299+
},
92719300
"com.amazonaws.batch#Volume": {
92729301
"type": "structure",
92739302
"members": {

0 commit comments

Comments
 (0)