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

Microsoft.DevCenter 开发人员中心

Bicep 资源定义

可以使用目标操作部署开发中心资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.DevCenter/devcenters 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.DevCenter/devcenters@2025-10-01-preview' = {
  scope: resourceSymbolicName or scope
  identity: {
    type: 'string'
    userAssignedIdentities: {
      {customized property}: {}
    }
  }
  location: 'string'
  name: 'string'
  properties: {
    devBoxProvisioningSettings: {
      installAzureMonitorAgentEnableStatus: 'string'
    }
    displayName: 'string'
    encryption: {
      customerManagedKeyEncryption: {
        keyEncryptionKeyIdentity: {
          delegatedIdentityClientId: 'string'
          identityType: 'string'
          userAssignedIdentityResourceId: 'string'
        }
        keyEncryptionKeyUrl: 'string'
      }
    }
    networkSettings: {
      microsoftHostedNetworkEnableStatus: 'string'
    }
    projectCatalogSettings: {
      catalogItemSyncEnableStatus: 'string'
    }
  }
  tags: {
    {customized property}: 'string'
  }
}

属性值

Microsoft.DevCenter/devcenters

Name Description Value
标识 托管标识属性。 ManagedServiceIdentity
位置 资源所在的地理位置 string (必需)
name 资源名称 string

Constraints:
最小长度 = 3
最大长度 = 26
模式 = ^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$ (必需)
properties DevCenter 属性 DevCenterProperties
作用域 在与部署范围不同的范围内创建资源时使用。 将此属性设置为资源的符号名称以应用 扩展资源
tags 资源标记 标记名称和值的字典。 请参阅模板 中的 标记

CustomerManagedKeyEncryption

Name Description Value
keyEncryptionKeyIdentity 客户管理的密钥设置的所有标识配置,用于定义应用于向 Key Vault 进行身份验证的标识。 CustomerManagedKeyEncryptionKeyIdentity
keyEncryptionKeyUrl 密钥加密密钥 URL、版本控制或非版本控制。 例如:https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78https://contosovault.vault.azure.net/keys/contosokek 字符串

CustomerManagedKeyEncryptionKeyIdentity

Name Description Value
delegatedIdentityClientId 用于访问密钥加密密钥 URL 的委托标识。 例如:/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<资源组>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId。 与 identityType systemAssignedIdentity 和 userAssignedIdentity 互斥 - 仅供内部使用。 string

Constraints:
最小长度 = 36
最大长度 = 36
图案 = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
identityType 值可以是 systemAssignedIdentity 或 userAssignedIdentity 'delegatedResourceIdentity'
'systemAssignedIdentity'
'userAssignedIdentity'
userAssignedIdentityResourceId 用户分配的标识用于访问密钥加密密钥 URL。 例如:/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<资源组>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId。 与 identityType systemAssignedIdentity 和 delegatedResourceIdentity 互斥。 字符串

DevBoxProvisioningSettings

Name Description Value
installAzureMonitorAgentEnableStatus 指示是否在属于此开发人员中心的开发箱上安装 Azure Monitor 代理服务 'Disabled'
'Enabled'

DevCenterNetworkSettings

Name Description Value
microsoftHostedNetworkEnableStatus 指示此开发人员中心中的池是否可以使用Microsoft托管网络。 默认值为“启用”(如果未设置)。 'Disabled'
'Enabled'

DevCenterProjectCatalogSettings

Name Description Value
catalogItemSyncEnableStatus 是否可将与此开发人员中心中的项目关联的项目目录配置为同步目录项。 'Disabled'
'Enabled'

DevCenterProperties

Name Description Value
devBoxProvisioningSettings 要用于预配属于此开发人员中心的所有 Dev Boxes 的设置。 DevBoxProvisioningSettings
displayName 开发中心的显示名称。 字符串
加密 用于专有内容的服务器端加密(如目录、日志、自定义项)的加密设置。 Encryption
networkSettings 将在与开发人员中心关联的网络资源上强制执行的网络设置。 DevCenterNetworkSettings
projectCatalogSettings 将项目与目录关联时要使用的开发人员中心设置。 DevCenterProjectCatalogSettings

Encryption

Name Description Value
customerManagedKeyEncryption 资源的所有客户管理的密钥加密属性。 CustomerManagedKeyEncryption

ManagedServiceIdentity

Name Description Value
类型 托管服务标识的类型(其中允许 SystemAssigned 和 UserAssigned 类型)。 'None'
'SystemAssigned'
“SystemAssigned,UserAssigned”
“UserAssigned”(必需)
userAssignedIdentities 与资源关联的用户分配标识集。 userAssignedIdentities 字典密钥将为 ARM 资源 ID,格式为“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 字典值可以是请求中的空对象({})。 UserAssignedIdentities

TrackedResourceTags

Name Description Value

UserAssignedIdentities

Name Description Value

UserAssignedIdentity

Name Description Value

用法示例

Azure 验证模块

以下 Azure 验证模块 可用于部署此资源类型。

Module Description
开发人员中心 适用于开发人员中心的 AVM 资源模块

Azure 快速入门示例

以下 Azure 快速入门模板 包含用于部署此资源类型的 Bicep 示例。

Bicep 文件 Description
配置部署环境服务 此模板提供了配置部署环境的方法。
配置 Dev Box 服务 此模板将按照 Dev Box 快速入门指南(/azure/dev-box/quickstart-create-dev-box)创建所有 Dev Box 管理员资源。 可以查看创建的所有资源,也可以直接转到 DevPortal.microsoft.com 创建第一个 Dev Box。
部署 Dev Box 服务 此模板提供了一种配置创建 Dev Box 所需的所有资源的方法。
使用内置映像 部署 Dev Box Service 此模板提供了使用内置映像部署 Dev Box 服务的方法。

ARM 模板资源定义

可以使用目标操作部署开发中心资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.DevCenter/devcenters 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.DevCenter/devcenters",
  "apiVersion": "2025-10-01-preview",
  "name": "string",
  "identity": {
    "type": "string",
    "userAssignedIdentities": {
      "{customized property}": {
      }
    }
  },
  "location": "string",
  "properties": {
    "devBoxProvisioningSettings": {
      "installAzureMonitorAgentEnableStatus": "string"
    },
    "displayName": "string",
    "encryption": {
      "customerManagedKeyEncryption": {
        "keyEncryptionKeyIdentity": {
          "delegatedIdentityClientId": "string",
          "identityType": "string",
          "userAssignedIdentityResourceId": "string"
        },
        "keyEncryptionKeyUrl": "string"
      }
    },
    "networkSettings": {
      "microsoftHostedNetworkEnableStatus": "string"
    },
    "projectCatalogSettings": {
      "catalogItemSyncEnableStatus": "string"
    }
  },
  "tags": {
    "{customized property}": "string"
  }
}

属性值

Microsoft.DevCenter/devcenters

Name Description Value
apiVersion API 版本 “2025-10-01-预览”
标识 托管标识属性。 ManagedServiceIdentity
位置 资源所在的地理位置 string (必需)
name 资源名称 string

Constraints:
最小长度 = 3
最大长度 = 26
模式 = ^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$ (必需)
properties DevCenter 属性 DevCenterProperties
tags 资源标记 标记名称和值的字典。 请参阅模板 中的 标记
类型 资源类型 'Microsoft.DevCenter/devcenters'

CustomerManagedKeyEncryption

Name Description Value
keyEncryptionKeyIdentity 客户管理的密钥设置的所有标识配置,用于定义应用于向 Key Vault 进行身份验证的标识。 CustomerManagedKeyEncryptionKeyIdentity
keyEncryptionKeyUrl 密钥加密密钥 URL、版本控制或非版本控制。 例如:https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78https://contosovault.vault.azure.net/keys/contosokek 字符串

CustomerManagedKeyEncryptionKeyIdentity

Name Description Value
delegatedIdentityClientId 用于访问密钥加密密钥 URL 的委托标识。 例如:/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<资源组>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId。 与 identityType systemAssignedIdentity 和 userAssignedIdentity 互斥 - 仅供内部使用。 string

Constraints:
最小长度 = 36
最大长度 = 36
图案 = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
identityType 值可以是 systemAssignedIdentity 或 userAssignedIdentity 'delegatedResourceIdentity'
'systemAssignedIdentity'
'userAssignedIdentity'
userAssignedIdentityResourceId 用户分配的标识用于访问密钥加密密钥 URL。 例如:/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<资源组>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId。 与 identityType systemAssignedIdentity 和 delegatedResourceIdentity 互斥。 字符串

DevBoxProvisioningSettings

Name Description Value
installAzureMonitorAgentEnableStatus 指示是否在属于此开发人员中心的开发箱上安装 Azure Monitor 代理服务 'Disabled'
'Enabled'

DevCenterNetworkSettings

Name Description Value
microsoftHostedNetworkEnableStatus 指示此开发人员中心中的池是否可以使用Microsoft托管网络。 默认值为“启用”(如果未设置)。 'Disabled'
'Enabled'

DevCenterProjectCatalogSettings

Name Description Value
catalogItemSyncEnableStatus 是否可将与此开发人员中心中的项目关联的项目目录配置为同步目录项。 'Disabled'
'Enabled'

DevCenterProperties

Name Description Value
devBoxProvisioningSettings 要用于预配属于此开发人员中心的所有 Dev Boxes 的设置。 DevBoxProvisioningSettings
displayName 开发中心的显示名称。 字符串
加密 用于专有内容的服务器端加密(如目录、日志、自定义项)的加密设置。 Encryption
networkSettings 将在与开发人员中心关联的网络资源上强制执行的网络设置。 DevCenterNetworkSettings
projectCatalogSettings 将项目与目录关联时要使用的开发人员中心设置。 DevCenterProjectCatalogSettings

Encryption

Name Description Value
customerManagedKeyEncryption 资源的所有客户管理的密钥加密属性。 CustomerManagedKeyEncryption

ManagedServiceIdentity

Name Description Value
类型 托管服务标识的类型(其中允许 SystemAssigned 和 UserAssigned 类型)。 'None'
'SystemAssigned'
“SystemAssigned,UserAssigned”
“UserAssigned”(必需)
userAssignedIdentities 与资源关联的用户分配标识集。 userAssignedIdentities 字典密钥将为 ARM 资源 ID,格式为“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 字典值可以是请求中的空对象({})。 UserAssignedIdentities

TrackedResourceTags

Name Description Value

UserAssignedIdentities

Name Description Value

UserAssignedIdentity

Name Description Value

用法示例

Azure 快速入门模板

以下 Azure 快速入门模板 部署此资源类型。

Template Description
配置部署环境服务

部署到 Azure
此模板提供了配置部署环境的方法。
配置 Dev Box 服务

部署到 Azure
此模板将按照 Dev Box 快速入门指南(/azure/dev-box/quickstart-create-dev-box)创建所有 Dev Box 管理员资源。 可以查看创建的所有资源,也可以直接转到 DevPortal.microsoft.com 创建第一个 Dev Box。
部署 Dev Box 服务

部署到 Azure
此模板提供了一种配置创建 Dev Box 所需的所有资源的方法。
使用内置映像 部署 Dev Box Service

部署到 Azure
此模板提供了使用内置映像部署 Dev Box 服务的方法。

Terraform (AzAPI 提供程序)资源定义

可以使用目标操作部署开发中心资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.DevCenter/devcenters 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.DevCenter/devcenters@2025-10-01-preview"
  name = "string"
  parent_id = "string"
  identity {
    type = "string"
    identity_ids = [
      "string"
    ]
  }
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = {
    properties = {
      devBoxProvisioningSettings = {
        installAzureMonitorAgentEnableStatus = "string"
      }
      displayName = "string"
      encryption = {
        customerManagedKeyEncryption = {
          keyEncryptionKeyIdentity = {
            delegatedIdentityClientId = "string"
            identityType = "string"
            userAssignedIdentityResourceId = "string"
          }
          keyEncryptionKeyUrl = "string"
        }
      }
      networkSettings = {
        microsoftHostedNetworkEnableStatus = "string"
      }
      projectCatalogSettings = {
        catalogItemSyncEnableStatus = "string"
      }
    }
  }
}

属性值

Microsoft.DevCenter/devcenters

Name Description Value
标识 托管标识属性。 ManagedServiceIdentity
位置 资源所在的地理位置 string (必需)
name 资源名称 string

Constraints:
最小长度 = 3
最大长度 = 26
模式 = ^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$ (必需)
parent_id 要向其应用此扩展资源的资源的 ID。 string (必需)
properties DevCenter 属性 DevCenterProperties
tags 资源标记 标记名称和值的字典。
类型 资源类型 “Microsoft.DevCenter/devcenters@2025-10-01-preview”

CustomerManagedKeyEncryption

Name Description Value
keyEncryptionKeyIdentity 客户管理的密钥设置的所有标识配置,用于定义应用于向 Key Vault 进行身份验证的标识。 CustomerManagedKeyEncryptionKeyIdentity
keyEncryptionKeyUrl 密钥加密密钥 URL、版本控制或非版本控制。 例如:https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78https://contosovault.vault.azure.net/keys/contosokek 字符串

CustomerManagedKeyEncryptionKeyIdentity

Name Description Value
delegatedIdentityClientId 用于访问密钥加密密钥 URL 的委托标识。 例如:/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<资源组>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId。 与 identityType systemAssignedIdentity 和 userAssignedIdentity 互斥 - 仅供内部使用。 string

Constraints:
最小长度 = 36
最大长度 = 36
图案 = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
identityType 值可以是 systemAssignedIdentity 或 userAssignedIdentity 'delegatedResourceIdentity'
'systemAssignedIdentity'
'userAssignedIdentity'
userAssignedIdentityResourceId 用户分配的标识用于访问密钥加密密钥 URL。 例如:/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<资源组>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId。 与 identityType systemAssignedIdentity 和 delegatedResourceIdentity 互斥。 字符串

DevBoxProvisioningSettings

Name Description Value
installAzureMonitorAgentEnableStatus 指示是否在属于此开发人员中心的开发箱上安装 Azure Monitor 代理服务 'Disabled'
'Enabled'

DevCenterNetworkSettings

Name Description Value
microsoftHostedNetworkEnableStatus 指示此开发人员中心中的池是否可以使用Microsoft托管网络。 默认值为“启用”(如果未设置)。 'Disabled'
'Enabled'

DevCenterProjectCatalogSettings

Name Description Value
catalogItemSyncEnableStatus 是否可将与此开发人员中心中的项目关联的项目目录配置为同步目录项。 'Disabled'
'Enabled'

DevCenterProperties

Name Description Value
devBoxProvisioningSettings 要用于预配属于此开发人员中心的所有 Dev Boxes 的设置。 DevBoxProvisioningSettings
displayName 开发中心的显示名称。 字符串
加密 用于专有内容的服务器端加密(如目录、日志、自定义项)的加密设置。 Encryption
networkSettings 将在与开发人员中心关联的网络资源上强制执行的网络设置。 DevCenterNetworkSettings
projectCatalogSettings 将项目与目录关联时要使用的开发人员中心设置。 DevCenterProjectCatalogSettings

Encryption

Name Description Value
customerManagedKeyEncryption 资源的所有客户管理的密钥加密属性。 CustomerManagedKeyEncryption

ManagedServiceIdentity

Name Description Value
类型 托管服务标识的类型(其中允许 SystemAssigned 和 UserAssigned 类型)。 'None'
'SystemAssigned'
“SystemAssigned,UserAssigned”
“UserAssigned”(必需)
userAssignedIdentities 与资源关联的用户分配标识集。 userAssignedIdentities 字典密钥将为 ARM 资源 ID,格式为“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 字典值可以是请求中的空对象({})。 UserAssignedIdentities

TrackedResourceTags

Name Description Value

UserAssignedIdentities

Name Description Value

UserAssignedIdentity

Name Description Value

用法示例

Terraform 示例

部署开发人员中心的基本示例。

terraform {
  required_providers {
    azapi = {
      source = "Azure/azapi"
    }
  }
}

provider "azapi" {
  skip_provider_registration = false
}

variable "resource_name" {
  type    = string
  default = "acctest0001"
}

variable "location" {
  type    = string
  default = "eastus"
}

resource "azapi_resource" "resourceGroup" {
  type     = "Microsoft.Resources/resourceGroups@2020-06-01"
  name     = var.resource_name
  location = var.location
}

resource "azapi_resource" "userAssignedIdentity" {
  type      = "Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31"
  parent_id = azapi_resource.resourceGroup.id
  name      = "${var.resource_name}-uai"
  location  = var.location
  body      = {}
}

resource "azapi_resource" "devCenter" {
  type      = "Microsoft.DevCenter/devCenters@2025-02-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  identity {
    type         = "SystemAssigned, UserAssigned"
    identity_ids = [azapi_resource.userAssignedIdentity.id]
  }
  body = {}
  tags = {
    environment = "terraform-acctests"
    some_key    = "some-value"
  }
}

Azure 验证模块

以下 Azure 验证模块 可用于部署此资源类型。

Module Description
开发人员中心 适用于开发人员中心的 AVM 资源模块