From 0260ae8c4b30d573164d706b8191cd81ed36cdf9 Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 31 Oct 2024 18:23:40 +0000 Subject: [PATCH] feat(client-batch): Add `podNamespace` to `EksAttemptDetail` and `containerID` to `EksAttemptContainerDetail`. --- clients/client-batch/README.md | 2 +- .../src/commands/DescribeJobsCommand.ts | 3 + clients/client-batch/src/models/models_0.ts | 61 ++++++++++--------- codegen/sdk-codegen/aws-models/batch.json | 36 +++++++---- 4 files changed, 60 insertions(+), 42 deletions(-) diff --git a/clients/client-batch/README.md b/clients/client-batch/README.md index c78c728999a4..02f83029c05d 100644 --- a/clients/client-batch/README.md +++ b/clients/client-batch/README.md @@ -21,7 +21,7 @@ on analyzing results and solving your specific problems instead.

## Installing -To install the this package, simply type add or install @aws-sdk/client-batch +To install this package, simply type add or install @aws-sdk/client-batch using your favorite package manager: - `npm install @aws-sdk/client-batch` diff --git a/clients/client-batch/src/commands/DescribeJobsCommand.ts b/clients/client-batch/src/commands/DescribeJobsCommand.ts index 1f648ff4c24d..6f3062a30071 100644 --- a/clients/client-batch/src/commands/DescribeJobsCommand.ts +++ b/clients/client-batch/src/commands/DescribeJobsCommand.ts @@ -647,6 +647,7 @@ export interface DescribeJobsCommandOutput extends DescribeJobsResponse, __Metad * // containers: [ // EksAttemptContainerDetails * // { // EksAttemptContainerDetail * // name: "STRING_VALUE", + * // containerID: "STRING_VALUE", * // exitCode: Number("int"), * // reason: "STRING_VALUE", * // }, @@ -654,12 +655,14 @@ export interface DescribeJobsCommandOutput extends DescribeJobsResponse, __Metad * // initContainers: [ * // { * // name: "STRING_VALUE", + * // containerID: "STRING_VALUE", * // exitCode: Number("int"), * // reason: "STRING_VALUE", * // }, * // ], * // eksClusterArn: "STRING_VALUE", * // podName: "STRING_VALUE", + * // podNamespace: "STRING_VALUE", * // nodeName: "STRING_VALUE", * // startedAt: Number("long"), * // stoppedAt: Number("long"), diff --git a/clients/client-batch/src/models/models_0.ts b/clients/client-batch/src/models/models_0.ts index 81f4c9d8453d..e316decc011b 100644 --- a/clients/client-batch/src/models/models_0.ts +++ b/clients/client-batch/src/models/models_0.ts @@ -276,8 +276,9 @@ export interface CancelJobRequest { /** *

A message to attach to the job that explains the reason for canceling it. This message is - * returned by future DescribeJobs operations on the job. This message is also + * returned by future DescribeJobs operations on the job. It is also * recorded in the Batch activity logs.

+ *

This parameter has as limit of 1024 characters.

* @public */ reason: string | undefined; @@ -1062,8 +1063,7 @@ export type JobStateTimeLimitActionsState = (typeof JobStateTimeLimitActionsState)[keyof typeof JobStateTimeLimitActionsState]; /** - *

Specifies an action that Batch will take after the job has remained at the head of the queue in the specified - * state for longer than the specified time.

+ *

Specifies an action that Batch will take after the job has remained at the head of the queue in the specified state for longer than the specified time.

* @public */ export interface JobStateTimeLimitAction { @@ -1129,14 +1129,13 @@ export interface CreateJobQueueRequest { state?: JQState; /** - *

The Amazon Resource Name (ARN) of the fair share scheduling policy. If this parameter is specified, the job - * queue uses a fair share scheduling policy. If this parameter isn't specified, the job queue - * uses a first in, first out (FIFO) scheduling policy. After a job queue is created, you can - * replace but can't remove the fair share scheduling policy. The format is + *

The Amazon Resource Name (ARN) of the fair share scheduling policy. Job queues that don't have a scheduling policy are scheduled in a first-in, first-out (FIFO) model. After a job queue has a scheduling policy, it can be replaced but can't be removed.

+ *

The format is * aws:Partition:batch:Region:Account:scheduling-policy/Name - * . - * An example is + * .

+ *

An example is * aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy.

+ *

A job queue without a scheduling policy is scheduled as a FIFO job queue and can't have a scheduling policy added. Jobs queues with a scheduling policy can have a maximum of 500 active fair share identifiers. When the limit has been reached, submissions of any jobs that add a new fair share identifier fail.

* @public */ schedulingPolicyArn?: string; @@ -1179,8 +1178,7 @@ export interface CreateJobQueueRequest { tags?: Record; /** - *

The set of actions that Batch performs on jobs that remain at the head of the job queue in the specified state - * longer than specified times. Batch will perform each action after maxTimeSeconds has passed.

+ *

The set of actions that Batch performs on jobs that remain at the head of the job queue in the specified state longer than specified times. Batch will perform each action after maxTimeSeconds has passed. (Note: The minimum value for maxTimeSeconds is 600 (10 minutes) and its maximum value is 86,400 (24 hours).)

* @public */ jobStateTimeLimitActions?: JobStateTimeLimitAction[]; @@ -3285,7 +3283,7 @@ export interface EcsProperties { /** *

An object that contains the properties for the Amazon ECS task definition of a job.

* - *

This object is currently limited to one element.

+ *

This object is currently limited to one task element. However, the task element can run up to 10 containers.

*
* @public */ @@ -3782,6 +3780,9 @@ export interface EksPodProperties { /** *

The properties of the container that's used on the Amazon EKS pod.

+ * + *

This object is limited to 10 elements.

+ *
* @public */ containers?: EksContainer[]; @@ -3793,7 +3794,7 @@ export interface EksPodProperties { * For more information, see Init * Containers in the Kubernetes documentation.

* - *

This object is limited to 10 elements

+ *

This object is limited to 10 elements.

*
* @public */ @@ -4298,13 +4299,7 @@ export interface JobQueueDetail { statusReason?: string; /** - *

The priority of the job queue. Job queues with a higher priority (or a higher integer value - * for the priority parameter) are evaluated first when associated with the same - * compute environment. Priority is determined in descending order. For example, a job queue with a - * priority value of 10 is given scheduling preference over a job queue with a priority - * value of 1. All of the compute environments must be either Amazon EC2 (EC2 - * or SPOT) or Fargate (FARGATE or FARGATE_SPOT). Amazon EC2 and - * Fargate compute environments can't be mixed.

+ *

The priority of the job queue. Job queues with a higher priority (or a higher integer value for the priority parameter) are evaluated first when associated with the same compute environment. Priority is determined in descending order. For example, a job queue with a priority value of 10 is given scheduling preference over a job queue with a priority value of 1. All of the compute environments must be either Amazon EC2 (EC2 or SPOT) or Fargate (FARGATE or FARGATE_SPOT). Amazon EC2 and Fargate compute environments can't be mixed.

* @public */ priority: number | undefined; @@ -4324,8 +4319,7 @@ export interface JobQueueDetail { tags?: Record; /** - *

The set of actions that Batch perform on jobs that remain at the head of the job queue in the specified state - * longer than specified times. Batch will perform each action after maxTimeSeconds has passed.

+ *

The set of actions that Batch perform on jobs that remain at the head of the job queue in the specified state longer than specified times. Batch will perform each action after maxTimeSeconds has passed.

* @public */ jobStateTimeLimitActions?: JobStateTimeLimitAction[]; @@ -5032,6 +5026,12 @@ export interface EksAttemptContainerDetail { */ name?: string; + /** + *

The ID for the container.

+ * @public + */ + containerID?: string; + /** *

The exit code returned for the job attempt. A non-zero exit code is considered * failed.

@@ -5077,6 +5077,12 @@ export interface EksAttemptDetail { */ podName?: string; + /** + *

The namespace of the Amazon EKS cluster that the pod exists in.

+ * @public + */ + podNamespace?: string; + /** *

The name of the node for this job attempt.

* @public @@ -6501,14 +6507,11 @@ export interface EksPodPropertiesOverride { containers?: EksContainerOverride[]; /** - *

The overrides for the conatainers defined in the Amazon EKS pod. These containers run before + *

The overrides for the initContainers defined in the Amazon EKS pod. These containers run before * application containers, always runs to completion, and must complete successfully before the next * container starts. These containers are registered with the Amazon EKS Connector agent and persists the * registration information in the Kubernetes backend data store. For more information, see Init * Containers in the Kubernetes documentation.

- * - *

This object is limited to 10 elements

- *
* @public */ initContainers?: EksContainerOverride[]; @@ -6835,8 +6838,9 @@ export interface TerminateJobRequest { /** *

A message to attach to the job that explains the reason for canceling it. This message is - * returned by future DescribeJobs operations on the job. This message is also + * returned by future DescribeJobs operations on the job. It is also * recorded in the Batch activity logs.

+ *

This parameter has as limit of 1024 characters.

* @public */ reason: string | undefined; @@ -7396,8 +7400,7 @@ export interface UpdateJobQueueRequest { computeEnvironmentOrder?: ComputeEnvironmentOrder[]; /** - *

The set of actions that Batch perform on jobs that remain at the head of the job queue in the specified state - * longer than specified times. Batch will perform each action after maxTimeSeconds has passed.

+ *

The set of actions that Batch perform on jobs that remain at the head of the job queue in the specified state longer than specified times. Batch will perform each action after maxTimeSeconds has passed. (Note: The minimum value for maxTimeSeconds is 600 (10 minutes) and its maximum value is 86,400 (24 hours).)

* @public */ jobStateTimeLimitActions?: JobStateTimeLimitAction[]; diff --git a/codegen/sdk-codegen/aws-models/batch.json b/codegen/sdk-codegen/aws-models/batch.json index 99b19a67e817..92505eed11c7 100644 --- a/codegen/sdk-codegen/aws-models/batch.json +++ b/codegen/sdk-codegen/aws-models/batch.json @@ -1622,7 +1622,7 @@ "target": "com.amazonaws.batch#String", "traits": { "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

A message to attach to the job that explains the reason for canceling it. This message is\n returned by future DescribeJobs operations on the job. This message is also\n recorded in the Batch activity logs.

", + "smithy.api#documentation": "

A message to attach to the job that explains the reason for canceling it. This message is\n returned by future DescribeJobs operations on the job. It is also\n recorded in the Batch activity logs.

\n

This parameter has as limit of 1024 characters.

", "smithy.api#required": {} } } @@ -2690,7 +2690,7 @@ "schedulingPolicyArn": { "target": "com.amazonaws.batch#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the fair share scheduling policy. If this parameter is specified, the job\n queue uses a fair share scheduling policy. If this parameter isn't specified, the job queue\n uses a first in, first out (FIFO) scheduling policy. After a job queue is created, you can\n replace but can't remove the fair share scheduling policy. The format is\n aws:Partition:batch:Region:Account:scheduling-policy/Name\n .\n An example is\n aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the fair share scheduling policy. Job queues that don't have a scheduling policy are scheduled in a first-in, first-out (FIFO) model. After a job queue has a scheduling policy, it can be replaced but can't be removed.

\n

The format is\n aws:Partition:batch:Region:Account:scheduling-policy/Name\n .

\n

An example is\n aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy.

\n

A job queue without a scheduling policy is scheduled as a FIFO job queue and can't have a scheduling policy added. Jobs queues with a scheduling policy can have a maximum of 500 active fair share identifiers. When the limit has been reached, submissions of any jobs that add a new fair share identifier fail.

" } }, "priority": { @@ -2718,7 +2718,7 @@ "jobStateTimeLimitActions": { "target": "com.amazonaws.batch#JobStateTimeLimitActions", "traits": { - "smithy.api#documentation": "

The set of actions that Batch performs on jobs that remain at the head of the job queue in the specified state\n longer than specified times. Batch will perform each action after maxTimeSeconds has passed.

" + "smithy.api#documentation": "

The set of actions that Batch performs on jobs that remain at the head of the job queue in the specified state longer than specified times. Batch will perform each action after maxTimeSeconds has passed. (Note: The minimum value for maxTimeSeconds is 600 (10 minutes) and its maximum value is 86,400 (24 hours).)

" } } }, @@ -3762,7 +3762,7 @@ "target": "com.amazonaws.batch#ListEcsTaskProperties", "traits": { "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

An object that contains the properties for the Amazon ECS task definition of a job.

\n \n

This object is currently limited to one element.

\n
", + "smithy.api#documentation": "

An object that contains the properties for the Amazon ECS task definition of a job.

\n \n

This object is currently limited to one task element. However, the task element can run up to 10 containers.

\n
", "smithy.api#required": {} } } @@ -3958,6 +3958,12 @@ "smithy.api#documentation": "

The name of a container.

" } }, + "containerID": { + "target": "com.amazonaws.batch#String", + "traits": { + "smithy.api#documentation": "

The ID for the container.

" + } + }, "exitCode": { "target": "com.amazonaws.batch#Integer", "traits": { @@ -4008,6 +4014,12 @@ "smithy.api#documentation": "

The name of the pod for this job attempt.

" } }, + "podNamespace": { + "target": "com.amazonaws.batch#String", + "traits": { + "smithy.api#documentation": "

The namespace of the Amazon EKS cluster that the pod exists in.

" + } + }, "nodeName": { "target": "com.amazonaws.batch#String", "traits": { @@ -4487,13 +4499,13 @@ "containers": { "target": "com.amazonaws.batch#EksContainers", "traits": { - "smithy.api#documentation": "

The properties of the container that's used on the Amazon EKS pod.

" + "smithy.api#documentation": "

The properties of the container that's used on the Amazon EKS pod.

\n \n

This object is limited to 10 elements.

\n
" } }, "initContainers": { "target": "com.amazonaws.batch#EksContainers", "traits": { - "smithy.api#documentation": "

These containers run before application containers, always runs to completion, and must\n complete successfully before the next container starts. These containers are registered with the\n Amazon EKS Connector agent and persists the registration information in the Kubernetes backend data store.\n For more information, see Init\n Containers in the Kubernetes documentation.

\n \n

This object is limited to 10 elements

\n
" + "smithy.api#documentation": "

These containers run before application containers, always runs to completion, and must\n complete successfully before the next container starts. These containers are registered with the\n Amazon EKS Connector agent and persists the registration information in the Kubernetes backend data store.\n For more information, see Init\n Containers in the Kubernetes documentation.

\n \n

This object is limited to 10 elements.

\n
" } }, "volumes": { @@ -4605,7 +4617,7 @@ "initContainers": { "target": "com.amazonaws.batch#EksContainerOverrideList", "traits": { - "smithy.api#documentation": "

The overrides for the conatainers defined in the Amazon EKS pod. These containers run before\n application containers, always runs to completion, and must complete successfully before the next\n container starts. These containers are registered with the Amazon EKS Connector agent and persists the\n registration information in the Kubernetes backend data store. For more information, see Init\n Containers in the Kubernetes documentation.

\n \n

This object is limited to 10 elements

\n
" + "smithy.api#documentation": "

The overrides for the initContainers defined in the Amazon EKS pod. These containers run before\n application containers, always runs to completion, and must complete successfully before the next\n container starts. These containers are registered with the Amazon EKS Connector agent and persists the\n registration information in the Kubernetes backend data store. For more information, see Init\n Containers in the Kubernetes documentation.

" } }, "metadata": { @@ -5478,7 +5490,7 @@ "target": "com.amazonaws.batch#Integer", "traits": { "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

The priority of the job queue. Job queues with a higher priority (or a higher integer value\n for the priority parameter) are evaluated first when associated with the same\n compute environment. Priority is determined in descending order. For example, a job queue with a\n priority value of 10 is given scheduling preference over a job queue with a priority\n value of 1. All of the compute environments must be either Amazon EC2 (EC2\n or SPOT) or Fargate (FARGATE or FARGATE_SPOT). Amazon EC2 and\n Fargate compute environments can't be mixed.

", + "smithy.api#documentation": "

The priority of the job queue. Job queues with a higher priority (or a higher integer value for the priority parameter) are evaluated first when associated with the same compute environment. Priority is determined in descending order. For example, a job queue with a priority value of 10 is given scheduling preference over a job queue with a priority value of 1. All of the compute environments must be either Amazon EC2 (EC2 or SPOT) or Fargate (FARGATE or FARGATE_SPOT). Amazon EC2 and Fargate compute environments can't be mixed.

", "smithy.api#required": {} } }, @@ -5499,7 +5511,7 @@ "jobStateTimeLimitActions": { "target": "com.amazonaws.batch#JobStateTimeLimitActions", "traits": { - "smithy.api#documentation": "

The set of actions that Batch perform on jobs that remain at the head of the job queue in the specified state\n longer than specified times. Batch will perform each action after maxTimeSeconds has passed.

" + "smithy.api#documentation": "

The set of actions that Batch perform on jobs that remain at the head of the job queue in the specified state longer than specified times. Batch will perform each action after maxTimeSeconds has passed.

" } } }, @@ -5550,7 +5562,7 @@ } }, "traits": { - "smithy.api#documentation": "

Specifies an action that Batch will take after the job has remained at the head of the queue in the specified\n state for longer than the specified time.

" + "smithy.api#documentation": "

Specifies an action that Batch will take after the job has remained at the head of the queue in the specified state for longer than the specified time.

" } }, "com.amazonaws.batch#JobStateTimeLimitActions": { @@ -7739,7 +7751,7 @@ "target": "com.amazonaws.batch#String", "traits": { "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

A message to attach to the job that explains the reason for canceling it. This message is\n returned by future DescribeJobs operations on the job. This message is also\n recorded in the Batch activity logs.

", + "smithy.api#documentation": "

A message to attach to the job that explains the reason for canceling it. This message is\n returned by future DescribeJobs operations on the job. It is also\n recorded in the Batch activity logs.

\n

This parameter has as limit of 1024 characters.

", "smithy.api#required": {} } } @@ -8088,7 +8100,7 @@ "jobStateTimeLimitActions": { "target": "com.amazonaws.batch#JobStateTimeLimitActions", "traits": { - "smithy.api#documentation": "

The set of actions that Batch perform on jobs that remain at the head of the job queue in the specified state\n longer than specified times. Batch will perform each action after maxTimeSeconds has passed.

" + "smithy.api#documentation": "

The set of actions that Batch perform on jobs that remain at the head of the job queue in the specified state longer than specified times. Batch will perform each action after maxTimeSeconds has passed. (Note: The minimum value for maxTimeSeconds is 600 (10 minutes) and its maximum value is 86,400 (24 hours).)

" } } },