Skip to content

Commit

Permalink
[Ready to MERGE] Swagger for Tenant Properties API (#5038)
Browse files Browse the repository at this point in the history
* added swagger for Tenant Properties

added swagger for Tenant Properties

* Fixed camel casing in billing.json file

Fixed camel casing in billing.json file

* Update billing.json

* changes in DiscoverTenants contracts

changes in DiscoverTenants contracts

* billing.Json trim blank space

billing.Json trim blank space

* Update billing.json

* removal of plural name

removal of plural name

* Updating the route

Updating the route as per suggestion

* Moved Swagger for Discover Tenants from billing to consumption

Moved Swagger for Discover Tenants from billing to consumption

* Change in Namespace followed by one additional parameter "billingAccountId"

Change in Namespace followed by one additional parameter "billingAccountId"

* Change of method name from discoverTenants to tanants.

Change of method name from discoverTenants to tanants.

* changes ion response type

changes ion response type

* added name after Id. Code review implementation

added name after Id. Code review implementation
  • Loading branch information
santoshsinha100 authored and praries880 committed Feb 22, 2019
1 parent a9e7c4f commit a628a43
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices": {
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices": {
"get": {
"tags": [
"Invoices"
Expand Down Expand Up @@ -403,7 +403,7 @@
}
}
},
"EnrollmentAccountListResult": {
"EnrollmentAccountListResult": {
"description": "Result of listing enrollment accounts.",
"properties": {
"value": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2702,6 +2702,53 @@
}
}
},
"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/tenants": {
"get": {
"tags": [
"Tenants"
],
"x-ms-examples": {
"TenantPropertiesGet": {
"$ref": "./examples/TenantsGet.json"
}
},
"operationId": "Tenants_Get",
"description": "Gets a Tenant Properties.",
"parameters": [
{
"name": "billingAccountId",
"in": "path",
"description": "Billing Account Id.",
"required": true,
"type": "string"
},
{
"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/TenantListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/marketplaces": {
"get": {
"tags": [
Expand Down Expand Up @@ -3088,6 +3135,65 @@
}
}
},
"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.",
"type": "string",
"readOnly": true
},
"billingAccountId": {
"description": "The Billing AccountId.",
"type": "string",
"readOnly": true
},
"tenantId": {
"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",
Expand Down Expand Up @@ -4195,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"
}
}
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"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/tenant1",
"name": "tenant1",
"type": "Microsoft.Consumption/tenants",
"properties": {
"billingProfileName": "PayByCheck01",
"billingAccountName": "Create Customer",
"tenantId": "251d3d06-c6e0-487b-bd5e-5c2e4c23d51a",
"BillingAccountId": "0d49b9e9-dfe7-536e-ede4-bae1d63adbb7"
}
}
]
}
}
}
}

0 comments on commit a628a43

Please sign in to comment.