Microsoft.Subscription 別名

Bicep 資源定義

別名資源類型是 擴充資源,這表示您可以將它套用至另一個資源。

scope使用此資源上的 屬性來設定此資源的範圍。 請參閱 在 Bicep 中設定擴充功能資源的範圍

您可以使用目標作業來部署別名資源類型:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.Subscription/aliases 資源,請將下列 Bicep 新增至您的範本。

resource symbolicname 'Microsoft.Subscription/aliases@2021-10-01' = {
  name: 'string'
  scope: tenant()
  properties: {
    additionalProperties: {
      managementGroupId: 'string'
      subscriptionOwnerId: 'string'
      subscriptionTenantId: 'string'
      tags: {}
    }
    billingScope: 'string'
    displayName: 'string'
    resellerId: 'string'
    subscriptionId: 'string'
    workload: 'string'
  }
}

屬性值

別名

名稱 描述
NAME 資源名稱 字串 (必要)
scope 在與部署範圍不同的範圍建立擴充資源時,請使用 。 針對 Bicep: tenant()
properties 放置別名要求屬性。 PutAliasRequestPropertiesOrSubscriptionAliasResponse...

PutAliasRequestPropertiesOrSubscriptionAliasResponse...

名稱 描述
additionalProperties 放置別名要求其他屬性。 PutAliasRequestAdditionalProperties
billingScope 訂用帳戶的計費範圍。
針對 CustomerLed 和 FieldLed - /billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
針對 PartnerLed - /billingAccounts/{billingAccountName}/customers/{customerName}
針對舊版 EA - /billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}
string
displayName 訂閱的易記名稱。 string
resellerId 轉銷商識別碼 string
subscriptionId 此參數可用來建立現有訂用帳戶識別碼的別名 string
workload 訂用帳戶的工作負載類型。 它可以是 Production 或 DevTest。 'DevTest'
'Production'

PutAliasRequestAdditionalProperties

名稱 描述
managementGroupId 訂用帳戶的管理群組識別碼。 string
subscriptionOwnerId 訂用帳戶的擁有者識別碼 string
subscriptionTenantId 訂用帳戶的租使用者識別碼 string
tags 訂用帳戶的標記 object

快速入門範本

下列快速入門範本會部署此資源類型。

[範本] 描述
在 EA 帳戶下建立訂用帳戶

部署至 Azure
此範本是管理群組範本,會透過別名建立訂用帳戶。 它只能用於Enterprise 合約計費模式。 官方檔會顯示其他類型的帳戶所需的修改。
建立訂用帳戶、resourceGroup 和 storageAccount

部署至 Azure
此範本是管理群組範本,將會在同一個範本中建立訂用帳戶、resourceGroup 和 storageAccount。 它只能用於Enterprise 合約計費模式。 官方檔會顯示其他類型的帳戶所需的修改。

ARM 範本資源定義

別名資源類型是 擴充資源,這表示您可以將它套用至另一個資源。

scope使用此資源上的 屬性來設定此資源的範圍。 請參閱 在 ARM 範本中設定擴充功能資源的範圍

您可以使用目標作業來部署別名資源類型:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.Subscription/aliases 資源,請將下列 JSON 新增至您的範本。

{
  "type": "Microsoft.Subscription/aliases",
  "apiVersion": "2021-10-01",
  "name": "string",
  "scope": "/",
  "properties": {
    "additionalProperties": {
      "managementGroupId": "string",
      "subscriptionOwnerId": "string",
      "subscriptionTenantId": "string",
      "tags": {}
    },
    "billingScope": "string",
    "displayName": "string",
    "resellerId": "string",
    "subscriptionId": "string",
    "workload": "string"
  }
}

屬性值

別名

名稱 描述
類型 資源類型 'Microsoft.Subscription/aliases'
apiVersion 資源 API 版本 '2021-10-01'
NAME 資源名稱 字串 (必要)
scope 在與部署範圍不同的範圍建立擴充資源時,請使用 。 針對 JSON: /
properties 放置別名要求屬性。 PutAliasRequestPropertiesOrSubscriptionAliasResponse...

PutAliasRequestPropertiesOrSubscriptionAliasResponse...

名稱 描述
additionalProperties 放置別名要求其他屬性。 PutAliasRequestAdditionalProperties
billingScope 訂用帳戶的計費範圍。
針對 CustomerLed 和 FieldLed - /billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
針對 PartnerLed - /billingAccounts/{billingAccountName}/customers/{customerName}
針對舊版 EA - /billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}
string
displayName 訂閱的易記名稱。 string
resellerId 轉銷商識別碼 string
subscriptionId 此參數可用來建立現有訂用帳戶識別碼的別名 string
workload 訂用帳戶的工作負載類型。 它可以是 Production 或 DevTest。 'DevTest'
'Production'

PutAliasRequestAdditionalProperties

名稱 描述
managementGroupId 訂用帳戶的管理群組識別碼。 string
subscriptionOwnerId 訂用帳戶的擁有者識別碼 string
subscriptionTenantId 訂用帳戶的租使用者識別碼 string
tags 訂用帳戶的標記 object

快速入門範本

下列快速入門範本會部署此資源類型。

[範本] 描述
在 EA 帳戶下建立訂用帳戶

部署至 Azure
此範本是管理群組範本,會透過別名建立訂用帳戶。 它只能用於Enterprise 合約計費模式。 官方檔會顯示其他類型的帳戶所需的修改。
建立訂用帳戶、resourceGroup 和 storageAccount

部署至 Azure
此範本是管理群組範本,將會在同一個範本中建立訂用帳戶、resourceGroup 和 storageAccount。 它只能用於Enterprise 合約計費模式。 官方檔會顯示其他類型的帳戶所需的修改。

Terraform (AzAPI 提供者) 資源定義

別名資源類型是 擴充資源,這表示您可以將它套用至另一個資源。

parent_id使用此資源上的 屬性來設定此資源的範圍。

您可以使用目標作業來部署別名資源類型:

  • 租用戶

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.Subscription/aliases 資源,請將下列 Terraform 新增至您的範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Subscription/aliases@2021-10-01"
  name = "string"
  parent_id = "string"
  body = jsonencode({
    properties = {
      additionalProperties = {
        managementGroupId = "string"
        subscriptionOwnerId = "string"
        subscriptionTenantId = "string"
        tags = {}
      }
      billingScope = "string"
      displayName = "string"
      resellerId = "string"
      subscriptionId = "string"
      workload = "string"
    }
  })
}

屬性值

別名

名稱 描述
類型 資源類型 「Microsoft.Subscription/aliases@2021-10-01」
NAME 資源名稱 字串 (必要)
parent_id 要套用此延伸模組資源的資源識別碼。 字串 (必要)
properties 放置別名要求屬性。 PutAliasRequestPropertiesOrSubscriptionAliasResponse...

PutAliasRequestPropertiesOrSubscriptionAliasResponse...

名稱 描述
additionalProperties 放置別名要求其他屬性。 PutAliasRequestAdditionalProperties
billingScope 訂用帳戶的計費範圍。
針對 CustomerLed 和 FieldLed - /billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
針對 PartnerLed - /billingAccounts/{billingAccountName}/customers/{customerName}
針對舊版 EA - /billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}
string
displayName 訂用帳戶的易記名稱。 string
resellerId 轉銷商識別碼 string
subscriptionId 此參數可用來建立現有訂用帳戶識別碼的別名 string
workload 訂用帳戶的工作負載類型。 它可以是 Production 或 DevTest。 「DevTest」
「生產」

PutAliasRequestAdditionalProperties

名稱 描述
managementGroupId 訂用帳戶的管理群組識別碼。 string
subscriptionOwnerId 訂用帳戶的擁有者識別碼 string
subscriptionTenantId 訂用帳戶的租使用者識別碼 string
tags 訂用帳戶的標籤 object