job_definitions
Creates, updates, deletes, gets or lists a job_definitions resource.
Overview
| Name | job_definitions |
| Type | Resource |
| Id | azure.storage_mover.job_definitions |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
agentName | string | Name of the Agent to assign for new Job Runs of this Job Definition. |
agentResourceId | string | Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition. |
connections | array | List of connections associated to this job. |
copyMode | string | Strategy to use for copy. Required. Known values are: "Additive" and "Mirror". (Additive, Mirror) |
dataIntegrityValidation | string | The checksum validation mode for the job definition. Known values are: "SaveVerifyFileMD5", "SaveFileMD5", and "None". (SaveVerifyFileMD5, SaveFileMD5, None) |
description | string | A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for migrating data between cloud to cloud. |
jobType | string | The type of the Job. Known values are: "OnPremToCloud" and "CloudToCloud". (OnPremToCloud, CloudToCloud) |
latestJobRunName | string | The name of the Job Run in a non-terminal state, if exists. |
latestJobRunResourceId | string | The fully qualified resource ID of the Job Run in a non-terminal state, if exists. |
latestJobRunStatus | string | The 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) |
preservePermissions | boolean | Boolean to preserve permissions or not. |
provisioningState | string | The provisioning state of this resource. Known values are: "Succeeded", "Canceled", "Failed", and "Deleting". (Succeeded, Canceled, Failed, Deleting) |
schedule | object | Schedule information for the Job Definition. |
sourceName | string | The name of the source Endpoint. Required. |
sourceResourceId | string | Fully qualified resource ID of the source Endpoint. |
sourceSubpath | string | The subpath to use when reading from the source Endpoint. |
sourceTargetMap | object | The list of cloud endpoints to migrate. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
targetName | string | The name of the target Endpoint. Required. |
targetResourceId | string | Fully qualified resource ID of the target Endpoint. |
targetSubpath | string | The subpath to use when writing to the target Endpoint. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
agentName | string | Name of the Agent to assign for new Job Runs of this Job Definition. |
agentResourceId | string | Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition. |
connections | array | List of connections associated to this job. |
copyMode | string | Strategy to use for copy. Required. Known values are: "Additive" and "Mirror". (Additive, Mirror) |
dataIntegrityValidation | string | The checksum validation mode for the job definition. Known values are: "SaveVerifyFileMD5", "SaveFileMD5", and "None". (SaveVerifyFileMD5, SaveFileMD5, None) |
description | string | A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for migrating data between cloud to cloud. |
jobType | string | The type of the Job. Known values are: "OnPremToCloud" and "CloudToCloud". (OnPremToCloud, CloudToCloud) |
latestJobRunName | string | The name of the Job Run in a non-terminal state, if exists. |
latestJobRunResourceId | string | The fully qualified resource ID of the Job Run in a non-terminal state, if exists. |
latestJobRunStatus | string | The 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) |
preservePermissions | boolean | Boolean to preserve permissions or not. |
provisioningState | string | The provisioning state of this resource. Known values are: "Succeeded", "Canceled", "Failed", and "Deleting". (Succeeded, Canceled, Failed, Deleting) |
schedule | object | Schedule information for the Job Definition. |
sourceName | string | The name of the source Endpoint. Required. |
sourceResourceId | string | Fully qualified resource ID of the source Endpoint. |
sourceSubpath | string | The subpath to use when reading from the source Endpoint. |
sourceTargetMap | object | The list of cloud endpoints to migrate. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
targetName | string | The name of the target Endpoint. Required. |
targetResourceId | string | Fully qualified resource ID of the target Endpoint. |
targetSubpath | string | The subpath to use when writing to the target Endpoint. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, storage_mover_name, project_name, job_definition_name, subscription_id | Gets a Job Definition resource. | |
list | select | resource_group_name, storage_mover_name, project_name, subscription_id | Lists all Job Definitions in a Project. | |
create_or_update | insert | resource_group_name, storage_mover_name, project_name, job_definition_name, subscription_id, properties | Creates or updates a Job Definition resource, which contains configuration for a single unit of managed data transfer. | |
update | update | resource_group_name, storage_mover_name, project_name, job_definition_name, subscription_id | Updates properties for a Job Definition resource. Properties not specified in the request body will be unchanged. | |
create_or_update | replace | resource_group_name, storage_mover_name, project_name, job_definition_name, subscription_id, properties | Creates or updates a Job Definition resource, which contains configuration for a single unit of managed data transfer. | |
delete | delete | resource_group_name, storage_mover_name, project_name, job_definition_name, subscription_id | Deletes a Job Definition resource. | |
start_job | exec | resource_group_name, storage_mover_name, project_name, job_definition_name, subscription_id | Creates a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. | |
stop_job | exec | resource_group_name, storage_mover_name, project_name, job_definition_name, subscription_id | Requests 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.
| Name | Datatype | Description |
|---|---|---|
job_definition_name | string | The name of the Job Definition resource. Required. |
project_name | string | The name of the Project resource. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
storage_mover_name | string | The name of the Storage Mover resource. Required. |
subscription_id | string |
SELECT examples
- get
- list
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
;
Lists all Job Definitions in a Project.
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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: job_definitions
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the job_definitions resource.
- name: storage_mover_name
value: "{{ storage_mover_name }}"
description: Required parameter for the job_definitions resource.
- name: project_name
value: "{{ project_name }}"
description: Required parameter for the job_definitions resource.
- name: job_definition_name
value: "{{ job_definition_name }}"
description: Required parameter for the job_definitions resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the job_definitions resource.
- name: properties
description: |
Job definition properties. Required.
value:
description: "{{ description }}"
jobType: "{{ jobType }}"
copyMode: "{{ copyMode }}"
sourceName: "{{ sourceName }}"
sourceResourceId: "{{ sourceResourceId }}"
sourceSubpath: "{{ sourceSubpath }}"
targetName: "{{ targetName }}"
targetResourceId: "{{ targetResourceId }}"
targetSubpath: "{{ targetSubpath }}"
latestJobRunName: "{{ latestJobRunName }}"
latestJobRunResourceId: "{{ latestJobRunResourceId }}"
latestJobRunStatus: "{{ latestJobRunStatus }}"
agentName: "{{ agentName }}"
agentResourceId: "{{ agentResourceId }}"
sourceTargetMap:
value:
- sourceEndpoint:
properties:
name: "{{ name }}"
sourceEndpointResourceId: "{{ sourceEndpointResourceId }}"
awsS3BucketId: "{{ awsS3BucketId }}"
targetEndpoint:
properties:
name: "{{ name }}"
targetEndpointResourceId: "{{ targetEndpointResourceId }}"
azureStorageAccountResourceId: "{{ azureStorageAccountResourceId }}"
azureStorageBlobContainerName: "{{ azureStorageBlobContainerName }}"
provisioningState: "{{ provisioningState }}"
connections:
- "{{ connections }}"
schedule:
frequency: "{{ frequency }}"
isActive: {{ isActive }}
executionTime:
hour: {{ hour }}
minute: "{{ minute }}"
startDate: "{{ startDate }}"
daysOfWeek:
- "{{ daysOfWeek }}"
daysOfMonth:
- {{ daysOfMonth }}
cronExpression: "{{ cronExpression }}"
endDate: "{{ endDate }}"
dataIntegrityValidation: "{{ dataIntegrityValidation }}"
preservePermissions: {{ preservePermissions }}
UPDATE examples
- update
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
- create_or_update
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
- delete
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
- start_job
- stop_job
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
;
Requests the Agent of any active instance of this Job Definition to stop.
EXEC azure.storage_mover.job_definitions.stop_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
;