Skip to main content

job_definitions

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

Overview

Namejob_definitions
TypeResource
Idazure.storage_mover.job_definitions

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.
agentNamestringName of the Agent to assign for new Job Runs of this Job Definition.
agentResourceIdstringFully qualified resource id of the Agent to assign for new Job Runs of this Job Definition.
connectionsarrayList of connections associated to this job.
copyModestringStrategy to use for copy. Required. Known values are: "Additive" and "Mirror". (Additive, Mirror)
dataIntegrityValidationstringThe checksum validation mode for the job definition. Known values are: "SaveVerifyFileMD5", "SaveFileMD5", and "None". (SaveVerifyFileMD5, SaveFileMD5, None)
descriptionstringA description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for migrating data between cloud to cloud.
jobTypestringThe type of the Job. Known values are: "OnPremToCloud" and "CloudToCloud". (OnPremToCloud, CloudToCloud)
latestJobRunNamestringThe name of the Job Run in a non-terminal state, if exists.
latestJobRunResourceIdstringThe fully qualified resource ID of the Job Run in a non-terminal state, if exists.
latestJobRunStatusstringThe current status of the Job Run in a non-terminal state, if exists. Known values are: "Queued", "Started", "Running", "CancelRequested", "Canceling", "Canceled", "Failed", "Succeeded", and "PausedByBandwidthManagement". (Queued, Started, Running, CancelRequested, Canceling, Canceled, Failed, Succeeded, PausedByBandwidthManagement)
preservePermissionsbooleanBoolean to preserve permissions or not.
provisioningStatestringThe provisioning state of this resource. Known values are: "Succeeded", "Canceled", "Failed", and "Deleting". (Succeeded, Canceled, Failed, Deleting)
scheduleobjectSchedule information for the Job Definition.
sourceNamestringThe name of the source Endpoint. Required.
sourceResourceIdstringFully qualified resource ID of the source Endpoint.
sourceSubpathstringThe subpath to use when reading from the source Endpoint.
sourceTargetMapobjectThe list of cloud endpoints to migrate.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
targetNamestringThe name of the target Endpoint. Required.
targetResourceIdstringFully qualified resource ID of the target Endpoint.
targetSubpathstringThe subpath to use when writing to the target Endpoint.
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, storage_mover_name, project_name, job_definition_name, subscription_idGets a Job Definition resource.
listselectresource_group_name, storage_mover_name, project_name, subscription_idLists all Job Definitions in a Project.
create_or_updateinsertresource_group_name, storage_mover_name, project_name, job_definition_name, subscription_id, propertiesCreates or updates a Job Definition resource, which contains configuration for a single unit of managed data transfer.
updateupdateresource_group_name, storage_mover_name, project_name, job_definition_name, subscription_idUpdates properties for a Job Definition resource. Properties not specified in the request body will be unchanged.
create_or_updatereplaceresource_group_name, storage_mover_name, project_name, job_definition_name, subscription_id, propertiesCreates or updates a Job Definition resource, which contains configuration for a single unit of managed data transfer.
deletedeleteresource_group_name, storage_mover_name, project_name, job_definition_name, subscription_idDeletes a Job Definition resource.
start_jobexecresource_group_name, storage_mover_name, project_name, job_definition_name, subscription_idCreates a new Job Run resource for the specified Job Definition and passes it to the Agent for execution.
stop_jobexecresource_group_name, storage_mover_name, project_name, job_definition_name, subscription_idRequests the Agent of any active instance of this Job Definition to stop.

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_definition_namestringThe name of the Job Definition resource. Required.
project_namestringThe name of the Project resource. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
storage_mover_namestringThe name of the Storage Mover resource. Required.
subscription_idstring

SELECT examples

Gets a Job Definition resource.

SELECT
id,
name,
agentName,
agentResourceId,
connections,
copyMode,
dataIntegrityValidation,
description,
jobType,
latestJobRunName,
latestJobRunResourceId,
latestJobRunStatus,
preservePermissions,
provisioningState,
schedule,
sourceName,
sourceResourceId,
sourceSubpath,
sourceTargetMap,
systemData,
targetName,
targetResourceId,
targetSubpath,
type
FROM azure.storage_mover.job_definitions
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND storage_mover_name = '{{ storage_mover_name }}' -- required
AND project_name = '{{ project_name }}' -- required
AND job_definition_name = '{{ job_definition_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates a Job Definition resource, which contains configuration for a single unit of managed data transfer.

INSERT INTO azure.storage_mover.job_definitions (
properties,
resource_group_name,
storage_mover_name,
project_name,
job_definition_name,
subscription_id
)
SELECT
'{{ properties }}' /* required */,
'{{ resource_group_name }}',
'{{ storage_mover_name }}',
'{{ project_name }}',
'{{ job_definition_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

UPDATE examples

Updates properties for a Job Definition resource. Properties not specified in the request body will be unchanged.

UPDATE azure.storage_mover.job_definitions
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND storage_mover_name = '{{ storage_mover_name }}' --required
AND project_name = '{{ project_name }}' --required
AND job_definition_name = '{{ job_definition_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

REPLACE examples

Creates or updates a Job Definition resource, which contains configuration for a single unit of managed data transfer.

REPLACE azure.storage_mover.job_definitions
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND storage_mover_name = '{{ storage_mover_name }}' --required
AND project_name = '{{ project_name }}' --required
AND job_definition_name = '{{ job_definition_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND properties = '{{ properties }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Deletes a Job Definition resource.

DELETE FROM azure.storage_mover.job_definitions
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND storage_mover_name = '{{ storage_mover_name }}' --required
AND project_name = '{{ project_name }}' --required
AND job_definition_name = '{{ job_definition_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Creates a new Job Run resource for the specified Job Definition and passes it to the Agent for execution.

EXEC azure.storage_mover.job_definitions.start_job 
@resource_group_name='{{ resource_group_name }}' --required,
@storage_mover_name='{{ storage_mover_name }}' --required,
@project_name='{{ project_name }}' --required,
@job_definition_name='{{ job_definition_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;