jobs
Creates, updates, deletes, gets or lists a jobs
resource.
Overview
Name | jobs |
Type | Resource |
Id | azure.data_box.jobs |
Fields
The following fields are returned by SELECT
queries:
- get
- list_by_resource_group
- list
Job object.
Name | Datatype | Description |
---|---|---|
id | string | Id of the object. |
name | string | Name of the object. |
identity | object | Msi identity of the resource |
location | string | The location of the resource. This will be one of the supported and registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a resource cannot be changed once it is created, but if an identical region is specified on update the request will succeed. |
properties | object | Properties of a job. |
sku | object | The sku type. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
tags | object | The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). |
type | string | Type of the object. |
List of jobs by resource group.
Name | Datatype | Description |
---|---|---|
id | string | Id of the object. |
name | string | Name of the object. |
identity | object | Msi identity of the resource |
location | string | The location of the resource. This will be one of the supported and registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a resource cannot be changed once it is created, but if an identical region is specified on update the request will succeed. |
properties | object | Properties of a job. |
sku | object | The sku type. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
tags | object | The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). |
type | string | Type of the object. |
List of jobs available under the subscription.
Name | Datatype | Description |
---|---|---|
id | string | Id of the object. |
name | string | Name of the object. |
identity | object | Msi identity of the resource |
location | string | The location of the resource. This will be one of the supported and registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a resource cannot be changed once it is created, but if an identical region is specified on update the request will succeed. |
properties | object | Properties of a job. |
sku | object | The sku type. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
tags | object | The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). |
type | string | Type of the object. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | subscriptionId , resourceGroupName , jobName | $expand | Gets information about the specified job. |
list_by_resource_group | select | subscriptionId , resourceGroupName | $skipToken | Lists all the jobs available under the given resource group. |
list | select | subscriptionId | $skipToken | Lists all the jobs available under the subscription. |
create | insert | subscriptionId , resourceGroupName , jobName , data__properties | Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API. | |
update | update | subscriptionId , resourceGroupName , jobName | If-Match | Updates the properties of an existing job. |
delete | delete | subscriptionId , resourceGroupName , jobName | Deletes a job. | |
mark_devices_shipped | exec | jobName , subscriptionId , resourceGroupName , deliverToDcPackageDetails | Request to mark devices for a given job as shipped | |
book_shipment_pick_up | exec | subscriptionId , resourceGroupName , jobName , startTime , endTime , shipmentLocation | Book shipment pick up. | |
cancel | exec | subscriptionId , resourceGroupName , jobName , reason | CancelJob. |
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 |
---|---|---|
jobName | string | The name of the job Resource within the specified resource group. job names must be between 3 and 24 characters in length and use any alphanumeric and underscore only |
resourceGroupName | string | The Resource Group Name |
subscriptionId | string | The Subscription Id |
$expand | string | $expand is supported on details parameter for job, which provides details on the job stages. |
$skipToken | string | $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. |
If-Match | string | Defines the If-Match condition. The patch will be performed only if the ETag of the job on the server matches this value. |
SELECT
examples
- get
- list_by_resource_group
- list
Gets information about the specified job.
SELECT
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type
FROM azure.data_box.jobs
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND jobName = '{{ jobName }}' -- required
AND $expand = '{{ $expand }}'
;
Lists all the jobs available under the given resource group.
SELECT
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type
FROM azure.data_box.jobs
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND $skipToken = '{{ $skipToken }}'
;
Lists all the jobs available under the subscription.
SELECT
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type
FROM azure.data_box.jobs
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND $skipToken = '{{ $skipToken }}'
;
INSERT
examples
- create
- Manifest
Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
INSERT INTO azure.data_box.jobs (
data__location,
data__tags,
data__sku,
data__identity,
data__properties,
subscriptionId,
resourceGroupName,
jobName
)
SELECT
'{{ location }}',
'{{ tags }}',
'{{ sku }}',
'{{ identity }}',
'{{ properties }}' /* required */,
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ jobName }}'
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: jobs
props:
- name: subscriptionId
value: string
description: Required parameter for the jobs resource.
- name: resourceGroupName
value: string
description: Required parameter for the jobs resource.
- name: jobName
value: string
description: Required parameter for the jobs resource.
- name: location
value: string
description: |
The location of the resource. This will be one of the supported and registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a resource cannot be changed once it is created, but if an identical region is specified on update the request will succeed.
- name: tags
value: object
description: |
The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups).
- name: sku
value: object
description: |
The sku type.
- name: identity
value: object
description: |
Msi identity of the resource
- name: properties
value: object
description: |
Properties of a job.
UPDATE
examples
- update
Updates the properties of an existing job.
UPDATE azure.data_box.jobs
SET
data__properties = '{{ properties }}',
data__tags = '{{ tags }}',
data__identity = '{{ identity }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND jobName = '{{ jobName }}' --required
AND If-Match = '{{ If-Match}}'
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type;
DELETE
examples
- delete
Deletes a job.
DELETE FROM azure.data_box.jobs
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND jobName = '{{ jobName }}' --required
;
Lifecycle Methods
- mark_devices_shipped
- book_shipment_pick_up
- cancel
Request to mark devices for a given job as shipped
EXEC azure.data_box.jobs.mark_devices_shipped
@jobName='{{ jobName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required
@@json=
'{
"deliverToDcPackageDetails": "{{ deliverToDcPackageDetails }}"
}'
;
Book shipment pick up.
EXEC azure.data_box.jobs.book_shipment_pick_up
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@jobName='{{ jobName }}' --required
@@json=
'{
"startTime": "{{ startTime }}",
"endTime": "{{ endTime }}",
"shipmentLocation": "{{ shipmentLocation }}"
}'
;
CancelJob.
EXEC azure.data_box.jobs.cancel
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@jobName='{{ jobName }}' --required
@@json=
'{
"reason": "{{ reason }}"
}'
;