Skip to main content

jobs

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

Overview

Namejobs
TypeResource
Idazure.data_box.jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringId of the object.
namestringName of the object.
allDevicesLostbooleanFlag to indicate if all devices associated with the job are lost.
cancellationReasonstringReason for cancellation.
delayedStagestringName of the stage where delay might be present. Known values are: "DeviceOrdered", "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC", "Created", "ShippedToAzureDC", "AwaitingShipmentDetails", "PreparingToShipFromAzureDC", and "ShippedToCustomer".
deliveryInfoobjectDelivery Info of Job.
deliveryTypestringDelivery type of Job. Known values are: "NonScheduled" and "Scheduled".
detailsobjectDetails of a job run. This field will only be sent for expand details filter.
errorobjectTop level error for the job.
identityobjectMsi identity of the resource.
isCancellablebooleanDescribes whether the job is cancellable or not.
isCancellableWithoutFeebooleanFlag to indicate cancellation of scheduled job.
isDeletablebooleanDescribes whether the job is deletable or not.
isPrepareToShipEnabledbooleanIs Prepare To Ship Enabled on this job.
isShippingAddressEditablebooleanDescribes whether the shipping address is editable or not.
locationstringThe 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. Required.
reverseShippingDetailsUpdatestringThe Editable status for Reverse Shipping Address and Contact Info. Known values are: "Enabled", "Disabled", and "NotSupported".
reverseTransportPreferenceUpdatestringThe Editable status for Reverse Transport preferences. Known values are: "Enabled", "Disabled", and "NotSupported".
skuobjectThe sku type. Required.
startTimestring (date-time)Time at which the job was started in UTC ISO 8601 format.
statusstringName of the stage which is in progress. Known values are: "DeviceOrdered", "DevicePrepared", "Dispatched", "Delivered", "PickedUp", "AtAzureDC", "DataCopy", "Completed", "CompletedWithErrors", "Cancelled", "Failed_IssueReportedAtCustomer", "Failed_IssueDetectedAtAzureDC", "Aborted", "CompletedWithWarnings", "ReadyToDispatchFromAzureDC", "ReadyToReceiveAtAzureDC", "Created", "ShippedToAzureDC", "AwaitingShipmentDetails", "PreparingToShipFromAzureDC", and "ShippedToCustomer".
systemDataobjectMetadata pertaining to creation and last modification of the resource.
tagsobjectThe list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups).
transferTypestringType of the data transfer. Required. Known values are: "ImportToAzure" and "ExportFromAzure".
typestringType of the object.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, job_name, subscription_id$expandGets information about the specified job.
list_by_resource_groupselectresource_group_name, subscription_id$skipTokenLists all the jobs available under the given resource group.
listselectsubscription_id$skipTokenLists all the jobs available under the subscription.
createinsertresource_group_name, job_name, subscription_id, location, sku, propertiesCreates 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.
updateupdateresource_group_name, job_name, subscription_idIf-MatchUpdates the properties of an existing job.
deletedeleteresource_group_name, job_name, subscription_idDeletes a job.
list_credentialsexecresource_group_name, job_name, subscription_idThis method gets the unencrypted secrets related to the job.
mark_devices_shippedexecjob_name, resource_group_name, subscription_id, deliverToDcPackageDetailsRequest to mark devices for a given job as shipped.
book_shipment_pick_upexecresource_group_name, job_name, subscription_id, startTime, endTime, shipmentLocationBook shipment pick up.
cancelexecresource_group_name, job_name, subscription_id, reasonCancelJob.

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
job_namestringThe 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. Required.
resource_group_namestringThe Resource Group Name. Required.
subscription_idstring
$expandstring$expand is supported on details parameter for job, which provides details on the job stages. Default value is None.
$skipTokenstring$skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. Default value is None.
If-MatchstringDefines the If-Match condition. The patch will be performed only if the ETag of the job on the server matches this value. Default value is None.

SELECT examples

Gets information about the specified job.

SELECT
id,
name,
allDevicesLost,
cancellationReason,
delayedStage,
deliveryInfo,
deliveryType,
details,
error,
identity,
isCancellable,
isCancellableWithoutFee,
isDeletable,
isPrepareToShipEnabled,
isShippingAddressEditable,
location,
reverseShippingDetailsUpdate,
reverseTransportPreferenceUpdate,
sku,
startTime,
status,
systemData,
tags,
transferType,
type
FROM azure.data_box.jobs
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND job_name = '{{ job_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
;

INSERT examples

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 (
location,
tags,
sku,
identity,
properties,
resource_group_name,
job_name,
subscription_id
)
SELECT
'{{ location }}' /* required */,
'{{ tags }}',
'{{ sku }}' /* required */,
'{{ identity }}',
'{{ properties }}' /* required */,
'{{ resource_group_name }}',
'{{ job_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type
;

UPDATE examples

Updates the properties of an existing job.

UPDATE azure.data_box.jobs
SET
tags = '{{ tags }}',
identity = '{{ identity }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND job_name = '{{ job_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND If-Match = '{{ If-Match}}'
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type;

DELETE examples

Deletes a job.

DELETE FROM azure.data_box.jobs
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND job_name = '{{ job_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

This method gets the unencrypted secrets related to the job.

EXEC azure.data_box.jobs.list_credentials 
@resource_group_name='{{ resource_group_name }}' --required,
@job_name='{{ job_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;