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
| Name | Datatype | Description |
|---|---|---|
id | string | Id of the object. |
name | string | Name of the object. |
allDevicesLost | boolean | Flag to indicate if all devices associated with the job are lost. |
cancellationReason | string | Reason for cancellation. |
delayedStage | string | Name 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". |
deliveryInfo | object | Delivery Info of Job. |
deliveryType | string | Delivery type of Job. Known values are: "NonScheduled" and "Scheduled". |
details | object | Details of a job run. This field will only be sent for expand details filter. |
error | object | Top level error for the job. |
identity | object | Msi identity of the resource. |
isCancellable | boolean | Describes whether the job is cancellable or not. |
isCancellableWithoutFee | boolean | Flag to indicate cancellation of scheduled job. |
isDeletable | boolean | Describes whether the job is deletable or not. |
isPrepareToShipEnabled | boolean | Is Prepare To Ship Enabled on this job. |
isShippingAddressEditable | boolean | Describes whether the shipping address is editable or not. |
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. Required. |
reverseShippingDetailsUpdate | string | The Editable status for Reverse Shipping Address and Contact Info. Known values are: "Enabled", "Disabled", and "NotSupported". |
reverseTransportPreferenceUpdate | string | The Editable status for Reverse Transport preferences. Known values are: "Enabled", "Disabled", and "NotSupported". |
sku | object | The sku type. Required. |
startTime | string (date-time) | Time at which the job was started in UTC ISO 8601 format. |
status | string | Name 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". |
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). |
transferType | string | Type of the data transfer. Required. Known values are: "ImportToAzure" and "ExportFromAzure". |
type | string | Type of the object. |
| Name | Datatype | Description |
|---|---|---|
id | string | Id of the object. |
name | string | Name of the object. |
allDevicesLost | boolean | Flag to indicate if all devices associated with the job are lost. |
cancellationReason | string | Reason for cancellation. |
delayedStage | string | Name 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". |
deliveryInfo | object | Delivery Info of Job. |
deliveryType | string | Delivery type of Job. Known values are: "NonScheduled" and "Scheduled". |
details | object | Details of a job run. This field will only be sent for expand details filter. |
error | object | Top level error for the job. |
identity | object | Msi identity of the resource. |
isCancellable | boolean | Describes whether the job is cancellable or not. |
isCancellableWithoutFee | boolean | Flag to indicate cancellation of scheduled job. |
isDeletable | boolean | Describes whether the job is deletable or not. |
isPrepareToShipEnabled | boolean | Is Prepare To Ship Enabled on this job. |
isShippingAddressEditable | boolean | Describes whether the shipping address is editable or not. |
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. Required. |
reverseShippingDetailsUpdate | string | The Editable status for Reverse Shipping Address and Contact Info. Known values are: "Enabled", "Disabled", and "NotSupported". |
reverseTransportPreferenceUpdate | string | The Editable status for Reverse Transport preferences. Known values are: "Enabled", "Disabled", and "NotSupported". |
sku | object | The sku type. Required. |
startTime | string (date-time) | Time at which the job was started in UTC ISO 8601 format. |
status | string | Name 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". |
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). |
transferType | string | Type of the data transfer. Required. Known values are: "ImportToAzure" and "ExportFromAzure". |
type | string | Type of the object. |
| Name | Datatype | Description |
|---|---|---|
id | string | Id of the object. |
name | string | Name of the object. |
allDevicesLost | boolean | Flag to indicate if all devices associated with the job are lost. |
cancellationReason | string | Reason for cancellation. |
delayedStage | string | Name 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". |
deliveryInfo | object | Delivery Info of Job. |
deliveryType | string | Delivery type of Job. Known values are: "NonScheduled" and "Scheduled". |
details | object | Details of a job run. This field will only be sent for expand details filter. |
error | object | Top level error for the job. |
identity | object | Msi identity of the resource. |
isCancellable | boolean | Describes whether the job is cancellable or not. |
isCancellableWithoutFee | boolean | Flag to indicate cancellation of scheduled job. |
isDeletable | boolean | Describes whether the job is deletable or not. |
isPrepareToShipEnabled | boolean | Is Prepare To Ship Enabled on this job. |
isShippingAddressEditable | boolean | Describes whether the shipping address is editable or not. |
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. Required. |
reverseShippingDetailsUpdate | string | The Editable status for Reverse Shipping Address and Contact Info. Known values are: "Enabled", "Disabled", and "NotSupported". |
reverseTransportPreferenceUpdate | string | The Editable status for Reverse Transport preferences. Known values are: "Enabled", "Disabled", and "NotSupported". |
sku | object | The sku type. Required. |
startTime | string (date-time) | Time at which the job was started in UTC ISO 8601 format. |
status | string | Name 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". |
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). |
transferType | string | Type of the data transfer. Required. Known values are: "ImportToAzure" and "ExportFromAzure". |
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 | resource_group_name, job_name, subscription_id | $expand | Gets information about the specified job. |
list_by_resource_group | select | resource_group_name, subscription_id | $skipToken | Lists all the jobs available under the given resource group. |
list | select | subscription_id | $skipToken | Lists all the jobs available under the subscription. |
create | insert | resource_group_name, job_name, subscription_id, location, sku, 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 | resource_group_name, job_name, subscription_id | If-Match | Updates the properties of an existing job. |
delete | delete | resource_group_name, job_name, subscription_id | Deletes a job. | |
list_credentials | exec | resource_group_name, job_name, subscription_id | This method gets the unencrypted secrets related to the job. | |
mark_devices_shipped | exec | job_name, resource_group_name, subscription_id, deliverToDcPackageDetails | Request to mark devices for a given job as shipped. | |
book_shipment_pick_up | exec | resource_group_name, job_name, subscription_id, startTime, endTime, shipmentLocation | Book shipment pick up. | |
cancel | exec | resource_group_name, job_name, subscription_id, 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 |
|---|---|---|
job_name | 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. Required. |
resource_group_name | string | The Resource Group Name. Required. |
subscription_id | string | |
$expand | string | $expand is supported on details parameter for job, which provides details on the job stages. Default value is None. |
$skipToken | string | $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. Default value is None. |
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. Default value is None. |
SELECT examples
- get
- list_by_resource_group
- list
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 }}'
;
Lists all the jobs available under the given resource group.
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 subscription_id = '{{ subscription_id }}' -- required
AND $skipToken = '{{ $skipToken }}'
;
Lists all the jobs available under the subscription.
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 subscription_id = '{{ subscription_id }}' -- 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 (
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
;
# 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: 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: location
value: "{{ location }}"
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. Required.
- name: tags
value: "{{ tags }}"
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
description: |
The sku type. Required.
value:
name: "{{ name }}"
displayName: "{{ displayName }}"
family: "{{ family }}"
model: "{{ model }}"
- name: identity
description: |
Msi identity of the resource.
value:
type: "{{ type }}"
principalId: "{{ principalId }}"
tenantId: "{{ tenantId }}"
userAssignedIdentities: "{{ userAssignedIdentities }}"
- name: properties
value:
transferType: "{{ transferType }}"
details:
jobStages:
- stageName: "{{ stageName }}"
displayName: "{{ displayName }}"
stageStatus: "{{ stageStatus }}"
stageTime: "{{ stageTime }}"
jobStageDetails: "{{ jobStageDetails }}"
delayInformation: "{{ delayInformation }}"
contactDetails:
contactName: "{{ contactName }}"
phone: "{{ phone }}"
phoneExtension: "{{ phoneExtension }}"
mobile: "{{ mobile }}"
emailList:
- "{{ emailList }}"
notificationPreference:
- stageName: "{{ stageName }}"
sendNotification: {{ sendNotification }}
shippingAddress:
streetAddress1: "{{ streetAddress1 }}"
streetAddress2: "{{ streetAddress2 }}"
streetAddress3: "{{ streetAddress3 }}"
city: "{{ city }}"
stateOrProvince: "{{ stateOrProvince }}"
country: "{{ country }}"
postalCode: "{{ postalCode }}"
zipExtendedCode: "{{ zipExtendedCode }}"
companyName: "{{ companyName }}"
addressType: "{{ addressType }}"
skipAddressValidation: {{ skipAddressValidation }}
taxIdentificationNumber: "{{ taxIdentificationNumber }}"
deliveryPackage:
trackingUrl: "{{ trackingUrl }}"
carrierName: "{{ carrierName }}"
trackingId: "{{ trackingId }}"
returnPackage:
trackingUrl: "{{ trackingUrl }}"
carrierName: "{{ carrierName }}"
trackingId: "{{ trackingId }}"
dataImportDetails:
- accountDetails:
dataAccountType: "{{ dataAccountType }}"
sharePassword: "{{ sharePassword }}"
logCollectionLevel: "{{ logCollectionLevel }}"
dataExportDetails:
- transferConfiguration:
transferConfigurationType: "{{ transferConfigurationType }}"
transferFilterDetails:
include: "{{ include }}"
transferAllDetails:
include: "{{ include }}"
logCollectionLevel: "{{ logCollectionLevel }}"
accountDetails:
dataAccountType: "{{ dataAccountType }}"
sharePassword: "{{ sharePassword }}"
jobDetailsType: "{{ jobDetailsType }}"
preferences:
preferredDataCenterRegion:
- "{{ preferredDataCenterRegion }}"
transportPreferences:
preferredShipmentType: "{{ preferredShipmentType }}"
isUpdated: {{ isUpdated }}
reverseTransportPreferences:
preferredShipmentType: "{{ preferredShipmentType }}"
isUpdated: {{ isUpdated }}
encryptionPreferences:
doubleEncryption: "{{ doubleEncryption }}"
hardwareEncryption: "{{ hardwareEncryption }}"
storageAccountAccessTierPreferences:
- "{{ storageAccountAccessTierPreferences }}"
reverseShippingDetails:
contactDetails:
contactName: "{{ contactName }}"
phone: "{{ phone }}"
phoneExtension: "{{ phoneExtension }}"
mobile: "{{ mobile }}"
shippingAddress:
streetAddress1: "{{ streetAddress1 }}"
streetAddress2: "{{ streetAddress2 }}"
streetAddress3: "{{ streetAddress3 }}"
city: "{{ city }}"
stateOrProvince: "{{ stateOrProvince }}"
country: "{{ country }}"
postalCode: "{{ postalCode }}"
zipExtendedCode: "{{ zipExtendedCode }}"
companyName: "{{ companyName }}"
addressType: "{{ addressType }}"
skipAddressValidation: {{ skipAddressValidation }}
taxIdentificationNumber: "{{ taxIdentificationNumber }}"
isUpdated: {{ isUpdated }}
copyLogDetails:
- copyLogDetailsType: "{{ copyLogDetailsType }}"
reverseShipmentLabelSasKey: "{{ reverseShipmentLabelSasKey }}"
chainOfCustodySasKey: "{{ chainOfCustodySasKey }}"
deviceErasureDetails:
deviceErasureStatus: "{{ deviceErasureStatus }}"
erasureOrDestructionCertificateSasKey: "{{ erasureOrDestructionCertificateSasKey }}"
keyEncryptionKey:
kekType: "{{ kekType }}"
identityProperties:
type: "{{ type }}"
userAssigned:
resourceId: "{{ resourceId }}"
kekUrl: "{{ kekUrl }}"
kekVaultResourceID: "{{ kekVaultResourceID }}"
expectedDataSizeInTeraBytes: {{ expectedDataSizeInTeraBytes }}
actions:
- "{{ actions }}"
lastMitigationActionOnJob:
actionDateTimeInUtc: "{{ actionDateTimeInUtc }}"
isPerformedByCustomer: {{ isPerformedByCustomer }}
customerResolution: "{{ customerResolution }}"
datacenterAddress:
datacenterAddressType: "{{ datacenterAddressType }}"
supportedCarriersForReturnShipment:
- "{{ supportedCarriersForReturnShipment }}"
dataCenterAzureLocation: "{{ dataCenterAzureLocation }}"
dataCenterCode: "{{ dataCenterCode }}"
deliveryType: "{{ deliveryType }}"
deliveryInfo:
scheduledDateTime: "{{ scheduledDateTime }}"
UPDATE examples
- update
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
- delete
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
- list_credentials
- mark_devices_shipped
- book_shipment_pick_up
- cancel
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
;
Request to mark devices for a given job as shipped.
EXEC azure.data_box.jobs.mark_devices_shipped
@job_name='{{ job_name }}' --required,
@resource_group_name='{{ resource_group_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"deliverToDcPackageDetails": "{{ deliverToDcPackageDetails }}"
}'
;
Book shipment pick up.
EXEC azure.data_box.jobs.book_shipment_pick_up
@resource_group_name='{{ resource_group_name }}' --required,
@job_name='{{ job_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"startTime": "{{ startTime }}",
"endTime": "{{ endTime }}",
"shipmentLocation": "{{ shipmentLocation }}"
}'
;
CancelJob.
EXEC azure.data_box.jobs.cancel
@resource_group_name='{{ resource_group_name }}' --required,
@job_name='{{ job_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"reason": "{{ reason }}"
}'
;