你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Job Executions - Get
获取作业执行。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}?api-version=2021-11-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 |
服务器的名称。 |
subscription
|
path | True |
string |
用于标识 Azure 订阅的订阅 ID。 |
api-version
|
query | True |
string |
要用于请求的 API 版本。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
已成功检索作业。 |
|
Other Status Codes |
错误响应:***
|
示例
Get a job execution.
Sample Request
Sample Response
{
"properties": {
"jobVersion": 1,
"jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA",
"lifecycle": "Created",
"provisioningState": "Created",
"createTime": "2017-12-21T19:02:00.8707045Z",
"startTime": "2017-12-21T19:12:00.8707045Z",
"endTime": "2017-12-21T19:22:00.8707045Z",
"currentAttempts": 0,
"currentAttemptStartTime": "2017-11-13T19:12:00.8707045Z",
"lastMessage": "Job execution created."
},
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999",
"name": "5555-6666-7777-8888-999999999999",
"type": "Microsoft.Sql/servers/jobAgents/executions"
}
定义
名称 | 说明 |
---|---|
Job |
作业的执行 |
Job |
作业执行的详细状态。 |
Job |
执行作业的目标。 |
Job |
目标的类型。 |
Provisioning |
作业执行的 ARM 预配状态。 |
JobExecution
作业的执行
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源 ID。 |
name |
string |
资源名称。 |
properties.createTime |
string |
创建作业执行的时间。 |
properties.currentAttemptStartTime |
string |
当前尝试的开始时间。 |
properties.currentAttempts |
integer |
已尝试执行作业的次数。 |
properties.endTime |
string |
作业执行完成的时间。 |
properties.jobExecutionId |
string |
作业执行的唯一标识符。 |
properties.jobVersion |
integer |
作业版本号。 |
properties.lastMessage |
string |
上一个状态或错误消息。 |
properties.lifecycle |
作业执行的详细状态。 |
|
properties.provisioningState |
作业执行的 ARM 预配状态。 |
|
properties.startTime |
string |
作业执行开始的时间。 |
properties.stepId |
integer |
作业步骤 ID。 |
properties.stepName |
string |
作业步骤名称。 |
properties.target |
执行此执行的目标。 |
|
type |
string |
资源类型。 |
JobExecutionLifecycle
作业执行的详细状态。
名称 | 类型 | 说明 |
---|---|---|
Canceled |
string |
|
Created |
string |
|
Failed |
string |
|
InProgress |
string |
|
Skipped |
string |
|
Succeeded |
string |
|
SucceededWithSkipped |
string |
|
TimedOut |
string |
|
WaitingForChildJobExecutions |
string |
|
WaitingForRetry |
string |
JobExecutionTarget
执行作业的目标。
名称 | 类型 | 说明 |
---|---|---|
databaseName |
string |
数据库名称。 |
serverName |
string |
服务器名称。 |
type |
目标的类型。 |
JobTargetType
目标的类型。
名称 | 类型 | 说明 |
---|---|---|
SqlDatabase |
string |
|
SqlElasticPool |
string |
|
SqlServer |
string |
|
SqlShardMap |
string |
|
TargetGroup |
string |
ProvisioningState
作业执行的 ARM 预配状态。
名称 | 类型 | 说明 |
---|---|---|
Canceled |
string |
|
Created |
string |
|
Failed |
string |
|
InProgress |
string |
|
Succeeded |
string |