Skip to content

Commit

Permalink
feat(client-batch): This feature allows customers to use AWS Batch wi…
Browse files Browse the repository at this point in the history
…th Linux with ARM64 CPU Architecture and X86_64 CPU Architecture with Windows OS on Fargate Platform.
  • Loading branch information
awstools committed Jul 3, 2023
1 parent 7994c9d commit 40de6f0
Show file tree
Hide file tree
Showing 8 changed files with 263 additions and 121 deletions.
8 changes: 8 additions & 0 deletions clients/client-batch/src/commands/CancelJobCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ export interface CancelJobCommandOutput extends CancelJobResponse, __MetadataBea
* in<code>RUNNABLE</code> remains in <code>RUNNABLE</code> until it reaches the head of the
* job queue. Then the job status is updated to
* <code>FAILED</code>.</p>
* <note>
* <p>A <code>PENDING</code> job is canceled after all dependency jobs are completed.
* Therefore, it may take longer than expected to cancel a job in <code>PENDING</code>
* status.</p>
* <p>When you try to cancel an array parent job in <code>PENDING</code>, Batch attempts to
* cancel all child jobs. The array parent job is canceled when all child jobs are
* completed.</p>
* </note>
* <p>Jobs that progressed to the <code>STARTING</code> or
* <code>RUNNING</code> state aren't canceled. However, the API operation still succeeds, even
* if no job is canceled. These jobs must be terminated with the <a>TerminateJob</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,12 @@ export interface CreateComputeEnvironmentCommandOutput extends CreateComputeEnvi
* or <code>SPOT_CAPACITY_OPTIMIZED</code>.</p>
* </li>
* <li>
* <p>Set the update to latest image version (<code>updateToLatestImageVersion</code>) parameter to
* <code>true</code>.</p>
* <p>Set the update to latest image version (<code>updateToLatestImageVersion</code>)
* parameter to
* <code>true</code>.
* The <code>updateToLatestImageVersion</code> parameter is used when you update a compute
* environment. This parameter is ignored when you create a compute
* environment.</p>
* </li>
* <li>
* <p>Don't specify an AMI ID in <code>imageId</code>, <code>imageIdOverride</code> (in <a href="https://docs.aws.amazon.com/batch/latest/APIReference/API_Ec2Configuration.html">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ export interface DescribeJobDefinitionsCommandOutput extends DescribeJobDefiniti
* // ephemeralStorage: { // EphemeralStorage
* // sizeInGiB: Number("int"), // required
* // },
* // runtimePlatform: { // RuntimePlatform
* // operatingSystemFamily: "STRING_VALUE",
* // cpuArchitecture: "STRING_VALUE",
* // },
* // },
* // timeout: { // JobTimeout
* // attemptDurationSeconds: Number("int"),
Expand Down Expand Up @@ -292,6 +296,10 @@ export interface DescribeJobDefinitionsCommandOutput extends DescribeJobDefiniti
* // ephemeralStorage: {
* // sizeInGiB: Number("int"), // required
* // },
* // runtimePlatform: {
* // operatingSystemFamily: "STRING_VALUE",
* // cpuArchitecture: "STRING_VALUE",
* // },
* // },
* // },
* // ],
Expand Down
8 changes: 8 additions & 0 deletions clients/client-batch/src/commands/DescribeJobsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ export interface DescribeJobsCommandOutput extends DescribeJobsResponse, __Metad
* // ephemeralStorage: { // EphemeralStorage
* // sizeInGiB: Number("int"), // required
* // },
* // runtimePlatform: { // RuntimePlatform
* // operatingSystemFamily: "STRING_VALUE",
* // cpuArchitecture: "STRING_VALUE",
* // },
* // },
* // nodeDetails: { // NodeDetails
* // nodeIndex: Number("int"),
Expand Down Expand Up @@ -333,6 +337,10 @@ export interface DescribeJobsCommandOutput extends DescribeJobsResponse, __Metad
* // ephemeralStorage: {
* // sizeInGiB: Number("int"), // required
* // },
* // runtimePlatform: {
* // operatingSystemFamily: "STRING_VALUE",
* // cpuArchitecture: "STRING_VALUE",
* // },
* // },
* // },
* // ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ export interface RegisterJobDefinitionCommandOutput extends RegisterJobDefinitio
* ephemeralStorage: { // EphemeralStorage
* sizeInGiB: Number("int"), // required
* },
* runtimePlatform: { // RuntimePlatform
* operatingSystemFamily: "STRING_VALUE",
* cpuArchitecture: "STRING_VALUE",
* },
* },
* nodeProperties: { // NodeProperties
* numNodes: Number("int"), // required
Expand Down Expand Up @@ -261,6 +265,10 @@ export interface RegisterJobDefinitionCommandOutput extends RegisterJobDefinitio
* ephemeralStorage: {
* sizeInGiB: Number("int"), // required
* },
* runtimePlatform: {
* operatingSystemFamily: "STRING_VALUE",
* cpuArchitecture: "STRING_VALUE",
* },
* },
* },
* ],
Expand Down
97 changes: 86 additions & 11 deletions clients/client-batch/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,16 +468,22 @@ export interface ComputeResource {
allocationStrategy?: CRAllocationStrategy | string;

/**
* <p>The minimum number of Amazon EC2 vCPUs that an environment should maintain (even if the compute
* environment is <code>DISABLED</code>).</p>
* <p>The minimum number of
* vCPUs that
* a
* compute
* environment should maintain (even if the compute environment is <code>DISABLED</code>).</p>
* <note>
* <p>This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it.</p>
* </note>
*/
minvCpus?: number;

/**
* <p>The maximum number of Amazon EC2 vCPUs that a compute environment can reach.</p>
* <p>The maximum number of
* vCPUs that a
* compute environment can
* support.</p>
* <note>
* <p>With both <code>BEST_FIT_PROGRESSIVE</code> and <code>SPOT_CAPACITY_OPTIMIZED</code>
* allocation strategies using On-Demand or Spot Instances, and the <code>BEST_FIT</code> strategy
Expand All @@ -490,8 +496,10 @@ export interface ComputeResource {
maxvCpus: number | undefined;

/**
* <p>The desired number of Amazon EC2 vCPUS in the compute environment. Batch modifies this value
* between the minimum and maximum values based on job queue demand.</p>
* <p>The desired number of
* vCPUS in the
* compute environment. Batch modifies this value between the minimum and maximum values based on
* job queue demand.</p>
* <note>
* <p>This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it.</p>
* </note>
Expand Down Expand Up @@ -2004,6 +2012,52 @@ export interface ResourceRequirement {
type: ResourceType | string | undefined;
}

/**
* @public
* <p>An object that represents the compute environment architecture for Batch jobs on Fargate.</p>
*/
export interface RuntimePlatform {
/**
* <p>The operating system for the compute environment.
* Valid values are:
* <code>LINUX</code> (default), <code>WINDOWS_SERVER_2019_CORE</code>,
* <code>WINDOWS_SERVER_2019_FULL</code>, <code>WINDOWS_SERVER_2022_CORE</code>, and
* <code>WINDOWS_SERVER_2022_FULL</code>.</p>
* <note>
* <p>The following parameters can’t be set for Windows containers: <code>linuxParameters</code>,
* <code>privileged</code>, <code>user</code>, <code>ulimits</code>,
* <code>readonlyRootFilesystem</code>,
* and <code>efsVolumeConfiguration</code>.</p>
* </note>
* <note>
* <p>The Batch Scheduler checks before registering a task definition with Fargate. If the job
* requires a Windows container and the first compute environment is <code>LINUX</code>, the
* compute environment is skipped and the next is checked until a Windows-based compute environment
* is found.</p>
* </note>
* <note>
* <p>Fargate Spot is not supported for Windows-based containers on Fargate. A job
* queue will be blocked if a Fargate Windows job is submitted to a job queue with only Fargate
* Spot compute environments.
* However, you can attach both <code>FARGATE</code> and <code>FARGATE_SPOT</code>
* compute environments to the same job
* queue.</p>
* </note>
*/
operatingSystemFamily?: string;

/**
* <p>The vCPU architecture. The default value is <code>X86_64</code>. Valid values are <code>X86_64</code> and
* <code> ARM64</code>.</p>
* <note>
* <p>This parameter must be set to
* <code>X86_64</code>
* for Windows containers.</p>
* </note>
*/
cpuArchitecture?: string;
}

/**
* @public
* <p>The <code>ulimit</code> settings to pass to the container.</p>
Expand Down Expand Up @@ -2424,6 +2478,11 @@ export interface ContainerProperties {
* Fargate.</p>
*/
ephemeralStorage?: EphemeralStorage;

/**
* <p>An object that represents the compute environment architecture for Batch jobs on Fargate.</p>
*/
runtimePlatform?: RuntimePlatform;
}

/**
Expand Down Expand Up @@ -3535,6 +3594,11 @@ export interface ContainerDetail {
* Fargate.</p>
*/
ephemeralStorage?: EphemeralStorage;

/**
* <p>An object that represents the compute environment architecture for Batch jobs on Fargate.</p>
*/
runtimePlatform?: RuntimePlatform;
}

/**
Expand Down Expand Up @@ -4526,6 +4590,8 @@ export interface RegisterJobDefinitionResponse {
/**
* @public
* <p>The overrides that should be sent to a container.</p>
* <p>For information about using Batch overrides when you connect event sources to targets, see
* <a href="https://docs.aws.amazon.com/eventbridge/latest/pipes-reference/API_BatchContainerOverrides.html">BatchContainerOverrides</a>.</p>
*/
export interface ContainerOverrides {
/**
Expand Down Expand Up @@ -4563,6 +4629,9 @@ export interface ContainerOverrides {
/**
* <p>The command to send to the container that overrides the default command from the Docker
* image or the job definition.</p>
* <note>
* <p>This parameter can't contain an empty string.</p>
* </note>
*/
command?: string[];

Expand Down Expand Up @@ -4740,8 +4809,11 @@ export interface SubmitJobRequest {
jobQueue: string | undefined;

/**
* <p>The share identifier for the job. If the job queue doesn't have a scheduling policy, then this parameter must
* not be specified. If the job queue has a scheduling policy, then this parameter must be specified.</p>
* <p>The share identifier for the job. Don't specify this parameter if the job queue doesn't
* have a scheduling policy. If the job queue has a scheduling policy, then this parameter must
* be specified.</p>
* <p>This string is limited to 255 alphanumeric characters, and can be followed by an asterisk
* (*).</p>
*/
shareIdentifier?: string;

Expand Down Expand Up @@ -4957,8 +5029,9 @@ export type CRUpdateAllocationStrategy = (typeof CRUpdateAllocationStrategy)[key
*/
export interface ComputeResourceUpdate {
/**
* <p>The minimum number of Amazon EC2 vCPUs that an environment should maintain (even if the compute
* environment is <code>DISABLED</code>).</p>
* <p>The minimum number of
* vCPUs that
* an environment should maintain (even if the compute environment is <code>DISABLED</code>).</p>
* <note>
* <p>This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it.</p>
* </note>
Expand All @@ -4979,8 +5052,10 @@ export interface ComputeResourceUpdate {
maxvCpus?: number;

/**
* <p>The desired number of Amazon EC2 vCPUS in the compute environment. Batch modifies this value
* between the minimum and maximum values based on job queue demand.</p>
* <p>The desired number of
* vCPUS in the
* compute environment. Batch modifies this value between the minimum and maximum values based on
* job queue demand.</p>
* <note>
* <p>This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it.</p>
* </note>
Expand Down
5 changes: 5 additions & 0 deletions clients/client-batch/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ import {
PlatformCapability,
ResourceRequirement,
RetryStrategy,
RuntimePlatform,
SchedulingPolicyDetail,
Secret,
ServerException,
Expand Down Expand Up @@ -2276,6 +2277,8 @@ const se_FairsharePolicy = (input: FairsharePolicy, context: __SerdeContext): an

// se_RetryStrategy omitted.

// se_RuntimePlatform omitted.

// se_Secret omitted.

// se_SecretList omitted.
Expand Down Expand Up @@ -2504,6 +2507,8 @@ const de_FairsharePolicy = (output: any, context: __SerdeContext): FairsharePoli

// de_RetryStrategy omitted.

// de_RuntimePlatform omitted.

/**
* deserializeAws_restJson1SchedulingPolicyDetail
*/
Expand Down
Loading

0 comments on commit 40de6f0

Please sign in to comment.