Skip to main content

jobs

Creates, updates, deletes, gets or lists a jobs resource.

Overview

Namejobs
TypeResource
Idazure_extras.media.jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
correlationDataobjectCustomer provided key, value pairs that will be returned in Job and JobOutput state events.
createdstring (date-time)The UTC date and time when the customer has created the Job, in 'YYYY-MM-DDThh:mm:ssZ' format.
descriptionstringOptional customer supplied description of the Job.
endTimestring (date-time)The UTC date and time at which this Job finished processing.
inputobjectThe inputs for the Job.
lastModifiedstring (date-time)The UTC date and time when the customer has last updated the Job, in 'YYYY-MM-DDThh:mm:ssZ' format.
outputsarrayThe outputs for the Job.
prioritystringPriority 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".
startTimestring (date-time)The UTC date and time at which this Job began processing.
statestringThe current state of the job. Known values are: "Canceled", "Canceling", "Error", "Finished", "Processing", "Queued", and "Scheduled".
systemDataobjectThe system metadata relating to this resource.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, account_name, transform_name, job_name, subscription_idGet Job. Gets a Job.
listselectresource_group_name, account_name, transform_name, subscription_id$filter, $orderbyList Jobs. Lists all of the Jobs for the Transform.
createinsertresource_group_name, account_name, transform_name, job_name, subscription_idCreate Job. Creates a Job.
updateupdateresource_group_name, account_name, transform_name, job_name, subscription_idUpdate 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.
deletedeleteresource_group_name, account_name, transform_name, job_name, subscription_idDelete Job. Deletes a Job.
cancel_jobexecresource_group_name, account_name, transform_name, job_name, subscription_idCancel 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.

NameDatatypeDescription
account_namestringThe Media Services account name. Required.
job_namestringThe Job name. Required.
resource_group_namestringThe name of the resource group within the Azure subscription. Required.
subscription_idstring
transform_namestringThe Transform name. Required.
$filterstringRestricts the set of items returned. Default value is None.
$orderbystringSpecifies the key by which the result collection should be ordered. Default value is None.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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 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 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
;