From 80736cd2583ec43391a132874da6c5f89b766fc1 Mon Sep 17 00:00:00 2001 From: Sriram Kalyan Vuddagiri Date: Thu, 26 Sep 2019 17:20:24 -0700 Subject: [PATCH 1/5] Added modern subscription creation under billing profile and for CSP. --- .../examples/createCspSubscription.json | 24 +++ ...createSubscriptionUnderBillingProfile.json | 30 ++++ .../2018-11-01-preview/subscriptions.json | 168 +++++++++++++++++- 3 files changed, 221 insertions(+), 1 deletion(-) create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/examples/createCspSubscription.json create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/examples/createSubscriptionUnderBillingProfile.json diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/examples/createCspSubscription.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/examples/createCspSubscription.json new file mode 100644 index 000000000000..ac920ee7789e --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/examples/createCspSubscription.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "billingAccountName": "cd3ae1d5-9cb9-5950-9ffc-bc522547dbad:34756dd9-25b9-40c6-bc85-c25f68bff94f_2018-09-30", + "customerId": "8391c271-1a71-42e7-95d1-bfee184b6e16", + "api-version": "2018-11-01-preview", + "body": { + "displayName": "Contoso MCA subscription", + "skuId": "0001" + } + }, + "responses": { + "202": { + "headers": { + "Location": "/providers/Microsoft.Subscription/subscriptionOperations/aeb76128-ebde-4f5a-a9ed-e7bbf2dbc994?api-version=2018-11-01-preview", + "Retry-After": 8 + } + }, + "200": { + "body": { + "subscriptionLink": "/subscriptions/d0d6ee57-6530-4fca-93a6-b755a070be35" + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/examples/createSubscriptionUnderBillingProfile.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/examples/createSubscriptionUnderBillingProfile.json new file mode 100644 index 000000000000..722f46a676ff --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/examples/createSubscriptionUnderBillingProfile.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "billingAccountName": "12a6eed9-5d39-4103-a5db-2db1db0a8c67", + "billingProfileName": "27VR-HDWX-BG7-TGB", + "invoiceSectionName": "b859d705-1ed7-4769-9d4b-19238e9e8ac2_10_31", + "api-version": "2018-11-01-preview", + "body": { + "displayName": "Contoso MCA subscription", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/12a6eed9-5d39-4103-a5db-2db1db0a8c67/billingProfiles/dbcb81c8-cda9-4b01-b9fc-831e6a2e152e", + "skuId": "0001", + "costCenter": "135366376", + "owner": { + "objectId": "973034ff-acb7-409c-b731-e789672c7b31" + } + } + }, + "responses": { + "202": { + "headers": { + "Location": "/providers/Microsoft.Subscription/subscriptionOperations/aeb76128-ebde-4f5a-a9ed-e7bbf2dbc994?api-version=2018-11-01-preview", + "Retry-After": 8 + } + }, + "200": { + "body": { + "subscriptionLink": "/subscriptions/d0d6ee57-6530-4fca-93a6-b755a070be35" + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/subscriptions.json index 46dc503a77f0..4757f2d68d60 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/subscriptions.json @@ -62,7 +62,7 @@ }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Subscription/createSubscription": { "post": { - "description": "The operation to create a new Azure subscription", + "description": "The operation to create a new WebDirect or EA Azure subscription.", "operationId": "SubscriptionFactory_CreateSubscription", "x-ms-examples": { "createSubscription": { @@ -126,6 +126,147 @@ } ] } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Subscription/createSubscription": { + "post": { + "description": "The operation to create a new WebDirect or EA Azure subscription (under billingProfiles).", + "operationId": "SubscriptionFactory_CreateSubscriptionUnderBillingProfile", + "x-ms-examples": { + "createSubscription": { + "$ref": "./examples/createSubscriptionUnderBillingProfile.json" + } + }, + "x-ms-long-running-operation": true, + "responses": { + "200": { + "description": "Normal response for a successful query. The response body will contain the data that matches the filters specified in the query parameters.", + "schema": { + "$ref": "#/definitions/SubscriptionCreationResult" + } + }, + "202": { + "description": "Accepted. Subscription creation is in progress.", + "headers": { + "Location": { + "description": "GET this URL to retrieve the status of the asynchronous operation.", + "type": "string" + }, + "Retry-After": { + "description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.", + "type": "integer" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "parameters": [ + { + "name": "billingAccountName", + "in": "path", + "description": "The name of the Microsoft Customer Agreement billing account for which you want to create the subscription.", + "required": true, + "type": "string" + }, + { + "name": "billingProfileName", + "in": "path", + "description": "The name of the billing profile in the billing account for which you want to create the subscription.", + "required": true, + "type": "string" + }, + { + "name": "invoiceSectionName", + "in": "path", + "description": "The name of the invoice section in the billing account for which you want to create the subscription.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "body", + "in": "body", + "description": "The subscription creation parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/ModernSubscriptionCreationParameters" + } + } + ] + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerId}/providers/Microsoft.Subscription/createSubscription": { + "post": { + "description": "The operation to create a new CSP subscription.", + "operationId": "SubscriptionFactory_CreateCspSubscription", + "x-ms-examples": { + "createSubscription": { + "$ref": "./examples/createCspSubscription.json" + } + }, + "x-ms-long-running-operation": true, + "responses": { + "200": { + "description": "Normal response for a successful query. The response body will contain the data that matches the filters specified in the query parameters.", + "schema": { + "$ref": "#/definitions/SubscriptionCreationResult" + } + }, + "202": { + "description": "Accepted. Subscription creation is in progress.", + "headers": { + "Location": { + "description": "GET this URL to retrieve the status of the asynchronous operation.", + "type": "string" + }, + "Retry-After": { + "description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.", + "type": "integer" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "parameters": [ + { + "name": "billingAccountName", + "in": "path", + "description": "The name of the Microsoft Customer Agreement billing account for which you want to create the subscription.", + "required": true, + "type": "string" + }, + { + "name": "customerId", + "in": "path", + "description": "Customer's invoice section id.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "body", + "in": "body", + "description": "The subscription creation parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/ModernCspSubscriptionCreationParameters" + } + } + ] + } } }, "definitions": { @@ -179,6 +320,31 @@ } } }, + "ModernCspSubscriptionCreationParameters": { + "description": "The parameters required to create a new CSP subscription.", + "required": [ + "displayName", + "skuId" + ], + "properties": { + "displayName": { + "description": "The friendly name of the subscription.", + "type": "string" + }, + "skuId": { + "description": "The SKU ID of the Azure plan. Azure plan determines the pricing and service-level agreement of the subscription. Use 001 for Microsoft Azure Plan and 002 for Microsoft Azure Plan for DevTest.", + "type": "string" + }, + "resellerId": { + "description": "Reseller ID, basically MPN Id.", + "type": "string" + }, + "serviceProviderId": { + "description": "Service provider ID, basically MPN Id.", + "type": "string" + } + } + }, "ErrorResponse": { "description": "Describes the format of Error response.", "type": "object", From 8db3fee2295a21b777d9850eced424c63de0a5c1 Mon Sep 17 00:00:00 2001 From: Sriram Kalyan Vuddagiri Date: Thu, 26 Sep 2019 17:39:20 -0700 Subject: [PATCH 2/5] SubscriptionFactory to Subscriptions. --- .../preview/2018-11-01-preview/subscriptions.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/subscriptions.json index 4757f2d68d60..4dae5c13f46c 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/subscriptions.json @@ -63,7 +63,7 @@ "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Subscription/createSubscription": { "post": { "description": "The operation to create a new WebDirect or EA Azure subscription.", - "operationId": "SubscriptionFactory_CreateSubscription", + "operationId": "Subscriptions_CreateSubscription", "x-ms-examples": { "createSubscription": { "$ref": "./examples/createSubscription.json" @@ -130,7 +130,7 @@ "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Subscription/createSubscription": { "post": { "description": "The operation to create a new WebDirect or EA Azure subscription (under billingProfiles).", - "operationId": "SubscriptionFactory_CreateSubscriptionUnderBillingProfile", + "operationId": "Subscriptions_CreateSubscriptionUnderBillingProfile", "x-ms-examples": { "createSubscription": { "$ref": "./examples/createSubscriptionUnderBillingProfile.json" @@ -204,7 +204,7 @@ "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerId}/providers/Microsoft.Subscription/createSubscription": { "post": { "description": "The operation to create a new CSP subscription.", - "operationId": "SubscriptionFactory_CreateCspSubscription", + "operationId": "Subscriptions_CreateCspSubscription", "x-ms-examples": { "createSubscription": { "$ref": "./examples/createCspSubscription.json" From 213865326654d1a2c5e0559a727ff7fb382bf641 Mon Sep 17 00:00:00 2001 From: Sriram Kalyan Vuddagiri Date: Fri, 27 Sep 2019 14:04:53 -0700 Subject: [PATCH 3/5] customerId to customerName. --- .../preview/2018-11-01-preview/subscriptions.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/subscriptions.json index 4dae5c13f46c..aca430f3f6c9 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/subscriptions.json @@ -201,7 +201,7 @@ ] } }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerId}/providers/Microsoft.Subscription/createSubscription": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/providers/Microsoft.Subscription/createSubscription": { "post": { "description": "The operation to create a new CSP subscription.", "operationId": "Subscriptions_CreateCspSubscription", @@ -247,9 +247,9 @@ "type": "string" }, { - "name": "customerId", + "name": "customerName", "in": "path", - "description": "Customer's invoice section id.", + "description": "The name of the customer.", "required": true, "type": "string" }, From c99b10866024980cae3fe36cb92f4488c4e3d443 Mon Sep 17 00:00:00 2001 From: Sriram Kalyan Vuddagiri Date: Fri, 27 Sep 2019 16:15:06 -0700 Subject: [PATCH 4/5] updated the CSP sub creation example. --- .../2018-11-01-preview/examples/createCspSubscription.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/examples/createCspSubscription.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/examples/createCspSubscription.json index ac920ee7789e..fce84d32970e 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/examples/createCspSubscription.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/examples/createCspSubscription.json @@ -1,7 +1,7 @@ { "parameters": { "billingAccountName": "cd3ae1d5-9cb9-5950-9ffc-bc522547dbad:34756dd9-25b9-40c6-bc85-c25f68bff94f_2018-09-30", - "customerId": "8391c271-1a71-42e7-95d1-bfee184b6e16", + "customerName": "0ec9a816-e305-4571-8963-32db796dc43d", "api-version": "2018-11-01-preview", "body": { "displayName": "Contoso MCA subscription", From 12cf92bb36d2c853720ea3480580c9ef415f9984 Mon Sep 17 00:00:00 2001 From: Sriram Kalyan Vuddagiri Date: Mon, 30 Sep 2019 14:54:34 -0700 Subject: [PATCH 5/5] Corrected the createSubscriptionUnderBillingProfile example with correct profile name. --- .../examples/createSubscriptionUnderBillingProfile.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/examples/createSubscriptionUnderBillingProfile.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/examples/createSubscriptionUnderBillingProfile.json index 722f46a676ff..bb5f3b9ee6b3 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/examples/createSubscriptionUnderBillingProfile.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/examples/createSubscriptionUnderBillingProfile.json @@ -6,7 +6,7 @@ "api-version": "2018-11-01-preview", "body": { "displayName": "Contoso MCA subscription", - "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/12a6eed9-5d39-4103-a5db-2db1db0a8c67/billingProfiles/dbcb81c8-cda9-4b01-b9fc-831e6a2e152e", + "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/12a6eed9-5d39-4103-a5db-2db1db0a8c67/billingProfiles/27VR-HDWX-BG7-TGB", "skuId": "0001", "costCenter": "135366376", "owner": {