Job Target Executions - List By Step
列出作业步骤执行的目标执行。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets?api-version=2023-08-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets?createTimeMin={createTimeMin}&createTimeMax={createTimeMax}&endTimeMin={endTimeMin}&endTimeMax={endTimeMax}&isActive={isActive}&$skip={$skip}&$top={$top}&api-version=2023-08-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
job
|
path | True |
string |
作业代理的名称。 |
|
job
|
path | True |
string (uuid) |
作业执行的 ID |
|
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 版本。 |
|
$skip
|
query |
integer (int64) |
要跳过的集合中的元素数。 |
|
|
$top
|
query |
integer (int64) |
要从集合返回的元素数。 |
|
|
create
|
query |
string (date-time) |
如果指定,则仅包含指定时间之前创建的作业执行。 |
|
|
create
|
query |
string (date-time) |
如果指定,则仅包含指定时间或之后创建的作业执行。 |
|
|
end
|
query |
string (date-time) |
如果指定,则仅包含指定时间之前完成的作业执行。 |
|
|
end
|
query |
string (date-time) |
如果指定,则仅包含指定时间或之后完成的作业执行。 |
|
|
is
|
query |
boolean |
如果已指定,则仅包含活动或仅已完成的作业执行。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
已成功检索目标执行。 |
|
| Other Status Codes |
错误响应: ***
|
示例
List job step target executions
示例请求
示例响应
{
"value": [
{
"properties": {
"jobVersion": 1,
"stepName": "step1",
"stepId": 1,
"jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA",
"lifecycle": "Succeeded",
"provisioningState": "Succeeded",
"createTime": "2017-07-01T04:33:17.5133333Z",
"startTime": "2017-07-01T04:33:18.1230403Z",
"endTime": "2017-07-01T04:33:18.7031029Z",
"currentAttempts": 1,
"currentAttemptStartTime": "2017-07-01T04:33:18.2391013Z",
"lastMessage": "Step 1 succeeded execution on target (server 'server1', database 'database1').",
"target": {
"type": "SqlDatabase",
"serverName": "server1",
"databaseName": "database1"
}
},
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999/steps/step1/targets/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"name": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"type": "Microsoft.Sql/servers/jobAgents/jobs/executions/steps/targets"
}
]
}
定义
| 名称 | 说明 |
|---|---|
|
Error |
资源管理错误附加信息。 |
|
Error |
错误详细信息。 |
|
Error |
错误响应 |
|
Job |
作业的执行 |
|
Job |
作业执行的详细状态。 |
|
Job |
作业执行的列表。 |
|
Job |
执行作业的目标。 |
|
Job |
目标的类型。 |
|
Provisioning |
作业执行的 ARM 预配状态。 |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
其他信息。 |
| type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
JobExecution
作业的执行
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
资源 ID。 |
| name |
string |
资源名称。 |
| properties.createTime |
string (date-time) |
创建作业执行的时间。 |
| properties.currentAttemptStartTime |
string (date-time) |
当前尝试的开始时间。 |
| properties.currentAttempts |
integer (int32) |
尝试执行作业的次数。 |
| properties.endTime |
string (date-time) |
作业执行完成的时间。 |
| properties.jobExecutionId |
string (uuid) |
作业执行的唯一标识符。 |
| properties.jobVersion |
integer (int32) |
作业版本号。 |
| properties.lastMessage |
string |
最后一个状态或错误消息。 |
| properties.lifecycle |
作业执行的详细状态。 |
|
| properties.provisioningState |
作业执行的 ARM 预配状态。 |
|
| properties.startTime |
string (date-time) |
作业执行开始的时间。 |
| properties.stepId |
integer (int32) |
作业步骤 ID。 |
| properties.stepName |
string |
作业步骤名称。 |
| properties.target |
执行此执行的目标。 |
|
| type |
string |
资源类型。 |
JobExecutionLifecycle
作业执行的详细状态。
| 值 | 说明 |
|---|---|
| Created | |
| InProgress | |
| WaitingForChildJobExecutions | |
| WaitingForRetry | |
| Succeeded | |
| SucceededWithSkipped | |
| Failed | |
| TimedOut | |
| Canceled | |
| Skipped |
JobExecutionListResult
作业执行的列表。
| 名称 | 类型 | 说明 |
|---|---|---|
| nextLink |
string |
用于检索下一页结果的链接。 |
| value |
结果数组。 |
JobExecutionTarget
执行作业的目标。
| 名称 | 类型 | 说明 |
|---|---|---|
| databaseName |
string |
数据库名称。 |
| serverName |
string |
服务器名称。 |
| type |
目标的类型。 |
JobTargetType
目标的类型。
| 值 | 说明 |
|---|---|
| TargetGroup | |
| SqlDatabase | |
| SqlElasticPool | |
| SqlShardMap | |
| SqlServer |
ProvisioningState
作业执行的 ARM 预配状态。
| 值 | 说明 |
|---|---|
| Created | |
| InProgress | |
| Succeeded | |
| Failed | |
| Canceled |