你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Dev Boxes - Stop Dev Box
停止开发箱。
POST {endpoint}/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:stop?api-version=2024-02-01
POST {endpoint}/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:stop?api-version=2024-02-01&hibernate={hibernate}
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
dev
|
path | True |
string |
开发框的显示名称。 正则表达式模式: |
endpoint
|
path | True |
string uri |
要在其上运行的特定于 DevCenter 的 URI。 |
project
|
path | True |
string |
项目名称。 正则表达式模式: |
user
|
path | True |
string |
用户的 AAD 对象 ID。 如果值为“me”,则标识取自身份验证上下文。 正则表达式模式: |
api-version
|
query | True |
string |
要用于此操作的 API 版本。 |
hibernate
|
query |
boolean |
用于使开发框休眠的可选参数。 |
响应
名称 | 类型 | 说明 |
---|---|---|
202 Accepted |
已接受请求进行处理,但尚未完成处理。 标头 Operation-Location: string |
|
Other Status Codes |
意外的错误响应。 标头 x-ms-error-code: string |
安全性
OAuth2Auth
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
https://devcenter.azure.com/.default |
示例
Stops a Dev Box.
示例请求
POST https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/users/me/devboxes/MyDevBox:stop?api-version=2024-02-01&hibernate=true
示例响应
Location: https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/operationstatuses/786a823c-8037-48ab-89b8-8599901e67d0
Operation-Location: https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/operationstatuses/786a823c-8037-48ab-89b8-8599901e67d0
{
"id": "/projects/myProject/operationstatuses/786a823c-8037-48ab-89b8-8599901e67d0",
"name": "786a823c-8037-48ab-89b8-8599901e67d0",
"status": "Running",
"startTime": "2023-02-01T12:43:54.122Z"
}
定义
名称 | 说明 |
---|---|
Azure. |
错误对象。 |
Azure. |
包含错误详细信息的响应。 |
Azure. |
包含有关错误的更具体信息的对象。 根据 Microsoft One API 指南 - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses。 |
Operation |
操作状态。 |
Operation |
异步操作的当前状态。 |
Azure.Core.Foundations.Error
错误对象。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
服务器定义的一组错误代码中的一个。 |
details |
有关导致此项报告错误的特定错误的详细信息数组。 |
|
innererror |
一个 对象,该对象包含比当前对象更具体的错误信息。 |
|
message |
string |
错误的用户可读表示形式。 |
target |
string |
错误的目标。 |
Azure.Core.Foundations.ErrorResponse
包含错误详细信息的响应。
名称 | 类型 | 说明 |
---|---|---|
error |
错误对象。 |
Azure.Core.Foundations.InnerError
包含有关错误的更具体信息的对象。 根据 Microsoft One API 指南 - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
服务器定义的一组错误代码中的一个。 |
innererror |
内部错误。 |
OperationState
操作状态。
名称 | 类型 | 说明 |
---|---|---|
Canceled |
string |
用户已取消该操作。 |
Failed |
string |
操作失败。 |
NotStarted |
string |
尚未启动操作。 |
Running |
string |
操作正在进行中。 |
Succeeded |
string |
操作已成功完成。 |
OperationStatus
异步操作的当前状态。
名称 | 类型 | 说明 |
---|---|---|
endTime |
string |
操作的结束时间。 |
error |
操作错误消息。 |
|
id |
string |
操作状态的完全限定 ID。 |
name |
string |
操作 ID 名称。 |
percentComplete |
number |
完成操作的百分比。 |
properties |
自定义操作属性,仅为成功操作填充。 |
|
resourceId |
string |
资源的 ID。 |
startTime |
string |
操作的开始时间。 |
status |
资源的预配状态。 |