jobs
Creates, updates, deletes, gets or lists a jobs resource.
Overview
| Name | jobs |
| Type | Resource |
| Id | azure_extras.media.jobs |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
correlationData | object | Customer provided key, value pairs that will be returned in Job and JobOutput state events. |
created | string (date-time) | The UTC date and time when the customer has created the Job, in 'YYYY-MM-DDThh:mm:ssZ' format. |
description | string | Optional customer supplied description of the Job. |
endTime | string (date-time) | The UTC date and time at which this Job finished processing. |
input | object | The inputs for the Job. |
lastModified | string (date-time) | The UTC date and time when the customer has last updated the Job, in 'YYYY-MM-DDThh:mm:ssZ' format. |
outputs | array | The outputs for the Job. |
priority | string | Priority with which the job should be processed. Higher priority jobs are processed before lower priority jobs. If not set, the default is normal. Known values are: "Low", "Normal", and "High". |
startTime | string (date-time) | The UTC date and time at which this Job began processing. |
state | string | The current state of the job. Known values are: "Canceled", "Canceling", "Error", "Finished", "Processing", "Queued", and "Scheduled". |
systemData | object | The system metadata relating to this resource. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
correlationData | object | Customer provided key, value pairs that will be returned in Job and JobOutput state events. |
created | string (date-time) | The UTC date and time when the customer has created the Job, in 'YYYY-MM-DDThh:mm:ssZ' format. |
description | string | Optional customer supplied description of the Job. |
endTime | string (date-time) | The UTC date and time at which this Job finished processing. |
input | object | The inputs for the Job. |
lastModified | string (date-time) | The UTC date and time when the customer has last updated the Job, in 'YYYY-MM-DDThh:mm:ssZ' format. |
outputs | array | The outputs for the Job. |
priority | string | Priority with which the job should be processed. Higher priority jobs are processed before lower priority jobs. If not set, the default is normal. Known values are: "Low", "Normal", and "High". |
startTime | string (date-time) | The UTC date and time at which this Job began processing. |
state | string | The current state of the job. Known values are: "Canceled", "Canceling", "Error", "Finished", "Processing", "Queued", and "Scheduled". |
systemData | object | The system metadata relating to this resource. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, account_name, transform_name, job_name, subscription_id | Get Job. Gets a Job. | |
list | select | resource_group_name, account_name, transform_name, subscription_id | $filter, $orderby | List Jobs. Lists all of the Jobs for the Transform. |
create | insert | resource_group_name, account_name, transform_name, job_name, subscription_id | Create Job. Creates a Job. | |
update | update | resource_group_name, account_name, transform_name, job_name, subscription_id | Update Job. Update is only supported for description and priority. Updating Priority will take effect when the Job state is Queued or Scheduled and depending on the timing the priority update may be ignored. | |
delete | delete | resource_group_name, account_name, transform_name, job_name, subscription_id | Delete Job. Deletes a Job. | |
cancel_job | exec | resource_group_name, account_name, transform_name, job_name, subscription_id | Cancel Job. Cancel a Job. |
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 |
|---|---|---|
account_name | string | The Media Services account name. Required. |
job_name | string | The Job name. Required. |
resource_group_name | string | The name of the resource group within the Azure subscription. Required. |
subscription_id | string | |
transform_name | string | The Transform name. Required. |
$filter | string | Restricts the set of items returned. Default value is None. |
$orderby | string | Specifies the key by which the result collection should be ordered. Default value is None. |
SELECT examples
- get
- list
Get Job. Gets a Job.
SELECT
id,
name,
correlationData,
created,
description,
endTime,
input,
lastModified,
outputs,
priority,
startTime,
state,
systemData,
type
FROM azure_extras.media.jobs
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND transform_name = '{{ transform_name }}' -- required
AND job_name = '{{ job_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List Jobs. Lists all of the Jobs for the Transform.
SELECT
id,
name,
correlationData,
created,
description,
endTime,
input,
lastModified,
outputs,
priority,
startTime,
state,
systemData,
type
FROM azure_extras.media.jobs
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND transform_name = '{{ transform_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
AND $orderby = '{{ $orderby }}'
;
INSERT examples
- create
- Manifest
Create Job. Creates a Job.
INSERT INTO azure_extras.media.jobs (
properties,
resource_group_name,
account_name,
transform_name,
job_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ account_name }}',
'{{ transform_name }}',
'{{ job_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: jobs
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the jobs resource.
- name: account_name
value: "{{ account_name }}"
description: Required parameter for the jobs resource.
- name: transform_name
value: "{{ transform_name }}"
description: Required parameter for the jobs resource.
- name: job_name
value: "{{ job_name }}"
description: Required parameter for the jobs resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the jobs resource.
- name: properties
value:
description: "{{ description }}"
input:
@odata:
type: "{{ type }}"
outputs:
- @odata:
type: "{{ type }}"
error:
code: "{{ code }}"
message: "{{ message }}"
category: "{{ category }}"
retry: "{{ retry }}"
details:
- code: "{{ code }}"
message: "{{ message }}"
presetOverride:
@odata:
type: "{{ type }}"
state: "{{ state }}"
progress: {{ progress }}
label: "{{ label }}"
startTime: "{{ startTime }}"
endTime: "{{ endTime }}"
priority: "{{ priority }}"
correlationData: "{{ correlationData }}"
UPDATE examples
- update
Update Job. Update is only supported for description and priority. Updating Priority will take effect when the Job state is Queued or Scheduled and depending on the timing the priority update may be ignored.
UPDATE azure_extras.media.jobs
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND transform_name = '{{ transform_name }}' --required
AND job_name = '{{ job_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
Delete Job. Deletes a Job.
DELETE FROM azure_extras.media.jobs
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND transform_name = '{{ transform_name }}' --required
AND job_name = '{{ job_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- cancel_job
Cancel Job. Cancel a Job.
EXEC azure_extras.media.jobs.cancel_job
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@transform_name='{{ transform_name }}' --required,
@job_name='{{ job_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;