service_jobs
Creates, updates, deletes, gets or lists a service_jobs resource.
Overview
| Name | service_jobs |
| Type | Resource |
| Id | aws.batch.service_jobs |
Fields
The following fields are returned by SELECT queries:
- describe_service_job
- list_service_jobs
| Name | Datatype | Description |
|---|---|---|
attempts | array | A list of job attempts associated with the service job. |
capacity_usage | array | The configured capacity for the service job, such as the number of instances. The number of instances should be the same value as the serviceRequestPayload.InstanceCount field. |
created_at | integer (int64) | The Unix timestamp (in milliseconds) for when the service job was created. |
is_terminated | boolean | Indicates whether the service job has been terminated. |
job_arn | string | The Amazon Resource Name (ARN) of the service job. |
job_id | string | The job ID for the service job. |
job_name | string | The name of the service job. |
job_queue | string | The ARN of the job queue that the service job is associated with. |
latest_attempt | object | The latest attempt associated with the service job. |
preemption_configuration | object | Specifies the service job behavior when preempted. |
preemption_summary | object | Summarizes the preemptions of the service job. This field appears on a service job when it has been preempted. |
quota_share_name | string | The name of the quota share that the service job is associated with. |
retry_strategy | object | The retry strategy to use for failed service jobs that are submitted with this service job. |
scheduled_at | integer (int64) | The Unix timestamp (in milliseconds) for when the service job was scheduled. This represents when the service job was dispatched to SageMaker and the service job transitioned to the SCHEDULED state. |
scheduling_priority | integer | The scheduling priority of the service job. |
service_job_type | string | The type of service job. For SageMaker Training jobs, this value is SAGEMAKER_TRAINING. (SAGEMAKER_TRAINING) |
service_request_payload | string | The request, in JSON, for the service that the SubmitServiceJob operation is queueing. |
share_identifier | string | The share identifier for the service job. This is used for fair-share scheduling. |
started_at | integer (int64) | The Unix timestamp (in milliseconds) for when the service job was started. |
status | string | The current status of the service job. (SUBMITTED, PENDING, RUNNABLE, SCHEDULED, STARTING, RUNNING, SUCCEEDED, FAILED) |
status_reason | string | A short, human-readable string to provide more details for the current status of the service job. |
stopped_at | integer (int64) | The Unix timestamp (in milliseconds) for when the service job stopped running. |
tags | object | The tags that are associated with the service job. Each tag consists of a key and an optional value. For more information, see Tagging your Batch resources. |
timeout_config | object | The timeout configuration for the service job. |
| Name | Datatype | Description |
|---|---|---|
capacity_usage | array | The capacity usage information for this service job, including the unit of measure and quantity of resources being used. |
created_at | integer (int64) | The Unix timestamp (in milliseconds) for when the service job was created. |
job_arn | string | The Amazon Resource Name (ARN) of the service job. |
job_id | string | The job ID for the service job. |
job_name | string | The name of the service job. |
latest_attempt | object | Information about the latest attempt for the service job. |
quota_share_name | string | The quota share for the service job. |
scheduled_at | integer (int64) | The Unix timestamp (in milliseconds) for when the service job was scheduled for execution. |
service_job_type | string | The type of service job. For SageMaker Training jobs, this value is SAGEMAKER_TRAINING. (SAGEMAKER_TRAINING) |
share_identifier | string | The share identifier for the job. |
started_at | integer (int64) | The Unix timestamp (in milliseconds) for when the service job was started. |
status | string | The current status of the service job. (SUBMITTED, PENDING, RUNNABLE, SCHEDULED, STARTING, RUNNING, SUCCEEDED, FAILED) |
status_reason | string | A short string to provide more details on the current status of the service job. |
stopped_at | integer (int64) | The Unix timestamp (in milliseconds) for when the service job stopped running. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_service_job | select | region | The details of a service job. | |
list_service_jobs | select | region | Returns a list of service jobs for a specified job queue. | |
update_service_job | update | region, jobId, schedulingPriority | Updates the priority of a specified service job in an Batch job queue. | |
terminate_service_job | delete | region | Terminates a service job in a job queue. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_service_job
- list_service_jobs
The details of a service job.
SELECT
attempts,
capacity_usage,
created_at,
is_terminated,
job_arn,
job_id,
job_name,
job_queue,
latest_attempt,
preemption_configuration,
preemption_summary,
quota_share_name,
retry_strategy,
scheduled_at,
scheduling_priority,
service_job_type,
service_request_payload,
share_identifier,
started_at,
status,
status_reason,
stopped_at,
tags,
timeout_config
FROM aws.batch.service_jobs
WHERE region = '{{ region }}' -- required
;
Returns a list of service jobs for a specified job queue.
SELECT
capacity_usage,
created_at,
job_arn,
job_id,
job_name,
latest_attempt,
quota_share_name,
scheduled_at,
service_job_type,
share_identifier,
started_at,
status,
status_reason,
stopped_at
FROM aws.batch.service_jobs
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- update_service_job
Updates the priority of a specified service job in an Batch job queue.
UPDATE aws.batch.service_jobs
SET
jobId = '{{ jobId }}',
schedulingPriority = {{ schedulingPriority }}
WHERE
region = '{{ region }}' --required
AND jobId = '{{ jobId }}' --required
AND schedulingPriority = '{{ schedulingPriority }}' --required
RETURNING
job_arn,
job_id,
job_name;
DELETE examples
- terminate_service_job
Terminates a service job in a job queue.
DELETE FROM aws.batch.service_jobs
WHERE region = '{{ region }}' --required
;