Skip to content

Commit

Permalink
feat(client-batch): Improvements of integration between AWS Batch and…
Browse files Browse the repository at this point in the history
… EC2.
  • Loading branch information
awstools committed Aug 16, 2024
1 parent b4200b0 commit 6612591
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 10 deletions.
10 changes: 1 addition & 9 deletions clients/client-batch/src/commands/CancelJobCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,7 @@ export interface CancelJobCommandInput extends CancelJobRequest {}
export interface CancelJobCommandOutput extends CancelJobResponse, __MetadataBearer {}

/**
* <p>Cancels a job in an Batch job queue. Jobs that are in the
* <code>SUBMITTED</code>
* or
* <code>PENDING</code>
* are
* canceled. A job
* 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>
* <p>Cancels a job in an Batch job queue. Jobs that are in a <code>SUBMITTED</code>, <code>PENDING</code>, or <code>RUNNABLE</code> state are cancelled and 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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export interface CreateComputeEnvironmentCommandOutput extends CreateComputeEnvi
* eksClusterArn: "STRING_VALUE", // required
* kubernetesNamespace: "STRING_VALUE", // required
* },
* context: "STRING_VALUE",
* };
* const command = new CreateComputeEnvironmentCommand(input);
* const response = await client.send(command);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export interface DescribeComputeEnvironmentsCommandOutput
* // },
* // containerOrchestrationType: "ECS" || "EKS",
* // uuid: "STRING_VALUE",
* // context: "STRING_VALUE",
* // },
* // ],
* // nextToken: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export interface UpdateComputeEnvironmentCommandOutput extends UpdateComputeEnvi
* terminateJobsOnUpdate: true || false,
* jobExecutionTimeoutMinutes: Number("long"),
* },
* context: "STRING_VALUE",
* };
* const command = new UpdateComputeEnvironmentCommand(input);
* const response = await client.send(command);
Expand Down
18 changes: 18 additions & 0 deletions clients/client-batch/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,12 @@ export interface CreateComputeEnvironmentRequest {
* @public
*/
eksConfiguration?: EksConfiguration;

/**
* <p>Reserved.</p>
* @public
*/
context?: string;
}

/**
Expand Down Expand Up @@ -1606,6 +1612,12 @@ export interface ComputeEnvironmentDetail {
* @public
*/
uuid?: string;

/**
* <p>Reserved.</p>
* @public
*/
context?: string;
}

/**
Expand Down Expand Up @@ -7299,6 +7311,12 @@ export interface UpdateComputeEnvironmentRequest {
* @public
*/
updatePolicy?: UpdatePolicy;

/**
* <p>Reserved.</p>
* @public
*/
context?: string;
}

/**
Expand Down
2 changes: 2 additions & 0 deletions clients/client-batch/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ export const se_CreateComputeEnvironmentCommand = async (
take(input, {
computeEnvironmentName: [],
computeResources: (_) => _json(_),
context: [],
eksConfiguration: (_) => _json(_),
serviceRole: [],
state: [],
Expand Down Expand Up @@ -722,6 +723,7 @@ export const se_UpdateComputeEnvironmentCommand = async (
take(input, {
computeEnvironment: [],
computeResources: (_) => _json(_),
context: [],
serviceRole: [],
state: [],
unmanagedvCpus: [],
Expand Down
20 changes: 19 additions & 1 deletion codegen/sdk-codegen/aws-models/batch.json
Original file line number Diff line number Diff line change
Expand Up @@ -1588,7 +1588,7 @@
}
],
"traits": {
"smithy.api#documentation": "<p>Cancels a job in an Batch job queue. Jobs that are in the\n <code>SUBMITTED</code>\n or\n <code>PENDING</code>\n are\n canceled. A job\n in<code>RUNNABLE</code> remains in <code>RUNNABLE</code> until it reaches the head of the\n job queue. Then the job status is updated to\n <code>FAILED</code>.</p>\n <note>\n <p>A <code>PENDING</code> job is canceled after all dependency jobs are completed.\n Therefore, it may take longer than expected to cancel a job in <code>PENDING</code>\n status.</p>\n <p>When you try to cancel an array parent job in <code>PENDING</code>, Batch attempts to\n cancel all child jobs. The array parent job is canceled when all child jobs are\n completed.</p>\n </note>\n <p>Jobs that progressed to the <code>STARTING</code> or\n <code>RUNNING</code> state aren't canceled. However, the API operation still succeeds, even\n if no job is canceled. These jobs must be terminated with the <a>TerminateJob</a>\n operation.</p>",
"smithy.api#documentation": "<p>Cancels a job in an Batch job queue. Jobs that are in a <code>SUBMITTED</code>, <code>PENDING</code>, or <code>RUNNABLE</code> state are cancelled and the job status is updated to <code>FAILED</code>.</p>\n <note>\n <p>A <code>PENDING</code> job is canceled after all dependency jobs are completed.\n Therefore, it may take longer than expected to cancel a job in <code>PENDING</code>\n status.</p>\n <p>When you try to cancel an array parent job in <code>PENDING</code>, Batch attempts to\n cancel all child jobs. The array parent job is canceled when all child jobs are\n completed.</p>\n </note>\n <p>Jobs that progressed to the <code>STARTING</code> or\n <code>RUNNING</code> state aren't canceled. However, the API operation still succeeds, even\n if no job is canceled. These jobs must be terminated with the <a>TerminateJob</a>\n operation.</p>",
"smithy.api#examples": [
{
"title": "To cancel a job",
Expand Down Expand Up @@ -1748,6 +1748,12 @@
"traits": {
"smithy.api#documentation": "<p>Unique identifier for the compute environment.</p>"
}
},
"context": {
"target": "com.amazonaws.batch#String",
"traits": {
"smithy.api#documentation": "<p>Reserved.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -2562,6 +2568,12 @@
"traits": {
"smithy.api#documentation": "<p>The details for the Amazon EKS cluster that supports the compute environment.</p>"
}
},
"context": {
"target": "com.amazonaws.batch#String",
"traits": {
"smithy.api#documentation": "<p>Reserved.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -7966,6 +7978,12 @@
"traits": {
"smithy.api#documentation": "<p>Specifies the updated infrastructure update policy for the compute environment. For more\n information about infrastructure updates, see <a href=\"https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html\">Updating compute environments</a> in\n the <i>Batch User Guide</i>.</p>"
}
},
"context": {
"target": "com.amazonaws.batch#String",
"traits": {
"smithy.api#documentation": "<p>Reserved.</p>"
}
}
},
"traits": {
Expand Down

0 comments on commit 6612591

Please sign in to comment.