diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/consumption.json index eaf850133b73..c2ac12c035b5 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/consumption.json @@ -2327,7 +2327,259 @@ "nextLinkName": "nextLink" } } - } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/usageDetails": { + "get": { + "tags": [ + "UsageDetails" + ], + "operationId": "UsageDetails_ListByManagementGroup", + "description": "Lists the usage detail records for all subscriptions belonging to a management group 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/UsageDetailsListByManagementGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "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.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails": { + "get": { + "tags": [ + "UsageDetails" + ], + "operationId": "UsageDetails_ListForBillingPeriodByManagementGroup", + "description": "Lists the usage detail records for all subscriptions belonging to a management group scope by specified 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/UsageDetailsListForBillingPeriodByManagementGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "$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.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/aggregatedcost": { + "get": { + "tags": [ + "AggregatedCost" + ], + "operationId": "AggregatedCost_GetByManagementGroup", + "description": "Provides the aggregate cost of a management group and all child management groups by current billing period.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "AggregatedCostByManagementGroup": { + "$ref": "./examples/AggregatedCostByManagementGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ManagementGroupAggregatedCostResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/Microsoft.Consumption/aggregatedcost": { + "get": { + "tags": [ + "AggregatedCost" + ], + "operationId": "AggregatedCost_GetForBillingPeriodByManagementGroup", + "description": "Provides the aggregate cost of a management group and all child management groups by specified billing period", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/consumption/" + }, + "x-ms-examples": { + "AggregatedCostListForBillingPeriodByManagementGroup": { + "$ref": "./examples/AggregatedCostForBillingPeriodByManagementGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "$ref": "#/parameters/billingPeriodNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ManagementGroupAggregatedCostResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + } }, "definitions": { "MeterDetails": { @@ -3651,7 +3903,64 @@ } } }, - "ErrorDetails": { + "ManagementGroupAggregatedCostResult": { + "description": "A management group aggregated cost resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ManagementGroupAggregatedCostProperties", + "title": "Management Group Aggregated Cost properties" + } + } + }, + "ManagementGroupAggregatedCostProperties": { + "description": "The properties of the Management Group Aggregated Cost.", + "type": "object", + "properties": { + "billingPeriodId": { + "description": "The id of the billing period resource that the aggregated cost belongs to.", + "type": "string", + "readOnly": true + }, + "azureCharges": { + "description": "Azure Charges.", + "type": "number", + "format": "decimal", + "readOnly": true + }, + "marketplaceCharges": { + "description": "Marketplace Charges.", + "type": "number", + "format": "decimal", + "readOnly": true + }, + "chargesBilledSeparately": { + "description": "Charges Billed Separately.", + "type": "number", + "format": "decimal", + "readOnly": true + }, + "currency": { + "description": "The ISO currency in which the meter is charged, for example, USD.", + "type": "string", + "readOnly": true + }, + "children": { + "description": "Children of a management group", + "type": "array", + "items": { + "$ref": "#/definitions/ManagementGroupAggregatedCostResult" + } + } + } + }, + "ErrorDetails": { "description": "The details of the error.", "properties": { "code": { @@ -3901,6 +4210,14 @@ } ] } + }, + "managementGroupIdParameter": { + "name": "managementGroupId", + "in": "path", + "description": "Azure Management Group ID.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" } } } \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/AggregatedCostByManagementGroup.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/AggregatedCostByManagementGroup.json new file mode 100644 index 000000000000..f003f87c37c8 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/AggregatedCostByManagementGroup.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2018-06-30", + "managementGroupId": "managementGroupForTest" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Management/managementGroups/managementGroupForTest/providers/Microsoft.Billing/billingPeriods/201808/providers/Microsoft.Consumption/aggregatedcostId1", + "name": "aggregatedcostId1", + "type": "Microsoft.Consumption/aggregatedcost", + "properties": { + "billingPeriodId": "/providers/Microsoft.Management/managementGroups/managementGroupForTest/providers/Microsoft.Billing/billingPeriods/201808", + "azureCharges": 250.9876, + "marketplaceCharges": 150.786, + "chargesBilledSeparately": 120.345, + "currency": "USD", + "children": [ + { + "id": "/providers/Microsoft.Management/managementGroups/managementGroupChildForTest/providers/Microsoft.Billing/billingPeriods/201808/providers/Microsoft.Consumption/aggregatedcostId2", + "name": "aggregatedcostId2", + "type": "Microsoft.Consumption/aggregatedcost", + "properties": { + "billingPeriodId": "/providers/Microsoft.Management/managementGroups/managementGroupChildForTest/providers/Microsoft.Billing/billingPeriods/201808", + "azureCharges": 150.0, + "marketplaceCharges": 50.786, + "chargesBilledSeparately": 30.345, + "currency": "USD", + "children": [] + } + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/AggregatedCostForBillingPeriodByManagementGroup.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/AggregatedCostForBillingPeriodByManagementGroup.json new file mode 100644 index 000000000000..655c61387cb9 --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/AggregatedCostForBillingPeriodByManagementGroup.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2018-06-30", + "managementGroupId": "managementGroupForTest", + "billingPeriodName": "201807" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Management/managementGroups/managementGroupForTest/providers/Microsoft.Billing/billingPeriods/201807/providers/Microsoft.Consumption/aggregatedcostId1", + "name": "aggregatedcostId1", + "type": "Microsoft.Consumption/aggregatedcost", + "properties": { + "billingPeriodId": "/providers/Microsoft.Management/managementGroups/managementGroupForTest/providers/Microsoft.Billing/billingPeriods/201807", + "azureCharges": 250.9876, + "marketplaceCharges": 150.786, + "chargesBilledSeparately": 120.345, + "currency": "USD", + "children": [ + { + "id": "/providers/Microsoft.Management/managementGroups/managementGroupChildForTest/providers/Microsoft.Billing/billingPeriods/201807/providers/Microsoft.Consumption/aggregatedcostId2", + "name": "aggregatedcostId2", + "type": "Microsoft.Consumption/aggregatedcost", + "properties": { + "billingPeriodId": "/providers/Microsoft.Management/managementGroups/managementGroupChildForTest/providers/Microsoft.Billing/billingPeriods/201807", + "azureCharges": 150.0, + "marketplaceCharges": 50.786, + "chargesBilledSeparately": 30.345, + "currency": "USD", + "children": [] + } + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/BalancesByBillingAccount.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/BalancesByBillingAccount.json index 1b0685536635..01f121467d01 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/BalancesByBillingAccount.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/BalancesByBillingAccount.json @@ -6,7 +6,7 @@ "responses": { "200": { "body": { - "id": "/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Consumption/balances/balanceId1", + "id": "/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/balances/balanceId1", "name": "balanceId1", "type": "Microsoft.Consumption/balances", "properties": { diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/MarketplacesByBillingAccountList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/MarketplacesByBillingAccountList.json index b60ba36633e1..117c6a7f9c0c 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/MarketplacesByBillingAccountList.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/MarketplacesByBillingAccountList.json @@ -8,7 +8,7 @@ "body": { "value": [ { - "id": "/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Consumption/marketplaces/marketplaceId1", + "id": "/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/marketplaces/marketplaceId1", "name": "marketplaceId1", "type": "Microsoft.Consumption/marketPlaces", "tags": { diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/MarketplacesByDepartmentList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/MarketplacesByDepartmentList.json index 9dfa9f192e55..46459faae17d 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/MarketplacesByDepartmentList.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/MarketplacesByDepartmentList.json @@ -9,7 +9,7 @@ "body": { "value": [ { - "id": "/providers/Microsoft.Billing/departments/123456/providers/Microsoft.Consumption/marketplaces/marketplaceId1", + "id": "/providers/Microsoft.Billing/departments/123456/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/marketplaces/marketplaceId1", "name": "marketplacesId1", "type": "Microsoft.Consumption/marketPlaces", "tags": { diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/MarketplacesByEnrollmentAccountList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/MarketplacesByEnrollmentAccountList.json index 9bceabcbec8a..5007be230830 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/MarketplacesByEnrollmentAccountList.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/MarketplacesByEnrollmentAccountList.json @@ -9,7 +9,7 @@ "body": { "value": [ { - "id": "/providers/Microsoft.Billing/enrollmentAccounts/123456/providers/Microsoft.Consumption/marketplaces/marketplaceId1", + "id": "/providers/Microsoft.Billing/enrollmentAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/marketplaces/marketplaceId1", "name": "marketplacesId1", "type": "Microsoft.Consumption/marketPlaces", "tags": { diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/MarketplacesList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/MarketplacesList.json index 8c10effe6f71..b627d58a4016 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/MarketplacesList.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/MarketplacesList.json @@ -8,7 +8,7 @@ "body": { "value": [ { - "id": "/subscriptions/subid/providers/Microsoft.Consumption/marketPlaces/marketplaceId1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/marketPlaces/marketplaceId1", "name": "marketplaceId1", "type": "Microsoft.Consumption/marketPlaces", "tags": { diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/PriceSheet.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/PriceSheet.json index c1169ac1284e..9c5fbbba39d7 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/PriceSheet.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/PriceSheet.json @@ -10,7 +10,7 @@ { "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/pricesheets/default", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/pricesheets/default", "name": "default", "type": "Microsoft.Consumption/pricesheets", "properties": diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsList.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsList.json index 539ae37fa7d4..8198c2afb307 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsList.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsList.json @@ -8,7 +8,7 @@ "body": { "value": [ { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", "name": "usageDetailsId1", "type": "Microsoft.Consumption/usageDetails", "tags": { diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListByBillingAccount.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListByBillingAccount.json index 7c375e2b794b..3bd38f978b5f 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListByBillingAccount.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListByBillingAccount.json @@ -9,7 +9,7 @@ "value": [ { "id": - "/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", + "/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", "name": "usageDetailsId1", "type": "Microsoft.Consumption/usageDetails", "tags": { diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListByDepartment.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListByDepartment.json index baac9c7005bc..2ac0a760905a 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListByDepartment.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListByDepartment.json @@ -9,7 +9,7 @@ "value": [ { "id": - "/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", + "/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", "name": "usageDetailsId1", "type": "Microsoft.Consumption/usageDetails", "tags": { diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListByEnrollmentAccount.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListByEnrollmentAccount.json index 5f729293c802..941f63477bb3 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListByEnrollmentAccount.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListByEnrollmentAccount.json @@ -9,7 +9,7 @@ "value": [ { "id": - "/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", + "/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", "name": "usageDetailsId1", "type": "Microsoft.Consumption/usageDetails", "tags": { diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListByManagementGroup.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListByManagementGroup.json new file mode 100644 index 000000000000..eb41c42e325f --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListByManagementGroup.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2018-06-30", + "managementGroupId": "managementGroupForTest" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/20180801/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/201808", + "usageStart": "2018-08-13T00:00:00Z", + "usageEnd": "2018-08-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, + "location":"EU West" + } + }, + { + "id": "/subscriptions/11111111-1111-1111-1111-111111111111/providers/Microsoft.Billing/billingPeriods/20180801/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", + "name": "usageDetailsId1", + "type": "Microsoft.Consumption/usageDetails", + "tags": { + "env": "newcrp", + "dev": "tools" + }, + "properties": { + "billingPeriodId": "/subscriptions/11111111-1111-1111-1111-111111111111/providers/Microsoft.Billing/billingPeriods/201808", + "usageStart": "2018-08-13T00:00:00Z", + "usageEnd": "2018-08-13T23:59:59Z", + "instanceName": "shared1", + "instanceId": "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1", + "instanceLocation": "eastasia", + "currency": "USD", + "usageQuantity": 0.00120, + "billableQuantity": 0.00128, + "pretaxCost": 0.26, + "isEstimated": false, + "meterId": "11111111-1111-1111-1111-111111111111", + "partNumber":"Part Number 1", + "resourceGuid":"11111111-1111-1111-1111-111111111111", + "offerId":"Offer Id 1", + "chargesBilledSeparately":true, + "location":"EU West" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListFilterByTag.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListFilterByTag.json index 9d7000d0cc70..0bd7bbd6b398 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListFilterByTag.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListFilterByTag.json @@ -9,7 +9,7 @@ "body": { "value": [ { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", "name": "usageDetailsId1", "type": "Microsoft.Consumption/usageDetails", "tags": { diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListForBillingPeriodByManagementGroup.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListForBillingPeriodByManagementGroup.json new file mode 100644 index 000000000000..327bc0c3894f --- /dev/null +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-06-30/examples/UsageDetailsListForBillingPeriodByManagementGroup.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2018-06-30", + "managementGroupId": "managementGroupForTest", + "billingPeriodName": "201807" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/20180701/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/201807", + "usageStart": "2018-07-13T00:00:00Z", + "usageEnd": "2018-07-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, + "location":"EU West" + } + }, + { + "id": "/subscriptions/11111111-1111-1111-1111-111111111111/providers/Microsoft.Billing/billingPeriods/20180701/providers/Microsoft.Consumption/usageDetails/usageDetailsId1", + "name": "usageDetailsId1", + "type": "Microsoft.Consumption/usageDetails", + "tags": { + "env": "newcrp", + "dev": "tools" + }, + "properties": { + "billingPeriodId": "/subscriptions/11111111-1111-1111-1111-111111111111/providers/Microsoft.Billing/billingPeriods/201807", + "usageStart": "2018-07-13T00:00:00Z", + "usageEnd": "2018-07-13T23:59:59Z", + "instanceName": "shared1", + "instanceId": "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1", + "instanceLocation": "eastasia", + "currency": "USD", + "usageQuantity": 0.00120, + "billableQuantity": 0.00128, + "pretaxCost": 0.26, + "isEstimated": false, + "meterId": "11111111-1111-1111-1111-111111111111", + "partNumber":"Part Number 1", + "resourceGuid":"11111111-1111-1111-1111-111111111111", + "offerId":"Offer Id 1", + "chargesBilledSeparately":true, + "location":"EU West" + } + } + ] + } + } + } +} \ No newline at end of file