@aws-sdk/client-batch 3.287.0 → 3.289.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,6 +32,18 @@ export interface CancelJobCommandOutput extends CancelJobResponse, __MetadataBea
32
32
  * @see {@link CancelJobCommandOutput} for command's `response` shape.
33
33
  * @see {@link BatchClientResolvedConfig | config} for BatchClient's `config` shape.
34
34
  *
35
+ * @example To cancel a job
36
+ * ```javascript
37
+ * // This example cancels a job with the specified job ID.
38
+ * const input = {
39
+ * "jobId": "1d828f65-7a4d-42e8-996d-3b900ed59dc4",
40
+ * "reason": "Cancelling job."
41
+ * };
42
+ * const command = new CancelJobCommand(input);
43
+ * await client.send(command);
44
+ * // example id: to-cancel-a-job-1481152314733
45
+ * ```
46
+ *
35
47
  */
36
48
  export declare class CancelJobCommand extends $Command<CancelJobCommandInput, CancelJobCommandOutput, BatchClientResolvedConfig> {
37
49
  readonly input: CancelJobCommandInput;
@@ -107,6 +107,96 @@ export interface CreateComputeEnvironmentCommandOutput extends CreateComputeEnvi
107
107
  * @see {@link CreateComputeEnvironmentCommandOutput} for command's `response` shape.
108
108
  * @see {@link BatchClientResolvedConfig | config} for BatchClient's `config` shape.
109
109
  *
110
+ * @example To create a managed EC2 compute environment
111
+ * ```javascript
112
+ * // This example creates a managed compute environment with specific C4 instance types that are launched on demand. The compute environment is called C4OnDemand.
113
+ * const input = {
114
+ * "type": "MANAGED",
115
+ * "computeEnvironmentName": "C4OnDemand",
116
+ * "computeResources": {
117
+ * "type": "EC2",
118
+ * "desiredvCpus": 48,
119
+ * "ec2KeyPair": "id_rsa",
120
+ * "instanceRole": "ecsInstanceRole",
121
+ * "instanceTypes": [
122
+ * "c4.large",
123
+ * "c4.xlarge",
124
+ * "c4.2xlarge",
125
+ * "c4.4xlarge",
126
+ * "c4.8xlarge"
127
+ * ],
128
+ * "maxvCpus": 128,
129
+ * "minvCpus": 0,
130
+ * "securityGroupIds": [
131
+ * "sg-cf5093b2"
132
+ * ],
133
+ * "subnets": [
134
+ * "subnet-220c0e0a",
135
+ * "subnet-1a95556d",
136
+ * "subnet-978f6dce"
137
+ * ],
138
+ * "tags": {
139
+ * "Name": "Batch Instance - C4OnDemand"
140
+ * }
141
+ * },
142
+ * "serviceRole": "arn:aws:iam::012345678910:role/AWSBatchServiceRole",
143
+ * "state": "ENABLED"
144
+ * };
145
+ * const command = new CreateComputeEnvironmentCommand(input);
146
+ * const response = await client.send(command);
147
+ * /* response ==
148
+ * {
149
+ * "computeEnvironmentArn": "arn:aws:batch:us-east-1:012345678910:compute-environment/C4OnDemand",
150
+ * "computeEnvironmentName": "C4OnDemand"
151
+ * }
152
+ * *\/
153
+ * // example id: to-create-a-managed-ec2-compute-environment-1481152600017
154
+ * ```
155
+ *
156
+ * @example To create a managed EC2 Spot compute environment
157
+ * ```javascript
158
+ * // This example creates a managed compute environment with the M4 instance type that is launched when the Spot bid price is at or below 20% of the On-Demand price for the instance type. The compute environment is called M4Spot.
159
+ * const input = {
160
+ * "type": "MANAGED",
161
+ * "computeEnvironmentName": "M4Spot",
162
+ * "computeResources": {
163
+ * "type": "SPOT",
164
+ * "bidPercentage": 20,
165
+ * "desiredvCpus": 4,
166
+ * "ec2KeyPair": "id_rsa",
167
+ * "instanceRole": "ecsInstanceRole",
168
+ * "instanceTypes": [
169
+ * "m4"
170
+ * ],
171
+ * "maxvCpus": 128,
172
+ * "minvCpus": 0,
173
+ * "securityGroupIds": [
174
+ * "sg-cf5093b2"
175
+ * ],
176
+ * "spotIamFleetRole": "arn:aws:iam::012345678910:role/aws-ec2-spot-fleet-role",
177
+ * "subnets": [
178
+ * "subnet-220c0e0a",
179
+ * "subnet-1a95556d",
180
+ * "subnet-978f6dce"
181
+ * ],
182
+ * "tags": {
183
+ * "Name": "Batch Instance - M4Spot"
184
+ * }
185
+ * },
186
+ * "serviceRole": "arn:aws:iam::012345678910:role/AWSBatchServiceRole",
187
+ * "state": "ENABLED"
188
+ * };
189
+ * const command = new CreateComputeEnvironmentCommand(input);
190
+ * const response = await client.send(command);
191
+ * /* response ==
192
+ * {
193
+ * "computeEnvironmentArn": "arn:aws:batch:us-east-1:012345678910:compute-environment/M4Spot",
194
+ * "computeEnvironmentName": "M4Spot"
195
+ * }
196
+ * *\/
197
+ * // example id: to-create-a-managed-ec2-spot-compute-environment-1481152844190
198
+ * ```
199
+ *
110
200
  */
111
201
  export declare class CreateComputeEnvironmentCommand extends $Command<CreateComputeEnvironmentCommandInput, CreateComputeEnvironmentCommandOutput, BatchClientResolvedConfig> {
112
202
  readonly input: CreateComputeEnvironmentCommandInput;
@@ -34,6 +34,60 @@ export interface CreateJobQueueCommandOutput extends CreateJobQueueResponse, __M
34
34
  * @see {@link CreateJobQueueCommandOutput} for command's `response` shape.
35
35
  * @see {@link BatchClientResolvedConfig | config} for BatchClient's `config` shape.
36
36
  *
37
+ * @example To create a job queue with a single compute environment
38
+ * ```javascript
39
+ * // This example creates a job queue called LowPriority that uses the M4Spot compute environment.
40
+ * const input = {
41
+ * "computeEnvironmentOrder": [
42
+ * {
43
+ * "computeEnvironment": "M4Spot",
44
+ * "order": 1
45
+ * }
46
+ * ],
47
+ * "jobQueueName": "LowPriority",
48
+ * "priority": 1,
49
+ * "state": "ENABLED"
50
+ * };
51
+ * const command = new CreateJobQueueCommand(input);
52
+ * const response = await client.send(command);
53
+ * /* response ==
54
+ * {
55
+ * "jobQueueArn": "arn:aws:batch:us-east-1:012345678910:job-queue/LowPriority",
56
+ * "jobQueueName": "LowPriority"
57
+ * }
58
+ * *\/
59
+ * // example id: to-create-a-job-queue-with-a-single-compute-environment-1481152967946
60
+ * ```
61
+ *
62
+ * @example To create a job queue with multiple compute environments
63
+ * ```javascript
64
+ * // This example creates a job queue called HighPriority that uses the C4OnDemand compute environment with an order of 1 and the M4Spot compute environment with an order of 2.
65
+ * const input = {
66
+ * "computeEnvironmentOrder": [
67
+ * {
68
+ * "computeEnvironment": "C4OnDemand",
69
+ * "order": 1
70
+ * },
71
+ * {
72
+ * "computeEnvironment": "M4Spot",
73
+ * "order": 2
74
+ * }
75
+ * ],
76
+ * "jobQueueName": "HighPriority",
77
+ * "priority": 10,
78
+ * "state": "ENABLED"
79
+ * };
80
+ * const command = new CreateJobQueueCommand(input);
81
+ * const response = await client.send(command);
82
+ * /* response ==
83
+ * {
84
+ * "jobQueueArn": "arn:aws:batch:us-east-1:012345678910:job-queue/HighPriority",
85
+ * "jobQueueName": "HighPriority"
86
+ * }
87
+ * *\/
88
+ * // example id: to-create-a-job-queue-with-multiple-compute-environments-1481153027051
89
+ * ```
90
+ *
37
91
  */
38
92
  export declare class CreateJobQueueCommand extends $Command<CreateJobQueueCommandInput, CreateJobQueueCommandOutput, BatchClientResolvedConfig> {
39
93
  readonly input: CreateJobQueueCommandInput;
@@ -32,6 +32,17 @@ export interface DeleteComputeEnvironmentCommandOutput extends DeleteComputeEnvi
32
32
  * @see {@link DeleteComputeEnvironmentCommandOutput} for command's `response` shape.
33
33
  * @see {@link BatchClientResolvedConfig | config} for BatchClient's `config` shape.
34
34
  *
35
+ * @example To delete a compute environment
36
+ * ```javascript
37
+ * // This example deletes the P2OnDemand compute environment.
38
+ * const input = {
39
+ * "computeEnvironment": "P2OnDemand"
40
+ * };
41
+ * const command = new DeleteComputeEnvironmentCommand(input);
42
+ * await client.send(command);
43
+ * // example id: to-delete-a-compute-environment-1481153105644
44
+ * ```
45
+ *
35
46
  */
36
47
  export declare class DeleteComputeEnvironmentCommand extends $Command<DeleteComputeEnvironmentCommandInput, DeleteComputeEnvironmentCommandOutput, BatchClientResolvedConfig> {
37
48
  readonly input: DeleteComputeEnvironmentCommandInput;
@@ -32,6 +32,17 @@ export interface DeleteJobQueueCommandOutput extends DeleteJobQueueResponse, __M
32
32
  * @see {@link DeleteJobQueueCommandOutput} for command's `response` shape.
33
33
  * @see {@link BatchClientResolvedConfig | config} for BatchClient's `config` shape.
34
34
  *
35
+ * @example To delete a job queue
36
+ * ```javascript
37
+ * // This example deletes the GPGPU job queue.
38
+ * const input = {
39
+ * "jobQueue": "GPGPU"
40
+ * };
41
+ * const command = new DeleteJobQueueCommand(input);
42
+ * await client.send(command);
43
+ * // example id: to-delete-a-job-queue-1481153508134
44
+ * ```
45
+ *
35
46
  */
36
47
  export declare class DeleteJobQueueCommand extends $Command<DeleteJobQueueCommandInput, DeleteJobQueueCommandOutput, BatchClientResolvedConfig> {
37
48
  readonly input: DeleteJobQueueCommandInput;
@@ -29,6 +29,17 @@ export interface DeregisterJobDefinitionCommandOutput extends DeregisterJobDefin
29
29
  * @see {@link DeregisterJobDefinitionCommandOutput} for command's `response` shape.
30
30
  * @see {@link BatchClientResolvedConfig | config} for BatchClient's `config` shape.
31
31
  *
32
+ * @example To deregister a job definition
33
+ * ```javascript
34
+ * // This example deregisters a job definition called sleep10.
35
+ * const input = {
36
+ * "jobDefinition": "sleep10"
37
+ * };
38
+ * const command = new DeregisterJobDefinitionCommand(input);
39
+ * await client.send(command);
40
+ * // example id: to-deregister-a-job-definition-1481153579565
41
+ * ```
42
+ *
32
43
  */
33
44
  export declare class DeregisterJobDefinitionCommand extends $Command<DeregisterJobDefinitionCommandInput, DeregisterJobDefinitionCommandOutput, BatchClientResolvedConfig> {
34
45
  readonly input: DeregisterJobDefinitionCommandInput;
@@ -32,6 +32,57 @@ export interface DescribeComputeEnvironmentsCommandOutput extends DescribeComput
32
32
  * @see {@link DescribeComputeEnvironmentsCommandOutput} for command's `response` shape.
33
33
  * @see {@link BatchClientResolvedConfig | config} for BatchClient's `config` shape.
34
34
  *
35
+ * @example To describe a compute environment
36
+ * ```javascript
37
+ * // This example describes the P2OnDemand compute environment.
38
+ * const input = {
39
+ * "computeEnvironments": [
40
+ * "P2OnDemand"
41
+ * ]
42
+ * };
43
+ * const command = new DescribeComputeEnvironmentsCommand(input);
44
+ * const response = await client.send(command);
45
+ * /* response ==
46
+ * {
47
+ * "computeEnvironments": [
48
+ * {
49
+ * "type": "MANAGED",
50
+ * "computeEnvironmentArn": "arn:aws:batch:us-east-1:012345678910:compute-environment/P2OnDemand",
51
+ * "computeEnvironmentName": "P2OnDemand",
52
+ * "computeResources": {
53
+ * "type": "EC2",
54
+ * "desiredvCpus": 48,
55
+ * "ec2KeyPair": "id_rsa",
56
+ * "instanceRole": "ecsInstanceRole",
57
+ * "instanceTypes": [
58
+ * "p2"
59
+ * ],
60
+ * "maxvCpus": 128,
61
+ * "minvCpus": 0,
62
+ * "securityGroupIds": [
63
+ * "sg-cf5093b2"
64
+ * ],
65
+ * "subnets": [
66
+ * "subnet-220c0e0a",
67
+ * "subnet-1a95556d",
68
+ * "subnet-978f6dce"
69
+ * ],
70
+ * "tags": {
71
+ * "Name": "Batch Instance - P2OnDemand"
72
+ * }
73
+ * },
74
+ * "ecsClusterArn": "arn:aws:ecs:us-east-1:012345678910:cluster/P2OnDemand_Batch_2c06f29d-d1fe-3a49-879d-42394c86effc",
75
+ * "serviceRole": "arn:aws:iam::012345678910:role/AWSBatchServiceRole",
76
+ * "state": "ENABLED",
77
+ * "status": "VALID",
78
+ * "statusReason": "ComputeEnvironment Healthy"
79
+ * }
80
+ * ]
81
+ * }
82
+ * *\/
83
+ * // example id: to-describe-a-compute-environment-1481153713334
84
+ * ```
85
+ *
35
86
  */
36
87
  export declare class DescribeComputeEnvironmentsCommand extends $Command<DescribeComputeEnvironmentsCommandInput, DescribeComputeEnvironmentsCommandOutput, BatchClientResolvedConfig> {
37
88
  readonly input: DescribeComputeEnvironmentsCommandInput;
@@ -30,6 +30,51 @@ export interface DescribeJobDefinitionsCommandOutput extends DescribeJobDefiniti
30
30
  * @see {@link DescribeJobDefinitionsCommandOutput} for command's `response` shape.
31
31
  * @see {@link BatchClientResolvedConfig | config} for BatchClient's `config` shape.
32
32
  *
33
+ * @example To describe active job definitions
34
+ * ```javascript
35
+ * // This example describes all of your active job definitions.
36
+ * const input = {
37
+ * "status": "ACTIVE"
38
+ * };
39
+ * const command = new DescribeJobDefinitionsCommand(input);
40
+ * const response = await client.send(command);
41
+ * /* response ==
42
+ * {
43
+ * "jobDefinitions": [
44
+ * {
45
+ * "type": "container",
46
+ * "containerProperties": {
47
+ * "command": [
48
+ * "sleep",
49
+ * "60"
50
+ * ],
51
+ * "environment": [],
52
+ * "image": "busybox",
53
+ * "mountPoints": [],
54
+ * "resourceRequirements": [
55
+ * {
56
+ * "type": "MEMORY",
57
+ * "value": "128"
58
+ * },
59
+ * {
60
+ * "type": "VCPU",
61
+ * "value": "1"
62
+ * }
63
+ * ],
64
+ * "ulimits": [],
65
+ * "volumes": []
66
+ * },
67
+ * "jobDefinitionArn": "arn:aws:batch:us-east-1:012345678910:job-definition/sleep60:1",
68
+ * "jobDefinitionName": "sleep60",
69
+ * "revision": 1,
70
+ * "status": "ACTIVE"
71
+ * }
72
+ * ]
73
+ * }
74
+ * *\/
75
+ * // example id: to-describe-active-job-definitions-1481153895831
76
+ * ```
77
+ *
33
78
  */
34
79
  export declare class DescribeJobDefinitionsCommand extends $Command<DescribeJobDefinitionsCommandInput, DescribeJobDefinitionsCommandOutput, BatchClientResolvedConfig> {
35
80
  readonly input: DescribeJobDefinitionsCommandInput;
@@ -29,6 +29,39 @@ export interface DescribeJobQueuesCommandOutput extends DescribeJobQueuesRespons
29
29
  * @see {@link DescribeJobQueuesCommandOutput} for command's `response` shape.
30
30
  * @see {@link BatchClientResolvedConfig | config} for BatchClient's `config` shape.
31
31
  *
32
+ * @example To describe a job queue
33
+ * ```javascript
34
+ * // This example describes the HighPriority job queue.
35
+ * const input = {
36
+ * "jobQueues": [
37
+ * "HighPriority"
38
+ * ]
39
+ * };
40
+ * const command = new DescribeJobQueuesCommand(input);
41
+ * const response = await client.send(command);
42
+ * /* response ==
43
+ * {
44
+ * "jobQueues": [
45
+ * {
46
+ * "computeEnvironmentOrder": [
47
+ * {
48
+ * "computeEnvironment": "arn:aws:batch:us-east-1:012345678910:compute-environment/C4OnDemand",
49
+ * "order": 1
50
+ * }
51
+ * ],
52
+ * "jobQueueArn": "arn:aws:batch:us-east-1:012345678910:job-queue/HighPriority",
53
+ * "jobQueueName": "HighPriority",
54
+ * "priority": 1,
55
+ * "state": "ENABLED",
56
+ * "status": "VALID",
57
+ * "statusReason": "JobQueue Healthy"
58
+ * }
59
+ * ]
60
+ * }
61
+ * *\/
62
+ * // example id: to-describe-a-job-queue-1481153995804
63
+ * ```
64
+ *
32
65
  */
33
66
  export declare class DescribeJobQueuesCommand extends $Command<DescribeJobQueuesCommandInput, DescribeJobQueuesCommandOutput, BatchClientResolvedConfig> {
34
67
  readonly input: DescribeJobQueuesCommandInput;
@@ -29,6 +29,52 @@ export interface DescribeJobsCommandOutput extends DescribeJobsResponse, __Metad
29
29
  * @see {@link DescribeJobsCommandOutput} for command's `response` shape.
30
30
  * @see {@link BatchClientResolvedConfig | config} for BatchClient's `config` shape.
31
31
  *
32
+ * @example To describe a specific job
33
+ * ```javascript
34
+ * // This example describes a job with the specified job ID.
35
+ * const input = {
36
+ * "jobs": [
37
+ * "24fa2d7a-64c4-49d2-8b47-f8da4fbde8e9"
38
+ * ]
39
+ * };
40
+ * const command = new DescribeJobsCommand(input);
41
+ * const response = await client.send(command);
42
+ * /* response ==
43
+ * {
44
+ * "jobs": [
45
+ * {
46
+ * "container": {
47
+ * "command": [
48
+ * "sleep",
49
+ * "60"
50
+ * ],
51
+ * "containerInstanceArn": "arn:aws:ecs:us-east-1:012345678910:container-instance/5406d7cd-58bd-4b8f-9936-48d7c6b1526c",
52
+ * "environment": [],
53
+ * "exitCode": 0,
54
+ * "image": "busybox",
55
+ * "memory": 128,
56
+ * "mountPoints": [],
57
+ * "ulimits": [],
58
+ * "vcpus": 1,
59
+ * "volumes": []
60
+ * },
61
+ * "createdAt": 1480460782010,
62
+ * "dependsOn": [],
63
+ * "jobDefinition": "sleep60",
64
+ * "jobId": "24fa2d7a-64c4-49d2-8b47-f8da4fbde8e9",
65
+ * "jobName": "example",
66
+ * "jobQueue": "arn:aws:batch:us-east-1:012345678910:job-queue/HighPriority",
67
+ * "parameters": {},
68
+ * "startedAt": 1480460816500,
69
+ * "status": "SUCCEEDED",
70
+ * "stoppedAt": 1480460880699
71
+ * }
72
+ * ]
73
+ * }
74
+ * *\/
75
+ * // example id: to-describe-a-specific-job-1481154090490
76
+ * ```
77
+ *
32
78
  */
33
79
  export declare class DescribeJobsCommand extends $Command<DescribeJobsCommandInput, DescribeJobsCommandOutput, BatchClientResolvedConfig> {
34
80
  readonly input: DescribeJobsCommandInput;
@@ -43,6 +43,49 @@ export interface ListJobsCommandOutput extends ListJobsResponse, __MetadataBeare
43
43
  * @see {@link ListJobsCommandOutput} for command's `response` shape.
44
44
  * @see {@link BatchClientResolvedConfig | config} for BatchClient's `config` shape.
45
45
  *
46
+ * @example To list running jobs
47
+ * ```javascript
48
+ * // This example lists the running jobs in the HighPriority job queue.
49
+ * const input = {
50
+ * "jobQueue": "HighPriority"
51
+ * };
52
+ * const command = new ListJobsCommand(input);
53
+ * const response = await client.send(command);
54
+ * /* response ==
55
+ * {
56
+ * "jobSummaryList": [
57
+ * {
58
+ * "jobId": "e66ff5fd-a1ff-4640-b1a2-0b0a142f49bb",
59
+ * "jobName": "example"
60
+ * }
61
+ * ]
62
+ * }
63
+ * *\/
64
+ * // example id: to-list-running-jobs-1481154202164
65
+ * ```
66
+ *
67
+ * @example To list submitted jobs
68
+ * ```javascript
69
+ * // This example lists jobs in the HighPriority job queue that are in the SUBMITTED job status.
70
+ * const input = {
71
+ * "jobQueue": "HighPriority",
72
+ * "jobStatus": "SUBMITTED"
73
+ * };
74
+ * const command = new ListJobsCommand(input);
75
+ * const response = await client.send(command);
76
+ * /* response ==
77
+ * {
78
+ * "jobSummaryList": [
79
+ * {
80
+ * "jobId": "68f0c163-fbd4-44e6-9fd1-25b14a434786",
81
+ * "jobName": "example"
82
+ * }
83
+ * ]
84
+ * }
85
+ * *\/
86
+ * // example id: to-list-submitted-jobs-1481154251623
87
+ * ```
88
+ *
46
89
  */
47
90
  export declare class ListJobsCommand extends $Command<ListJobsCommandInput, ListJobsCommandOutput, BatchClientResolvedConfig> {
48
91
  readonly input: ListJobsCommandInput;
@@ -30,6 +30,26 @@ export interface ListTagsForResourceCommandOutput extends ListTagsForResourceRes
30
30
  * @see {@link ListTagsForResourceCommandOutput} for command's `response` shape.
31
31
  * @see {@link BatchClientResolvedConfig | config} for BatchClient's `config` shape.
32
32
  *
33
+ * @example ListTagsForResource Example
34
+ * ```javascript
35
+ * // This demonstrates calling the ListTagsForResource action.
36
+ * const input = {
37
+ * "resourceArn": "arn:aws:batch:us-east-1:123456789012:job-definition/sleep30:1"
38
+ * };
39
+ * const command = new ListTagsForResourceCommand(input);
40
+ * const response = await client.send(command);
41
+ * /* response ==
42
+ * {
43
+ * "tags": {
44
+ * "Department": "Engineering",
45
+ * "Stage": "Alpha",
46
+ * "User": "JaneDoe"
47
+ * }
48
+ * }
49
+ * *\/
50
+ * // example id: listtagsforresource-example-1591293003710
51
+ * ```
52
+ *
33
53
  */
34
54
  export declare class ListTagsForResourceCommand extends $Command<ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput, BatchClientResolvedConfig> {
35
55
  readonly input: ListTagsForResourceCommandInput;
@@ -29,6 +29,82 @@ export interface RegisterJobDefinitionCommandOutput extends RegisterJobDefinitio
29
29
  * @see {@link RegisterJobDefinitionCommandOutput} for command's `response` shape.
30
30
  * @see {@link BatchClientResolvedConfig | config} for BatchClient's `config` shape.
31
31
  *
32
+ * @example To register a job definition
33
+ * ```javascript
34
+ * // This example registers a job definition for a simple container job.
35
+ * const input = {
36
+ * "type": "container",
37
+ * "containerProperties": {
38
+ * "command": [
39
+ * "sleep",
40
+ * "10"
41
+ * ],
42
+ * "image": "busybox",
43
+ * "resourceRequirements": [
44
+ * {
45
+ * "type": "MEMORY",
46
+ * "value": "128"
47
+ * },
48
+ * {
49
+ * "type": "VCPU",
50
+ * "value": "1"
51
+ * }
52
+ * ]
53
+ * },
54
+ * "jobDefinitionName": "sleep10"
55
+ * };
56
+ * const command = new RegisterJobDefinitionCommand(input);
57
+ * const response = await client.send(command);
58
+ * /* response ==
59
+ * {
60
+ * "jobDefinitionArn": "arn:aws:batch:us-east-1:012345678910:job-definition/sleep10:1",
61
+ * "jobDefinitionName": "sleep10",
62
+ * "revision": 1
63
+ * }
64
+ * *\/
65
+ * // example id: to-register-a-job-definition-1481154325325
66
+ * ```
67
+ *
68
+ * @example RegisterJobDefinition with tags
69
+ * ```javascript
70
+ * // This demonstrates calling the RegisterJobDefinition action, including tags.
71
+ * const input = {
72
+ * "type": "container",
73
+ * "containerProperties": {
74
+ * "command": [
75
+ * "sleep",
76
+ * "30"
77
+ * ],
78
+ * "image": "busybox",
79
+ * "resourceRequirements": [
80
+ * {
81
+ * "type": "MEMORY",
82
+ * "value": "128"
83
+ * },
84
+ * {
85
+ * "type": "VCPU",
86
+ * "value": "1"
87
+ * }
88
+ * ]
89
+ * },
90
+ * "jobDefinitionName": "sleep30",
91
+ * "tags": {
92
+ * "Department": "Engineering",
93
+ * "User": "JaneDoe"
94
+ * }
95
+ * };
96
+ * const command = new RegisterJobDefinitionCommand(input);
97
+ * const response = await client.send(command);
98
+ * /* response ==
99
+ * {
100
+ * "jobDefinitionArn": "arn:aws:batch:us-east-1:012345678910:job-definition/sleep30:1",
101
+ * "jobDefinitionName": "sleep30",
102
+ * "revision": 1
103
+ * }
104
+ * *\/
105
+ * // example id: registerjobdefinition-with-tags-1591290509028
106
+ * ```
107
+ *
32
108
  */
33
109
  export declare class RegisterJobDefinitionCommand extends $Command<RegisterJobDefinitionCommandInput, RegisterJobDefinitionCommandOutput, BatchClientResolvedConfig> {
34
110
  readonly input: RegisterJobDefinitionCommandInput;
@@ -41,6 +41,25 @@ export interface SubmitJobCommandOutput extends SubmitJobResponse, __MetadataBea
41
41
  * @see {@link SubmitJobCommandOutput} for command's `response` shape.
42
42
  * @see {@link BatchClientResolvedConfig | config} for BatchClient's `config` shape.
43
43
  *
44
+ * @example To submit a job to a queue
45
+ * ```javascript
46
+ * // This example submits a simple container job called example to the HighPriority job queue.
47
+ * const input = {
48
+ * "jobDefinition": "sleep60",
49
+ * "jobName": "example",
50
+ * "jobQueue": "HighPriority"
51
+ * };
52
+ * const command = new SubmitJobCommand(input);
53
+ * const response = await client.send(command);
54
+ * /* response ==
55
+ * {
56
+ * "jobId": "876da822-4198-45f2-a252-6cea32512ea8",
57
+ * "jobName": "example"
58
+ * }
59
+ * *\/
60
+ * // example id: to-submit-a-job-to-a-queue-1481154481673
61
+ * ```
62
+ *
44
63
  */
45
64
  export declare class SubmitJobCommand extends $Command<SubmitJobCommandInput, SubmitJobCommandOutput, BatchClientResolvedConfig> {
46
65
  readonly input: SubmitJobCommandInput;
@@ -32,6 +32,20 @@ export interface TagResourceCommandOutput extends TagResourceResponse, __Metadat
32
32
  * @see {@link TagResourceCommandOutput} for command's `response` shape.
33
33
  * @see {@link BatchClientResolvedConfig | config} for BatchClient's `config` shape.
34
34
  *
35
+ * @example TagResource Example
36
+ * ```javascript
37
+ * // This demonstrates calling the TagResource action.
38
+ * const input = {
39
+ * "resourceArn": "arn:aws:batch:us-east-1:123456789012:job-definition/sleep30:1",
40
+ * "tags": {
41
+ * "Stage": "Alpha"
42
+ * }
43
+ * };
44
+ * const command = new TagResourceCommand(input);
45
+ * await client.send(command);
46
+ * // example id: tagresource-example-1591291959952
47
+ * ```
48
+ *
35
49
  */
36
50
  export declare class TagResourceCommand extends $Command<TagResourceCommandInput, TagResourceCommandOutput, BatchClientResolvedConfig> {
37
51
  readonly input: TagResourceCommandInput;
@@ -31,6 +31,18 @@ export interface TerminateJobCommandOutput extends TerminateJobResponse, __Metad
31
31
  * @see {@link TerminateJobCommandOutput} for command's `response` shape.
32
32
  * @see {@link BatchClientResolvedConfig | config} for BatchClient's `config` shape.
33
33
  *
34
+ * @example To terminate a job
35
+ * ```javascript
36
+ * // This example terminates a job with the specified job ID.
37
+ * const input = {
38
+ * "jobId": "61e743ed-35e4-48da-b2de-5c8333821c84",
39
+ * "reason": "Terminating job."
40
+ * };
41
+ * const command = new TerminateJobCommand(input);
42
+ * await client.send(command);
43
+ * // example id: to-terminate-a-job-1481154558276
44
+ * ```
45
+ *
34
46
  */
35
47
  export declare class TerminateJobCommand extends $Command<TerminateJobCommandInput, TerminateJobCommandOutput, BatchClientResolvedConfig> {
36
48
  readonly input: TerminateJobCommandInput;
@@ -29,6 +29,20 @@ export interface UntagResourceCommandOutput extends UntagResourceResponse, __Met
29
29
  * @see {@link UntagResourceCommandOutput} for command's `response` shape.
30
30
  * @see {@link BatchClientResolvedConfig | config} for BatchClient's `config` shape.
31
31
  *
32
+ * @example UntagResource Example
33
+ * ```javascript
34
+ * // This demonstrates calling the UntagResource action.
35
+ * const input = {
36
+ * "resourceArn": "arn:aws:batch:us-east-1:123456789012:job-definition/sleep30:1",
37
+ * "tagKeys": [
38
+ * "Stage"
39
+ * ]
40
+ * };
41
+ * const command = new UntagResourceCommand(input);
42
+ * await client.send(command);
43
+ * // example id: untagresource-example-1591292811042
44
+ * ```
45
+ *
32
46
  */
33
47
  export declare class UntagResourceCommand extends $Command<UntagResourceCommandInput, UntagResourceCommandOutput, BatchClientResolvedConfig> {
34
48
  readonly input: UntagResourceCommandInput;
@@ -29,6 +29,24 @@ export interface UpdateComputeEnvironmentCommandOutput extends UpdateComputeEnvi
29
29
  * @see {@link UpdateComputeEnvironmentCommandOutput} for command's `response` shape.
30
30
  * @see {@link BatchClientResolvedConfig | config} for BatchClient's `config` shape.
31
31
  *
32
+ * @example To update a compute environment
33
+ * ```javascript
34
+ * // This example disables the P2OnDemand compute environment so it can be deleted.
35
+ * const input = {
36
+ * "computeEnvironment": "P2OnDemand",
37
+ * "state": "DISABLED"
38
+ * };
39
+ * const command = new UpdateComputeEnvironmentCommand(input);
40
+ * const response = await client.send(command);
41
+ * /* response ==
42
+ * {
43
+ * "computeEnvironmentArn": "arn:aws:batch:us-east-1:012345678910:compute-environment/P2OnDemand",
44
+ * "computeEnvironmentName": "P2OnDemand"
45
+ * }
46
+ * *\/
47
+ * // example id: to-update-a-compute-environment-1481154702731
48
+ * ```
49
+ *
32
50
  */
33
51
  export declare class UpdateComputeEnvironmentCommand extends $Command<UpdateComputeEnvironmentCommandInput, UpdateComputeEnvironmentCommandOutput, BatchClientResolvedConfig> {
34
52
  readonly input: UpdateComputeEnvironmentCommandInput;
@@ -29,6 +29,24 @@ export interface UpdateJobQueueCommandOutput extends UpdateJobQueueResponse, __M
29
29
  * @see {@link UpdateJobQueueCommandOutput} for command's `response` shape.
30
30
  * @see {@link BatchClientResolvedConfig | config} for BatchClient's `config` shape.
31
31
  *
32
+ * @example To update a job queue
33
+ * ```javascript
34
+ * // This example disables a job queue so that it can be deleted.
35
+ * const input = {
36
+ * "jobQueue": "GPGPU",
37
+ * "state": "DISABLED"
38
+ * };
39
+ * const command = new UpdateJobQueueCommand(input);
40
+ * const response = await client.send(command);
41
+ * /* response ==
42
+ * {
43
+ * "jobQueueArn": "arn:aws:batch:us-east-1:012345678910:job-queue/GPGPU",
44
+ * "jobQueueName": "GPGPU"
45
+ * }
46
+ * *\/
47
+ * // example id: to-update-a-job-queue-1481154806981
48
+ * ```
49
+ *
32
50
  */
33
51
  export declare class UpdateJobQueueCommand extends $Command<UpdateJobQueueCommandInput, UpdateJobQueueCommandOutput, BatchClientResolvedConfig> {
34
52
  readonly input: UpdateJobQueueCommandInput;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-batch",
3
3
  "description": "AWS SDK for JavaScript Batch Client for Node.js, Browser and React Native",
4
- "version": "3.287.0",
4
+ "version": "3.289.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,37 +20,37 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.287.0",
24
- "@aws-sdk/config-resolver": "3.287.0",
25
- "@aws-sdk/credential-provider-node": "3.287.0",
26
- "@aws-sdk/fetch-http-handler": "3.282.0",
27
- "@aws-sdk/hash-node": "3.272.0",
28
- "@aws-sdk/invalid-dependency": "3.272.0",
29
- "@aws-sdk/middleware-content-length": "3.282.0",
30
- "@aws-sdk/middleware-endpoint": "3.282.0",
31
- "@aws-sdk/middleware-host-header": "3.282.0",
32
- "@aws-sdk/middleware-logger": "3.287.0",
33
- "@aws-sdk/middleware-recursion-detection": "3.282.0",
34
- "@aws-sdk/middleware-retry": "3.287.0",
35
- "@aws-sdk/middleware-serde": "3.272.0",
36
- "@aws-sdk/middleware-signing": "3.282.0",
37
- "@aws-sdk/middleware-stack": "3.272.0",
38
- "@aws-sdk/middleware-user-agent": "3.282.0",
39
- "@aws-sdk/node-config-provider": "3.287.0",
40
- "@aws-sdk/node-http-handler": "3.282.0",
41
- "@aws-sdk/protocol-http": "3.282.0",
42
- "@aws-sdk/smithy-client": "3.279.0",
43
- "@aws-sdk/types": "3.272.0",
44
- "@aws-sdk/url-parser": "3.272.0",
23
+ "@aws-sdk/client-sts": "3.289.0",
24
+ "@aws-sdk/config-resolver": "3.289.0",
25
+ "@aws-sdk/credential-provider-node": "3.289.0",
26
+ "@aws-sdk/fetch-http-handler": "3.289.0",
27
+ "@aws-sdk/hash-node": "3.289.0",
28
+ "@aws-sdk/invalid-dependency": "3.289.0",
29
+ "@aws-sdk/middleware-content-length": "3.289.0",
30
+ "@aws-sdk/middleware-endpoint": "3.289.0",
31
+ "@aws-sdk/middleware-host-header": "3.289.0",
32
+ "@aws-sdk/middleware-logger": "3.289.0",
33
+ "@aws-sdk/middleware-recursion-detection": "3.289.0",
34
+ "@aws-sdk/middleware-retry": "3.289.0",
35
+ "@aws-sdk/middleware-serde": "3.289.0",
36
+ "@aws-sdk/middleware-signing": "3.289.0",
37
+ "@aws-sdk/middleware-stack": "3.289.0",
38
+ "@aws-sdk/middleware-user-agent": "3.289.0",
39
+ "@aws-sdk/node-config-provider": "3.289.0",
40
+ "@aws-sdk/node-http-handler": "3.289.0",
41
+ "@aws-sdk/protocol-http": "3.289.0",
42
+ "@aws-sdk/smithy-client": "3.289.0",
43
+ "@aws-sdk/types": "3.289.0",
44
+ "@aws-sdk/url-parser": "3.289.0",
45
45
  "@aws-sdk/util-base64": "3.208.0",
46
46
  "@aws-sdk/util-body-length-browser": "3.188.0",
47
47
  "@aws-sdk/util-body-length-node": "3.208.0",
48
- "@aws-sdk/util-defaults-mode-browser": "3.279.0",
49
- "@aws-sdk/util-defaults-mode-node": "3.287.0",
50
- "@aws-sdk/util-endpoints": "3.272.0",
51
- "@aws-sdk/util-retry": "3.272.0",
52
- "@aws-sdk/util-user-agent-browser": "3.282.0",
53
- "@aws-sdk/util-user-agent-node": "3.287.0",
48
+ "@aws-sdk/util-defaults-mode-browser": "3.289.0",
49
+ "@aws-sdk/util-defaults-mode-node": "3.289.0",
50
+ "@aws-sdk/util-endpoints": "3.289.0",
51
+ "@aws-sdk/util-retry": "3.289.0",
52
+ "@aws-sdk/util-user-agent-browser": "3.289.0",
53
+ "@aws-sdk/util-user-agent-node": "3.289.0",
54
54
  "@aws-sdk/util-utf8": "3.254.0",
55
55
  "tslib": "^2.3.1"
56
56
  },