Dev Box Definitions - Update
部分更新 Dev Box 定义。
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}?api-version=2024-02-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
dev
|
path | True |
string minLength: 3maxLength: 63 pattern: ^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$ |
Dev Box 定义的名称。 |
dev
|
path | True |
string minLength: 3maxLength: 26 pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$ |
开发中心的名称。 |
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 名称不区分大小写。 |
subscription
|
path | True |
string minLength: 1 |
目标订阅的 ID。 |
api-version
|
query | True |
string minLength: 1 |
用于此作的 API 版本。 |
请求正文
名称 | 类型 | 说明 |
---|---|---|
location |
string |
资源所在的地理位置 |
properties.hibernateSupport |
指示使用此定义创建的 Dev Boxes 是否能够进入休眠状态。 并非所有图像都能够支持休眠。 若要了解详细信息,请参阅 https://aka.ms/devbox/hibernate |
|
properties.imageReference |
图像参考信息。 |
|
properties.osStorageType |
string |
用于使用此定义创建的 Dev Boxes作系统磁盘的存储类型。 |
properties.sku |
使用此定义创建的 Dev Boxes 的 SKU。 |
|
tags |
object |
资源标记。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
还行。 请求已成功。 |
|
202 Accepted |
已接受。 该操作将以异步方式完成。 标头 Location: string |
|
Other Status Codes |
描述作失败的原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
DevBoxDefinitions_Patch
示例请求
PATCH https://management.azure.com/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/devboxdefinitions/WebDevBox?api-version=2024-02-01
{
"properties": {
"imageReference": {
"id": "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/2.0.0"
}
}
}
示例响应
{
"id": "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/devboxdefinitions/WebDevBox",
"name": "WebDevBox",
"type": "Microsoft.DevCenter/devcenters/devboxdefinitions",
"properties": {
"imageReference": {
"id": "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/2.0.0"
},
"sku": {
"name": "Preview"
},
"hibernateSupport": "Enabled",
"provisioningState": "Succeeded"
},
"location": "centralus",
"systemData": {
"createdBy": "user1",
"createdByType": "User",
"createdAt": "2020-11-18T18:00:36.993Z",
"lastModifiedBy": "user1",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-11-18T18:30:36.993Z"
}
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/CENTRALUS/operationStatuses/722e7bc4-60fa-4e6b-864f-d5bf12b9adc4?api-version=2024-02-01
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/CENTRALUS/operationStatuses/722e7bc4-60fa-4e6b-864f-d5bf12b9adc4?api-version=2024-02-01
定义
名称 | 说明 |
---|---|
Catalog |
目录资源验证状态 |
created |
创建资源的标识的类型。 |
Dev |
表示开发人员计算机的定义。 |
Dev |
Dev Box 定义资源的部分更新。 |
Error |
资源管理错误附加信息。 |
Error |
错误详细信息。 |
Error |
错误响应 |
Hibernate |
指示是否启用/禁用休眠。 |
Image |
图像参考信息 |
Image |
图像验证错误详细信息 |
Image |
图像验证状态 |
Provisioning |
资源的预配状态。 |
Sku |
表示 SKU 的资源模型定义 |
Sku |
如果服务具有多个层,但在 PUT 上不需要,则需要资源提供程序实现此字段。 |
system |
与创建和上次修改资源相关的元数据。 |
CatalogResourceValidationStatus
目录资源验证状态
值 | 说明 |
---|---|
Failed | |
Pending | |
Succeeded | |
Unknown |
createdByType
创建资源的标识的类型。
值 | 说明 |
---|---|
Application | |
Key | |
ManagedIdentity | |
User |
DevBoxDefinition
表示开发人员计算机的定义。
名称 | 类型 | 说明 |
---|---|---|
id |
string (arm-id) |
资源的完全限定资源 ID。 例如“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
location |
string |
资源所在的地理位置 |
name |
string |
资源的名称 |
properties.activeImageReference |
当前活动映像的图像参考信息(仅在更新期间填充)。 |
|
properties.hibernateSupport |
指示使用此定义创建的 Dev Boxes 是否能够进入休眠状态。 并非所有图像都能够支持休眠。 若要了解详细信息,请参阅 https://aka.ms/devbox/hibernate |
|
properties.imageReference |
图像参考信息。 |
|
properties.imageValidationErrorDetails |
图像验证程序错误的详细信息。 在图像验证未成功时填充。 |
|
properties.imageValidationStatus |
配置的映像的验证状态。 |
|
properties.osStorageType |
string |
用于使用此定义创建的 Dev Boxes作系统磁盘的存储类型。 |
properties.provisioningState |
资源的预配状态。 |
|
properties.sku |
使用此定义创建的 Dev Boxes 的 SKU。 |
|
properties.validationStatus |
Dev Box 定义的验证状态。 |
|
systemData |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
|
tags |
object |
资源标记。 |
type |
string |
资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
DevBoxDefinitionUpdate
Dev Box 定义资源的部分更新。
名称 | 类型 | 说明 |
---|---|---|
location |
string |
资源所在的地理位置 |
properties.hibernateSupport |
指示使用此定义创建的 Dev Boxes 是否能够进入休眠状态。 并非所有图像都能够支持休眠。 若要了解详细信息,请参阅 https://aka.ms/devbox/hibernate |
|
properties.imageReference |
图像参考信息。 |
|
properties.osStorageType |
string |
用于使用此定义创建的 Dev Boxes作系统磁盘的存储类型。 |
properties.sku |
使用此定义创建的 Dev Boxes 的 SKU。 |
|
tags |
object |
资源标记。 |
ErrorAdditionalInfo
资源管理错误附加信息。
名称 | 类型 | 说明 |
---|---|---|
info |
object |
其他信息。 |
type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
名称 | 类型 | 说明 |
---|---|---|
additionalInfo |
错误附加信息。 |
|
code |
string |
错误代码。 |
details |
错误详细信息。 |
|
message |
string |
错误消息。 |
target |
string |
错误目标。 |
ErrorResponse
错误响应
名称 | 类型 | 说明 |
---|---|---|
error |
错误对象。 |
HibernateSupport
指示是否启用/禁用休眠。
值 | 说明 |
---|---|
Disabled | |
Enabled |
ImageReference
图像参考信息
名称 | 类型 | 说明 |
---|---|---|
exactVersion |
string |
使用后映像的实际版本。 当 ID 引用库映像最新版本时,这将指示正在使用的实际版本。 |
id |
string |
映像 ID 或映像版本 ID。 提供映像 ID 时,将使用其最新版本。 |
ImageValidationErrorDetails
图像验证错误详细信息
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误的标识符。 |
message |
string |
描述错误的消息。 |
ImageValidationStatus
图像验证状态
值 | 说明 |
---|---|
Failed | |
Pending | |
Succeeded | |
TimedOut | |
Unknown |
ProvisioningState
资源的预配状态。
值 | 说明 |
---|---|
Accepted | |
Canceled | |
Created | |
Creating | |
Deleted | |
Deleting | |
Failed | |
MovingResources | |
NotSpecified | |
RolloutInProgress | |
Running | |
StorageProvisioningFailed | |
Succeeded | |
TransientFailure | |
Updated | |
Updating |
Sku
表示 SKU 的资源模型定义
名称 | 类型 | 说明 |
---|---|---|
capacity |
integer (int32) |
如果 SKU 支持横向扩展/缩减,则应包含容量整数。 如果资源无法横向扩展/缩小,则可能会省略此范围。 |
family |
string |
如果服务具有不同代的硬件(对于同一 SKU,则可以在此处捕获)。 |
name |
string |
SKU 的名称。 例如 P3。 它通常是字母+数字代码 |
size |
string |
SKU 大小。 当名称字段是层和其他一些值的组合时,这将是独立的代码。 |
tier |
如果服务具有多个层,但在 PUT 上不需要,则需要资源提供程序实现此字段。 |
SkuTier
如果服务具有多个层,但在 PUT 上不需要,则需要资源提供程序实现此字段。
值 | 说明 |
---|---|
Basic | |
Free | |
Premium | |
Standard |
systemData
与创建和上次修改资源相关的元数据。
名称 | 类型 | 说明 |
---|---|---|
createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
createdBy |
string |
创建资源的标识。 |
createdByType |
创建资源的标识的类型。 |
|
lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
lastModifiedBy |
string |
上次修改资源的标识。 |
lastModifiedByType |
上次修改资源的标识的类型。 |