Operation Statuses - Get
获取作的状态。
GET {endpoint}/projects/{projectName}/operationstatuses/{operationId}?api-version=2025-02-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
endpoint
|
path | True |
string (uri) |
要运行的特定于 DevCenter 的 URI。 |
|
operation
|
path | True |
string (uuid) minLength: 36maxLength: 36 pattern: ^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$ |
作 ID 名称。 |
|
project
|
path | True |
string minLength: 3maxLength: 63 pattern: ^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$ |
项目的名称。 |
|
api-version
|
query | True |
string minLength: 1 |
用于此操作的 API 版本。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
请求已成功。 |
|
| Other Status Codes |
意外的错误响应。 标头 x-ms-error-code: string |
安全性
OAuth2Auth
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| https://devcenter.azure.com/.default |
示例
Get the status of an operation.
示例请求
GET {endpoint}/projects/myProject/operationstatuses/fa067167-e49d-41bd-8dd8-de719b9de3b3?api-version=2025-02-01
示例响应
{
"id": "/projects/myProject/operationStatuses/fa067167-e49d-41bd-8dd8-de719b9de3b3",
"name": "fa067167-e49d-41bd-8dd8-de719b9de3b3",
"status": "Running",
"startTime": "2024-01-24T21:14:58.472Z"
}
定义
| 名称 | 说明 |
|---|---|
|
Azure. |
错误对象。 |
|
Azure. |
包含错误详细信息的响应。 |
|
Azure. |
包含有关错误的更具体信息的对象。 根据 Azure REST API 准则 - https://aka.ms/AzureRestApiGuidelines#handling-errors。 |
|
Operation |
资源的预配状态。 |
|
Operation |
异步操作的当前状态。 |
Azure.Core.Foundations.Error
错误对象。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
服务器定义的错误代码集之一。 |
| details |
导致此报告错误的特定错误的详细信息数组。 |
|
| innererror |
包含与当前对象有关错误的更具体信息的对象。 |
|
| message |
string |
错误的人工可读表示形式。 |
| target |
string |
错误的目标。 |
Azure.Core.Foundations.ErrorResponse
包含错误详细信息的响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
Azure.Core.Foundations.InnerError
包含有关错误的更具体信息的对象。 根据 Azure REST API 准则 - https://aka.ms/AzureRestApiGuidelines#handling-errors。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
服务器定义的错误代码集之一。 |
| innererror |
内部错误。 |
OperationState
资源的预配状态。
| 值 | 说明 |
|---|---|
| NotStarted |
操作尚未启动。 |
| Running |
作正在进行中。 |
| Succeeded |
操作已成功完成。 |
| Failed |
操作失败。 |
| Canceled |
该操作已被用户取消。 |
OperationStatus
异步操作的当前状态。
| 名称 | 类型 | 说明 |
|---|---|---|
| endTime |
string (date-time) |
作的结束时间,RFC3339格式。 |
| error |
作错误消息。 |
|
| id |
string |
作状态的完全限定 ID。 |
| name |
string (uuid) minLength: 36maxLength: 36 pattern: ^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$ |
作 ID 名称。 |
| percentComplete |
number (double) minimum: 0maximum: 100 |
完成的操作的百分比。 |
| properties |
自定义作属性,仅为成功的作填充。 |
|
| resourceId |
string |
资源的 ID。 |
| startTime |
string (date-time) |
作的开始时间,RFC3339格式。 |
| status |
资源的预配状态。 |