job_steps
Creates, updates, deletes, gets or lists a job_steps resource.
Overview
| Name | job_steps |
| Type | Resource |
| Id | azure.sql.job_steps |
Fields
The following fields are returned by SELECT queries:
- get_by_version
- get
- list_by_version
- list_by_job
| 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. |
action | object | The action payload of the job step. Required. |
credential | string | The resource ID of the job credential that will be used to connect to the targets. |
executionOptions | object | Execution options for the job step. |
output | object | Output destination properties of the job step. |
stepId | integer | The job step's index within the job. If not specified when creating the job step, it will be created as the last step. If not specified when updating the job step, the step id is not modified. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
targetGroup | string | The resource ID of the target group that the job step will be executed on. Required. |
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. |
action | object | The action payload of the job step. Required. |
credential | string | The resource ID of the job credential that will be used to connect to the targets. |
executionOptions | object | Execution options for the job step. |
output | object | Output destination properties of the job step. |
stepId | integer | The job step's index within the job. If not specified when creating the job step, it will be created as the last step. If not specified when updating the job step, the step id is not modified. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
targetGroup | string | The resource ID of the target group that the job step will be executed on. Required. |
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. |
action | object | The action payload of the job step. Required. |
credential | string | The resource ID of the job credential that will be used to connect to the targets. |
executionOptions | object | Execution options for the job step. |
output | object | Output destination properties of the job step. |
stepId | integer | The job step's index within the job. If not specified when creating the job step, it will be created as the last step. If not specified when updating the job step, the step id is not modified. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
targetGroup | string | The resource ID of the target group that the job step will be executed on. Required. |
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. |
action | object | The action payload of the job step. Required. |
credential | string | The resource ID of the job credential that will be used to connect to the targets. |
executionOptions | object | Execution options for the job step. |
output | object | Output destination properties of the job step. |
stepId | integer | The job step's index within the job. If not specified when creating the job step, it will be created as the last step. If not specified when updating the job step, the step id is not modified. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
targetGroup | string | The resource ID of the target group that the job step will be executed on. Required. |
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:
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_agent_name | string | The name of the job agent. Required. |
job_name | string | The name of the job. Required. |
job_version | integer | The version of the job to get. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
server_name | string | The name of the server. Required. |
step_name | string | The name of the job step. Required. |
subscription_id | string |
SELECT examples
- get_by_version
- get
- list_by_version
- list_by_job
Gets the specified version of a job step.
SELECT
id,
name,
action,
credential,
executionOptions,
output,
stepId,
systemData,
targetGroup,
type
FROM azure.sql.job_steps
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND job_agent_name = '{{ job_agent_name }}' -- required
AND job_name = '{{ job_name }}' -- required
AND job_version = '{{ job_version }}' -- required
AND step_name = '{{ step_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets a job step in a job's current version.
SELECT
id,
name,
action,
credential,
executionOptions,
output,
stepId,
systemData,
targetGroup,
type
FROM azure.sql.job_steps
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND job_agent_name = '{{ job_agent_name }}' -- required
AND job_name = '{{ job_name }}' -- required
AND step_name = '{{ step_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets all job steps in the specified job version.
SELECT
id,
name,
action,
credential,
executionOptions,
output,
stepId,
systemData,
targetGroup,
type
FROM azure.sql.job_steps
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND job_agent_name = '{{ job_agent_name }}' -- required
AND job_name = '{{ job_name }}' -- required
AND job_version = '{{ job_version }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets all job steps for a job's current version.
SELECT
id,
name,
action,
credential,
executionOptions,
output,
stepId,
systemData,
targetGroup,
type
FROM azure.sql.job_steps
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND job_agent_name = '{{ job_agent_name }}' -- required
AND job_name = '{{ job_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Creates or updates a job step. This will implicitly create a new job version.
INSERT INTO azure.sql.job_steps (
properties,
resource_group_name,
server_name,
job_agent_name,
job_name,
step_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ server_name }}',
'{{ job_agent_name }}',
'{{ job_name }}',
'{{ step_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: job_steps
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the job_steps resource.
- name: server_name
value: "{{ server_name }}"
description: Required parameter for the job_steps resource.
- name: job_agent_name
value: "{{ job_agent_name }}"
description: Required parameter for the job_steps resource.
- name: job_name
value: "{{ job_name }}"
description: Required parameter for the job_steps resource.
- name: step_name
value: "{{ step_name }}"
description: Required parameter for the job_steps resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the job_steps resource.
- name: properties
description: |
Resource properties.
value:
stepId: {{ stepId }}
targetGroup: "{{ targetGroup }}"
credential: "{{ credential }}"
action:
type: "{{ type }}"
source: "{{ source }}"
value: "{{ value }}"
output:
type: "{{ type }}"
subscriptionId: "{{ subscriptionId }}"
resourceGroupName: "{{ resourceGroupName }}"
serverName: "{{ serverName }}"
databaseName: "{{ databaseName }}"
schemaName: "{{ schemaName }}"
tableName: "{{ tableName }}"
credential: "{{ credential }}"
executionOptions:
timeoutSeconds: {{ timeoutSeconds }}
retryAttempts: {{ retryAttempts }}
initialRetryIntervalSeconds: {{ initialRetryIntervalSeconds }}
maximumRetryIntervalSeconds: {{ maximumRetryIntervalSeconds }}
retryIntervalBackoffMultiplier: {{ retryIntervalBackoffMultiplier }}
REPLACE examples
- create_or_update
Creates or updates a job step. This will implicitly create a new job version.
REPLACE azure.sql.job_steps
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND server_name = '{{ server_name }}' --required
AND job_agent_name = '{{ job_agent_name }}' --required
AND job_name = '{{ job_name }}' --required
AND step_name = '{{ step_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
Deletes a job step. This will implicitly create a new job version.
DELETE FROM azure.sql.job_steps
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND server_name = '{{ server_name }}' --required
AND job_agent_name = '{{ job_agent_name }}' --required
AND job_name = '{{ job_name }}' --required
AND step_name = '{{ step_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;