jobs
Creates, updates, deletes, gets or lists a jobs resource.
Overview
| Name | jobs |
| Type | Resource |
| Id | aws.amplify.jobs |
Fields
The following fields are returned by SELECT queries:
- get_job
- list_jobs
| Name | Datatype | Description |
|---|---|---|
steps | array | The execution steps for an execution job, for an Amplify app. |
summary | object | Describes the summary for an execution job for an Amplify app. |
| Name | Datatype | Description |
|---|---|---|
commit_id | string | The commit ID from a third-party repository provider for the job. (pattern: <code>(?s).*</code>) |
commit_message | string | The commit message from a third-party repository provider for the job. (pattern: <code>(?s).*</code>) |
commit_time | string (date-time) | The commit date and time for the job. |
end_time | string (date-time) | The end date and time for the job. |
job_arn | string | The Amazon Resource Name (ARN) for the job. |
job_id | string | The unique ID for the job. (pattern: <code>[0-9]+</code>) |
job_type | string | The type for the job. If the value is RELEASE, the job was manually released from its source by using the StartJob API. This value is available only for apps that are connected to a repository. If the value is RETRY, the job was manually retried using the StartJob API. If the value is WEB_HOOK, the job was automatically triggered by webhooks. If the value is MANUAL, the job is for a manually deployed app. Manually deployed apps are not connected to a Git repository. (RELEASE, RETRY, MANUAL, WEB_HOOK) |
source_url | string | The source URL for the files to deploy. The source URL can be either an HTTP GET URL that is publicly accessible and downloads a single .zip file, or an Amazon S3 bucket and prefix. (pattern: <code>^(s3|https|http)://.*</code>) |
source_url_type | string | The type of source specified by the sourceURL. If the value is ZIP, the source is a .zip file. If the value is BUCKET_PREFIX, the source is an Amazon S3 bucket and prefix. If no value is specified, the default is ZIP. (ZIP, BUCKET_PREFIX) |
start_time | string (date-time) | The start date and time for the job. |
status | string | The current status for the job. (CREATED, PENDING, PROVISIONING, RUNNING, FAILED, SUCCEED, CANCELLING, CANCELLED) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_job | select | app_id, branch_name, job_id, region | Returns a job for a branch of an Amplify app. | |
list_jobs | select | app_id, branch_name, region | nextToken, maxResults | Lists the jobs for a branch of an Amplify app. |
delete_job | delete | app_id, branch_name, job_id, region | Deletes a job for a branch of an Amplify app. |
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 |
|---|---|---|
app_id | string | The unique ID for an Amplify app. |
branch_name | string | The name of the branch to use for the job. |
job_id | string | The unique ID for the job. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of records to list in a single response. |
nextToken | string | A pagination token. Set to null to start listing steps from the start. If a non-null pagination token is returned in a result, pass its value in here to list more steps. |
SELECT examples
- get_job
- list_jobs
Returns a job for a branch of an Amplify app.
SELECT
steps,
summary
FROM aws.amplify.jobs
WHERE app_id = '{{ app_id }}' -- required
AND branch_name = '{{ branch_name }}' -- required
AND job_id = '{{ job_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists the jobs for a branch of an Amplify app.
SELECT
commit_id,
commit_message,
commit_time,
end_time,
job_arn,
job_id,
job_type,
source_url,
source_url_type,
start_time,
status
FROM aws.amplify.jobs
WHERE app_id = '{{ app_id }}' -- required
AND branch_name = '{{ branch_name }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
DELETE examples
- delete_job
Deletes a job for a branch of an Amplify app.
DELETE FROM aws.amplify.jobs
WHERE app_id = '{{ app_id }}' --required
AND branch_name = '{{ branch_name }}' --required
AND job_id = '{{ job_id }}' --required
AND region = '{{ region }}' --required
;