Job Steps - List By Job

작업의 현재 버전에 대한 모든 작업 단계를 가져옵니다.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps?api-version=2021-11-01

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
jobAgentName
path True

string

작업 에이전트의 이름입니다.

jobName
path True

string

가져올 작업의 이름입니다.

resourceGroupName
path True

string

리소스를 포함하는 리소스 그룹의 이름입니다. Azure 리소스 관리자 API 또는 포털에서 이 값을 가져올 수 있습니다.

serverName
path True

string

서버의 이름입니다.

subscriptionId
path True

string

Azure 구독을 식별하는 구독 ID입니다.

api-version
query True

string

요청에 사용할 API 버전입니다.

응답

Name 형식 Description
200 OK

JobStepListResult

작업 단계 목록을 성공적으로 검색했습니다.

Other Status Codes

오류 응답: ***

  • 404 JobAgentNotFound - 지정된 작업 에이전트가 지정된 논리 서버에 없습니다.

  • 404 ResourceNotFound - 요청된 리소스를 찾을 수 없습니다.

  • 404 SubscriptionDoesNotHaveServer - 요청된 서버를 찾을 수 없습니다.

  • 404 ServerNotInSubscriptionResourceGroup - 지정된 서버가 지정된 리소스 그룹 및 구독에 없습니다.

예제

List job steps for the latest version of a job.

Sample Request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps?api-version=2021-11-01

Sample Response

{
  "value": [
    {
      "properties": {
        "stepId": 1,
        "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1",
        "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1",
        "action": {
          "type": "TSql",
          "source": "Inline",
          "value": "select 2"
        },
        "output": {
          "type": "SqlDatabase",
          "subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a",
          "resourceGroupName": "group3",
          "serverName": "server3",
          "databaseName": "database3",
          "schemaName": "myschema1234",
          "tableName": "mytable5678",
          "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0"
        },
        "executionOptions": {
          "timeoutSeconds": 1234,
          "retryAttempts": 42,
          "initialRetryIntervalSeconds": 11,
          "maximumRetryIntervalSeconds": 222,
          "retryIntervalBackoffMultiplier": 3
        }
      },
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1",
      "name": "step1",
      "type": "Microsoft.Sql/servers/jobAgents/jobs/steps"
    },
    {
      "properties": {
        "stepId": 2,
        "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1",
        "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1",
        "action": {
          "type": "TSql",
          "source": "Inline",
          "value": "select 2"
        },
        "output": {
          "type": "SqlDatabase",
          "subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a",
          "resourceGroupName": "group3",
          "serverName": "server3",
          "databaseName": "database3",
          "schemaName": "myschema1234",
          "tableName": "mytable5678",
          "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0"
        },
        "executionOptions": {
          "timeoutSeconds": 1234,
          "retryAttempts": 42,
          "initialRetryIntervalSeconds": 11,
          "maximumRetryIntervalSeconds": 222,
          "retryIntervalBackoffMultiplier": 3
        }
      },
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step2",
      "name": "step2",
      "type": "Microsoft.Sql/servers/jobAgents/jobs/steps"
    }
  ]
}

정의

Name Description
JobStep

작업 단계입니다.

JobStepAction

작업 단계에서 실행할 작업입니다.

JobStepActionSource

실행할 작업의 원본입니다.

JobStepActionType

작업 단계에서 실행 중인 작업 유형입니다.

JobStepExecutionOptions

작업 단계의 실행 옵션입니다.

JobStepListResult

작업 단계 목록입니다.

JobStepOutput

작업 단계의 출력 구성입니다.

JobStepOutputType

출력 대상 형식입니다.

JobStep

작업 단계입니다.

Name 형식 Description
id

string

리소스 ID입니다.

name

string

리소스 이름입니다.

properties.action

JobStepAction

작업 단계의 작업 페이로드입니다.

properties.credential

string

대상에 연결하는 데 사용할 작업 자격 증명의 리소스 ID입니다.

properties.executionOptions

JobStepExecutionOptions

작업 단계에 대한 실행 옵션입니다.

properties.output

JobStepOutput

작업 단계의 출력 대상 속성입니다.

properties.stepId

integer

작업 단계의 작업 내 인덱스입니다. 작업 단계를 만들 때 지정하지 않으면 마지막 단계로 만들어집니다. 작업 단계를 업데이트할 때 지정하지 않으면 단계 ID가 수정되지 않습니다.

properties.targetGroup

string

작업 단계가 실행될 대상 그룹의 리소스 ID입니다.

type

string

리소스 종류.

JobStepAction

작업 단계에서 실행할 작업입니다.

Name 형식 기본값 Description
source

JobStepActionSource

Inline

실행할 작업의 원본입니다.

type

JobStepActionType

TSql

작업 단계에서 실행 중인 작업 유형입니다.

value

string

작업 값(예: 실행할 T-SQL 스크립트의 텍스트)입니다.

JobStepActionSource

실행할 작업의 원본입니다.

Name 형식 Description
Inline

string

JobStepActionType

작업 단계에서 실행 중인 작업 유형입니다.

Name 형식 Description
TSql

string

JobStepExecutionOptions

작업 단계의 실행 옵션입니다.

Name 형식 기본값 Description
initialRetryIntervalSeconds

integer

1

작업 단계 실행에 대한 재시도 사이의 초기 지연입니다.

maximumRetryIntervalSeconds

integer

120

작업 단계 실행을 위해 재시도 사이에 대기할 최대 시간입니다.

retryAttempts

integer

10

첫 번째 시도가 실패할 경우 작업 단계가 다시 시도되는 최대 횟수입니다.

retryIntervalBackoffMultiplier

number

2

재시도 사이의 시간에 대한 백오프 승수입니다.

timeoutSeconds

integer

43200

작업 단계에 대한 실행 시간 제한입니다.

JobStepListResult

작업 단계 목록입니다.

Name 형식 Description
nextLink

string

연결하여 결과의 다음 페이지를 검색합니다.

value

JobStep[]

결과 배열입니다.

JobStepOutput

작업 단계의 출력 구성입니다.

Name 형식 기본값 Description
credential

string

출력 대상에 연결하는 데 사용할 자격 증명의 리소스 ID입니다.

databaseName

string

출력 대상 데이터베이스입니다.

resourceGroupName

string

출력 대상 리소스 그룹입니다.

schemaName

string

dbo

출력 대상 스키마입니다.

serverName

string

출력 대상 서버 이름입니다.

subscriptionId

string

출력 대상 구독 ID입니다.

tableName

string

출력 대상 테이블입니다.

type

JobStepOutputType

SqlDatabase

출력 대상 형식입니다.

JobStepOutputType

출력 대상 형식입니다.

Name 형식 Description
SqlDatabase

string