Skip to main content

jobs

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

Overview

Namejobs
TypeResource
Idazure_extras.storage_import_export.jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringSpecifies the resource identifier of the job.
namestringSpecifies the name of the job.
backupDriveManifestbooleanDefault value is false. Indicates whether the manifest files on the drives should be copied to block blobs.
cancelRequestedbooleanIndicates whether a request has been submitted to cancel the job.
deliveryPackageobjectContains information about the package being shipped by the customer to the Microsoft data center.
diagnosticsPathstringThe virtual blob directory to which the copy logs and backups of drive manifest files (if enabled) will be stored.
driveListarrayList of up to ten drives that comprise the job. The drive list is a required element for an import job; it is not specified for export jobs.
encryptionKeyobjectContains information about the encryption key.
exportobjectA property containing information about the blobs to be exported for an export job. This property is included for export jobs only.
identityobjectSpecifies the job identity details.
incompleteBlobListUristringA blob path that points to a block blob containing a list of blob names that were not exported due to insufficient drive space. If all blobs were exported successfully, then this element is not included in the response.
jobTypestringThe type of job.
locationstringSpecifies the Azure location where the job is created.
logLevelstringDefault value is Error. Indicates whether error logging or verbose logging will be enabled.
percentCompleteintegerOverall percentage completed for the job.
provisioningStatestringSpecifies the provisioning state of the job.
returnAddressobjectSpecifies the return address information for the job.
returnPackageobjectContains information about the package being shipped from the Microsoft data center to the customer to return the drives. The format is the same as the deliveryPackage property above. This property is not included if the drives have not yet been returned.
returnShippingobjectSpecifies the return carrier and customer's account with the carrier.
shippingInformationobjectContains information about the Microsoft datacenter to which the drives should be shipped.
statestringCurrent state of the job.
storageAccountIdstringThe resource identifier of the storage account where data will be imported to or exported from.
systemDataobjectSystemData of ImportExport Jobs.
tagsobjectSpecifies the tags that are assigned to the job.
typestringSpecifies the type of the job resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectjob_name, resource_group_name, subscription_idAccept-LanguageGets information about an existing job.
list_by_resource_groupselectresource_group_name, subscription_id$top, $filter, Accept-LanguageReturns all active and completed jobs in a resource group.
list_by_subscriptionselectsubscription_id$top, $filter, Accept-LanguageReturns all active and completed jobs in a subscription.
createinsertjob_name, resource_group_name, subscription_idx-ms-client-tenant-id, Accept-LanguageCreates a new job or updates an existing job in the specified subscription.
updateupdatejob_name, resource_group_name, subscription_idAccept-LanguageUpdates specific properties of a job. You can call this operation to notify the Import/Export service that the hard drives comprising the import or export job have been shipped to the Microsoft data center. It can also be used to cancel an existing job.
deletedeletejob_name, resource_group_name, subscription_idAccept-LanguageDeletes an existing job. Only jobs in the Creating or Completed states can be deleted.

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 import/export job. Required.
resource_group_namestringThe resource group name uniquely identifies the resource group within the user subscription. Required.
subscription_idstring
$filterstringCan be used to restrict the results to certain conditions. Default value is None.
$topintegerAn integer value that specifies how many jobs at most should be returned. The value cannot exceed 100. Default value is None.
Accept-Languagestring
x-ms-client-tenant-idstringThe tenant ID of the client making the request. Default value is None.

SELECT examples

Gets information about an existing job.

SELECT
id,
name,
backupDriveManifest,
cancelRequested,
deliveryPackage,
diagnosticsPath,
driveList,
encryptionKey,
export,
identity,
incompleteBlobListUri,
jobType,
location,
logLevel,
percentComplete,
provisioningState,
returnAddress,
returnPackage,
returnShipping,
shippingInformation,
state,
storageAccountId,
systemData,
tags,
type
FROM azure_extras.storage_import_export.jobs
WHERE job_name = '{{ job_name }}' -- required
AND resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND Accept-Language = '{{ Accept-Language }}'
;

INSERT examples

Creates a new job or updates an existing job in the specified subscription.

INSERT INTO azure_extras.storage_import_export.jobs (
location,
tags,
properties,
job_name,
resource_group_name,
subscription_id,
x-ms-client-tenant-id,
Accept-Language
)
SELECT
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ job_name }}',
'{{ resource_group_name }}',
'{{ subscription_id }}',
'{{ x-ms-client-tenant-id }}',
'{{ Accept-Language }}'
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Updates specific properties of a job. You can call this operation to notify the Import/Export service that the hard drives comprising the import or export job have been shipped to the Microsoft data center. It can also be used to cancel an existing job.

UPDATE azure_extras.storage_import_export.jobs
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
job_name = '{{ job_name }}' --required
AND resource_group_name = '{{ resource_group_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND Accept-Language = '{{ Accept-Language}}'
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;

DELETE examples

Deletes an existing job. Only jobs in the Creating or Completed states can be deleted.

DELETE FROM azure_extras.storage_import_export.jobs
WHERE job_name = '{{ job_name }}' --required
AND resource_group_name = '{{ resource_group_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND Accept-Language = '{{ Accept-Language }}'
;