From 0f5512a3c534b877d238e57f41c9f0ef21a38119 Mon Sep 17 00:00:00 2001 From: Khalid Chaudhry Date: Tue, 5 Jun 2018 17:34:54 -0700 Subject: [PATCH 1/2] Added new api versions for PriceSheet and UsageDetail --- .../stable/2018-05-31/consumption.json | 1166 ++++++++++++++++- .../2018-05-31/examples/PriceSheet.json | 34 + .../2018-05-31/examples/PriceSheetExpand.json | 45 + .../examples/PriceSheetForBillingPeriod.json | 35 + .../examples/UsageDetailsExpand.json | 62 + .../2018-05-31/examples/UsageDetailsList.json | 42 + .../UsageDetailsListByBillingAccount.json | 44 + .../UsageDetailsListByDepartment.json | 44 + .../UsageDetailsListByEnrollmentAccount.json | 44 + .../examples/UsageDetailsListFilterByTag.json | 42 + .../UsageDetailsListForBillingPeriod.json | 43 + ...sListForBillingPeriodByBillingAccount.json | 43 + ...tailsListForBillingPeriodByDepartment.json | 43 + ...stForBillingPeriodByEnrollmentAccount.json | 43 + ...DetailsListForBillingPeriodGroupByTag.json | 44 + .../UsageDetailsListGroupByTagDate.json | 47 + 16 files changed, 1819 insertions(+), 2 deletions(-) create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/PriceSheet.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/PriceSheetExpand.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/PriceSheetForBillingPeriod.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsExpand.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsList.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListByBillingAccount.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListByDepartment.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListByEnrollmentAccount.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListFilterByTag.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListForBillingPeriod.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListForBillingPeriodByBillingAccount.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListForBillingPeriodByDepartment.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListForBillingPeriodByEnrollmentAccount.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListForBillingPeriodGroupByTag.json create mode 100644 specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListGroupByTagDate.json diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json index e09560e3bec9..a524a426a439 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json @@ -34,6 +34,832 @@ } }, "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/pricesheets/default": { + "get": { + "tags": [ + "PriceSheet" + ], + "operationId": "PriceSheet_Get", + "description": "Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or later.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "PriceSheet": { + "$ref": "./examples/PriceSheet.json" + } + }, + "parameters": [ + { + "name": "$expand", + "description": "May be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the top N results.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/PriceSheetResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/pricesheets/default": { + "get": { + "tags": [ + "PriceSheet" + ], + "operationId": "PriceSheet_GetByBillingPeriod", + "description": "Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only for May 1, 2014 or later.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "PriceSheetForBillingPeriod": { + "$ref": "./examples/PriceSheetForBillingPeriod.json" + }, + "PriceSheetExpand": { + "$ref": "./examples/PriceSheetExpand.json" + } + }, + "parameters": [ + { + "name": "$expand", + "description": "May be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the top N results.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingPeriodNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/PriceSheetResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/usageDetails": { + "get": { + "tags": [ + "UsageDetails" + ], + "operationId": "UsageDetails_List", + "description": "Lists the usage details for a scope by current billing period. Usage details are available via this API only for May 1, 2014 or later.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "UsageDetailsList": { + "$ref": "./examples/UsageDetailsList.json" + }, + "UsageDetailsListFilterByTag": { + "$ref": "./examples/UsageDetailsListFilterByTag.json" + }, + "UsageDetailsListGroupByTagDate": { + "$ref": "./examples/UsageDetailsListGroupByTagDate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$filter", + "description": "May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName, properties/instanceId or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N usageDetails.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + }, + { + "name": "$apply", + "description": "OData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart)", + "in": "query", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Apply" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/UsageDetailsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails": { + "get": { + "tags": [ + "UsageDetails" + ], + "operationId": "UsageDetails_ListByBillingPeriod", + "description": "Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "UsageDetailsListForBillingPeriod": { + "$ref": "./examples/UsageDetailsListForBillingPeriod.json" + }, + "UsageDetailsExpand": { + "$ref": "./examples/UsageDetailsExpand.json" + }, + "UsageDetailsListForBillingPeriodGroupByTag": { + "$ref": "./examples/UsageDetailsListForBillingPeriodGroupByTag.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/billingPeriodNameParameter" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$filter", + "description": "May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$apply", + "description": "OData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart) for specified billing period", + "in": "query", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Apply" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N usageDetails.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/UsageDetailsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/usageDetails": { + "get": { + "tags": [ + "UsageDetails" + ], + "operationId": "UsageDetailsByBillingAccount_List", + "description": "Lists the usage details by billingAccountId for a scope by current billing period. Usage details are available via this API only for May 1, 2014 or later.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "UsageDetailsList": { + "$ref": "./examples/UsageDetailsListByBillingAccount.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$filter", + "description": "May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName, properties/instanceId or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N usageDetails.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + }, + { + "name": "$apply", + "description": "OData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart)", + "in": "query", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Apply" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/UsageDetailsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails": { + "get": { + "tags": [ + "UsageDetails" + ], + "operationId": "UsageDetailsByBillingAccount_ListByBillingPeriod", + "description": "Lists the usage details based on billingAccountId for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "UsageDetailsListForBillingPeriod": { + "$ref": "./examples/UsageDetailsListForBillingPeriodByBillingAccount.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/billingPeriodNameParameter" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$filter", + "description": "May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$apply", + "description": "OData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart) for specified billing period", + "in": "query", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Apply" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N usageDetails.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/UsageDetailsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Consumption/usageDetails": { + "get": { + "tags": [ + "UsageDetails" + ], + "operationId": "UsageDetailsByDepartment_List", + "description": "Lists the usage details by departmentId for a scope by current billing period. Usage details are available via this API only for May 1, 2014 or later.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "UsageDetailsList": { + "$ref": "./examples/UsageDetailsListByDepartment.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/departmentIdParameter" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$filter", + "description": "May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName, properties/instanceId or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N usageDetails.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + }, + { + "name": "$apply", + "description": "OData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart)", + "in": "query", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Apply" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/UsageDetailsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails": { +"get": { + "tags": [ + "UsageDetails" + ], + "operationId": "UsageDetailsByDepartment_ListByBillingPeriod", + "description": "Lists the usage details based on departmentId for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "UsageDetailsListForBillingPeriod": { + "$ref": "./examples/UsageDetailsListForBillingPeriodByDepartment.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/departmentIdParameter" + }, + { + "$ref": "#/parameters/billingPeriodNameParameter" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$filter", + "description": "May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$apply", + "description": "OData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart) for specified billing period", + "in": "query", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Apply" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N usageDetails.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/UsageDetailsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Consumption/usageDetails": { + "get": { + "tags": [ + "UsageDetails" + ], + "operationId": "UsageDetailsByEnrollmentAccount_List", + "description": "Lists the usage details by enrollmentAccountId for a scope by current billing period. Usage details are available via this API only for May 1, 2014 or later.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "UsageDetailsList": { + "$ref": "./examples/UsageDetailsListByEnrollmentAccount.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/enrollmentAccountIdParameter" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$filter", + "description": "May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName, properties/instanceId or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N usageDetails.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + }, + { + "name": "$apply", + "description": "OData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart)", + "in": "query", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Apply" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/UsageDetailsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails": { +"get": { + "tags": [ + "UsageDetails" + ], + "operationId": "UsageDetailsByEnrollmentAccount_ListByBillingPeriod", + "description": "Lists the usage details based on enrollmentAccountId for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "UsageDetailsListForBillingPeriod": { + "$ref": "./examples/UsageDetailsListForBillingPeriodByEnrollmentAccount.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/enrollmentAccountIdParameter" + }, + { + "$ref": "#/parameters/billingPeriodNameParameter" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$filter", + "description": "May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$apply", + "description": "OData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart) for specified billing period", + "in": "query", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Apply" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N usageDetails.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/UsageDetailsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/forecasts": { "get": { "tags": [ @@ -177,7 +1003,7 @@ } } } - } + } }, "OperationListResult": { "description": "Result of listing consumption operations. It contains a list of operations and a URL link to get the next set of results.", @@ -226,7 +1052,93 @@ }, "x-ms-azure-resource": true }, - + "PriceSheetResult": { + "description": "An pricesheet resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/PriceSheetModel", + "title": "Price sheet properties" + } + } + }, + "PriceSheetModel": { + "description": "price sheet result. It contains the pricesheet associated with billing period", + "properties": { + "pricesheets": { + "description": "Price sheet", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/PriceSheetProperties" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "PriceSheetProperties": { + "description": "The properties of the price sheet.", + "properties": { + "billingPeriodId": { + "description": "The id of the billing period resource that the usage belongs to.", + "type": "string", + "readOnly": true + }, + "meterId": { + "description": "The meter id (GUID)", + "type": "string", + "format":"uuid", + "readOnly": true + }, + "meterDetails": { + "description": "The details about the meter. By default this is not populated, unless it's specified in $expand.", + "$ref": "#/definitions/MeterDetails", + "readOnly": true + }, + "unitOfMeasure": { + "description": "Unit of measure", + "type": "string", + "readOnly": true + }, + "includedQuantity": { + "description": "Included quality for an offer", + "type": "number", + "format": "decimal", + "readOnly": true + }, + "partNumber": { + "description": "Part Number", + "type": "string", + "readOnly": true + }, + "unitPrice": { + "description": "Unit Price", + "type": "number", + "format": "decimal", + "readOnly": true + }, + "currencyCode": { + "description": "Currency Code", + "type": "string", + "readOnly": true + }, + "offerId": { + "description": "Offer Id", + "type": "string", + "readOnly": true + } + } + }, "Forecast": { "description": "A forecast resource.", "type": "object", @@ -243,6 +1155,224 @@ } } }, + "MeterDetails": { + "description": "The properties of the meter detail.", + "properties": { + "meterName": { + "description": "The name of the meter, within the given meter category", + "type": "string", + "readOnly": true + }, + "meterCategory": { + "description": "The category of the meter, for example, 'Cloud services', 'Networking', etc..", + "type": "string", + "readOnly": true + }, + "meterSubCategory": { + "description": "The subcategory of the meter, for example, 'A6 Cloud services', 'ExpressRoute (IXP)', etc..", + "type": "string", + "readOnly": true + }, + "unit": { + "description": "The unit in which the meter consumption is charged, for example, 'Hours', 'GB', etc.", + "type": "string", + "readOnly": true + }, + "meterLocation": { + "description": "The location in which the Azure service is available.", + "type": "string", + "readOnly": true + }, + "totalIncludedQuantity": { + "description": "The total included quantity associated with the offer.", + "type": "number", + "format": "decimal", + "readOnly": true + }, + "pretaxStandardRate": { + "description": "The pretax listing price.", + "type": "number", + "format": "decimal", + "readOnly": true + } + } + }, + "UsageDetail": { + "description": "An usage detail resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/UsageDetailProperties", + "title": "Usage detail properties" + } + } + }, + "UsageDetailsListResult": { + "description": "Result of listing usage details. It contains a list of available usage details in reverse chronological order by billing period.", + "properties": { + "value": { + "description": "The list of usage details.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/UsageDetail" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "UsageDetailProperties": { + "description": "The properties of the usage detail.", + "properties": { + "billingPeriodId": { + "description": "The id of the billing period resource that the usage belongs to.", + "type": "string", + "readOnly": true + }, + "invoiceId": { + "description": "The id of the invoice resource that the usage belongs to.", + "type": "string", + "readOnly": true + }, + "usageStart": { + "description": "The start of the date time range covered by the usage detail.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "usageEnd": { + "description": "The end of the date time range covered by the usage detail.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "instanceName": { + "description": "The name of the resource instance that the usage is about.", + "type": "string", + "readOnly": true + }, + "instanceId": { + "description": "The uri of the resource instance that the usage is about.", + "type": "string", + "readOnly": true + }, + "instanceLocation": { + "description": "The location of the resource instance that the usage is about.", + "type": "string", + "readOnly": true + }, + "currency": { + "description": "The ISO currency in which the meter is charged, for example, USD.", + "type": "string", + "readOnly": true + }, + "usageQuantity": { + "description": "The quantity of usage.", + "type": "number", + "format": "decimal", + "readOnly": true + }, + "billableQuantity": { + "description": "The billable usage quantity.", + "type": "number", + "format": "decimal", + "readOnly": true + }, + "pretaxCost": { + "description": "The amount of cost before tax.", + "type": "number", + "format": "decimal", + "readOnly": true + }, + "isEstimated": { + "description": "The estimated usage is subject to change.", + "type": "boolean", + "readOnly": true + }, + "meterId": { + "description": "The meter id (GUID).", + "type": "string", + "format":"uuid", + "readOnly": true + }, + "meterDetails": { + "description": "The details about the meter. By default this is not populated, unless it's specified in $expand.", + "$ref": "#/definitions/MeterDetails", + "readOnly": true + }, + "subscriptionGuid": { + "description": "Subscription guid.", + "type": "string", + "format":"uuid", + "readOnly": true + }, + "subscriptionName": { + "description": "Subscription name.", + "type": "string", + "readOnly": true + }, + "accountName": { + "description": "Account name.", + "type": "string", + "readOnly": true + }, + "departmentName": { + "description": "Department name.", + "type": "string", + "readOnly": true + }, + "product": { + "description": "Product name.", + "type": "string", + "readOnly": true + }, + "consumedService": { + "description": "Consumed service name.", + "type": "string", + "readOnly": true + }, + "costCenter": { + "description": "The cost center of this department if it is a department and a costcenter exists", + "type": "string", + "readOnly": true + }, + "partNumber": { + "description": "Part Number", + "type": "string", + "readOnly": true + }, + "resourceGuid": { + "description": "Resource Guid", + "type": "string", + "readOnly": true + }, + "offerId": { + "description": "Offer Id", + "type": "string", + "readOnly": true + }, + "chargesBilledSeparately": { + "description": "Charges billed separately", + "type": "boolean", + "readOnly": true + }, + "additionalProperties": { + "description": "Additional details of this usage item. By default this is not populated, unless it's specified in $expand.", + "type": "string", + "readOnly": true + } + } + }, "ForecastsListResult": { "description": "Result of listing forecasts. It contains a list of available forecasts.", "type": "object", @@ -354,6 +1484,38 @@ "description": "Azure Subscription ID.", "required": true, "type": "string" + }, + "billingPeriodNameParameter": { + "name": "billingPeriodName", + "in": "path", + "description": "Billing Period Name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "billingAccountIdParameter": { + "name": "billingAccountId", + "in": "path", + "description": "BillingAccount ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "departmentIdParameter": { + "name": "departmentId", + "in": "path", + "description": "Department ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "enrollmentAccountIdParameter": { + "name": "enrollmentAccountId", + "in": "path", + "description": "EnrollmentAccount ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" } } } diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/PriceSheet.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/PriceSheet.json new file mode 100644 index 000000000000..c1169ac1284e --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/PriceSheet.json @@ -0,0 +1,34 @@ +{ + "parameters": + { + "api-version": "2018-05-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": + { + "200": + { + "body": + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/pricesheets/default", + "name": "default", + "type": "Microsoft.Consumption/pricesheets", + "properties": + { + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.consumption/pricesheets/default?api-version=2018-01-31&$skiptoken=AQAAAA%3D%3D", + "pricesheets": [ + { + "billingPeriodId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702", + "meterId": "00000000-0000-0000-0000-000000000000", + "unitOfMeasure": "100 Hours", + "includedQuantity": 100, + "partNumber": "XX-11110", + "unitPrice": 0.00328, + "currencyCode": "EUR", + "offerId":"OfferId 1" + }] + } + } + } + } +} diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/PriceSheetExpand.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/PriceSheetExpand.json new file mode 100644 index 000000000000..a563dc620c6e --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/PriceSheetExpand.json @@ -0,0 +1,45 @@ +{ + "parameters": + { + "api-version": "2018-05-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "billingPeriodName": "201801", + "$expand": "meterDetails" + }, + "responses": + { + "200": + { + "body": + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/pricesheets/default", + "name": "default", + "type": "Microsoft.Consumption/pricesheets", + "properties": + { + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.consumption/pricesheets/default?api-version=2018-01-31&$skiptoken=AQAAAA%3D%3D&$expand=properties/pricesheets/meterDetails", + "pricesheets": [ + { + "billingPeriodId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702", + "meterId": "00000000-0000-0000-0000-000000000000", + "unitOfMeasure": "100 Hours", + "includedQuantity": 100, + "partNumber": "XX-11110", + "unitPrice": 0.00328, + "currencyCode": "EUR", + "offerId":"OfferId 1", + "meterDetails": + { + "meterName": "Data Transfer Out (GB)", + "meterCategory": "Networking", + "unit": "GB", + "meterLocation": "Zone 2", + "totalIncludedQuantity": 0, + "pretaxStandardRate": 0.138 + } + }] + } + } + } + } +} diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/PriceSheetForBillingPeriod.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/PriceSheetForBillingPeriod.json new file mode 100644 index 000000000000..abd1243f2956 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/PriceSheetForBillingPeriod.json @@ -0,0 +1,35 @@ +{ + "parameters": + { + "api-version": "2018-05-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "billingPeriodName": "201801" + }, + "responses": + { + "200": + { + "body": + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/pricesheets/default", + "name": "default", + "type": "Microsoft.Consumption/pricesheets", + "properties": + { + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/microsoft.consumption/pricesheets/default?api-version=2018-01-31", + "pricesheets": [ + { + "billingPeriodId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702", + "meterId": "00000000-0000-0000-0000-000000000000", + "unitOfMeasure": "100 Hours", + "includedQuantity": 100, + "partNumber": "XX-11110", + "unitPrice": 0.00328, + "currencyCode": "EUR", + "offerId":"OfferId 1" + }] + } + } + } + } +} diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsExpand.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsExpand.json new file mode 100644 index 000000000000..de19342645e7 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsExpand.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "billingPeriodName": "201702", + "$expand": "meterDetails,additionalProperties", + "$filter": "properties/usageEnd ge '2018-01-14' AND properties/usageEnd le '2018-02-14' AND tags eq 'dev:tools'", + "$top": 1 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", + "name": "usageDetailsId1", + "type": "Microsoft.Consumption/usageDetails", + "tags": { + "env": "newcrp", + "dev": "tools" + }, + "properties": { + "billingPeriodId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702", + "invoiceId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/invoices/201703-123456789", + "usageStart": "2017-02-13T00:00:00Z", + "usageEnd": "2017-02-13T23:59:59Z", + "instanceName": "shared1", + "instanceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1", + "instanceLocation": "eastasia", + "currency": "USD", + "usageQuantity": 0.00328, + "billableQuantity": 0.00328, + "pretaxCost": 0.67, + "isEstimated": false, + "meterId": "00000000-0000-0000-0000-000000000000", + "meterDetails": { + "meterName": "Data Transfer Out (GB)", + "meterCategory": "Networking", + "unit": "GB", + "meterLocation": "Zone 2", + "totalIncludedQuantity": 0, + "pretaxStandardRate": 0.138 + }, + "subscriptionGuid": "00000000-0000-0000-0000-000000000000", + "subscriptionName": "Dummy subscription", + "accountName": "My account name", + "departmentName": "My department name", + "product": "My product name", + "consumedService": "My consumed service", + "costCenter": "Cost center 1", + "partNumber":"Part Number 1", + "resourceGuid":"00000000-0000-0000-0000-000000000000", + "offerId":"Offer Id 1", + "chargesBilledSeparately":true, + "additionalProperties": "{\"MyType\":\"\",\"ServiceType\":\"\",\"VMName\":\"\",\"UsageType\":\"MyUsage\"}" + } + } + ] + } + } + } +} diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsList.json new file mode 100644 index 000000000000..8b4dd7f52d04 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsList.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", + "name": "usageDetailsId1", + "type": "Microsoft.Consumption/usageDetails", + "tags": { + "env": "newcrp", + "dev": "tools" + }, + "properties": { + "billingPeriodId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702", + "invoiceId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/invoices/201703-123456789", + "usageStart": "2017-02-13T00:00:00Z", + "usageEnd": "2017-02-13T23:59:59Z", + "instanceName": "shared1", + "instanceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1", + "instanceLocation": "eastasia", + "currency": "USD", + "usageQuantity": 0.00328, + "billableQuantity": 0.00328, + "pretaxCost": 0.67, + "isEstimated": false, + "meterId": "00000000-0000-0000-0000-000000000000", + "partNumber":"Part Number 1", + "resourceGuid":"00000000-0000-0000-0000-000000000000", + "offerId":"Offer Id 1", + "chargesBilledSeparately":true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListByBillingAccount.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListByBillingAccount.json new file mode 100644 index 000000000000..752b763e2da5 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListByBillingAccount.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "billingAccountId": "1234" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": + "/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", + "name": "usageDetailsId1", + "type": "Microsoft.Consumption/usageDetails", + "tags": { + "env": "newcrp", + "dev": "tools" + }, + "properties": { + "billingPeriodId": + "/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Billing/billingPeriods/201702", + "invoiceId": "/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Billing/invoices/201703-123456789", + "usageStart": "2017-02-13T00:00:00Z", + "usageEnd": "2017-02-13T23:59:59Z", + "instanceName": "shared1", + "instanceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1", + "instanceLocation": "eastasia", + "currency": "USD", + "usageQuantity": 0.00328, + "billableQuantity": 0.00328, + "pretaxCost": 0.67, + "isEstimated": false, + "meterId": "00000000-0000-0000-0000-000000000000", + "partNumber":"Part Number 1", + "resourceGuid":"00000000-0000-0000-0000-000000000000", + "offerId":"Offer Id 1", + "chargesBilledSeparately":true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListByDepartment.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListByDepartment.json new file mode 100644 index 000000000000..d5e80a4e38c7 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListByDepartment.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "departmentId": "1234" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": + "/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", + "name": "usageDetailsId1", + "type": "Microsoft.Consumption/usageDetails", + "tags": { + "env": "newcrp", + "dev": "tools" + }, + "properties": { + "billingPeriodId": + "/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Billing/billingPeriods/201702", + "invoiceId": "/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Billing/invoices/201703-123456789", + "usageStart": "2017-02-13T00:00:00Z", + "usageEnd": "2017-02-13T23:59:59Z", + "instanceName": "shared1", + "instanceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1", + "instanceLocation": "eastasia", + "currency": "USD", + "usageQuantity": 0.00328, + "billableQuantity": 0.00328, + "pretaxCost": 0.67, + "isEstimated": false, + "meterId": "00000000-0000-0000-0000-000000000000", + "partNumber":"Part Number 1", + "resourceGuid":"00000000-0000-0000-0000-000000000000", + "offerId":"Offer Id 1", + "chargesBilledSeparately":true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListByEnrollmentAccount.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListByEnrollmentAccount.json new file mode 100644 index 000000000000..de0875e2ad5a --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListByEnrollmentAccount.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "enrollmentAccountId": "1234" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": + "/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", + "name": "usageDetailsId1", + "type": "Microsoft.Consumption/usageDetails", + "tags": { + "env": "newcrp", + "dev": "tools" + }, + "properties": { + "billingPeriodId": + "/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Billing/billingPeriods/201702", + "invoiceId": "/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Billing/invoices/201703-123456789", + "usageStart": "2017-02-13T00:00:00Z", + "usageEnd": "2017-02-13T23:59:59Z", + "instanceName": "shared1", + "instanceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1", + "instanceLocation": "eastasia", + "currency": "USD", + "usageQuantity": 0.00328, + "billableQuantity": 0.00328, + "pretaxCost": 0.67, + "isEstimated": false, + "meterId": "00000000-0000-0000-0000-000000000000", + "partNumber":"Part Number 1", + "resourceGuid":"00000000-0000-0000-0000-000000000000", + "offerId":"Offer Id 1", + "chargesBilledSeparately":true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListFilterByTag.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListFilterByTag.json new file mode 100644 index 000000000000..31099676756d --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListFilterByTag.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "$filter": "tags eq 'dev:tools'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", + "name": "usageDetailsId1", + "type": "Microsoft.Consumption/usageDetails", + "tags": { + "dev": "tools" + }, + "properties": { + "billingPeriodId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702", + "invoiceId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/invoices/201703-123456789", + "usageStart": "2017-02-13T00:00:00Z", + "usageEnd": "2017-02-13T23:59:59Z", + "instanceName": "shared1", + "instanceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1", + "instanceLocation": "eastasia", + "currency": "USD", + "usageQuantity": 0.00328, + "billableQuantity": 0.00328, + "pretaxCost": 0.67, + "isEstimated": false, + "meterId": "00000000-0000-0000-0000-000000000000", + "partNumber":"Part Number 1", + "resourceGuid":"00000000-0000-0000-0000-000000000000", + "offerId":"Offer Id 1", + "chargesBilledSeparately":true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListForBillingPeriod.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListForBillingPeriod.json new file mode 100644 index 000000000000..295f8f7b9d0f --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListForBillingPeriod.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "billingPeriodName": "201702" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", + "name": "usageDetailsId1", + "type": "Microsoft.Consumption/usageDetails", + "tags": { + "env": "newcrp", + "dev": "tools" + }, + "properties": { + "billingPeriodId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702", + "invoiceId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/invoices/201703-123456789", + "usageStart": "2017-02-13T00:00:00Z", + "usageEnd": "2017-02-13T23:59:59Z", + "instanceName": "shared1", + "instanceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1", + "instanceLocation": "eastasia", + "currency": "USD", + "usageQuantity": 0.00328, + "billableQuantity": 0.00328, + "pretaxCost": 0.67, + "isEstimated": false, + "meterId": "00000000-0000-0000-0000-000000000000", + "partNumber":"Part Number 1", + "resourceGuid":"00000000-0000-0000-0000-000000000000", + "offerId":"Offer Id 1", + "chargesBilledSeparately":true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListForBillingPeriodByBillingAccount.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListForBillingPeriodByBillingAccount.json new file mode 100644 index 000000000000..ad8f3938018c --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListForBillingPeriodByBillingAccount.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "billingAccountId": "1234", + "billingPeriodName": "201702" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", + "name": "usageDetailsId1", + "type": "Microsoft.Consumption/usageDetails", + "tags": { + "env": "newcrp", + "dev": "tools" + }, + "properties": { + "billingPeriodId": "/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Billing/billingPeriods/201702", + "invoiceId": "/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Billing/invoices/201703-123456789", + "usageStart": "2017-02-13T00:00:00Z", + "usageEnd": "2017-02-13T23:59:59Z", + "instanceName": "shared1", + "instanceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1", + "instanceLocation": "eastasia", + "currency": "USD", + "usageQuantity": 0.00328, + "billableQuantity": 0.00328, + "pretaxCost": 0.67, + "isEstimated": false, + "meterId": "00000000-0000-0000-0000-000000000000", + "partNumber":"Part Number 1", + "resourceGuid":"00000000-0000-0000-0000-000000000000", + "offerId":"Offer Id 1", + "chargesBilledSeparately":true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListForBillingPeriodByDepartment.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListForBillingPeriodByDepartment.json new file mode 100644 index 000000000000..05d4b7565851 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListForBillingPeriodByDepartment.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "departmentId": "1234", + "billingPeriodName": "201702" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", + "name": "usageDetailsId1", + "type": "Microsoft.Consumption/usageDetails", + "tags": { + "env": "newcrp", + "dev": "tools" + }, + "properties": { + "billingPeriodId": "/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Billing/billingPeriods/201702", + "invoiceId": "/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Billing/invoices/201703-123456789", + "usageStart": "2017-02-13T00:00:00Z", + "usageEnd": "2017-02-13T23:59:59Z", + "instanceName": "shared1", + "instanceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1", + "instanceLocation": "eastasia", + "currency": "USD", + "usageQuantity": 0.00328, + "billableQuantity": 0.00328, + "pretaxCost": 0.67, + "isEstimated": false, + "meterId": "00000000-0000-0000-0000-000000000000", + "partNumber":"Part Number 1", + "resourceGuid":"00000000-0000-0000-0000-000000000000", + "offerId":"Offer Id 1", + "chargesBilledSeparately":true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListForBillingPeriodByEnrollmentAccount.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListForBillingPeriodByEnrollmentAccount.json new file mode 100644 index 000000000000..d218b60fb815 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListForBillingPeriodByEnrollmentAccount.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "enrollmentAccountId": "1234", + "billingPeriodName": "201702" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", + "name": "usageDetailsId1", + "type": "Microsoft.Consumption/usageDetails", + "tags": { + "env": "newcrp", + "dev": "tools" + }, + "properties": { + "billingPeriodId": "/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Billing/billingPeriods/201702", + "invoiceId": "/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Billing/invoices/201703-123456789", + "usageStart": "2017-02-13T00:00:00Z", + "usageEnd": "2017-02-13T23:59:59Z", + "instanceName": "shared1", + "instanceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1", + "instanceLocation": "eastasia", + "currency": "USD", + "usageQuantity": 0.00328, + "billableQuantity": 0.00328, + "pretaxCost": 0.67, + "isEstimated": false, + "meterId": "00000000-0000-0000-0000-000000000000", + "partNumber":"Part Number 1", + "resourceGuid":"00000000-0000-0000-0000-000000000000", + "offerId":"Offer Id 1", + "chargesBilledSeparately":true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListForBillingPeriodGroupByTag.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListForBillingPeriodGroupByTag.json new file mode 100644 index 000000000000..5b7ed78249c1 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListForBillingPeriodGroupByTag.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "billingPeriodName": "201803", + "$apply": "groupby((tags))" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/20180301/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", + "name": "usageDetailsId1", + "type": "Microsoft.Consumption/usageDetails", + "tags": { + "description": "Azure VCAP STA - RDS Server" + }, + "properties": { + "billingPeriodId": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/20180301", + "usageQuantity": 11.11111, + "pretaxCost": 0, + "currency": "USD" + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/20180301/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", + "name": "usageDetailsId1", + "type": "Microsoft.Consumption/usageDetails", + "tags": { + "description": "Domain controller - STA" + }, + "properties": { + "billingPeriodId": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/20180301", + "usageQuantity": 111.11111111111, + "pretaxCost": 0, + "currency": "USD" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListGroupByTagDate.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListGroupByTagDate.json new file mode 100644 index 000000000000..bf3dc5c17ff1 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/examples/UsageDetailsListGroupByTagDate.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "$apply": "groupby((tags,properties/usageStart))" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/20180301/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", + "name": "usageDetailsId1", + "type": "Microsoft.Consumption/usageDetails", + "tags": { + "description": "Azure VCAP STA - RDS Server" + }, + "properties": { + "billingPeriodId": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/20180301", + "usageStart": "2018-03-01T00:00:00.0000000Z", + "usageEnd": "2018-03-01T23:59:59.0000000Z", + "usageQuantity": 11.11111, + "pretaxCost": 0, + "currency": "USD" + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/20180301/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", + "name": "usageDetailsId1", + "type": "Microsoft.Consumption/usageDetails", + "tags": { + "description": "Azure VCAP STA - RDS Server" + }, + "properties": { + "billingPeriodId": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/20180301", + "usageStart": "2018-03-02T00:00:00.0000000Z", + "usageEnd": "2018-03-02T23:59:59.0000000Z", + "usageQuantity": 1.11111111111, + "pretaxCost": 0, + "currency": "USD" + } + } + ] + } + } + } +} \ No newline at end of file From 900a52724a80781934651db97154547762681c5e Mon Sep 17 00:00:00 2001 From: Khalid Chaudhry Date: Wed, 6 Jun 2018 12:30:07 -0700 Subject: [PATCH 2/2] consolidating the operation groups based on code review. --- .../stable/2018-05-31/consumption.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json index a524a426a439..90c09061afad 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-05-31/consumption.json @@ -352,7 +352,7 @@ "tags": [ "UsageDetails" ], - "operationId": "UsageDetailsByBillingAccount_List", + "operationId": "UsageDetails_ListByBillingAccount", "description": "Lists the usage details by billingAccountId for a scope by current billing period. Usage details are available via this API only for May 1, 2014 or later.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" @@ -436,7 +436,7 @@ "tags": [ "UsageDetails" ], - "operationId": "UsageDetailsByBillingAccount_ListByBillingPeriod", + "operationId": "UsageDetails_ListForBillingPeriodByBillingAccount", "description": "Lists the usage details based on billingAccountId for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" @@ -523,7 +523,7 @@ "tags": [ "UsageDetails" ], - "operationId": "UsageDetailsByDepartment_List", + "operationId": "UsageDetails_ListByDepartment", "description": "Lists the usage details by departmentId for a scope by current billing period. Usage details are available via this API only for May 1, 2014 or later.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" @@ -607,8 +607,8 @@ "tags": [ "UsageDetails" ], - "operationId": "UsageDetailsByDepartment_ListByBillingPeriod", - "description": "Lists the usage details based on departmentId for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later.", + "operationId": "UsageDetails_ListForBillingPeriodByDepartment", + "description": "Lists the usage details based on departmentId for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" }, @@ -694,7 +694,7 @@ "tags": [ "UsageDetails" ], - "operationId": "UsageDetailsByEnrollmentAccount_List", + "operationId": "UsageDetails_ListByEnrollmentAccount", "description": "Lists the usage details by enrollmentAccountId for a scope by current billing period. Usage details are available via this API only for May 1, 2014 or later.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" @@ -778,7 +778,7 @@ "tags": [ "UsageDetails" ], - "operationId": "UsageDetailsByEnrollmentAccount_ListByBillingPeriod", + "operationId": "UsageDetails_ListForBillingPeriodByEnrollmentAccount", "description": "Lists the usage details based on enrollmentAccountId for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/consumption/"