Job Steps - Create Or Update
작업 단계를 만들거나 업데이트합니다. 이렇게 하면 암시적으로 새 작업 버전이 생성됩니다.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}?api-version=2021-11-01
URI 매개 변수
Name | In(다음 안에) | 필수 | 형식 | Description |
---|---|---|---|---|
job
|
path | True |
string |
작업 에이전트의 이름입니다. |
job
|
path | True |
string |
작업의 이름입니다. |
resource
|
path | True |
string |
리소스를 포함하는 리소스 그룹의 이름입니다. Azure 리소스 관리자 API 또는 포털에서 이 값을 가져올 수 있습니다. |
server
|
path | True |
string |
서버의 이름입니다. |
step
|
path | True |
string |
작업 단계의 이름입니다. |
subscription
|
path | True |
string |
Azure 구독을 식별하는 구독 ID입니다. |
api-version
|
query | True |
string |
요청에 사용할 API 버전입니다. |
요청 본문
Name | 필수 | 형식 | Description |
---|---|---|---|
properties.action | True |
작업 단계의 작업 페이로드입니다. |
|
properties.credential | True |
string |
대상에 연결하는 데 사용할 작업 자격 증명의 리소스 ID입니다. |
properties.targetGroup | True |
string |
작업 단계가 실행될 대상 그룹의 리소스 ID입니다. |
properties.executionOptions |
작업 단계에 대한 실행 옵션입니다. |
||
properties.output |
작업 단계의 출력 대상 속성입니다. |
||
properties.stepId |
integer |
작업 단계의 작업 내 인덱스입니다. 작업 단계를 만들 때 지정하지 않으면 마지막 단계로 만들어집니다. 작업 단계를 업데이트할 때 지정하지 않으면 단계 ID가 수정되지 않습니다. |
응답
Name | 형식 | Description |
---|---|---|
200 OK |
작업 단계를 업데이트했습니다. |
|
201 Created |
작업 단계를 추가했습니다. |
|
Other Status Codes |
오류 응답: ***
|
예제
Create or update a job step with all properties specified. |
Create or update a job step with minimal properties specified. |
Create or update a job step with all properties specified.
샘플 요청
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1?api-version=2021-11-01
{
"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
}
}
}
샘플 응답
{
"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": 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"
}
Create or update a job step with minimal properties specified.
샘플 요청
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1?api-version=2021-11-01
{
"properties": {
"targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup0",
"credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0",
"action": {
"value": "select 1"
}
}
}
샘플 응답
{
"properties": {
"stepId": 1,
"targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup0",
"credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0",
"action": {
"type": "TSql",
"source": "Inline",
"value": "select 1"
},
"executionOptions": {
"timeoutSeconds": 43200,
"retryAttempts": 10,
"initialRetryIntervalSeconds": 1,
"maximumRetryIntervalSeconds": 120,
"retryIntervalBackoffMultiplier": 2
}
},
"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": 1,
"targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup0",
"credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0",
"action": {
"type": "TSql",
"source": "Inline",
"value": "select 1"
},
"executionOptions": {
"timeoutSeconds": 43200,
"retryAttempts": 10,
"initialRetryIntervalSeconds": 1,
"maximumRetryIntervalSeconds": 120,
"retryIntervalBackoffMultiplier": 2
}
},
"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"
}
정의
Name | Description |
---|---|
Job |
작업 단계입니다. |
Job |
작업 단계에서 실행할 작업입니다. |
Job |
실행할 작업의 원본입니다. |
Job |
작업 단계에서 실행 중인 작업 유형입니다. |
Job |
작업 단계의 실행 옵션입니다. |
Job |
작업 단계의 출력 구성입니다. |
Job |
출력 대상 형식입니다. |
JobStep
작업 단계입니다.
Name | 형식 | Description |
---|---|---|
id |
string |
리소스 ID입니다. |
name |
string |
리소스 이름입니다. |
properties.action |
작업 단계의 작업 페이로드입니다. |
|
properties.credential |
string |
대상에 연결하는 데 사용할 작업 자격 증명의 리소스 ID입니다. |
properties.executionOptions |
작업 단계에 대한 실행 옵션입니다. |
|
properties.output |
작업 단계의 출력 대상 속성입니다. |
|
properties.stepId |
integer |
작업 단계의 작업 내 인덱스입니다. 작업 단계를 만들 때 지정하지 않으면 마지막 단계로 만들어집니다. 작업 단계를 업데이트할 때 지정하지 않으면 단계 ID가 수정되지 않습니다. |
properties.targetGroup |
string |
작업 단계가 실행될 대상 그룹의 리소스 ID입니다. |
type |
string |
리소스 종류. |
JobStepAction
작업 단계에서 실행할 작업입니다.
Name | 형식 | Default value | Description |
---|---|---|---|
source | Inline |
실행할 작업의 원본입니다. |
|
type | TSql |
작업 단계에서 실행 중인 작업 유형입니다. |
|
value |
string |
작업 값(예: 실행할 T-SQL 스크립트의 텍스트)입니다. |
JobStepActionSource
실행할 작업의 원본입니다.
값 | Description |
---|---|
Inline |
JobStepActionType
작업 단계에서 실행 중인 작업 유형입니다.
값 | Description |
---|---|
TSql |
JobStepExecutionOptions
작업 단계의 실행 옵션입니다.
Name | 형식 | Default value | Description |
---|---|---|---|
initialRetryIntervalSeconds |
integer |
1 |
작업 단계 실행에 대한 재시도 사이의 초기 지연입니다. |
maximumRetryIntervalSeconds |
integer |
120 |
작업 단계 실행을 위해 재시도 사이에 대기할 최대 시간입니다. |
retryAttempts |
integer |
10 |
첫 번째 시도가 실패할 경우 작업 단계가 다시 시도되는 최대 횟수입니다. |
retryIntervalBackoffMultiplier |
number |
2 |
재시도 사이의 시간에 대한 백오프 승수입니다. |
timeoutSeconds |
integer |
43200 |
작업 단계에 대한 실행 시간 제한입니다. |
JobStepOutput
작업 단계의 출력 구성입니다.
Name | 형식 | Default value | Description |
---|---|---|---|
credential |
string |
출력 대상에 연결하는 데 사용할 자격 증명의 리소스 ID입니다. |
|
databaseName |
string |
출력 대상 데이터베이스입니다. |
|
resourceGroupName |
string |
출력 대상 리소스 그룹입니다. |
|
schemaName |
string |
dbo |
출력 대상 스키마입니다. |
serverName |
string |
출력 대상 서버 이름입니다. |
|
subscriptionId |
string |
출력 대상 구독 ID입니다. |
|
tableName |
string |
출력 대상 테이블입니다. |
|
type | SqlDatabase |
출력 대상 형식입니다. |
JobStepOutputType
출력 대상 형식입니다.
값 | Description |
---|---|
SqlDatabase |