types-boto3-batch 1.35.71__py3-none-any.whl

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.
@@ -0,0 +1,430 @@
1
+ """
2
+ Type annotations for batch service client.
3
+
4
+ [Open documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/)
5
+
6
+ Usage::
7
+
8
+ ```python
9
+ from boto3.session import Session
10
+ from types_boto3_batch.client import BatchClient
11
+
12
+ session = Session()
13
+ client: BatchClient = session.client("batch")
14
+ ```
15
+
16
+ Copyright 2024 Vlad Emelianov
17
+ """
18
+
19
+ import sys
20
+ from typing import Any, Dict, Mapping, Type, overload
21
+
22
+ from botocore.client import BaseClient, ClientMeta
23
+
24
+ from .paginator import (
25
+ DescribeComputeEnvironmentsPaginator,
26
+ DescribeJobDefinitionsPaginator,
27
+ DescribeJobQueuesPaginator,
28
+ ListJobsPaginator,
29
+ ListSchedulingPoliciesPaginator,
30
+ )
31
+ from .type_defs import (
32
+ CancelJobRequestRequestTypeDef,
33
+ CreateComputeEnvironmentRequestRequestTypeDef,
34
+ CreateComputeEnvironmentResponseTypeDef,
35
+ CreateJobQueueRequestRequestTypeDef,
36
+ CreateJobQueueResponseTypeDef,
37
+ CreateSchedulingPolicyRequestRequestTypeDef,
38
+ CreateSchedulingPolicyResponseTypeDef,
39
+ DeleteComputeEnvironmentRequestRequestTypeDef,
40
+ DeleteJobQueueRequestRequestTypeDef,
41
+ DeleteSchedulingPolicyRequestRequestTypeDef,
42
+ DeregisterJobDefinitionRequestRequestTypeDef,
43
+ DescribeComputeEnvironmentsRequestRequestTypeDef,
44
+ DescribeComputeEnvironmentsResponseTypeDef,
45
+ DescribeJobDefinitionsRequestRequestTypeDef,
46
+ DescribeJobDefinitionsResponseTypeDef,
47
+ DescribeJobQueuesRequestRequestTypeDef,
48
+ DescribeJobQueuesResponseTypeDef,
49
+ DescribeJobsRequestRequestTypeDef,
50
+ DescribeJobsResponseTypeDef,
51
+ DescribeSchedulingPoliciesRequestRequestTypeDef,
52
+ DescribeSchedulingPoliciesResponseTypeDef,
53
+ GetJobQueueSnapshotRequestRequestTypeDef,
54
+ GetJobQueueSnapshotResponseTypeDef,
55
+ ListJobsRequestRequestTypeDef,
56
+ ListJobsResponseTypeDef,
57
+ ListSchedulingPoliciesRequestRequestTypeDef,
58
+ ListSchedulingPoliciesResponseTypeDef,
59
+ ListTagsForResourceRequestRequestTypeDef,
60
+ ListTagsForResourceResponseTypeDef,
61
+ RegisterJobDefinitionRequestRequestTypeDef,
62
+ RegisterJobDefinitionResponseTypeDef,
63
+ SubmitJobRequestRequestTypeDef,
64
+ SubmitJobResponseTypeDef,
65
+ TagResourceRequestRequestTypeDef,
66
+ TerminateJobRequestRequestTypeDef,
67
+ UntagResourceRequestRequestTypeDef,
68
+ UpdateComputeEnvironmentRequestRequestTypeDef,
69
+ UpdateComputeEnvironmentResponseTypeDef,
70
+ UpdateJobQueueRequestRequestTypeDef,
71
+ UpdateJobQueueResponseTypeDef,
72
+ UpdateSchedulingPolicyRequestRequestTypeDef,
73
+ )
74
+
75
+ if sys.version_info >= (3, 12):
76
+ from typing import Literal, Unpack
77
+ else:
78
+ from typing_extensions import Literal, Unpack
79
+
80
+ __all__ = ("BatchClient",)
81
+
82
+ class BotocoreClientError(Exception):
83
+ MSG_TEMPLATE: str
84
+
85
+ def __init__(self, error_response: Mapping[str, Any], operation_name: str) -> None:
86
+ self.response: Dict[str, Any]
87
+ self.operation_name: str
88
+
89
+ class Exceptions:
90
+ ClientError: Type[BotocoreClientError]
91
+ ClientException: Type[BotocoreClientError]
92
+ ServerException: Type[BotocoreClientError]
93
+
94
+ class BatchClient(BaseClient):
95
+ """
96
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch.html#Batch.Client)
97
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/)
98
+ """
99
+
100
+ meta: ClientMeta
101
+
102
+ @property
103
+ def exceptions(self) -> Exceptions:
104
+ """
105
+ BatchClient exceptions.
106
+
107
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch.html#Batch.Client)
108
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#exceptions)
109
+ """
110
+
111
+ def can_paginate(self, operation_name: str) -> bool:
112
+ """
113
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/can_paginate.html)
114
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#can_paginate)
115
+ """
116
+
117
+ def generate_presigned_url(
118
+ self,
119
+ ClientMethod: str,
120
+ Params: Mapping[str, Any] = ...,
121
+ ExpiresIn: int = 3600,
122
+ HttpMethod: str = ...,
123
+ ) -> str:
124
+ """
125
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/generate_presigned_url.html)
126
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#generate_presigned_url)
127
+ """
128
+
129
+ def close(self) -> None:
130
+ """
131
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/close.html)
132
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#close)
133
+ """
134
+
135
+ def cancel_job(self, **kwargs: Unpack[CancelJobRequestRequestTypeDef]) -> Dict[str, Any]:
136
+ """
137
+ Cancels a job in an Batch job queue.
138
+
139
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/cancel_job.html)
140
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#cancel_job)
141
+ """
142
+
143
+ def create_compute_environment(
144
+ self, **kwargs: Unpack[CreateComputeEnvironmentRequestRequestTypeDef]
145
+ ) -> CreateComputeEnvironmentResponseTypeDef:
146
+ """
147
+ Creates an Batch compute environment.
148
+
149
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/create_compute_environment.html)
150
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#create_compute_environment)
151
+ """
152
+
153
+ def create_job_queue(
154
+ self, **kwargs: Unpack[CreateJobQueueRequestRequestTypeDef]
155
+ ) -> CreateJobQueueResponseTypeDef:
156
+ """
157
+ Creates an Batch job queue.
158
+
159
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/create_job_queue.html)
160
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#create_job_queue)
161
+ """
162
+
163
+ def create_scheduling_policy(
164
+ self, **kwargs: Unpack[CreateSchedulingPolicyRequestRequestTypeDef]
165
+ ) -> CreateSchedulingPolicyResponseTypeDef:
166
+ """
167
+ Creates an Batch scheduling policy.
168
+
169
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/create_scheduling_policy.html)
170
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#create_scheduling_policy)
171
+ """
172
+
173
+ def delete_compute_environment(
174
+ self, **kwargs: Unpack[DeleteComputeEnvironmentRequestRequestTypeDef]
175
+ ) -> Dict[str, Any]:
176
+ """
177
+ Deletes an Batch compute environment.
178
+
179
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/delete_compute_environment.html)
180
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#delete_compute_environment)
181
+ """
182
+
183
+ def delete_job_queue(
184
+ self, **kwargs: Unpack[DeleteJobQueueRequestRequestTypeDef]
185
+ ) -> Dict[str, Any]:
186
+ """
187
+ Deletes the specified job queue.
188
+
189
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/delete_job_queue.html)
190
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#delete_job_queue)
191
+ """
192
+
193
+ def delete_scheduling_policy(
194
+ self, **kwargs: Unpack[DeleteSchedulingPolicyRequestRequestTypeDef]
195
+ ) -> Dict[str, Any]:
196
+ """
197
+ Deletes the specified scheduling policy.
198
+
199
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/delete_scheduling_policy.html)
200
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#delete_scheduling_policy)
201
+ """
202
+
203
+ def deregister_job_definition(
204
+ self, **kwargs: Unpack[DeregisterJobDefinitionRequestRequestTypeDef]
205
+ ) -> Dict[str, Any]:
206
+ """
207
+ Deregisters an Batch job definition.
208
+
209
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/deregister_job_definition.html)
210
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#deregister_job_definition)
211
+ """
212
+
213
+ def describe_compute_environments(
214
+ self, **kwargs: Unpack[DescribeComputeEnvironmentsRequestRequestTypeDef]
215
+ ) -> DescribeComputeEnvironmentsResponseTypeDef:
216
+ """
217
+ Describes one or more of your compute environments.
218
+
219
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/describe_compute_environments.html)
220
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#describe_compute_environments)
221
+ """
222
+
223
+ def describe_job_definitions(
224
+ self, **kwargs: Unpack[DescribeJobDefinitionsRequestRequestTypeDef]
225
+ ) -> DescribeJobDefinitionsResponseTypeDef:
226
+ """
227
+ Describes a list of job definitions.
228
+
229
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/describe_job_definitions.html)
230
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#describe_job_definitions)
231
+ """
232
+
233
+ def describe_job_queues(
234
+ self, **kwargs: Unpack[DescribeJobQueuesRequestRequestTypeDef]
235
+ ) -> DescribeJobQueuesResponseTypeDef:
236
+ """
237
+ Describes one or more of your job queues.
238
+
239
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/describe_job_queues.html)
240
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#describe_job_queues)
241
+ """
242
+
243
+ def describe_jobs(
244
+ self, **kwargs: Unpack[DescribeJobsRequestRequestTypeDef]
245
+ ) -> DescribeJobsResponseTypeDef:
246
+ """
247
+ Describes a list of Batch jobs.
248
+
249
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/describe_jobs.html)
250
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#describe_jobs)
251
+ """
252
+
253
+ def describe_scheduling_policies(
254
+ self, **kwargs: Unpack[DescribeSchedulingPoliciesRequestRequestTypeDef]
255
+ ) -> DescribeSchedulingPoliciesResponseTypeDef:
256
+ """
257
+ Describes one or more of your scheduling policies.
258
+
259
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/describe_scheduling_policies.html)
260
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#describe_scheduling_policies)
261
+ """
262
+
263
+ def get_job_queue_snapshot(
264
+ self, **kwargs: Unpack[GetJobQueueSnapshotRequestRequestTypeDef]
265
+ ) -> GetJobQueueSnapshotResponseTypeDef:
266
+ """
267
+ Provides a list of the first 100 <code>RUNNABLE</code> jobs associated to a
268
+ single job queue.
269
+
270
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/get_job_queue_snapshot.html)
271
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#get_job_queue_snapshot)
272
+ """
273
+
274
+ def list_jobs(self, **kwargs: Unpack[ListJobsRequestRequestTypeDef]) -> ListJobsResponseTypeDef:
275
+ """
276
+ Returns a list of Batch jobs.
277
+
278
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/list_jobs.html)
279
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#list_jobs)
280
+ """
281
+
282
+ def list_scheduling_policies(
283
+ self, **kwargs: Unpack[ListSchedulingPoliciesRequestRequestTypeDef]
284
+ ) -> ListSchedulingPoliciesResponseTypeDef:
285
+ """
286
+ Returns a list of Batch scheduling policies.
287
+
288
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/list_scheduling_policies.html)
289
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#list_scheduling_policies)
290
+ """
291
+
292
+ def list_tags_for_resource(
293
+ self, **kwargs: Unpack[ListTagsForResourceRequestRequestTypeDef]
294
+ ) -> ListTagsForResourceResponseTypeDef:
295
+ """
296
+ Lists the tags for an Batch resource.
297
+
298
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/list_tags_for_resource.html)
299
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#list_tags_for_resource)
300
+ """
301
+
302
+ def register_job_definition(
303
+ self, **kwargs: Unpack[RegisterJobDefinitionRequestRequestTypeDef]
304
+ ) -> RegisterJobDefinitionResponseTypeDef:
305
+ """
306
+ Registers an Batch job definition.
307
+
308
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/register_job_definition.html)
309
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#register_job_definition)
310
+ """
311
+
312
+ def submit_job(
313
+ self, **kwargs: Unpack[SubmitJobRequestRequestTypeDef]
314
+ ) -> SubmitJobResponseTypeDef:
315
+ """
316
+ Submits an Batch job from a job definition.
317
+
318
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/submit_job.html)
319
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#submit_job)
320
+ """
321
+
322
+ def tag_resource(self, **kwargs: Unpack[TagResourceRequestRequestTypeDef]) -> Dict[str, Any]:
323
+ """
324
+ Associates the specified tags to a resource with the specified
325
+ <code>resourceArn</code>.
326
+
327
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/tag_resource.html)
328
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#tag_resource)
329
+ """
330
+
331
+ def terminate_job(self, **kwargs: Unpack[TerminateJobRequestRequestTypeDef]) -> Dict[str, Any]:
332
+ """
333
+ Terminates a job in a job queue.
334
+
335
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/terminate_job.html)
336
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#terminate_job)
337
+ """
338
+
339
+ def untag_resource(
340
+ self, **kwargs: Unpack[UntagResourceRequestRequestTypeDef]
341
+ ) -> Dict[str, Any]:
342
+ """
343
+ Deletes specified tags from an Batch resource.
344
+
345
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/untag_resource.html)
346
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#untag_resource)
347
+ """
348
+
349
+ def update_compute_environment(
350
+ self, **kwargs: Unpack[UpdateComputeEnvironmentRequestRequestTypeDef]
351
+ ) -> UpdateComputeEnvironmentResponseTypeDef:
352
+ """
353
+ Updates an Batch compute environment.
354
+
355
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/update_compute_environment.html)
356
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#update_compute_environment)
357
+ """
358
+
359
+ def update_job_queue(
360
+ self, **kwargs: Unpack[UpdateJobQueueRequestRequestTypeDef]
361
+ ) -> UpdateJobQueueResponseTypeDef:
362
+ """
363
+ Updates a job queue.
364
+
365
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/update_job_queue.html)
366
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#update_job_queue)
367
+ """
368
+
369
+ def update_scheduling_policy(
370
+ self, **kwargs: Unpack[UpdateSchedulingPolicyRequestRequestTypeDef]
371
+ ) -> Dict[str, Any]:
372
+ """
373
+ Updates a scheduling policy.
374
+
375
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/update_scheduling_policy.html)
376
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#update_scheduling_policy)
377
+ """
378
+
379
+ @overload
380
+ def get_paginator(
381
+ self, operation_name: Literal["describe_compute_environments"]
382
+ ) -> DescribeComputeEnvironmentsPaginator:
383
+ """
384
+ Create a paginator for an operation.
385
+
386
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/get_paginator.html)
387
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#get_paginator)
388
+ """
389
+
390
+ @overload
391
+ def get_paginator(
392
+ self, operation_name: Literal["describe_job_definitions"]
393
+ ) -> DescribeJobDefinitionsPaginator:
394
+ """
395
+ Create a paginator for an operation.
396
+
397
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/get_paginator.html)
398
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#get_paginator)
399
+ """
400
+
401
+ @overload
402
+ def get_paginator(
403
+ self, operation_name: Literal["describe_job_queues"]
404
+ ) -> DescribeJobQueuesPaginator:
405
+ """
406
+ Create a paginator for an operation.
407
+
408
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/get_paginator.html)
409
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#get_paginator)
410
+ """
411
+
412
+ @overload
413
+ def get_paginator(self, operation_name: Literal["list_jobs"]) -> ListJobsPaginator:
414
+ """
415
+ Create a paginator for an operation.
416
+
417
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/get_paginator.html)
418
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#get_paginator)
419
+ """
420
+
421
+ @overload
422
+ def get_paginator(
423
+ self, operation_name: Literal["list_scheduling_policies"]
424
+ ) -> ListSchedulingPoliciesPaginator:
425
+ """
426
+ Create a paginator for an operation.
427
+
428
+ [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/get_paginator.html)
429
+ [Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_batch/client/#get_paginator)
430
+ """