Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parameters": {
"aliasName": "aliasForNewSub",
"api-version": "2019-10-01-preview",
"body": {
"properties": {
"displayName": "Contoso MCA subscription",
"billingScope": "/providers/Microsoft.Billing/billingAccounts/e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31/billingProfiles/PE2Q-NOIT-BG7-TGB/invoiceSections/MTT4-OBS7-PJA-TGB",
"workloadType": "Production"
}
}
},
"responses": {
"200": {
"body": {
"id": "/providers/Microsoft.Subscription/aliases/aliasForNewSub",
"name": "aliasForNewSub",
"type": "Microsoft.Subscription/aliases",
"properties": {
"subscriptionId": "subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05"
}
}
},
"201": {
"body": {
"id": "/providers/Microsoft.Subscription/aliases/aliasForNewSub",
"name": "aliasForNewSub",
"type": "Microsoft.Subscription/aliases",
"properties": {
"subscriptionId": "subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"parameters": {
"aliasName": "aliasForNewSub",
"api-version": "2019-10-01-preview"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"parameters": {
"aliasName": "aliasForNewSub",
"api-version": "2019-10-01-preview"
},
"responses": {
"200": {
"body": {
"id": "/providers/Microsoft.Subscription/aliases/aliasForNewSub",
"name": "aliasForNewSub",
"type": "Microsoft.Subscription/aliases",
"properties": {
"subscriptionId": "subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"parameters": {
"api-version": "2019-10-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/providers/Microsoft.Subscription/aliases/aliasForNewSub",
"name": "aliasForNewSub",
"type": "Microsoft.Subscription/aliases",
"properties": {
"subscriptionId": "subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05"
}
}
],
"nextLink": null
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,146 @@
}
]
}
},
"/providers/Microsoft.Subscription/aliases/{aliasName}": {
"put": {
"description": "Create Alias Subscription.",
"operationId": "Subscription_CreateAlias",
"x-ms-examples": {
"CreateAlias": {
"$ref": "./examples/createAlias.json"
}
},
"x-ms-long-running-operation": true,
"responses": {
"200": {
"description": "Normal response for a successful query.",
"schema": {
"$ref": "#/definitions/PutAliasResponse"
}
},
"201": {
"description": "Accepted. Subscription creation is in progress.",
"schema": {
"$ref": "#/definitions/PutAliasResponse"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
}
},
"parameters": [
{
"$ref": "#/parameters/aliasNameParameter"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PutAliasRequest"
}
},
{
"$ref": "#/parameters/apiVersionParameter"
}
]
},
"get": {
"description": "Get Alias Subscription.",
"operationId": "Subscription_GetAlias",
"x-ms-examples": {
"GetAlias": {
"$ref": "./examples/getAlias.json"
}
},
"responses": {
"200": {
"description": "Subscription details.",
"schema": {
"$ref": "#/definitions/PutAliasResponse"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
}
},
"parameters": [
{
"$ref": "#/parameters/aliasNameParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
]
},
"delete": {
"description": "Delete Alias.",
"operationId": "Subscription_DeleteAlias",
"x-ms-examples": {
"DeleteAlias": {
"$ref": "./examples/deleteAlias.json"
}
},
"responses": {
"200": {
"description": "Deleted the alias"
},
"204": {
"description": "Alias does not exist"
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
}
},
"parameters": [
{
"$ref": "#/parameters/aliasNameParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
]
}
},
"/providers/Microsoft.Subscription/aliases": {
"get": {
"description": "Get Alias Subscription.",
"operationId": "Subscription_ListAlias",
"x-ms-examples": {
"GetAlias": {
"$ref": "./examples/listAlias.json"
}
},
"responses": {
"200": {
"description": "Subscription details.",
"schema": {
"$ref": "#/definitions/PutAliasListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
}
},
"parameters": [
{
"$ref": "#/parameters/apiVersionParameter"
}
]
}
}
},
"definitions": {
Expand All @@ -409,6 +549,16 @@
}
}
},
"ErrorResponseBody": {
"description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.",
"type": "object",
"properties": {
"error": {
"description": "The details of the error.",
"$ref": "#/definitions/ErrorResponse"
}
}
},
"CanceledSubscriptionId": {
"description": "The ID of the canceled subscription",
"properties": {
Expand Down Expand Up @@ -608,6 +758,116 @@
"type": "string"
}
}
},
"PutAliasRequest": {
"description": "The parameters required to create a new subscription.",
"type": "object",
"properties": {
"properties": {
"$ref": "#/definitions/PutAliasRequestProperties",
"description": "Put alias request properties."
}
}
},
"PutAliasRequestProperties": {
"description": "Put subscription properties.",
"required": [
"displayName",
"workloadType",
"billingScope"
],
"properties": {
"displayName": {
"description": "The friendly name of the subscription.",
"type": "string"
},
"workloadType": {
"description": "The workload type of the subscription. It can be either Production or DevTest.",
"type": "string",
"x-ms-enum": {
"name": "workloadType",
"modelAsString": true
},
"enum": [
"Production",
"DevTest"
]
},
"billingScope": {
"description": "Determines whether subscription is fieldLed, partnerLed or LegacyEA",
"type": "string"
},
"subscriptionId": {
"description": "This parameter can be used to create alias for existing subscription Id",
"type": "string"
}
}
},
"PutAliasResponse": {
"description": "Subscription Information with the alias.",
"properties": {
"id": {
"description": "Fully qualified ID for the alias resource.",
"readOnly": true,
"type": "string"
},
"name": {
"description": "Alias ID.",
"readOnly": true,
"type": "string"
},
"type": {
"description": "Resource type, Microsoft.Subscription/aliases.",
"readOnly": true,
"type": "string"
},
"properties": {
"$ref": "#/definitions/PutAliasResponseProperties",
"description": "Put Alias response properties."
}
},
"x-ms-azure-resource": true
},
"PutAliasResponseProperties": {
"description": "Put subscription creation result properties.",
"properties": {
"subscriptionId": {
"description": "Newly created subscription Id.",
"readOnly": true,
"type": "string"
},
"provisioningState": {
"type": "string",
"description": "The provisioning state of the resource.",
"enum": [
"Accepted",
"Succeeded",
"Failed"
],
"x-ms-enum": {
"name": "ProvisioningState",
"modelAsString": true
}
}
}
},
"PutAliasListResult": {
"description": "The list of aliases.",
"properties": {
"value": {
"description": "The list of alias.",
"type": "array",
"readOnly": true,
"items": {
"$ref": "#/definitions/PutAliasResponse"
}
},
"nextLink": {
"description": "The link (url) to the next page of results.",
"type": "string",
"readOnly": true
}
}
}
},
"parameters": {
Expand Down Expand Up @@ -635,6 +895,14 @@
"schema": {
"$ref": "#/definitions/SubscriptionName"
}
},
"aliasNameParameter": {
"name": "aliasName",
"x-ms-parameter-location": "method",
"in": "path",
"required": true,
"type": "string",
"description": "Alias Name"
}
},
"security": [
Expand Down