你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

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 参数

名称 必需 类型 说明
devBoxDefinitionName
path True

string

minLength: 3
maxLength: 63
pattern: ^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$

Dev Box 定义的名称。

devCenterName
path True

string

minLength: 3
maxLength: 26
pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$

开发中心的名称。

resourceGroupName
path True

string

minLength: 1
maxLength: 90

资源组的名称。 名称不区分大小写。

subscriptionId
path True

string

minLength: 1

目标订阅的 ID。

api-version
query True

string

minLength: 1

用于此作的 API 版本。

请求正文

名称 类型 说明
location

string

资源所在的地理位置

properties.hibernateSupport

HibernateSupport

指示使用此定义创建的 Dev Boxes 是否能够进入休眠状态。 并非所有图像都能够支持休眠。 若要了解详细信息,请参阅 https://aka.ms/devbox/hibernate

properties.imageReference

ImageReference

图像参考信息。

properties.osStorageType

string

用于使用此定义创建的 Dev Boxes作系统磁盘的存储类型。

properties.sku

Sku

使用此定义创建的 Dev Boxes 的 SKU。

tags

object

资源标记。

响应

名称 类型 说明
200 OK

DevBoxDefinition

还行。 请求已成功。

202 Accepted

已接受。 该操作将以异步方式完成。

标头

Location: string

Other Status Codes

ErrorResponse

描述作失败的原因的错误响应。

安全性

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

定义

名称 说明
CatalogResourceValidationStatus

目录资源验证状态

createdByType

创建资源的标识的类型。

DevBoxDefinition

表示开发人员计算机的定义。

DevBoxDefinitionUpdate

Dev Box 定义资源的部分更新。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

HibernateSupport

指示是否启用/禁用休眠。

ImageReference

图像参考信息

ImageValidationErrorDetails

图像验证错误详细信息

ImageValidationStatus

图像验证状态

ProvisioningState

资源的预配状态。

Sku

表示 SKU 的资源模型定义

SkuTier

如果服务具有多个层,但在 PUT 上不需要,则需要资源提供程序实现此字段。

systemData

与创建和上次修改资源相关的元数据。

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

ImageReference

当前活动映像的图像参考信息(仅在更新期间填充)。

properties.hibernateSupport

HibernateSupport

指示使用此定义创建的 Dev Boxes 是否能够进入休眠状态。 并非所有图像都能够支持休眠。 若要了解详细信息,请参阅 https://aka.ms/devbox/hibernate

properties.imageReference

ImageReference

图像参考信息。

properties.imageValidationErrorDetails

ImageValidationErrorDetails

图像验证程序错误的详细信息。 在图像验证未成功时填充。

properties.imageValidationStatus

ImageValidationStatus

配置的映像的验证状态。

properties.osStorageType

string

用于使用此定义创建的 Dev Boxes作系统磁盘的存储类型。

properties.provisioningState

ProvisioningState

资源的预配状态。

properties.sku

Sku

使用此定义创建的 Dev Boxes 的 SKU。

properties.validationStatus

CatalogResourceValidationStatus

Dev Box 定义的验证状态。

systemData

systemData

包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。

tags

object

资源标记。

type

string

资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

DevBoxDefinitionUpdate

Dev Box 定义资源的部分更新。

名称 类型 说明
location

string

资源所在的地理位置

properties.hibernateSupport

HibernateSupport

指示使用此定义创建的 Dev Boxes 是否能够进入休眠状态。 并非所有图像都能够支持休眠。 若要了解详细信息,请参阅 https://aka.ms/devbox/hibernate

properties.imageReference

ImageReference

图像参考信息。

properties.osStorageType

string

用于使用此定义创建的 Dev Boxes作系统磁盘的存储类型。

properties.sku

Sku

使用此定义创建的 Dev Boxes 的 SKU。

tags

object

资源标记。

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

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

SkuTier

如果服务具有多个层,但在 PUT 上不需要,则需要资源提供程序实现此字段。

SkuTier

如果服务具有多个层,但在 PUT 上不需要,则需要资源提供程序实现此字段。

说明
Basic
Free
Premium
Standard

systemData

与创建和上次修改资源相关的元数据。

名称 类型 说明
createdAt

string (date-time)

资源创建时间戳(UTC)。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识的类型。

lastModifiedAt

string (date-time)

上次修改的资源时间戳(UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识的类型。