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
- vw_job_definitions
- job_definitions
Name | Datatype | Description |
---|---|---|
description | text | field from the properties object |
agent_name | text | field from the properties object |
agent_resource_id | text | field from the properties object |
copy_mode | text | field from the properties object |
jobDefinitionName | text | field from the properties object |
latest_job_run_name | text | field from the properties object |
latest_job_run_resource_id | text | field from the properties object |
latest_job_run_status | text | field from the properties object |
projectName | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
source_name | text | field from the properties object |
source_resource_id | text | field from the properties object |
source_subpath | text | field from the properties object |
storageMoverName | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
target_name | text | field from the properties object |
target_resource_id | text | field from the properties object |
target_subpath | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Job definition properties. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | jobDefinitionName, projectName, resourceGroupName, storageMoverName, subscriptionId | Gets a Job Definition resource. |
list | SELECT | projectName, resourceGroupName, storageMoverName, subscriptionId | Lists all Job Definitions in a Project. |
create_or_update | INSERT | jobDefinitionName, projectName, resourceGroupName, storageMoverName, subscriptionId, data__properties | Creates or updates a Job Definition resource, which contains configuration for a single unit of managed data transfer. |
delete | DELETE | jobDefinitionName, projectName, resourceGroupName, storageMoverName, subscriptionId | Deletes a Job Definition resource. |
update | UPDATE | jobDefinitionName, projectName, resourceGroupName, storageMoverName, subscriptionId | Updates properties for a Job Definition resource. Properties not specified in the request body will be unchanged. |
start_job | EXEC | jobDefinitionName, projectName, resourceGroupName, storageMoverName, subscriptionId | Creates a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. |
stop_job | EXEC | jobDefinitionName, projectName, resourceGroupName, storageMoverName, subscriptionId | Requests the Agent of any active instance of this Job Definition to stop. |
SELECT
examples
Lists all Job Definitions in a Project.
- vw_job_definitions
- job_definitions
SELECT
description,
agent_name,
agent_resource_id,
copy_mode,
jobDefinitionName,
latest_job_run_name,
latest_job_run_resource_id,
latest_job_run_status,
projectName,
provisioning_state,
resourceGroupName,
source_name,
source_resource_id,
source_subpath,
storageMoverName,
subscriptionId,
system_data,
target_name,
target_resource_id,
target_subpath
FROM azure.storage_mover.vw_job_definitions
WHERE projectName = '{{ projectName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND storageMoverName = '{{ storageMoverName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties,
systemData
FROM azure.storage_mover.job_definitions
WHERE projectName = '{{ projectName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND storageMoverName = '{{ storageMoverName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new job_definitions
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.storage_mover.job_definitions (
jobDefinitionName,
projectName,
resourceGroupName,
storageMoverName,
subscriptionId,
data__properties,
properties,
systemData
)
SELECT
'{{ jobDefinitionName }}',
'{{ projectName }}',
'{{ resourceGroupName }}',
'{{ storageMoverName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}',
'{{ systemData }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: description
value: string
- name: copyMode
value: string
- name: sourceName
value: string
- name: sourceResourceId
value: string
- name: sourceSubpath
value: string
- name: targetName
value: string
- name: targetResourceId
value: string
- name: targetSubpath
value: string
- name: latestJobRunName
value: string
- name: latestJobRunResourceId
value: string
- name: latestJobRunStatus
value: string
- name: agentName
value: string
- name: agentResourceId
value: string
- name: provisioningState
value: []
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
UPDATE
example
Updates a job_definitions
resource.
/*+ update */
UPDATE azure.storage_mover.job_definitions
SET
properties = '{{ properties }}'
WHERE
jobDefinitionName = '{{ jobDefinitionName }}'
AND projectName = '{{ projectName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND storageMoverName = '{{ storageMoverName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified job_definitions
resource.
/*+ delete */
DELETE FROM azure.storage_mover.job_definitions
WHERE jobDefinitionName = '{{ jobDefinitionName }}'
AND projectName = '{{ projectName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND storageMoverName = '{{ storageMoverName }}'
AND subscriptionId = '{{ subscriptionId }}';