Microsoft.Sql servers/jobAgents/jobs/steps

Template format

To create a Microsoft.Sql/servers/jobAgents/jobs/steps resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "Microsoft.Sql/servers/jobAgents/jobs/steps",
  "apiVersion": "2017-03-01-preview",
  "properties": {
    "stepId": "integer",
    "targetGroup": "string",
    "credential": "string",
    "action": {
      "type": "TSql",
      "source": "Inline",
      "value": "string"
    },
    "output": {
      "type": "SqlDatabase",
      "subscriptionId": "string",
      "resourceGroupName": "string",
      "serverName": "string",
      "databaseName": "string",
      "schemaName": "string",
      "tableName": "string",
      "credential": "string"
    },
    "executionOptions": {
      "timeoutSeconds": "integer",
      "retryAttempts": "integer",
      "initialRetryIntervalSeconds": "integer",
      "maximumRetryIntervalSeconds": "integer",
      "retryIntervalBackoffMultiplier": "number"
    }
  }
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.Sql/servers/jobAgents/jobs/steps object

Name Type Required Value
name string Yes The name of the job step.
type enum Yes steps
-or-
Microsoft.Sql/servers/jobAgents/jobs/steps

See Set name and type for child resources.
apiVersion enum Yes 2017-03-01-preview
properties object Yes Resource properties. - JobStepProperties object

JobStepProperties object

Name Type Required Value
stepId integer No 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.
targetGroup string Yes The resource ID of the target group that the job step will be executed on.
credential string Yes The resource ID of the job credential that will be used to connect to the targets.
action object Yes The action payload of the job step. - JobStepAction object
output object No Output destination properties of the job step. - JobStepOutput object
executionOptions object No Execution options for the job step. - JobStepExecutionOptions object

JobStepAction object

Name Type Required Value
type enum No Type of action being executed by the job step. - TSql
source enum No The source of the action to execute. - Inline
value string Yes The action value, for example the text of the T-SQL script to execute.

JobStepOutput object

Name Type Required Value
type enum No The output destination type. - SqlDatabase
subscriptionId string No The output destination subscription id. - globally unique identifier
resourceGroupName string No The output destination resource group.
serverName string Yes The output destination server name.
databaseName string Yes The output destination database.
schemaName string No The output destination schema.
tableName string Yes The output destination table.
credential string Yes The resource ID of the credential to use to connect to the output destination.

JobStepExecutionOptions object

Name Type Required Value
timeoutSeconds integer No Execution timeout for the job step.
retryAttempts integer No Maximum number of times the job step will be reattempted if the first attempt fails.
initialRetryIntervalSeconds integer No Initial delay between retries for job step execution.
maximumRetryIntervalSeconds integer No The maximum amount of time to wait between retries for job step execution.
retryIntervalBackoffMultiplier number No The backoff multiplier for the time between retries.