jobs
Creates, updates, deletes, gets or lists a jobs
resource.
Overview
Name | jobs |
Type | Resource |
Id | azure.sql.jobs |
Fields
- vw_jobs
- jobs
Name | Datatype | Description |
---|---|---|
description | text | field from the properties object |
jobAgentName | text | field from the properties object |
jobName | text | field from the properties object |
resourceGroupName | text | field from the properties object |
schedule | text | field from the properties object |
serverName | text | field from the properties object |
subscriptionId | text | field from the properties object |
version | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Properties of a job. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | jobAgentName, jobName, resourceGroupName, serverName, subscriptionId | Gets a job. |
list_by_agent | SELECT | jobAgentName, resourceGroupName, serverName, subscriptionId | Gets a list of jobs. |
create_or_update | INSERT | jobAgentName, jobName, resourceGroupName, serverName, subscriptionId | Creates or updates a job. |
delete | DELETE | jobAgentName, jobName, resourceGroupName, serverName, subscriptionId | Deletes a job. |
SELECT
examples
Gets a list of jobs.
- vw_jobs
- jobs
SELECT
description,
jobAgentName,
jobName,
resourceGroupName,
schedule,
serverName,
subscriptionId,
version
FROM azure.sql.vw_jobs
WHERE jobAgentName = '{{ jobAgentName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.sql.jobs
WHERE jobAgentName = '{{ jobAgentName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new jobs
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql.jobs (
jobAgentName,
jobName,
resourceGroupName,
serverName,
subscriptionId,
properties
)
SELECT
'{{ jobAgentName }}',
'{{ jobName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: description
value: string
- name: version
value: integer
- name: schedule
value:
- name: startTime
value: string
- name: endTime
value: string
- name: type
value: string
- name: enabled
value: boolean
- name: interval
value: string
DELETE
example
Deletes the specified jobs
resource.
/*+ delete */
DELETE FROM azure.sql.jobs
WHERE jobAgentName = '{{ jobAgentName }}'
AND jobName = '{{ jobName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';