Alias - Create

建立別名訂閱。

PUT https://management.azure.com/providers/Microsoft.Subscription/aliases/{aliasName}?api-version=2021-10-01

URI 參數

名稱 位於 必要 類型 Description
aliasName
path True

string

AliasName 是訂用帳戶建立要求的名稱。 請注意,這與訂用帳戶名稱不同,而且在建立訂用帳戶的要求之外,沒有任何其他生命週期需求。

api-version
query True

string

要與用戶端要求搭配使用的 API 版本。 目前版本為 2021-10-01

要求本文

名稱 類型 Description
properties

PutAliasRequestProperties

放置別名要求屬性。

回應

名稱 類型 Description
200 OK

SubscriptionAliasResponse

成功查詢的正常回應。

201 Created

SubscriptionAliasResponse

已接受。 訂用帳戶建立正在進行中。

Other Status Codes

ErrorResponseBody

描述作業失敗原因的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

CreateAlias

Sample Request

PUT https://management.azure.com/providers/Microsoft.Subscription/aliases/aliasForNewSub?api-version=2021-10-01

{
  "properties": {
    "displayName": "Test Subscription",
    "workload": "Production",
    "billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH",
    "subscriptionId": null,
    "additionalProperties": {
      "managementGroupId": null,
      "subscriptionTenantId": "66f6e4d6-07dc-4aea-94ea-e12d3026a3c8",
      "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c",
      "tags": {
        "tag1": "Messi",
        "tag2": "Ronaldo",
        "tag3": "Lebron"
      }
    }
  }
}

Sample Response

{
  "id": "string",
  "name": "string",
  "type": "string",
  "properties": {
    "subscriptionId": "e2283d0f-acad-4904-b803-627dd74cc072",
    "displayName": "Test Subscription",
    "provisioningState": "Accepted",
    "acceptOwnershipUrl": "/providers/Microsoft.Subscription/e2283d0f-acad-4904-b803-627dd74cc072/acceptOwnership",
    "acceptOwnershipState": "Pending",
    "billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH",
    "workload": "Production",
    "resellerId": null,
    "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c",
    "managementGroupId": null,
    "tags": {
      "tag1": "Messi",
      "tag2": "Ronaldo",
      "tag3": "Lebron"
    }
  }
}
{
  "id": "string",
  "name": "string",
  "type": "string",
  "properties": {
    "subscriptionId": "e2283d0f-acad-4904-b803-627dd74cc072",
    "displayName": "Test Subscription",
    "provisioningState": "Accepted",
    "acceptOwnershipUrl": "/providers/Microsoft.Subscription/e2283d0f-acad-4904-b803-627dd74cc072/acceptOwnership",
    "acceptOwnershipState": "Pending",
    "billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH",
    "workload": "Production",
    "resellerId": null,
    "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c",
    "managementGroupId": null,
    "tags": {
      "tag1": "Messi",
      "tag2": "Ronaldo",
      "tag3": "Lebron"
    }
  }
}

定義

名稱 Description
AcceptOwnership

接受資源的擁有權狀態。

createdByType

建立資源的身分識別類型。

ErrorResponse

描述錯誤回應的格式。

ErrorResponseBody

錯誤回應表示服務無法處理傳入要求。 錯誤訊息中提供了原因。

ProvisioningState

資源的布建狀態。

PutAliasRequest

建立新訂閱所需的參數。

PutAliasRequestAdditionalProperties

放置訂用帳戶其他屬性。

PutAliasRequestProperties

放置訂用帳戶屬性。

SubscriptionAliasResponse

具有別名的訂用帳戶資訊。

SubscriptionAliasResponseProperties

放置訂用帳戶建立結果屬性。

systemData

與建立和上次修改資源相關的元數據。

workload

訂用帳戶的工作負載類型。 它可以是 Production 或 DevTest。

AcceptOwnership

接受資源的擁有權狀態。

名稱 類型 Description
Completed

string

Expired

string

Pending

string

createdByType

建立資源的身分識別類型。

名稱 類型 Description
Application

string

Key

string

ManagedIdentity

string

User

string

ErrorResponse

描述錯誤回應的格式。

名稱 類型 Description
code

string

錯誤碼

message

string

指出作業失敗原因的錯誤訊息。

ErrorResponseBody

錯誤回應表示服務無法處理傳入要求。 錯誤訊息中提供了原因。

名稱 類型 Description
code

string

錯誤碼

error

ErrorResponse

錯誤的詳細數據。

message

string

指出作業失敗原因的錯誤訊息。

ProvisioningState

資源的布建狀態。

名稱 類型 Description
Accepted

string

Pending

string

Succeeded

string

PutAliasRequest

建立新訂閱所需的參數。

名稱 類型 Description
properties

PutAliasRequestProperties

放置別名要求屬性。

PutAliasRequestAdditionalProperties

放置訂用帳戶其他屬性。

名稱 類型 Description
managementGroupId

string

訂用帳戶的管理群組標識碼。

subscriptionOwnerId

string

訂用帳戶的擁有者標識碼

subscriptionTenantId

string

訂用帳戶的租用戶標識碼

tags

object

訂用帳戶的標記

PutAliasRequestProperties

放置訂用帳戶屬性。

名稱 類型 Description
additionalProperties

PutAliasRequestAdditionalProperties

放置別名要求其他屬性。

billingScope

string

訂用帳戶的計費範圍。 針對 CustomerLed 和 FieldLed - /billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSectionName} For PartnerLed - /billingAccounts/{billingAccountName}/customers/{customerName} For Legacy EA - /billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}

displayName

string

訂閱的易記名稱。

resellerId

string

轉銷商標識碼

subscriptionId

string

此參數可用來建立現有訂用帳戶標識碼的別名

workload

workload

訂用帳戶的工作負載類型。 它可以是 Production 或 DevTest。

SubscriptionAliasResponse

具有別名的訂用帳戶資訊。

名稱 類型 Description
id

string

別名資源的完整標識碼。

name

string

別名標識碼。

properties

SubscriptionAliasResponseProperties

訂用帳戶別名響應屬性。

systemData

systemData

與建立和上次修改資源相關的元數據。

type

string

資源類型,Microsoft.Subscription/aliases。

SubscriptionAliasResponseProperties

放置訂用帳戶建立結果屬性。

名稱 類型 Description
acceptOwnershipState

AcceptOwnership

接受資源的擁有權狀態。

acceptOwnershipUrl

string

接受訂用帳戶擁有權的 URL。

billingScope

string

訂用帳戶的計費範圍。 針對 CustomerLed 和 FieldLed - /billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSectionName} For PartnerLed - /billingAccounts/{billingAccountName}/customers/{customerName} For Legacy EA - /billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}

createdTime

string

建立時間

displayName

string

訂用帳戶的顯示名稱。

managementGroupId

string

管理群組標識碼。

provisioningState

ProvisioningState

資源的布建狀態。

resellerId

string

轉銷商標識碼

subscriptionId

string

新建立的訂用帳戶標識碼。

subscriptionOwnerId

string

訂用帳戶的擁有者標識碼

tags

object

訂用帳戶的標記

workload

workload

訂用帳戶的工作負載類型。 它可以是 Production 或 DevTest。

systemData

與建立和上次修改資源相關的元數據。

名稱 類型 Description
createdAt

string

資源建立的時間戳 (UTC) 。

createdBy

string

建立資源的身分識別。

createdByType

createdByType

建立資源的身分識別類型。

lastModifiedAt

string

上次修改的資源時間戳 (UTC)

lastModifiedBy

string

上次修改資源的身分識別。

lastModifiedByType

createdByType

上次修改資源的身分識別類型。

workload

訂用帳戶的工作負載類型。 它可以是 Production 或 DevTest。

名稱 類型 Description
DevTest

string

Production

string