aws-sdk-batch 1.117.0 → 1.118.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.
@@ -1063,7 +1063,7 @@ module Aws::Batch
1063
1063
  # either EC2 (`EC2` or `SPOT`) or Fargate (`FARGATE` or `FARGATE_SPOT`);
1064
1064
  # EC2 and Fargate compute environments can't be mixed.
1065
1065
  #
1066
- # @option params [required, Array<Types::ComputeEnvironmentOrder>] :compute_environment_order
1066
+ # @option params [Array<Types::ComputeEnvironmentOrder>] :compute_environment_order
1067
1067
  # The set of compute environments mapped to a job queue and their order
1068
1068
  # relative to each other. The job scheduler uses this parameter to
1069
1069
  # determine which compute environment runs a specific job. Compute
@@ -1079,6 +1079,18 @@ module Aws::Batch
1079
1079
  #
1080
1080
  # </note>
1081
1081
  #
1082
+ # @option params [Array<Types::ServiceEnvironmentOrder>] :service_environment_order
1083
+ # A list of service environments that this job queue can use to allocate
1084
+ # jobs. All serviceEnvironments must have the same type. A job queue
1085
+ # can't have both a serviceEnvironmentOrder and a
1086
+ # computeEnvironmentOrder field.
1087
+ #
1088
+ # @option params [String] :job_queue_type
1089
+ # The type of job queue. For service jobs that run on SageMaker
1090
+ # Training, this value is `SAGEMAKER_TRAINING`. For regular container
1091
+ # jobs, this value is `EKS`, `ECS`, or `ECS_FARGATE` depending on the
1092
+ # compute environment.
1093
+ #
1082
1094
  # @option params [Hash<String,String>] :tags
1083
1095
  # The tags that you apply to the job queue to help you categorize and
1084
1096
  # organize your resources. Each tag consists of a key and an optional
@@ -1158,12 +1170,19 @@ module Aws::Batch
1158
1170
  # state: "ENABLED", # accepts ENABLED, DISABLED
1159
1171
  # scheduling_policy_arn: "String",
1160
1172
  # priority: 1, # required
1161
- # compute_environment_order: [ # required
1173
+ # compute_environment_order: [
1162
1174
  # {
1163
1175
  # order: 1, # required
1164
1176
  # compute_environment: "String", # required
1165
1177
  # },
1166
1178
  # ],
1179
+ # service_environment_order: [
1180
+ # {
1181
+ # order: 1, # required
1182
+ # service_environment: "String", # required
1183
+ # },
1184
+ # ],
1185
+ # job_queue_type: "EKS", # accepts EKS, ECS, ECS_FARGATE, SAGEMAKER_TRAINING
1167
1186
  # tags: {
1168
1187
  # "TagKey" => "TagValue",
1169
1188
  # },
@@ -1172,7 +1191,7 @@ module Aws::Batch
1172
1191
  # reason: "String", # required
1173
1192
  # state: "RUNNABLE", # required, accepts RUNNABLE
1174
1193
  # max_time_seconds: 1, # required
1175
- # action: "CANCEL", # required, accepts CANCEL
1194
+ # action: "CANCEL", # required, accepts CANCEL, TERMINATE
1176
1195
  # },
1177
1196
  # ],
1178
1197
  # })
@@ -1254,6 +1273,74 @@ module Aws::Batch
1254
1273
  req.send_request(options)
1255
1274
  end
1256
1275
 
1276
+ # Creates a service environment for running service jobs. Service
1277
+ # environments define capacity limits for specific service types such as
1278
+ # SageMaker Training jobs.
1279
+ #
1280
+ # @option params [required, String] :service_environment_name
1281
+ # The name for the service environment. It can be up to 128 characters
1282
+ # long and can contain letters, numbers, hyphens (-), and underscores
1283
+ # (\_).
1284
+ #
1285
+ # @option params [required, String] :service_environment_type
1286
+ # The type of service environment. For SageMaker Training jobs, specify
1287
+ # `SAGEMAKER_TRAINING`.
1288
+ #
1289
+ # @option params [String] :state
1290
+ # The state of the service environment. Valid values are `ENABLED` and
1291
+ # `DISABLED`. The default value is `ENABLED`.
1292
+ #
1293
+ # @option params [required, Array<Types::CapacityLimit>] :capacity_limits
1294
+ # The capacity limits for the service environment. The number of
1295
+ # instances a job consumes is the total number of instances requested in
1296
+ # the submit training job request resource configuration.
1297
+ #
1298
+ # @option params [Hash<String,String>] :tags
1299
+ # The tags that you apply to the service environment to help you
1300
+ # categorize and organize your resources. Each tag consists of a key and
1301
+ # an optional value. For more information, see [Tagging your Batch
1302
+ # resources][1].
1303
+ #
1304
+ #
1305
+ #
1306
+ # [1]: https://docs.aws.amazon.com/batch/latest/userguide/using-tags.html
1307
+ #
1308
+ # @return [Types::CreateServiceEnvironmentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1309
+ #
1310
+ # * {Types::CreateServiceEnvironmentResponse#service_environment_name #service_environment_name} => String
1311
+ # * {Types::CreateServiceEnvironmentResponse#service_environment_arn #service_environment_arn} => String
1312
+ #
1313
+ # @example Request syntax with placeholder values
1314
+ #
1315
+ # resp = client.create_service_environment({
1316
+ # service_environment_name: "String", # required
1317
+ # service_environment_type: "SAGEMAKER_TRAINING", # required, accepts SAGEMAKER_TRAINING
1318
+ # state: "ENABLED", # accepts ENABLED, DISABLED
1319
+ # capacity_limits: [ # required
1320
+ # {
1321
+ # max_capacity: 1,
1322
+ # capacity_unit: "String",
1323
+ # },
1324
+ # ],
1325
+ # tags: {
1326
+ # "TagKey" => "TagValue",
1327
+ # },
1328
+ # })
1329
+ #
1330
+ # @example Response structure
1331
+ #
1332
+ # resp.service_environment_name #=> String
1333
+ # resp.service_environment_arn #=> String
1334
+ #
1335
+ # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CreateServiceEnvironment AWS API Documentation
1336
+ #
1337
+ # @overload create_service_environment(params = {})
1338
+ # @param [Hash] params ({})
1339
+ def create_service_environment(params = {}, options = {})
1340
+ req = build_request(:create_service_environment, params)
1341
+ req.send_request(options)
1342
+ end
1343
+
1257
1344
  # Deletes an Batch compute environment.
1258
1345
  #
1259
1346
  # Before you can delete a compute environment, you must set its state to
@@ -1399,6 +1486,31 @@ module Aws::Batch
1399
1486
  req.send_request(options)
1400
1487
  end
1401
1488
 
1489
+ # Deletes a Service environment. Before you can delete a service
1490
+ # environment, you must first set its state to `DISABLED` with the
1491
+ # `UpdateServiceEnvironment` API operation and disassociate it from any
1492
+ # job queues with the `UpdateJobQueue` API operation.
1493
+ #
1494
+ # @option params [required, String] :service_environment
1495
+ # The name or ARN of the service environment to delete.
1496
+ #
1497
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1498
+ #
1499
+ # @example Request syntax with placeholder values
1500
+ #
1501
+ # resp = client.delete_service_environment({
1502
+ # service_environment: "String", # required
1503
+ # })
1504
+ #
1505
+ # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteServiceEnvironment AWS API Documentation
1506
+ #
1507
+ # @overload delete_service_environment(params = {})
1508
+ # @param [Hash] params ({})
1509
+ def delete_service_environment(params = {}, options = {})
1510
+ req = build_request(:delete_service_environment, params)
1511
+ req.send_request(options)
1512
+ end
1513
+
1402
1514
  # Deregisters an Batch job definition. Job definitions are permanently
1403
1515
  # deleted after 180 days.
1404
1516
  #
@@ -2323,13 +2435,17 @@ module Aws::Batch
2323
2435
  # resp.job_queues[0].compute_environment_order #=> Array
2324
2436
  # resp.job_queues[0].compute_environment_order[0].order #=> Integer
2325
2437
  # resp.job_queues[0].compute_environment_order[0].compute_environment #=> String
2438
+ # resp.job_queues[0].service_environment_order #=> Array
2439
+ # resp.job_queues[0].service_environment_order[0].order #=> Integer
2440
+ # resp.job_queues[0].service_environment_order[0].service_environment #=> String
2441
+ # resp.job_queues[0].job_queue_type #=> String, one of "EKS", "ECS", "ECS_FARGATE", "SAGEMAKER_TRAINING"
2326
2442
  # resp.job_queues[0].tags #=> Hash
2327
2443
  # resp.job_queues[0].tags["TagKey"] #=> String
2328
2444
  # resp.job_queues[0].job_state_time_limit_actions #=> Array
2329
2445
  # resp.job_queues[0].job_state_time_limit_actions[0].reason #=> String
2330
2446
  # resp.job_queues[0].job_state_time_limit_actions[0].state #=> String, one of "RUNNABLE"
2331
2447
  # resp.job_queues[0].job_state_time_limit_actions[0].max_time_seconds #=> Integer
2332
- # resp.job_queues[0].job_state_time_limit_actions[0].action #=> String, one of "CANCEL"
2448
+ # resp.job_queues[0].job_state_time_limit_actions[0].action #=> String, one of "CANCEL", "TERMINATE"
2333
2449
  # resp.next_token #=> String
2334
2450
  #
2335
2451
  # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobQueues AWS API Documentation
@@ -2991,6 +3107,147 @@ module Aws::Batch
2991
3107
  req.send_request(options)
2992
3108
  end
2993
3109
 
3110
+ # Describes one or more of your service environments.
3111
+ #
3112
+ # @option params [Array<String>] :service_environments
3113
+ # An array of service environment names or ARN entries.
3114
+ #
3115
+ # @option params [Integer] :max_results
3116
+ # The maximum number of results returned by
3117
+ # `DescribeServiceEnvironments` in paginated output. When this parameter
3118
+ # is used, `DescribeServiceEnvironments` only returns `maxResults`
3119
+ # results in a single page and a `nextToken` response element. The
3120
+ # remaining results of the initial request can be seen by sending
3121
+ # another `DescribeServiceEnvironments` request with the returned
3122
+ # `nextToken` value. This value can be between 1 and 100. If this
3123
+ # parameter isn't used, then `DescribeServiceEnvironments` returns up
3124
+ # to 100 results and a `nextToken` value if applicable.
3125
+ #
3126
+ # @option params [String] :next_token
3127
+ # The `nextToken` value returned from a previous paginated
3128
+ # `DescribeServiceEnvironments` request where `maxResults` was used and
3129
+ # the results exceeded the value of that parameter. Pagination continues
3130
+ # from the end of the previous results that returned the `nextToken`
3131
+ # value. This value is `null` when there are no more results to return.
3132
+ #
3133
+ # <note markdown="1"> Treat this token as an opaque identifier that's only used to retrieve
3134
+ # the next items in a list and not for other programmatic purposes.
3135
+ #
3136
+ # </note>
3137
+ #
3138
+ # @return [Types::DescribeServiceEnvironmentsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3139
+ #
3140
+ # * {Types::DescribeServiceEnvironmentsResponse#service_environments #service_environments} => Array&lt;Types::ServiceEnvironmentDetail&gt;
3141
+ # * {Types::DescribeServiceEnvironmentsResponse#next_token #next_token} => String
3142
+ #
3143
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
3144
+ #
3145
+ # @example Request syntax with placeholder values
3146
+ #
3147
+ # resp = client.describe_service_environments({
3148
+ # service_environments: ["String"],
3149
+ # max_results: 1,
3150
+ # next_token: "String",
3151
+ # })
3152
+ #
3153
+ # @example Response structure
3154
+ #
3155
+ # resp.service_environments #=> Array
3156
+ # resp.service_environments[0].service_environment_name #=> String
3157
+ # resp.service_environments[0].service_environment_arn #=> String
3158
+ # resp.service_environments[0].service_environment_type #=> String, one of "SAGEMAKER_TRAINING"
3159
+ # resp.service_environments[0].state #=> String, one of "ENABLED", "DISABLED"
3160
+ # resp.service_environments[0].status #=> String, one of "CREATING", "UPDATING", "DELETING", "DELETED", "VALID", "INVALID"
3161
+ # resp.service_environments[0].capacity_limits #=> Array
3162
+ # resp.service_environments[0].capacity_limits[0].max_capacity #=> Integer
3163
+ # resp.service_environments[0].capacity_limits[0].capacity_unit #=> String
3164
+ # resp.service_environments[0].tags #=> Hash
3165
+ # resp.service_environments[0].tags["TagKey"] #=> String
3166
+ # resp.next_token #=> String
3167
+ #
3168
+ # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeServiceEnvironments AWS API Documentation
3169
+ #
3170
+ # @overload describe_service_environments(params = {})
3171
+ # @param [Hash] params ({})
3172
+ def describe_service_environments(params = {}, options = {})
3173
+ req = build_request(:describe_service_environments, params)
3174
+ req.send_request(options)
3175
+ end
3176
+
3177
+ # The details of a service job.
3178
+ #
3179
+ # @option params [required, String] :job_id
3180
+ # The job ID for the service job to describe.
3181
+ #
3182
+ # @return [Types::DescribeServiceJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3183
+ #
3184
+ # * {Types::DescribeServiceJobResponse#attempts #attempts} => Array&lt;Types::ServiceJobAttemptDetail&gt;
3185
+ # * {Types::DescribeServiceJobResponse#created_at #created_at} => Integer
3186
+ # * {Types::DescribeServiceJobResponse#is_terminated #is_terminated} => Boolean
3187
+ # * {Types::DescribeServiceJobResponse#job_arn #job_arn} => String
3188
+ # * {Types::DescribeServiceJobResponse#job_id #job_id} => String
3189
+ # * {Types::DescribeServiceJobResponse#job_name #job_name} => String
3190
+ # * {Types::DescribeServiceJobResponse#job_queue #job_queue} => String
3191
+ # * {Types::DescribeServiceJobResponse#latest_attempt #latest_attempt} => Types::LatestServiceJobAttempt
3192
+ # * {Types::DescribeServiceJobResponse#retry_strategy #retry_strategy} => Types::ServiceJobRetryStrategy
3193
+ # * {Types::DescribeServiceJobResponse#scheduling_priority #scheduling_priority} => Integer
3194
+ # * {Types::DescribeServiceJobResponse#service_request_payload #service_request_payload} => String
3195
+ # * {Types::DescribeServiceJobResponse#service_job_type #service_job_type} => String
3196
+ # * {Types::DescribeServiceJobResponse#share_identifier #share_identifier} => String
3197
+ # * {Types::DescribeServiceJobResponse#started_at #started_at} => Integer
3198
+ # * {Types::DescribeServiceJobResponse#status #status} => String
3199
+ # * {Types::DescribeServiceJobResponse#status_reason #status_reason} => String
3200
+ # * {Types::DescribeServiceJobResponse#stopped_at #stopped_at} => Integer
3201
+ # * {Types::DescribeServiceJobResponse#tags #tags} => Hash&lt;String,String&gt;
3202
+ # * {Types::DescribeServiceJobResponse#timeout_config #timeout_config} => Types::ServiceJobTimeout
3203
+ #
3204
+ # @example Request syntax with placeholder values
3205
+ #
3206
+ # resp = client.describe_service_job({
3207
+ # job_id: "String", # required
3208
+ # })
3209
+ #
3210
+ # @example Response structure
3211
+ #
3212
+ # resp.attempts #=> Array
3213
+ # resp.attempts[0].service_resource_id.name #=> String, one of "TrainingJobArn"
3214
+ # resp.attempts[0].service_resource_id.value #=> String
3215
+ # resp.attempts[0].started_at #=> Integer
3216
+ # resp.attempts[0].stopped_at #=> Integer
3217
+ # resp.attempts[0].status_reason #=> String
3218
+ # resp.created_at #=> Integer
3219
+ # resp.is_terminated #=> Boolean
3220
+ # resp.job_arn #=> String
3221
+ # resp.job_id #=> String
3222
+ # resp.job_name #=> String
3223
+ # resp.job_queue #=> String
3224
+ # resp.latest_attempt.service_resource_id.name #=> String, one of "TrainingJobArn"
3225
+ # resp.latest_attempt.service_resource_id.value #=> String
3226
+ # resp.retry_strategy.attempts #=> Integer
3227
+ # resp.retry_strategy.evaluate_on_exit #=> Array
3228
+ # resp.retry_strategy.evaluate_on_exit[0].action #=> String, one of "RETRY", "EXIT"
3229
+ # resp.retry_strategy.evaluate_on_exit[0].on_status_reason #=> String
3230
+ # resp.scheduling_priority #=> Integer
3231
+ # resp.service_request_payload #=> String
3232
+ # resp.service_job_type #=> String, one of "SAGEMAKER_TRAINING"
3233
+ # resp.share_identifier #=> String
3234
+ # resp.started_at #=> Integer
3235
+ # resp.status #=> String, one of "SUBMITTED", "PENDING", "RUNNABLE", "SCHEDULED", "STARTING", "RUNNING", "SUCCEEDED", "FAILED"
3236
+ # resp.status_reason #=> String
3237
+ # resp.stopped_at #=> Integer
3238
+ # resp.tags #=> Hash
3239
+ # resp.tags["TagKey"] #=> String
3240
+ # resp.timeout_config.attempt_duration_seconds #=> Integer
3241
+ #
3242
+ # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeServiceJob AWS API Documentation
3243
+ #
3244
+ # @overload describe_service_job(params = {})
3245
+ # @param [Hash] params ({})
3246
+ def describe_service_job(params = {}, options = {})
3247
+ req = build_request(:describe_service_job, params)
3248
+ req.send_request(options)
3249
+ end
3250
+
2994
3251
  # Provides a list of the first 100 `RUNNABLE` jobs associated to a
2995
3252
  # single job queue.
2996
3253
  #
@@ -3523,6 +3780,99 @@ module Aws::Batch
3523
3780
  req.send_request(options)
3524
3781
  end
3525
3782
 
3783
+ # Returns a list of service jobs for a specified job queue.
3784
+ #
3785
+ # @option params [String] :job_queue
3786
+ # The name or ARN of the job queue with which to list service jobs.
3787
+ #
3788
+ # @option params [String] :job_status
3789
+ # The job status with which to filter service jobs.
3790
+ #
3791
+ # @option params [Integer] :max_results
3792
+ # The maximum number of results returned by `ListServiceJobs` in
3793
+ # paginated output. When this parameter is used, `ListServiceJobs` only
3794
+ # returns `maxResults` results in a single page and a `nextToken`
3795
+ # response element. The remaining results of the initial request can be
3796
+ # seen by sending another `ListServiceJobs` request with the returned
3797
+ # `nextToken` value. This value can be between 1 and 100. If this
3798
+ # parameter isn't used, then `ListServiceJobs` returns up to 100
3799
+ # results and a `nextToken` value if applicable.
3800
+ #
3801
+ # @option params [String] :next_token
3802
+ # The `nextToken` value returned from a previous paginated
3803
+ # `ListServiceJobs` request where `maxResults` was used and the results
3804
+ # exceeded the value of that parameter. Pagination continues from the
3805
+ # end of the previous results that returned the `nextToken` value. This
3806
+ # value is `null` when there are no more results to return.
3807
+ #
3808
+ # <note markdown="1"> Treat this token as an opaque identifier that's only used to retrieve
3809
+ # the next items in a list and not for other programmatic purposes.
3810
+ #
3811
+ # </note>
3812
+ #
3813
+ # @option params [Array<Types::KeyValuesPair>] :filters
3814
+ # The filters to apply to the service job list query. The filter names
3815
+ # and values can be:
3816
+ #
3817
+ # * name: `JOB_STATUS`
3818
+ #
3819
+ # values: `SUBMITTED | PENDING | RUNNABLE | STARTING | RUNNING |
3820
+ # SUCCEEDED | FAILED | SCHEDULED`
3821
+ #
3822
+ # * name: `JOB_NAME`
3823
+ #
3824
+ # values: case-insensitive matches for the job name. If a filter value
3825
+ # ends with an asterisk (*), it matches any job name that begins with
3826
+ # the string before the '*'.
3827
+ #
3828
+ # @return [Types::ListServiceJobsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3829
+ #
3830
+ # * {Types::ListServiceJobsResponse#job_summary_list #job_summary_list} => Array&lt;Types::ServiceJobSummary&gt;
3831
+ # * {Types::ListServiceJobsResponse#next_token #next_token} => String
3832
+ #
3833
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
3834
+ #
3835
+ # @example Request syntax with placeholder values
3836
+ #
3837
+ # resp = client.list_service_jobs({
3838
+ # job_queue: "String",
3839
+ # job_status: "SUBMITTED", # accepts SUBMITTED, PENDING, RUNNABLE, SCHEDULED, STARTING, RUNNING, SUCCEEDED, FAILED
3840
+ # max_results: 1,
3841
+ # next_token: "String",
3842
+ # filters: [
3843
+ # {
3844
+ # name: "String",
3845
+ # values: ["String"],
3846
+ # },
3847
+ # ],
3848
+ # })
3849
+ #
3850
+ # @example Response structure
3851
+ #
3852
+ # resp.job_summary_list #=> Array
3853
+ # resp.job_summary_list[0].latest_attempt.service_resource_id.name #=> String, one of "TrainingJobArn"
3854
+ # resp.job_summary_list[0].latest_attempt.service_resource_id.value #=> String
3855
+ # resp.job_summary_list[0].created_at #=> Integer
3856
+ # resp.job_summary_list[0].job_arn #=> String
3857
+ # resp.job_summary_list[0].job_id #=> String
3858
+ # resp.job_summary_list[0].job_name #=> String
3859
+ # resp.job_summary_list[0].service_job_type #=> String, one of "SAGEMAKER_TRAINING"
3860
+ # resp.job_summary_list[0].share_identifier #=> String
3861
+ # resp.job_summary_list[0].status #=> String, one of "SUBMITTED", "PENDING", "RUNNABLE", "SCHEDULED", "STARTING", "RUNNING", "SUCCEEDED", "FAILED"
3862
+ # resp.job_summary_list[0].status_reason #=> String
3863
+ # resp.job_summary_list[0].started_at #=> Integer
3864
+ # resp.job_summary_list[0].stopped_at #=> Integer
3865
+ # resp.next_token #=> String
3866
+ #
3867
+ # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ListServiceJobs AWS API Documentation
3868
+ #
3869
+ # @overload list_service_jobs(params = {})
3870
+ # @param [Hash] params ({})
3871
+ def list_service_jobs(params = {}, options = {})
3872
+ req = build_request(:list_service_jobs, params)
3873
+ req.send_request(options)
3874
+ end
3875
+
3526
3876
  # Lists the tags for an Batch resource. Batch resources that support
3527
3877
  # tags are compute environments, jobs, job definitions, job queues, and
3528
3878
  # scheduling policies. ARNs for child jobs of array and multi-node
@@ -5039,6 +5389,114 @@ module Aws::Batch
5039
5389
  req.send_request(options)
5040
5390
  end
5041
5391
 
5392
+ # Submits a service job to a specified job queue to run on SageMaker AI.
5393
+ # A service job is a unit of work that you submit to Batch for execution
5394
+ # on SageMaker AI.
5395
+ #
5396
+ # @option params [required, String] :job_name
5397
+ # The name of the service job. It can be up to 128 characters long. It
5398
+ # can contain uppercase and lowercase letters, numbers, hyphens (-), and
5399
+ # underscores (\_).
5400
+ #
5401
+ # @option params [required, String] :job_queue
5402
+ # The job queue into which the service job is submitted. You can specify
5403
+ # either the name or the ARN of the queue. The job queue must have the
5404
+ # type `SAGEMAKER_TRAINING`.
5405
+ #
5406
+ # @option params [Types::ServiceJobRetryStrategy] :retry_strategy
5407
+ # The retry strategy to use for failed service jobs that are submitted
5408
+ # with this service job request.
5409
+ #
5410
+ # @option params [Integer] :scheduling_priority
5411
+ # The scheduling priority of the service job. Valid values are integers
5412
+ # between 0 and 9999.
5413
+ #
5414
+ # @option params [required, String] :service_request_payload
5415
+ # The request, in JSON, for the service that the SubmitServiceJob
5416
+ # operation is queueing.
5417
+ #
5418
+ # @option params [required, String] :service_job_type
5419
+ # The type of service job. For SageMaker Training jobs, specify
5420
+ # `SAGEMAKER_TRAINING`.
5421
+ #
5422
+ # @option params [String] :share_identifier
5423
+ # The share identifier for the service job. Don't specify this
5424
+ # parameter if the job queue doesn't have a fair- share scheduling
5425
+ # policy. If the job queue has a fair-share scheduling policy, then this
5426
+ # parameter must be specified.
5427
+ #
5428
+ # @option params [Types::ServiceJobTimeout] :timeout_config
5429
+ # The timeout configuration for the service job. If none is specified,
5430
+ # Batch defers to the default timeout of the underlying service handling
5431
+ # the job.
5432
+ #
5433
+ # @option params [Hash<String,String>] :tags
5434
+ # The tags that you apply to the service job request. Each tag consists
5435
+ # of a key and an optional value. For more information, see [Tagging
5436
+ # your Batch resources][1].
5437
+ #
5438
+ #
5439
+ #
5440
+ # [1]: https://docs.aws.amazon.com/batch/latest/userguide/using-tags.html
5441
+ #
5442
+ # @option params [String] :client_token
5443
+ # A unique identifier for the request. This token is used to ensure
5444
+ # idempotency of requests. If this parameter is specified and two submit
5445
+ # requests with identical payloads and `clientToken`s are received,
5446
+ # these requests are considered the same request and the second request
5447
+ # is rejected.
5448
+ #
5449
+ # **A suitable default value is auto-generated.** You should normally
5450
+ # not need to pass this option.**
5451
+ #
5452
+ # @return [Types::SubmitServiceJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
5453
+ #
5454
+ # * {Types::SubmitServiceJobResponse#job_arn #job_arn} => String
5455
+ # * {Types::SubmitServiceJobResponse#job_name #job_name} => String
5456
+ # * {Types::SubmitServiceJobResponse#job_id #job_id} => String
5457
+ #
5458
+ # @example Request syntax with placeholder values
5459
+ #
5460
+ # resp = client.submit_service_job({
5461
+ # job_name: "String", # required
5462
+ # job_queue: "String", # required
5463
+ # retry_strategy: {
5464
+ # attempts: 1, # required
5465
+ # evaluate_on_exit: [
5466
+ # {
5467
+ # action: "RETRY", # accepts RETRY, EXIT
5468
+ # on_status_reason: "String",
5469
+ # },
5470
+ # ],
5471
+ # },
5472
+ # scheduling_priority: 1,
5473
+ # service_request_payload: "String", # required
5474
+ # service_job_type: "SAGEMAKER_TRAINING", # required, accepts SAGEMAKER_TRAINING
5475
+ # share_identifier: "String",
5476
+ # timeout_config: {
5477
+ # attempt_duration_seconds: 1,
5478
+ # },
5479
+ # tags: {
5480
+ # "TagKey" => "TagValue",
5481
+ # },
5482
+ # client_token: "ClientRequestToken",
5483
+ # })
5484
+ #
5485
+ # @example Response structure
5486
+ #
5487
+ # resp.job_arn #=> String
5488
+ # resp.job_name #=> String
5489
+ # resp.job_id #=> String
5490
+ #
5491
+ # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/SubmitServiceJob AWS API Documentation
5492
+ #
5493
+ # @overload submit_service_job(params = {})
5494
+ # @param [Hash] params ({})
5495
+ def submit_service_job(params = {}, options = {})
5496
+ req = build_request(:submit_service_job, params)
5497
+ req.send_request(options)
5498
+ end
5499
+
5042
5500
  # Associates the specified tags to a resource with the specified
5043
5501
  # `resourceArn`. If existing tags on a resource aren't specified in the
5044
5502
  # request parameters, they aren't changed. When a resource is deleted,
@@ -5146,6 +5604,34 @@ module Aws::Batch
5146
5604
  req.send_request(options)
5147
5605
  end
5148
5606
 
5607
+ # Terminates a service job in a job queue.
5608
+ #
5609
+ # @option params [required, String] :job_id
5610
+ # The service job ID of the service job to terminate.
5611
+ #
5612
+ # @option params [required, String] :reason
5613
+ # A message to attach to the service job that explains the reason for
5614
+ # canceling it. This message is returned by `DescribeServiceJob`
5615
+ # operations on the service job.
5616
+ #
5617
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
5618
+ #
5619
+ # @example Request syntax with placeholder values
5620
+ #
5621
+ # resp = client.terminate_service_job({
5622
+ # job_id: "String", # required
5623
+ # reason: "String", # required
5624
+ # })
5625
+ #
5626
+ # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/TerminateServiceJob AWS API Documentation
5627
+ #
5628
+ # @overload terminate_service_job(params = {})
5629
+ # @param [Hash] params ({})
5630
+ def terminate_service_job(params = {}, options = {})
5631
+ req = build_request(:terminate_service_job, params)
5632
+ req.send_request(options)
5633
+ end
5634
+
5149
5635
  # Deletes specified tags from an Batch resource.
5150
5636
  #
5151
5637
  # @option params [required, String] :resource_arn
@@ -5516,6 +6002,11 @@ module Aws::Batch
5516
6002
  #
5517
6003
  # </note>
5518
6004
  #
6005
+ # @option params [Array<Types::ServiceEnvironmentOrder>] :service_environment_order
6006
+ # The order of the service environment associated with the job queue.
6007
+ # Job queues with a higher priority are evaluated first when associated
6008
+ # with the same service environment.
6009
+ #
5519
6010
  # @option params [Array<Types::JobStateTimeLimitAction>] :job_state_time_limit_actions
5520
6011
  # The set of actions that Batch perform on jobs that remain at the head
5521
6012
  # of the job queue in the specified state longer than specified times.
@@ -5557,12 +6048,18 @@ module Aws::Batch
5557
6048
  # compute_environment: "String", # required
5558
6049
  # },
5559
6050
  # ],
6051
+ # service_environment_order: [
6052
+ # {
6053
+ # order: 1, # required
6054
+ # service_environment: "String", # required
6055
+ # },
6056
+ # ],
5560
6057
  # job_state_time_limit_actions: [
5561
6058
  # {
5562
6059
  # reason: "String", # required
5563
6060
  # state: "RUNNABLE", # required, accepts RUNNABLE
5564
6061
  # max_time_seconds: 1, # required
5565
- # action: "CANCEL", # required, accepts CANCEL
6062
+ # action: "CANCEL", # required, accepts CANCEL, TERMINATE
5566
6063
  # },
5567
6064
  # ],
5568
6065
  # })
@@ -5616,6 +6113,53 @@ module Aws::Batch
5616
6113
  req.send_request(options)
5617
6114
  end
5618
6115
 
6116
+ # Updates a service environment. You can update the state of a service
6117
+ # environment from `ENABLED` to `DISABLED` to prevent new service jobs
6118
+ # from being placed in the service environment.
6119
+ #
6120
+ # @option params [required, String] :service_environment
6121
+ # The name or ARN of the service environment to update.
6122
+ #
6123
+ # @option params [String] :state
6124
+ # The state of the service environment.
6125
+ #
6126
+ # @option params [Array<Types::CapacityLimit>] :capacity_limits
6127
+ # The capacity limits for the service environment. This defines the
6128
+ # maximum resources that can be used by service jobs in this
6129
+ # environment.
6130
+ #
6131
+ # @return [Types::UpdateServiceEnvironmentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
6132
+ #
6133
+ # * {Types::UpdateServiceEnvironmentResponse#service_environment_name #service_environment_name} => String
6134
+ # * {Types::UpdateServiceEnvironmentResponse#service_environment_arn #service_environment_arn} => String
6135
+ #
6136
+ # @example Request syntax with placeholder values
6137
+ #
6138
+ # resp = client.update_service_environment({
6139
+ # service_environment: "String", # required
6140
+ # state: "ENABLED", # accepts ENABLED, DISABLED
6141
+ # capacity_limits: [
6142
+ # {
6143
+ # max_capacity: 1,
6144
+ # capacity_unit: "String",
6145
+ # },
6146
+ # ],
6147
+ # })
6148
+ #
6149
+ # @example Response structure
6150
+ #
6151
+ # resp.service_environment_name #=> String
6152
+ # resp.service_environment_arn #=> String
6153
+ #
6154
+ # @see http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/UpdateServiceEnvironment AWS API Documentation
6155
+ #
6156
+ # @overload update_service_environment(params = {})
6157
+ # @param [Hash] params ({})
6158
+ def update_service_environment(params = {}, options = {})
6159
+ req = build_request(:update_service_environment, params)
6160
+ req.send_request(options)
6161
+ end
6162
+
5619
6163
  # @!endgroup
5620
6164
 
5621
6165
  # @param params ({})
@@ -5634,7 +6178,7 @@ module Aws::Batch
5634
6178
  tracer: tracer
5635
6179
  )
5636
6180
  context[:gem_name] = 'aws-sdk-batch'
5637
- context[:gem_version] = '1.117.0'
6181
+ context[:gem_version] = '1.118.0'
5638
6182
  Seahorse::Client::Request.new(handlers, context)
5639
6183
  end
5640
6184