你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Updates - Get Operation
检索操作状态。
GET https://{accountEndpoint}/deviceupdate/{instanceId}/v2/updates/operations/{operationId}
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
account
|
path | True |
string |
帐户终结点。 |
instance
|
path | True |
string |
帐户实例标识符。 |
operation
|
path | True |
string |
操作标识符。 |
请求头
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
If-None-Match |
string |
定义 If-None-Match 条件。 仅当服务器上的 ETag 与此值不匹配时,才会执行该操作。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
操作状态。 Headers Retry-After: string |
|
404 Not Found |
未找到。 |
|
429 Too Many Requests |
请求过多;一个时间段内可以执行的操作数有速率限制。 |
|
Other Status Codes |
未修改。 |
安全性
azure_auth_implicit
Azure Active Directory OAuth2 隐式流
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
Scopes
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
azure_auth_code
Azure Active Directory OAuth2 AccessCode 流
Type:
oauth2
Flow:
accessCode
Authorization URL:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
Token URL:
https://login.microsoftonline.com/common/oauth2/v2.0/token
Scopes
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
azure_auth_application
Azure Active Directory OAuth2 应用程序流
Type:
oauth2
Flow:
application
Token URL:
https://login.microsoftonline.com/common/oauth2/v2.0/token
Scopes
名称 | 说明 |
---|---|
.default | 客户端凭据范围 |
azure_auth_password
Azure Active Directory OAuth2 密码流
Type:
oauth2
Flow:
password
Token URL:
https://login.microsoftonline.com/common/oauth2/v2.0/token
Scopes
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
Updates_GetOperation
Sample Request
GET https://contoso.api.adu.microsoft.com/deviceupdate/blue/v2/updates/operations/e4491c54-916f-443d-9094-bcca546ace2f
Sample Response
{
"operationId": "e4491c54-916f-443d-9094-bcca546ace2f",
"status": "Succeeded",
"resourceLocation": "/v2/updates/providers/microsoft/names/adu/versions/1.0.0.0",
"traceId": "2b881ef9deaf5d45b0a716ca5b4145ec",
"createdDateTime": "2020-04-22T21:00:53.2548897+00:00",
"lastActionDateTime": "2020-04-22T21:01:43.9401420+00:00",
"etag": "\"a0f7b6f2-3f6c-4eb6-8a59-2f5411c23888\""
}
定义
名称 | 说明 |
---|---|
Error |
错误详细信息。 |
Inner |
一个 对象,该对象包含比当前对象更具体的错误信息。 |
Operation |
操作元数据。 |
Operation |
操作状态。 |
Update |
更新标识符。 |
Error
错误详细信息。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
服务器定义的错误代码。 |
details |
Error[] |
导致报告错误的错误数组。 |
innererror |
一个 对象,该对象包含比当前对象更具体的错误信息。 |
|
message |
string |
错误的用户可读表示形式。 |
occurredDateTime |
string |
发生错误的日期和时间(UTC)。 |
target |
string |
错误的目标。 |
InnerError
一个 对象,该对象包含比当前对象更具体的错误信息。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
比包含的错误提供的更具体的错误代码。 |
errorDetail |
string |
内部错误或异常消息。 |
innerError |
一个 对象,该对象包含比当前对象更具体的错误信息。 |
|
message |
string |
错误的用户可读表示形式。 |
Operation
操作元数据。
名称 | 类型 | 说明 |
---|---|---|
createdDateTime |
string |
创建操作时的 UTC 日期和时间。 |
error |
遇到操作错误(如果有)。 |
|
etag |
string |
操作 ETag。 |
lastActionDateTime |
string |
上次更新操作状态的 UTC 日期和时间。 |
operationId |
string |
操作 ID。 |
resourceLocation |
string |
操作成功时导入的更新的位置。 |
status |
操作状态。 |
|
traceId |
string |
Microsoft 支持部门可用于故障排除的操作关联标识。 |
updateId |
要导入或删除的更新的标识。 对于导入,只有在导入清单成功处理后,才会填充此属性。 |
OperationStatus
操作状态。
名称 | 类型 | 说明 |
---|---|---|
Failed |
string |
后台操作已完成但失败。 |
NotStarted |
string |
已创建后台操作,但尚未启动。 |
Running |
string |
后台操作当前正在运行。 |
Succeeded |
string |
后台操作已成功完成。 |
Undefined |
string |
未定义的操作状态。 |
UpdateId
更新标识符。
名称 | 类型 | 说明 |
---|---|---|
name |
string |
更新名称。 |
provider |
string |
更新提供程序。 |
version |
string |
更新版本。 |