From 5d3784a8f7565285f6ac02df64446356988d73ca Mon Sep 17 00:00:00 2001 From: Santosh Sinha Date: Mon, 14 Jan 2019 18:34:39 -0800 Subject: [PATCH 01/13] added swagger for Tenant Properties added swagger for Tenant Properties --- .../preview/2018-03-01-preview/billing.json | 63 ++++++++++++++++++- .../examples/TenantPropertiesGet.json | 15 +++++ 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/TenantPropertiesGet.json diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json index 74de6d615fa9..18a7c1ee8a35 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json @@ -200,6 +200,47 @@ } } }, + "/providers/Microsoft.Billing/DiscoverTenants?billingProfileId={billingProfileId}": { + "get": { + "tags": [ + "TenantProperties" + ], + "x-ms-examples": { + "TenantPropertiesGet": { + "$ref": "./examples/TenantPropertiesGet.json" + } + }, + "operationId": "TenantProperties_Get", + "description": "Gets a Tenant Properties.", + "parameters": [ + { + "name": "billingProfileId", + "in": "path", + "description": "Billing Profile Id.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/TenantProperties" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices": { "get": { "tags": [ @@ -402,7 +443,7 @@ "$ref": "#/definitions/EnrollmentAccountProperties" } } - }, + }, "EnrollmentAccountListResult": { "description": "Result of listing enrollment accounts.", "properties": { @@ -431,6 +472,26 @@ } } }, + "TenantProperties": { + "description": "A Tenant properties Resource", + "properties": { + "BillingProfileName": { + "description": "The Billing Profile name.", + "type": "string", + "readOnly": true + }, + "BillingAccountId": { + "description": "The Billing AccountId.", + "type": "string", + "readOnly": true + }, + "TenantId": { + "description": "The TenantId.", + "type": "string", + "readOnly": true + } + } + }, "BillingPeriod": { "description": "A billing period resource.", "type": "object", diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/TenantPropertiesGet.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/TenantPropertiesGet.json new file mode 100644 index 000000000000..53d4d8b10378 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/TenantPropertiesGet.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2018-03-01-preview", + "billingProfileId": "f47d2fec-3db5-4758-8717-4ff7b1641c13" + }, + "responses": { + "200": { + "body": { + "BillingProfileName": "PayByCheck01", + "BillingAccountId": "9984934b-0494-53de-0fcd-83828e47dbc6", + "TenantId": "251d3d06-c6e0-487b-bd5e-5c2e4c23d51a" + } + } + } + } \ No newline at end of file From 38018ada2fbdb533b666c645bb565740eeb48751 Mon Sep 17 00:00:00 2001 From: Santosh Sinha Date: Tue, 15 Jan 2019 10:20:14 -0800 Subject: [PATCH 02/13] Fixed camel casing in billing.json file Fixed camel casing in billing.json file --- .../preview/2018-03-01-preview/billing.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json index 18a7c1ee8a35..ca8fcaf3481c 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json @@ -475,17 +475,17 @@ "TenantProperties": { "description": "A Tenant properties Resource", "properties": { - "BillingProfileName": { + "billingProfileName": { "description": "The Billing Profile name.", "type": "string", "readOnly": true }, - "BillingAccountId": { + "billingAccountId": { "description": "The Billing AccountId.", "type": "string", "readOnly": true }, - "TenantId": { + "tenantId": { "description": "The TenantId.", "type": "string", "readOnly": true From c81e2130e29fae03a78cb1bfec7529ea6510ae1e Mon Sep 17 00:00:00 2001 From: Santosh Sinha Date: Tue, 15 Jan 2019 10:37:28 -0800 Subject: [PATCH 03/13] Update billing.json --- .../Microsoft.Billing/preview/2018-03-01-preview/billing.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json index ca8fcaf3481c..885e5c912d33 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json @@ -200,10 +200,10 @@ } } }, - "/providers/Microsoft.Billing/DiscoverTenants?billingProfileId={billingProfileId}": { + "/providers/Microsoft.Billing/discoverTenants?billingProfileId={billingProfileId}": { "get": { "tags": [ - "TenantProperties" + "discoverTenants" ], "x-ms-examples": { "TenantPropertiesGet": { From 33d848a6a3264cac98a5928547541bda1dd69189 Mon Sep 17 00:00:00 2001 From: Santosh Sinha Date: Tue, 15 Jan 2019 11:47:45 -0800 Subject: [PATCH 04/13] changes in DiscoverTenants contracts changes in DiscoverTenants contracts --- .../preview/2018-03-01-preview/billing.json | 8 ++++---- .../{TenantPropertiesGet.json => DiscoverTenantsGet.json} | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) rename specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/{TenantPropertiesGet.json => DiscoverTenantsGet.json} (56%) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json index 885e5c912d33..4ee06b488eb0 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json @@ -207,10 +207,10 @@ ], "x-ms-examples": { "TenantPropertiesGet": { - "$ref": "./examples/TenantPropertiesGet.json" + "$ref": "./examples/DiscoverTenantsGet.json" } }, - "operationId": "TenantProperties_Get", + "operationId": "DiscoverTenants_Get", "description": "Gets a Tenant Properties.", "parameters": [ { @@ -228,7 +228,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/TenantProperties" + "$ref": "#/definitions/DiscoverTenants" } }, "default": { @@ -472,7 +472,7 @@ } } }, - "TenantProperties": { + "DiscoverTenants": { "description": "A Tenant properties Resource", "properties": { "billingProfileName": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/TenantPropertiesGet.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/DiscoverTenantsGet.json similarity index 56% rename from specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/TenantPropertiesGet.json rename to specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/DiscoverTenantsGet.json index 53d4d8b10378..9a764585f2ef 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/TenantPropertiesGet.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/DiscoverTenantsGet.json @@ -6,9 +6,9 @@ "responses": { "200": { "body": { - "BillingProfileName": "PayByCheck01", - "BillingAccountId": "9984934b-0494-53de-0fcd-83828e47dbc6", - "TenantId": "251d3d06-c6e0-487b-bd5e-5c2e4c23d51a" + "billingProfileName": "PayByCheck01", + "billingAccountId": "9984934b-0494-53de-0fcd-83828e47dbc6", + "tenantId": "251d3d06-c6e0-487b-bd5e-5c2e4c23d51a" } } } From 5c877c217d22dc3e5ed70f1cfad6336804b2f6c6 Mon Sep 17 00:00:00 2001 From: Santosh Sinha Date: Tue, 15 Jan 2019 12:25:21 -0800 Subject: [PATCH 05/13] billing.Json trim blank space billing.Json trim blank space --- .../Microsoft.Billing/preview/2018-03-01-preview/billing.json | 3 +-- .../2018-03-01-preview/examples/DiscoverTenantsGet.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json index 4ee06b488eb0..98f75ffa2080 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json @@ -240,8 +240,7 @@ } } }, - - "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices": { "get": { "tags": [ "Invoices" diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/DiscoverTenantsGet.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/DiscoverTenantsGet.json index 9a764585f2ef..27153ffd39d5 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/DiscoverTenantsGet.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/DiscoverTenantsGet.json @@ -12,4 +12,4 @@ } } } - } \ No newline at end of file +} \ No newline at end of file From c736ede84bd2ff158b5a277be6d46b5df3ea90a4 Mon Sep 17 00:00:00 2001 From: Santosh Sinha Date: Tue, 15 Jan 2019 12:28:34 -0800 Subject: [PATCH 06/13] Update billing.json --- .../Microsoft.Billing/preview/2018-03-01-preview/billing.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json index 98f75ffa2080..26ba9a2a57bf 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json @@ -442,8 +442,8 @@ "$ref": "#/definitions/EnrollmentAccountProperties" } } - }, - "EnrollmentAccountListResult": { + }, + "EnrollmentAccountListResult": { "description": "Result of listing enrollment accounts.", "properties": { "value": { From 7a96d09e36921acec926a55ca8c1645a16207f37 Mon Sep 17 00:00:00 2001 From: Santosh Sinha Date: Tue, 15 Jan 2019 15:13:33 -0800 Subject: [PATCH 07/13] removal of plural name removal of plural name --- .../Microsoft.Billing/preview/2018-03-01-preview/billing.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json index 26ba9a2a57bf..610ade053355 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json @@ -228,7 +228,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/DiscoverTenants" + "$ref": "#/definitions/DiscoverTenant" } }, "default": { @@ -471,7 +471,7 @@ } } }, - "DiscoverTenants": { + "DiscoverTenant": { "description": "A Tenant properties Resource", "properties": { "billingProfileName": { From eab3b0f6d4d94e909316970d13c435393d424358 Mon Sep 17 00:00:00 2001 From: Santosh Sinha Date: Wed, 16 Jan 2019 16:01:41 -0800 Subject: [PATCH 08/13] Updating the route Updating the route as per suggestion --- .../Microsoft.Billing/preview/2018-03-01-preview/billing.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json index 610ade053355..91c7af85ed39 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json @@ -200,7 +200,7 @@ } } }, - "/providers/Microsoft.Billing/discoverTenants?billingProfileId={billingProfileId}": { + "/providers/Microsoft.Billing/billingProfiles/{billingProfileId}/discoverTenants": { "get": { "tags": [ "discoverTenants" From b6137f4ef99c9f7700520a1477018e28297f9232 Mon Sep 17 00:00:00 2001 From: Santosh Sinha Date: Thu, 17 Jan 2019 16:21:21 -0800 Subject: [PATCH 09/13] Moved Swagger for Discover Tenants from billing to consumption Moved Swagger for Discover Tenants from billing to consumption --- .../preview/2018-03-01-preview/billing.json | 62 +------------------ .../stable/2018-10-01/consumption.json | 60 ++++++++++++++++++ .../examples/DiscoverTenantsGet.json | 0 3 files changed, 61 insertions(+), 61 deletions(-) rename specification/{billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview => consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01}/examples/DiscoverTenantsGet.json (100%) diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json index 91c7af85ed39..d63470a7dc54 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json @@ -199,47 +199,7 @@ } } } - }, - "/providers/Microsoft.Billing/billingProfiles/{billingProfileId}/discoverTenants": { - "get": { - "tags": [ - "discoverTenants" - ], - "x-ms-examples": { - "TenantPropertiesGet": { - "$ref": "./examples/DiscoverTenantsGet.json" - } - }, - "operationId": "DiscoverTenants_Get", - "description": "Gets a Tenant Properties.", - "parameters": [ - { - "name": "billingProfileId", - "in": "path", - "description": "Billing Profile Id.", - "required": true, - "type": "string" - }, - { - "$ref": "#/parameters/apiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/DiscoverTenant" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, + }, "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices": { "get": { "tags": [ @@ -471,26 +431,6 @@ } } }, - "DiscoverTenant": { - "description": "A Tenant properties Resource", - "properties": { - "billingProfileName": { - "description": "The Billing Profile name.", - "type": "string", - "readOnly": true - }, - "billingAccountId": { - "description": "The Billing AccountId.", - "type": "string", - "readOnly": true - }, - "tenantId": { - "description": "The TenantId.", - "type": "string", - "readOnly": true - } - } - }, "BillingPeriod": { "description": "A billing period resource.", "type": "object", diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/consumption.json index d28a411e6930..f92a52fc368f 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/consumption.json @@ -2702,6 +2702,46 @@ } } }, + "/providers/Microsoft.Consumption/billingProfiles/{billingProfileId}/discoverTenants": { + "get": { + "tags": [ + "discoverTenants" + ], + "x-ms-examples": { + "TenantPropertiesGet": { + "$ref": "./examples/DiscoverTenantsGet.json" + } + }, + "operationId": "DiscoverTenants_Get", + "description": "Gets a Tenant Properties.", + "parameters": [ + { + "name": "billingProfileId", + "in": "path", + "description": "Billing Profile Id.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DiscoverTenant" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/marketplaces": { "get": { "tags": [ @@ -3088,6 +3128,26 @@ } } }, + "DiscoverTenant": { + "description": "A Tenant properties Resource", + "properties": { + "billingProfileName": { + "description": "The Billing Profile name.", + "type": "string", + "readOnly": true + }, + "billingAccountId": { + "description": "The Billing AccountId.", + "type": "string", + "readOnly": true + }, + "tenantId": { + "description": "The TenantId.", + "type": "string", + "readOnly": true + } + } + }, "MarketplacesListResult": { "description": "Result of listing marketplaces. It contains a list of available marketplaces in reverse chronological order by billing period.", "type": "object", diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/DiscoverTenantsGet.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/examples/DiscoverTenantsGet.json similarity index 100% rename from specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/DiscoverTenantsGet.json rename to specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/examples/DiscoverTenantsGet.json From 53fb8f8a711e344aa6445b4ee78e0f385d4dd513 Mon Sep 17 00:00:00 2001 From: Santosh Sinha Date: Tue, 22 Jan 2019 17:03:47 -0800 Subject: [PATCH 10/13] Change in Namespace followed by one additional parameter "billingAccountId" Change in Namespace followed by one additional parameter "billingAccountId" --- .../stable/2018-10-01/consumption.json | 9 ++++++++- .../stable/2018-10-01/examples/DiscoverTenantsGet.json | 7 ++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/consumption.json index f92a52fc368f..543cdf1174b7 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/consumption.json @@ -2702,7 +2702,7 @@ } } }, - "/providers/Microsoft.Consumption/billingProfiles/{billingProfileId}/discoverTenants": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/discoverTenants": { "get": { "tags": [ "discoverTenants" @@ -2715,6 +2715,13 @@ "operationId": "DiscoverTenants_Get", "description": "Gets a Tenant Properties.", "parameters": [ + { + "name": "billingAccountId", + "in": "path", + "description": "Billing Account Id.", + "required": true, + "type": "string" + }, { "name": "billingProfileId", "in": "path", diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/examples/DiscoverTenantsGet.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/examples/DiscoverTenantsGet.json index 27153ffd39d5..68e683de7c25 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/examples/DiscoverTenantsGet.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/examples/DiscoverTenantsGet.json @@ -1,13 +1,14 @@ { "parameters": { - "api-version": "2018-03-01-preview", - "billingProfileId": "f47d2fec-3db5-4758-8717-4ff7b1641c13" + "api-version": "2019-01-01", + "billingProfileId": "dd21e577-ec81-45ec-b08a-622213737978", + "billingAccountId": "0d49b9e9-dfe7-536e-ede4-bae1d63adbb7" }, "responses": { "200": { "body": { "billingProfileName": "PayByCheck01", - "billingAccountId": "9984934b-0494-53de-0fcd-83828e47dbc6", + "billingAccountName": "Create Customer", "tenantId": "251d3d06-c6e0-487b-bd5e-5c2e4c23d51a" } } From b4058158e72d1f4d1f12d312dfc1136731381151 Mon Sep 17 00:00:00 2001 From: Santosh Sinha Date: Wed, 23 Jan 2019 18:58:33 -0800 Subject: [PATCH 11/13] Change of method name from discoverTenants to tanants. Change of method name from discoverTenants to tanants. --- .../stable/2018-10-01/consumption.json | 69 +++++++++++++++---- ...iscoverTenantsGet.json => TenantsGet.json} | 5 +- 2 files changed, 57 insertions(+), 17 deletions(-) rename specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/examples/{DiscoverTenantsGet.json => TenantsGet.json} (61%) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/consumption.json index 543cdf1174b7..e297bf311bb2 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/consumption.json @@ -2702,20 +2702,20 @@ } } }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/discoverTenants": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/tenants": { "get": { "tags": [ - "discoverTenants" + "Tenants" ], "x-ms-examples": { "TenantPropertiesGet": { - "$ref": "./examples/DiscoverTenantsGet.json" + "$ref": "./examples/TenantsGet.json" } }, - "operationId": "DiscoverTenants_Get", + "operationId": "Tenants_Get", "description": "Gets a Tenant Properties.", "parameters": [ - { + { "name": "billingAccountId", "in": "path", "description": "Billing Account Id.", @@ -2737,7 +2737,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/DiscoverTenant" + "$ref": "#/definitions/TenantListResult" } }, "default": { @@ -3135,8 +3135,24 @@ } } }, - "DiscoverTenant": { - "description": "A Tenant properties Resource", + "Tenant": { + "description": "An tenant detail resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/TenantProperties", + "title": "Usage detail properties" + } + } + }, + "TenantProperties": { + "description": "The properties of the tenants.", "properties": { "billingProfileName": { "description": "The Billing Profile name.", @@ -3152,9 +3168,32 @@ "description": "The TenantId.", "type": "string", "readOnly": true + }, + "billingAccountName": { + "description": "The Billing Account Name.", + "type": "string", + "readOnly": true } } - }, + }, + "TenantListResult": { + "description": "A Tenant properties Resource", + "properties": { + "value": { + "description": "The list of tenant details.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Tenant" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, "MarketplacesListResult": { "description": "Result of listing marketplaces. It contains a list of available marketplaces in reverse chronological order by billing period.", "type": "object", @@ -4262,19 +4301,19 @@ "$ref": "#/definitions/ManagementGroupAggregatedCostResult" } }, - "includedSubscriptions": { + "includedSubscriptions": { "description": "List of subscription Guids included in the calculation of aggregated cost", - "type": "array", + "type": "array", "items": { "type": "string" - } + } }, - "excludedSubscriptions": { + "excludedSubscriptions": { "description": "List of subscription Guids excluded from the calculation of aggregated cost", - "type": "array", + "type": "array", "items": { "type": "string" - } + } } } }, diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/examples/DiscoverTenantsGet.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/examples/TenantsGet.json similarity index 61% rename from specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/examples/DiscoverTenantsGet.json rename to specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/examples/TenantsGet.json index 68e683de7c25..617ea07fbcf7 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/examples/DiscoverTenantsGet.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/examples/TenantsGet.json @@ -2,14 +2,15 @@ "parameters": { "api-version": "2019-01-01", "billingProfileId": "dd21e577-ec81-45ec-b08a-622213737978", - "billingAccountId": "0d49b9e9-dfe7-536e-ede4-bae1d63adbb7" + "billingAccountId": "0d49b9e9-dfe7-536e-ede4-bae1d63adbb7" }, "responses": { "200": { "body": { "billingProfileName": "PayByCheck01", "billingAccountName": "Create Customer", - "tenantId": "251d3d06-c6e0-487b-bd5e-5c2e4c23d51a" + "tenantId": "251d3d06-c6e0-487b-bd5e-5c2e4c23d51a", + "BillingAccountId": "0d49b9e9-dfe7-536e-ede4-bae1d63adbb7" } } } From 42f98d21553a31ef667486cbf47e1f881ef40f84 Mon Sep 17 00:00:00 2001 From: Santosh Sinha Date: Thu, 24 Jan 2019 09:20:12 -0800 Subject: [PATCH 12/13] changes ion response type changes ion response type --- .../2018-10-01/examples/TenantsGet.json | 35 ++++++++++++------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/examples/TenantsGet.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/examples/TenantsGet.json index 617ea07fbcf7..f6492e6430d8 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/examples/TenantsGet.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/examples/TenantsGet.json @@ -1,17 +1,26 @@ { - "parameters": { - "api-version": "2019-01-01", - "billingProfileId": "dd21e577-ec81-45ec-b08a-622213737978", - "billingAccountId": "0d49b9e9-dfe7-536e-ede4-bae1d63adbb7" - }, - "responses": { - "200": { - "body": { - "billingProfileName": "PayByCheck01", - "billingAccountName": "Create Customer", - "tenantId": "251d3d06-c6e0-487b-bd5e-5c2e4c23d51a", - "BillingAccountId": "0d49b9e9-dfe7-536e-ede4-bae1d63adbb7" - } + "parameters": { + "api-version": "2019-01-01", + "billingProfileId": "dd21e577-ec81-45ec-b08a-622213737978", + "billingAccountId": "0d49b9e9-dfe7-536e-ede4-bae1d63adbb7" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/billingAccounts/0d49b9e9-dfe7-536e-ede4-bae1d63adbb7/billingProfiles/dd21e577-ec81-45ec-b08a-622213737978/providers/Microsoft.Consumption/tenants", + "name": "tenant1", + "type": "Microsoft.Consumption/tenants", + "properties": { + "billingProfileName": "PayByCheck01", + "billingAccountName": "Create Customer", + "tenantId": "251d3d06-c6e0-487b-bd5e-5c2e4c23d51a", + "BillingAccountId": "0d49b9e9-dfe7-536e-ede4-bae1d63adbb7" + } + } + ] } } + } } \ No newline at end of file From 0d55ad65e0e0dff936abad229d0d6477be61c3cc Mon Sep 17 00:00:00 2001 From: Santosh Sinha Date: Thu, 24 Jan 2019 17:58:57 -0800 Subject: [PATCH 13/13] added name after Id. Code review implementation added name after Id. Code review implementation --- .../stable/2018-10-01/examples/TenantsGet.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/examples/TenantsGet.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/examples/TenantsGet.json index f6492e6430d8..2ebd7260dbf6 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/examples/TenantsGet.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-10-01/examples/TenantsGet.json @@ -9,14 +9,14 @@ "body": { "value": [ { - "id": "/billingAccounts/0d49b9e9-dfe7-536e-ede4-bae1d63adbb7/billingProfiles/dd21e577-ec81-45ec-b08a-622213737978/providers/Microsoft.Consumption/tenants", + "id": "/billingAccounts/0d49b9e9-dfe7-536e-ede4-bae1d63adbb7/billingProfiles/dd21e577-ec81-45ec-b08a-622213737978/providers/Microsoft.Consumption/tenants/tenant1", "name": "tenant1", - "type": "Microsoft.Consumption/tenants", + "type": "Microsoft.Consumption/tenants", "properties": { - "billingProfileName": "PayByCheck01", - "billingAccountName": "Create Customer", - "tenantId": "251d3d06-c6e0-487b-bd5e-5c2e4c23d51a", - "BillingAccountId": "0d49b9e9-dfe7-536e-ede4-bae1d63adbb7" + "billingProfileName": "PayByCheck01", + "billingAccountName": "Create Customer", + "tenantId": "251d3d06-c6e0-487b-bd5e-5c2e4c23d51a", + "BillingAccountId": "0d49b9e9-dfe7-536e-ede4-bae1d63adbb7" } } ]