Alias - Create
Create Alias Subscription.
PUT https://management.azure.com/providers/Microsoft.Subscription/aliases/{aliasName}?api-version=2021-10-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
alias
|
path | True |
string |
AliasName is the name for the subscription creation request. Note that this is not the same as subscription name and this doesn’t have any other lifecycle need beyond the request for subscription creation. |
api-version
|
query | True |
string |
Version of the API to be used with the client request. Current version is 2021-10-01 |
Request Body
Name | Type | Description |
---|---|---|
properties |
Put alias request properties. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Normal response for a successful query. |
|
201 Created |
Accepted. Subscription creation is in progress. |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
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"
}
}
}
Definitions
Name | Description |
---|---|
Accept |
The accept ownership state of the resource. |
created |
The type of identity that created the resource. |
Error |
Describes the format of Error response. |
Error |
Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. |
Provisioning |
The provisioning state of the resource. |
Put |
The parameters required to create a new subscription. |
Put |
Put subscription additional properties. |
Put |
Put subscription properties. |
Subscription |
Subscription Information with the alias. |
Subscription |
Put subscription creation result properties. |
system |
Metadata pertaining to creation and last modification of the resource. |
workload |
The workload type of the subscription. It can be either Production or DevTest. |
AcceptOwnership
The accept ownership state of the resource.
Name | Type | Description |
---|---|---|
Completed |
string |
|
Expired |
string |
|
Pending |
string |
createdByType
The type of identity that created the resource.
Name | Type | Description |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
ErrorResponse
Describes the format of Error response.
Name | Type | Description |
---|---|---|
code |
string |
Error code |
message |
string |
Error message indicating why the operation failed. |
ErrorResponseBody
Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.
Name | Type | Description |
---|---|---|
code |
string |
Error code |
error |
The details of the error. |
|
message |
string |
Error message indicating why the operation failed. |
ProvisioningState
The provisioning state of the resource.
Name | Type | Description |
---|---|---|
Accepted |
string |
|
Pending |
string |
|
Succeeded |
string |
PutAliasRequest
The parameters required to create a new subscription.
Name | Type | Description |
---|---|---|
properties |
Put alias request properties. |
PutAliasRequestAdditionalProperties
Put subscription additional properties.
Name | Type | Description |
---|---|---|
managementGroupId |
string |
Management group Id for the subscription. |
subscriptionOwnerId |
string |
Owner Id of the subscription |
subscriptionTenantId |
string |
Tenant Id of the subscription |
tags |
object |
Tags for the subscription |
PutAliasRequestProperties
Put subscription properties.
Name | Type | Description |
---|---|---|
additionalProperties |
Put alias request additional properties. |
|
billingScope |
string |
Billing scope of the subscription. For CustomerLed and FieldLed - /billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName} For PartnerLed - /billingAccounts/{billingAccountName}/customers/{customerName} For Legacy EA - /billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName} |
displayName |
string |
The friendly name of the subscription. |
resellerId |
string |
Reseller Id |
subscriptionId |
string |
This parameter can be used to create alias for existing subscription Id |
workload |
The workload type of the subscription. It can be either Production or DevTest. |
SubscriptionAliasResponse
Subscription Information with the alias.
Name | Type | Description |
---|---|---|
id |
string |
Fully qualified ID for the alias resource. |
name |
string |
Alias ID. |
properties |
Subscription Alias response properties. |
|
systemData |
Metadata pertaining to creation and last modification of the resource. |
|
type |
string |
Resource type, Microsoft.Subscription/aliases. |
SubscriptionAliasResponseProperties
Put subscription creation result properties.
Name | Type | Description |
---|---|---|
acceptOwnershipState |
The accept ownership state of the resource. |
|
acceptOwnershipUrl |
string |
Url to accept ownership of the subscription. |
billingScope |
string |
Billing scope of the subscription. For CustomerLed and FieldLed - /billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName} For PartnerLed - /billingAccounts/{billingAccountName}/customers/{customerName} For Legacy EA - /billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName} |
createdTime |
string |
Created Time |
displayName |
string |
The display name of the subscription. |
managementGroupId |
string |
The Management Group Id. |
provisioningState |
The provisioning state of the resource. |
|
resellerId |
string |
Reseller Id |
subscriptionId |
string |
Newly created subscription Id. |
subscriptionOwnerId |
string |
Owner Id of the subscription |
tags |
object |
Tags for the subscription |
workload |
The workload type of the subscription. It can be either Production or DevTest. |
systemData
Metadata pertaining to creation and last modification of the resource.
Name | Type | Description |
---|---|---|
createdAt |
string |
The timestamp of resource creation (UTC). |
createdBy |
string |
The identity that created the resource. |
createdByType |
The type of identity that created the resource. |
|
lastModifiedAt |
string |
The timestamp of resource last modification (UTC) |
lastModifiedBy |
string |
The identity that last modified the resource. |
lastModifiedByType |
The type of identity that last modified the resource. |
workload
The workload type of the subscription. It can be either Production or DevTest.
Name | Type | Description |
---|---|---|
DevTest |
string |
|
Production |
string |