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

Microsoft.Maps 帐户

Bicep 资源定义

可以使用针对以下操作部署帐户资源类型:

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

资源格式

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

resource symbolicname 'Microsoft.Maps/accounts@2023-06-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  sku: {
    name: 'string'
  }
  kind: 'string'
  identity: {
    type: 'string'
    userAssignedIdentities: {}
  }
  properties: {
    cors: {
      corsRules: [
        {
          allowedOrigins: [
            'string'
          ]
        }
      ]
    }
    disableLocalAuth: bool
    encryption: {
      customerManagedKeyEncryption: {
        keyEncryptionKeyIdentity: {
          delegatedIdentityClientId: 'string'
          identityType: 'string'
          userAssignedIdentityResourceId: 'string'
        }
        keyEncryptionKeyUrl: 'string'
      }
      infrastructureEncryption: 'string'
    }
    linkedResources: [
      {
        id: 'string'
        uniqueName: 'string'
      }
    ]
  }
}

属性值

accounts

名称 说明
name 资源名称 字符串 (必需)

字符限制:资源组名称和帐户名称) 1-98 (

有效字符:
字母数字、下划线字符、句点和连字符。

以字母数字开头。
location 资源所在的地理位置 字符串 (必需)
标记 资源标记。 标记名称和值的字典。 请参阅 模板中的标记
sku 此帐户的 SKU。 需要 sku ()
kind 获取或设置 Kind 属性。 “Gen1”
“Gen2”
标识 托管服务标识 (系统分配的标识和/或用户分配的标识) ManagedServiceIdentity
properties 映射帐户属性。 MapsAccountProperties

ManagedServiceIdentity

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

MapsAccountProperties

名称 说明
cors 指定 Blob 服务的 CORS 规则。 最多可以在请求中包含五个 CorsRule 元素。 如果请求正文中不包含 CorsRule 元素,则将删除所有 CORS 规则,并且将禁用 Blob 服务的 CORS。 CorsRules
disableLocalAuth 允许Azure Policy上的切换功能禁用Azure Maps本地身份验证支持。 这将从任何用法中禁用共享密钥和共享访问签名令牌身份验证。 bool
加密 (可选) 不建议包含在资源定义中。 仅在可能禁用平台 (AKA 基础结构) 加密时才需要。 Azure SQL TDE 就是一个示例。 启用和禁用值。 加密
linkedResources 映射帐户的关联资源的数组。 数组中的链接资源无法单独更新,必须一起更新数组中的所有链接资源。 这些资源可用于Azure Maps REST API 上的操作。 访问由映射帐户托管标识控制, (对这些资源的) 权限 () 。 LinkedResource[]

约束:
最大长度 = 10

CorsRules

名称 说明
corsRules CORS 规则的列表。 最多可以在请求中包含五个 CorsRule 元素。 CorsRule[]

约束:
最大长度 = 5

CorsRule

名称 说明
allowedOrigins 如果存在 CorsRule 元素,则为必需项。 将允许通过 CORS 或“*”允许所有域的源域列表 string[] (必需的)

Encryption

名称 说明
customerManagedKeyEncryption 资源的所有客户管理的密钥加密属性。 CustomerManagedKeyEncryption
infrastructureEncryption 启用和禁用值。 “disabled”
“enabled”

CustomerManagedKeyEncryption

名称 说明
keyEncryptionKeyIdentity 客户管理的密钥设置的所有标识配置,定义应使用哪个标识进行身份验证密钥保管库。 CustomerManagedKeyEncryptionKeyIdentity
keyEncryptionKeyUrl 密钥加密密钥 URL,版本控制或非版本控制。 例如:https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78https://contosovault.vault.azure.net/keys/contosokek. 字符串

CustomerManagedKeyEncryptionKeyIdentity

名称 说明
delegatedIdentityClientId 用于访问密钥加密密钥 URL 的委托标识。 例如:/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/{资源组}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId。 与 identityType systemAssignedIdentity 和 userAssignedIdentity 互斥 - 仅限内部使用。 字符串

约束:
最小长度 = 36
最大长度 = 36
Pattern = “^[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 互斥。 字符串

LinkedResource

名称 说明 Value
id ARM 资源 ID 的格式为:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/accounts/{storageName}”。 字符串 (必需)
uniqueName 唯一标识链接资源的名称。 字符串 (必需)

SKU

名称 说明
name SKU 的名称,采用标准格式 (,例如 S0) 。 “G2”
“S0”
“S1” (必需)

快速入门模板

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

模板 说明
RBAC - 在 Azure Maps 帐户上创建托管标识访问

部署到 Azure
此模板创建托管标识,并向其分配对创建的Azure Maps帐户的访问权限。
部署Azure Maps

部署到 Azure
此模板部署和Azure Maps帐户并列出主键。
使用 Azure Maps Creator (室内地图) 部署Azure Maps

部署到 Azure
此模板使用室内地图创建者功能部署和Azure Maps帐户,以允许生成室内地图。
创建存储在 Azure 密钥保管库中的Azure Maps SAS 令牌

部署到 Azure
此模板部署和Azure Maps帐户,并根据提供的要存储在 Azure 密钥保管库机密中的用户分配标识列出 Sas 令牌。

ARM 模板资源定义

可以使用针对以下操作部署帐户资源类型:

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

资源格式

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

{
  "type": "Microsoft.Maps/accounts",
  "apiVersion": "2023-06-01",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "sku": {
    "name": "string"
  },
  "kind": "string",
  "identity": {
    "type": "string",
    "userAssignedIdentities": {}
  },
  "properties": {
    "cors": {
      "corsRules": [
        {
          "allowedOrigins": [ "string" ]
        }
      ]
    },
    "disableLocalAuth": "bool",
    "encryption": {
      "customerManagedKeyEncryption": {
        "keyEncryptionKeyIdentity": {
          "delegatedIdentityClientId": "string",
          "identityType": "string",
          "userAssignedIdentityResourceId": "string"
        },
        "keyEncryptionKeyUrl": "string"
      },
      "infrastructureEncryption": "string"
    },
    "linkedResources": [
      {
        "id": "string",
        "uniqueName": "string"
      }
    ]
  }
}

属性值

accounts

名称 说明 Value
type 资源类型 “Microsoft.Maps/accounts”
apiVersion 资源 API 版本 '2023-06-01'
name 资源名称 字符串 (必需)

字符限制:资源组名称和帐户名称) 1-98 (

有效字符:
字母数字、下划线字符、句点和连字符。

以字母数字开头。
location 资源所在的地理位置 字符串 (必需)
标记 资源标记。 标记名称和值的字典。 请参阅 模板中的标记
sku 此帐户的 SKU。 需要 sku ()
kind 获取或设置 Kind 属性。 “Gen1”
“Gen2”
标识 托管服务标识 (系统分配的标识和/或用户分配的标识) ManagedServiceIdentity
properties 映射帐户属性。 MapsAccountProperties

ManagedServiceIdentity

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

MapsAccountProperties

名称 说明
cors 指定 Blob 服务的 CORS 规则。 最多可以在请求中包含五个 CorsRule 元素。 如果请求正文中不包含 CorsRule 元素,则将删除所有 CORS 规则,并且将为 Blob 服务禁用 CORS。 CorsRules
disableLocalAuth 允许Azure Policy上的切换功能禁用Azure Maps本地身份验证支持。 这将禁用任何用途的共享密钥和共享访问签名令牌身份验证。 bool
加密 (可选) 不建议包含在资源定义中。 仅在可能禁用平台 (AKA 基础结构) 加密时才需要。 Azure SQL TDE 就是一个示例。 值处于启用和禁用状态。 加密
linkedResources 与映射帐户关联的资源的数组。 数组中的链接资源无法单独更新,必须一起更新数组中的所有链接资源。 这些资源可用于Azure Maps REST API 上的操作。 访问由映射帐户托管标识控制, (对这些资源 () ) 权限。 LinkedResource[]

约束:
最大长度 = 10

CorsRules

名称 说明
corsRules CORS 规则的列表。 最多可以在请求中包含五个 CorsRule 元素。 CorsRule[]

约束:
最大长度 = 5

CorsRule

名称 说明
allowedOrigins 如果存在 CorsRule 元素,则为必需项。 允许通过 CORS 或“*”允许所有域的源域列表 string[] (必需)

Encryption

名称 说明
customerManagedKeyEncryption 资源的所有客户管理的密钥加密属性。 CustomerManagedKeyEncryption
infrastructureEncryption 启用和禁用值。 “disabled”
“enabled”

CustomerManagedKeyEncryption

名称 说明
keyEncryptionKeyIdentity 客户管理的密钥设置的所有标识配置,定义应使用哪个标识进行身份验证密钥保管库。 CustomerManagedKeyEncryptionKeyIdentity
keyEncryptionKeyUrl 密钥加密密钥 URL,版本控制或非版本控制。 例如:https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78https://contosovault.vault.azure.net/keys/contosokek. 字符串

CustomerManagedKeyEncryptionKeyIdentity

名称 说明
delegatedIdentityClientId 用于访问密钥加密密钥 URL 的委托标识。 例如:/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/{资源组}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId。 与 identityType systemAssignedIdentity 和 userAssignedIdentity 互斥 - 仅限内部使用。 字符串

约束:
最小长度 = 36
最大长度 = 36
Pattern = “^[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 互斥。 字符串

LinkedResource

名称 说明 Value
id ARM 资源 ID 的格式为:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/accounts/{storageName}”。 字符串 (必需)
uniqueName 唯一标识链接资源的名称。 字符串 (必需)

SKU

名称 说明
name SKU 的名称,采用标准格式 (,例如 S0) 。 “G2”
“S0”
“S1” (必需)

快速入门模板

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

模板 说明
RBAC - 在 Azure Maps 帐户上创建托管标识访问

部署到 Azure
此模板创建托管标识,并向其分配对创建的Azure Maps帐户的访问权限。
部署Azure Maps

部署到 Azure
此模板部署和Azure Maps帐户并列出主键。
使用 Azure Maps Creator (室内地图) 部署Azure Maps

部署到 Azure
此模板使用室内地图创建者功能部署和Azure Maps帐户,以允许生成室内地图。
创建存储在 Azure 密钥保管库中的Azure Maps SAS 令牌

部署到 Azure
此模板部署和Azure Maps帐户,并根据提供的要存储在 Azure 密钥保管库机密中的用户分配标识列出 Sas 令牌。

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

可以使用针对以下操作部署帐户资源类型:

  • 资源组

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

资源格式

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Maps/accounts@2023-06-01"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  identity {
    type = "string"
    identity_ids = []
  }
  body = jsonencode({
    properties = {
      cors = {
        corsRules = [
          {
            allowedOrigins = [
              "string"
            ]
          }
        ]
      }
      disableLocalAuth = bool
      encryption = {
        customerManagedKeyEncryption = {
          keyEncryptionKeyIdentity = {
            delegatedIdentityClientId = "string"
            identityType = "string"
            userAssignedIdentityResourceId = "string"
          }
          keyEncryptionKeyUrl = "string"
        }
        infrastructureEncryption = "string"
      }
      linkedResources = [
        {
          id = "string"
          uniqueName = "string"
        }
      ]
    }
    sku = {
      name = "string"
    }
    kind = "string"
  })
}

属性值

accounts

名称 说明 Value
type 资源类型 “Microsoft.Maps/accounts@2023-06-01”
name 资源名称 字符串 (必需)

字符限制:资源组名称和帐户名称) 1-98 (

有效字符:
字母数字、下划线字符、句点和连字符。

以字母数字开头。
location 资源所在的地理位置 字符串 (必需)
parent_id 若要部署到资源组,请使用该资源组的 ID。 字符串 (必需)
标记 资源标记。 标记名称和值的字典。
sku 此帐户的 SKU。 需要 sku ()
kind 获取或设置 Kind 属性。 “Gen1”
“Gen2”
标识 托管服务标识 (系统分配的标识和/或用户分配的标识) ManagedServiceIdentity
properties 映射帐户属性。 MapsAccountProperties

ManagedServiceIdentity

名称 说明 Value
type ) 允许 SystemAssigned 和 UserAssigned 类型的托管服务标识 (的类型。 “SystemAssigned”
“SystemAssigned,UserAssigned”
“UserAssigned” (必需)
identity_ids 与资源关联的用户分配标识集。 userAssignedIdentities 字典密钥将是采用以下格式的 ARM 资源 ID:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}。 字典值可以是请求中) ({} 空对象。 用户标识 ID 的数组。

MapsAccountProperties

名称 说明
cors 指定 Blob 服务的 CORS 规则。 最多可以在请求中包含五个 CorsRule 元素。 如果请求正文中不包含 CorsRule 元素,则将删除所有 CORS 规则,并且将为 Blob 服务禁用 CORS。 CorsRules
disableLocalAuth 允许Azure Policy上的切换功能禁用Azure Maps本地身份验证支持。 这将禁用任何用途的共享密钥和共享访问签名令牌身份验证。 bool
加密 (可选) 不建议包含在资源定义中。 仅在可能禁用平台 (AKA 基础结构) 加密时才需要。 Azure SQL TDE 就是一个示例。 值处于启用和禁用状态。 加密
linkedResources 与映射帐户关联的资源的数组。 数组中的链接资源无法单独更新,必须一起更新数组中的所有链接资源。 这些资源可用于Azure Maps REST API 上的操作。 访问由映射帐户托管标识控制, (对这些资源 () ) 权限。 LinkedResource[]

约束:
最大长度 = 10

CorsRules

名称 说明
corsRules CORS 规则的列表。 最多可以在请求中包含五个 CorsRule 元素。 CorsRule[]

约束:
最大长度 = 5

CorsRule

名称 说明
allowedOrigins 如果存在 CorsRule 元素,则为必需项。 允许通过 CORS 或“*”允许所有域的源域列表 string[] (必需)

Encryption

名称 说明
customerManagedKeyEncryption 资源的所有客户管理的密钥加密属性。 CustomerManagedKeyEncryption
infrastructureEncryption 值处于启用和禁用状态。 "disabled"
"enabled"

CustomerManagedKeyEncryption

名称 说明
keyEncryptionKeyIdentity 客户管理的密钥设置的所有标识配置,定义应使用哪个标识对密钥保管库进行身份验证。 CustomerManagedKeyEncryptionKeyIdentity
keyEncryptionKeyUrl 密钥加密密钥 URL,版本控制或非版本控制。 例如:https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78https://contosovault.vault.azure.net/keys/contosokek. 字符串

CustomerManagedKeyEncryptionKeyIdentity

名称 说明
delegatedIdentityClientId 用于访问密钥加密密钥 URL 的委托标识。 例如:/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/{资源组}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId。 与 identityType systemAssignedIdentity 和 userAssignedIdentity 互斥 - 仅限内部使用。 字符串

约束:
最小长度 = 36
最大长度 = 36
Pattern = “^[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 互斥。 字符串

LinkedResource

名称 说明 Value
id ARM 资源 ID 的格式为:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/accounts/{storageName}”。 字符串 (必需)
uniqueName 唯一标识链接资源的名称。 字符串 (必需)

SKU

名称 说明
name SKU 的名称,采用标准格式 (,例如 S0) 。 “G2”
“S0”
需要“S1” ()