Skip to main content

job_steps

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

Overview

Namejob_steps
TypeResource
Idazure.sql.job_steps

Fields

NameDatatypeDescription
actiontextfield from the properties object
credentialtextfield from the properties object
execution_optionstextfield from the properties object
jobAgentNametextfield from the properties object
jobNametextfield from the properties object
jobVersiontextfield from the properties object
outputtextfield from the properties object
resourceGroupNametextfield from the properties object
serverNametextfield from the properties object
stepNametextfield from the properties object
step_idtextfield from the properties object
subscriptionIdtextfield from the properties object
target_grouptextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTjobAgentName, jobName, resourceGroupName, serverName, stepName, subscriptionIdGets a job step in a job's current version.
get_by_versionSELECTjobAgentName, jobName, jobVersion, resourceGroupName, serverName, stepName, subscriptionIdGets the specified version of a job step.
list_by_jobSELECTjobAgentName, jobName, resourceGroupName, serverName, subscriptionIdGets all job steps for a job's current version.
list_by_versionSELECTjobAgentName, jobName, jobVersion, resourceGroupName, serverName, subscriptionIdGets all job steps in the specified job version.
create_or_updateINSERTjobAgentName, jobName, resourceGroupName, serverName, stepName, subscriptionIdCreates or updates a job step. This will implicitly create a new job version.
deleteDELETEjobAgentName, jobName, resourceGroupName, serverName, stepName, subscriptionIdDeletes a job step. This will implicitly create a new job version.

SELECT examples

Gets all job steps for a job's current version.

SELECT
action,
credential,
execution_options,
jobAgentName,
jobName,
jobVersion,
output,
resourceGroupName,
serverName,
stepName,
step_id,
subscriptionId,
target_group
FROM azure.sql.vw_job_steps
WHERE jobAgentName = '{{ jobAgentName }}'
AND jobName = '{{ jobName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new job_steps resource.

/*+ create */
INSERT INTO azure.sql.job_steps (
jobAgentName,
jobName,
resourceGroupName,
serverName,
stepName,
subscriptionId,
properties
)
SELECT
'{{ jobAgentName }}',
'{{ jobName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ stepName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

DELETE example

Deletes the specified job_steps resource.

/*+ delete */
DELETE FROM azure.sql.job_steps
WHERE jobAgentName = '{{ jobAgentName }}'
AND jobName = '{{ jobName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND stepName = '{{ stepName }}'
AND subscriptionId = '{{ subscriptionId }}';