diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json new file mode 100644 index 000000000000..2b7d3f57b3be --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json @@ -0,0 +1,2872 @@ +{ + "swagger": "2.0", + "info": { + "version": "2019-03-01-preview", + "title": "CostManagementClient" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "Dimensions_ListByBillingAccount", + "description": "Lists the dimensions by billingAccount Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "BillingAccountDimensionsList": { + "$ref": "./examples/BillingAccountDimensionsList.json" + }, + "BillingAccountDimensionsListExpandAndTop": { + "$ref": "./examples/BillingAccountDimensionsListExpandAndTop.json" + }, + "BillingAccountDimensionsListWithFilter": { + "$ref": "./examples/BillingAccountDimensionsListWithFilter.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "name": "$filter", + "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.", + "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 dimension data.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "Dimensions_ListByEnrollmentAccount", + "description": "Lists the dimensions by Enrollment Account Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "EnrollmentAccountDimensionsList": { + "$ref": "./examples/EnrollmentAccountDimensionsList.json" + }, + "EnrollmentAccountDimensionsListExpandAndTop": { + "$ref": "./examples/EnrollmentAccountDimensionsListExpandAndTop.json" + }, + "EnrollmentAccountDimensionsListWithFilter": { + "$ref": "./examples/EnrollmentAccountDimensionsListWithFilter.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/enrollmentAccountIdParameter" + }, + { + "name": "$filter", + "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.", + "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 dimension data.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "Dimensions_ListByDepartment", + "description": "Lists the dimensions by Department Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "DepartmentDimensionsList": { + "$ref": "./examples/DepartmentDimensionsList.json" + }, + "DepartmentDimensionsListExpandAndTop": { + "$ref": "./examples/DepartmentDimensionsListExpandAndTop.json" + }, + "DepartmentDimensionsListWithFilter": { + "$ref": "./examples/DepartmentDimensionsListWithFilter.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/departmentIdParameter" + }, + { + "name": "$filter", + "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.", + "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 dimension data.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "Dimensions_ListByManagementGroup", + "description": "Lists the dimensions by managementGroup Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ManagementGroupDimensionsList": { + "$ref": "./examples/ManagementGroupDimensionsList.json" + }, + "ManagementGroupDimensionsListExpandAndTop": { + "$ref": "./examples/ManagementGroupDimensionsListExpandAndTop.json" + }, + "ManagementGroupDimensionsListWithFilter": { + "$ref": "./examples/ManagementGroupDimensionsListWithFilter.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "name": "$filter", + "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.", + "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 dimension data.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "Dimensions_ListBySubscription", + "description": "Lists the dimensions by subscription Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "SubscriptionDimensionsList": { + "$ref": "./examples/SubscriptionDimensionsList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "name": "$filter", + "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.", + "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 dimension data.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/Query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "Query_UsageBySubscription", + "description": "Query the usage data for subscriptionId.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "SubscriptionQuery": { + "$ref": "./examples/SubscriptionQuery.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/Forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_UsageBySubscription", + "description": "Forecast the usage data for subscriptionId.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "SubscriptionForecast": { + "$ref": "./examples/SubscriptionForecast.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "Dimensions_ListByResourceGroup", + "description": "Lists the dimensions by resource group Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ResourceGroupDimensionsList": { + "$ref": "./examples/ResourceGroupDimensionsList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "$filter", + "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.", + "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 dimension data.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.CostManagement/Query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "Query_UsageByResourceGroup", + "description": "Query the usage data for subscriptionId and resource group.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ResourceGroupQuery": { + "$ref": "./examples/ResourceGroupQuery.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.CostManagement/Forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_UsageByResourceGroup", + "description": "Forecast the usage data for subscriptionId and resource group.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ResourceGroupForecast": { + "$ref": "./examples/ResourceGroupForecast.json" + } + + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/Query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "Query_UsageByBillingAccount", + "description": "Query the usage data for billing account.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "BillingAccountQuery": { + "$ref": "./examples/BillingAccountQuery.json" + }, + "BillingAccountQueryGroupingUsage": { + "$ref": "./examples/BillingAccountQueryGrouping.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/Forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_UsageByBillingAccount", + "description": "Forecast the usage data for billing account.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "BillingAccountForecast": { + "$ref": "./examples/BillingAccountForecast.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.CostManagement/Query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "Query_UsageByEnrollmentAccount", + "description": "Query the usage data for an enrollment account.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "EnrollmentAccountQuery": { + "$ref": "./examples/EnrollmentAccountQuery.json" + }, + "EnrollmentAccountQueryGroupingUsage": { + "$ref": "./examples/EnrollmentAccountQueryGrouping.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/enrollmentAccountIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.CostManagement/Forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_UsageByEnrollmentAccount", + "description": "Forecast the usage data for an enrollment account.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "EnrollmentAccountForecast": { + "$ref": "./examples/EnrollmentAccountForecast.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/enrollmentAccountIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.CostManagement/Query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "Query_UsageByDepartment", + "description": "Query the usage data for department.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "DepartmentQuery": { + "$ref": "./examples/DepartmentQuery.json" + }, + "DepartmentQueryGroupingUsage": { + "$ref": "./examples/DepartmentQueryGrouping.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/departmentIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.CostManagement/Forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_UsageByDepartment", + "description": "Forecast the usage data for department.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "DepartmentForecast": { + "$ref": "./examples/DepartmentForecast.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/departmentIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.CostManagement/Query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "Query_UsageByManagmentGroup", + "description": "Lists the usage data for management group.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ManagementGroupQuery": { + "$ref": "./examples/ManagementGroupQuery.json" + }, + "ManagementGroupQueryGroupingUsage": { + "$ref": "./examples/ManagementGroupQueryGrouping.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.CostManagement/Forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_UsageByManagmentGroup", + "description": "Lists the usage data for management group.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ManagementGroupForecast": { + "$ref": "./examples/ManagementGroupForecast.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.CostManagement/cloudConnectors": { + "get": { + "tags": [ + "CloudConnectors" + ], + "operationId": "CloudConnector_List", + "description": "List all cloud connector definitions", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "CloudConnector_List": { + "$ref": "./examples/CloudConnectorList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ConnectorDefinitionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.CostManagement/cloudConnectors/{connectorName}": { + "get": { + "tags": [ + "CloudConnectors" + ], + "operationId": "CloudConnector_Get", + "description": "Get a cloud connector definition", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "CloudConnector_Get": { + "$ref": "./examples/CloudConnectorGet.json" + }, + "CloudConnector_Get_Expand": { + "$ref": "./examples/CloudConnectorGetExpand.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/connectorNameParameter" + }, + { + "name": "$expand", + "description": "May be used to expand the collectionInfo property. By default, collectionInfo is not included.", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ConnectorDefinition" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "CloudConnectors" + ], + "operationId": "CloudConnector_CreateOrUpdate", + "description": "Create or update a cloud connector definition", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "CloudConnector_Put": { + "$ref": "./examples/CloudConnectorPut.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/connectorNameParameter" + }, + { + "name": "connector", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ConnectorDefinition" + }, + "description": "Connector details" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ConnectorDefinition" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/ConnectorDefinition" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "CloudConnectors" + ], + "operationId": "CloudConnector_Delete", + "description": "Delete a cloud connector definition", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "CloudConnector_Delete": { + "$ref": "./examples/CloudConnectorDelete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/connectorNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "CloudConnectors" + ], + "operationId": "CloudConnector_Update", + "description": "Update a cloud connector definition", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "CloudConnector_Patch": { + "$ref": "./examples/CloudConnectorPatch.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/connectorNameParameter" + }, + { + "name": "connector", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ConnectorDefinition" + }, + "description": "Connector details" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ConnectorDefinition" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/externalBillingAccounts": { + "get": { + "tags": [ + "ExternalBillingAccounts" + ], + "operationId": "ExternalBillingAccount_List", + "description": "List all ExternalBillingAccount definitions", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalBillingAccount_List": { + "$ref": "./examples/ExternalBillingAccountList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ExternalBillingAccountDefinitionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}": { + "get": { + "tags": [ + "ExternalBillingAccounts" + ], + "operationId": "ExternalBillingAccount_Get", + "description": "Get a ExternalBillingAccount definition", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalBillingAccount_Get": { + "$ref": "./examples/ExternalBillingAccountGet.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/externalBillingAccountNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ExternalBillingAccountDefinition" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}/externalSubscriptions": { + "get": { + "tags": [ + "ExternalSubscriptions" + ], + "operationId": "ExternalSubscription_ListByExternalBillingAccount", + "description": "List all ExternalSubscriptions by ExternalBillingAccount definitions", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalBillingAccountExternalSubscription_List": { + "$ref": "./examples/ExternalBillingAccountExternalSubscriptionList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/externalBillingAccountNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ExternalSubscriptionDefinitionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.CostManagement/externalSubscriptions": { + "get": { + "tags": [ + "ExternalSubscriptions" + ], + "operationId": "ExternalSubscription_List", + "description": "List all ExternalSubscription definitions", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalSubscription_List": { + "$ref": "./examples/ExternalSubscriptionList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ExternalSubscriptionDefinitionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}": { + "get": { + "tags": [ + "ExternalSubscriptions" + ], + "operationId": "ExternalSubscription_Get", + "description": "Get an ExternalSubscription definition", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalSubscription_Get": { + "$ref": "./examples/ExternalSubscriptionGet.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/externalSubscriptionNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ExternalSubscriptionDefinition" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.CostManagement/externalSubscriptions": { + "get": { + "tags": [ + "ExternalSubscriptions" + ], + "operationId": "ExternalSubscription_ListByManagementGroup", + "description": "List all ExternalSubscription definitions for Management Group", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalSubscription_List": { + "$ref": "./examples/ManagementGroupExternalSubscriptionList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/managementGroupIdParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ExternalSubscriptionDefinitionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}": { + "put": { + "tags": [ + "ExternalSubscriptions" + ], + "operationId": "ExternalSubscription_UpdateByManagementGroup", + "description": "Associates ExternalSubscription with the management group", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ManagementGroupExternalSubscription_Put": { + "$ref": "./examples/ManagementGroupExternalSubscriptionPut.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "$ref": "#/parameters/externalSubscriptionNameParameter" + } + ], + "responses": { + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.CostManagement/getEntities": { + "post": { + "tags": [ + "Entities" + ], + "operationId": "Entities_ListByManagementGroup", + "description": "List all entities (Management Groups, Subscriptions, ExternalSubscriptions, etc.) focusing on a particular group for the authenticated user.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "$ref": "#/parameters/EntityViewParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/EntityListResult" + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "GetEntities": { + "$ref": "./examples/ManagementGroupGetEntities.json" + } + } + } + }, + "/providers/Microsoft.CostManagement/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists all of the available consumption REST API operations.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "ErrorBase": { + "description": "The details of the error.", + "properties": { + "code": { + "type": "string", + "description": "A machine readable error code.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "A human readable error message.", + "readOnly": true + }, + "target": { + "type": "string", + "description": "Indicates which property in the request is responsible for the error.", + "readOnly": true + } + } + }, + "ErrorDetails": { + "description": "The details of the error.", + "properties": { + "code": { + "description": "A machine readable error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "A human readable error message.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "Indicates which property in the request is responsible for the error.", + "type": "string" + }, + "details": { + "description": "error details.", + "type": "array", + "items": { + "$ref": "#/definitions/ErrorBase" + } + } + } + }, + "ErrorResponse": { + "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", + "type": "object", + "properties": { + "error": { + "description": "The details of the error.", + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "Resource": { + "description": "The Resource model definition.", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Resource Id." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "Resource name." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type." + }, + "tags": { + "readOnly": true, + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags." + } + }, + "x-ms-azure-resource": true + }, + "ReportConfigDefinition": { + "description": "The definition of a report config.", + "properties": { + "type": { + "description": "The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates.", + "type": "string", + "enum": [ + "Usage" + ], + "x-ms-enum": { + "name": "ReportType", + "modelAsString": true + } + }, + "timeframe": { + "description": "The time frame for pulling data for the report. If custom, then a specific time period must be provided.", + "type": "string", + "enum": [ + "WeekToDate", + "MonthToDate", + "YearToDate", + "Custom" + ], + "x-ms-enum": { + "name": "TimeframeType", + "modelAsString": true + } + }, + "timePeriod": { + "description": "Has time period for pulling data for the report.", + "$ref": "#/definitions/ReportConfigTimePeriod" + }, + "dataset": { + "description": "Has definition for data in this report config.", + "$ref": "#/definitions/ReportConfigDataset" + } + }, + "required": [ + "type", + "timeframe" + ] + }, + "ReportConfigTimePeriod": { + "description": "The start and end date for pulling data for the report.", + "properties": { + "from": { + "description": "The start date to pull data from.", + "type": "string", + "format": "date-time" + }, + "to": { + "description": "The end date to pull data to.", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "from", + "to" + ] + }, + "ReportConfigDataset": { + "description": "The definition of data present in the report.", + "properties": { + "granularity": { + "description": "The granularity of rows in the report.", + "type": "string", + "enum": [ + "Daily", + "Monthly" + ], + "x-ms-enum": { + "name": "GranularityType", + "modelAsString": true + } + }, + "configuration": { + "description": "Has configuration information for the data in the report. The configuration will be ignored if aggregation and grouping are provided.", + "$ref": "#/definitions/ReportConfigDatasetConfiguration" + }, + "aggregation": { + "type": "object", + "description": "Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses.", + "additionalProperties": { + "type": "object", + "$ref": "#/definitions/ReportConfigAggregation" + }, + "maxItems": 2 + }, + "grouping": { + "description": "Array of group by expression to use in the report. Report can have up to 2 group by clauses.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigGrouping" + }, + "maxItems": 2 + }, + "sorting": { + "description": "Array of order by expression to use in the report.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigSorting" + } + }, + "filter": { + "type": "object", + "description": "Has filter expression to use in the report.", + "$ref": "#/definitions/ReportConfigFilter" + } + } + }, + "ReportConfigDatasetConfiguration": { + "description": "The configuration of dataset in the report.", + "properties": { + "columns": { + "description": "Array of column names to be included in the report. Any valid report column name is allowed. If not provided, then report includes all columns.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ReportConfigAggregation": { + "description": "The aggregation expression to be used in the report.", + "properties": { + "name": { + "description": "The name of the column to aggregate.", + "type": "string" + }, + "function": { + "description": "The name of the aggregation function to use.", + "type": "string", + "enum": [ + "Sum" + ], + "x-ms-enum": { + "name": "FunctionType", + "modelAsString": true + } + } + }, + "required": [ + "name", + "function" + ] + }, + "ReportConfigSorting": { + "description": "The order by expression to be used in the report.", + "properties": { + "direction": { + "description": "Direction of sort.", + "type": "string", + "enum": [ + "Ascending", + "Descending" + ] + }, + "name": { + "description": "The name of the column to sort.", + "type": "string" + } + }, + "required": [ + "name" + ] + }, + "ReportConfigGrouping": { + "description": "The group by expression to be used in the report.", + "properties": { + "type": { + "description": "Has type of the column to group.", + "$ref": "#/definitions/ReportConfigColumnType" + }, + "name": { + "description": "The name of the column to group. This version supports subscription lowest possible grain.", + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "ReportConfigFilter": { + "description": "The filter expression to be used in the report.", + "properties": { + "and": { + "description": "The logical \"AND\" expression. Must have at least 2 items.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigFilter" + }, + "minItems": 2 + }, + "or": { + "description": "The logical \"OR\" expression. Must have at least 2 items.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigFilter" + }, + "minItems": 2 + }, + "not": { + "description": "The logical \"NOT\" expression.", + "$ref": "#/definitions/ReportConfigFilter" + }, + "dimension": { + "description": "Has comparison expression for a dimension", + "$ref": "#/definitions/ReportConfigComparisonExpression" + }, + "tag": { + "description": "Has comparison expression for a tag", + "$ref": "#/definitions/ReportConfigComparisonExpression" + } + } + }, + "ReportConfigColumnType": { + "description": "The type of the column in the report.", + "type": "string", + "enum": [ + "Tag", + "Dimension" + ], + "x-ms-enum": { + "name": "ReportConfigColumnType", + "modelAsString": true + } + }, + "ReportConfigComparisonExpression": { + "description": "The comparison expression to be used in the report.", + "properties": { + "name": { + "description": "The name of the column to use in comparison.", + "type": "string" + }, + "operator": { + "description": "The operator to use for comparison.", + "type": "string", + "enum": [ + "In", + "Contains" + ], + "x-ms-enum": { + "name": "OperatorType", + "modelAsString": true + } + }, + "values": { + "description": "Array of values to use for comparison", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + } + }, + "required": [ + "name", + "operator", + "values" + ] + }, + "DimensionsListResult": { + "description": "Result of listing dimensions. It contains a list of available dimensions.", + "type": "object", + "properties": { + "value": { + "description": "The list of dimensions.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Dimension" + } + } + } + }, + "Dimension": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DimensionProperties", + "title": "Dimension properties" + } + } + }, + "DimensionProperties": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "filterEnabled": { + "type": "boolean" + }, + "groupingEnabled": { + "type": "boolean" + }, + "data": { + "type": "array", + "items": { + "type": "string" + } + }, + "total": { + "format": "int32", + "type": "integer" + }, + "category": { + "type": "string" + }, + "usageStart": { + "format": "date-time", + "type": "string" + }, + "usageEnd": { + "format": "date-time", + "type": "string" + }, + "nextLink": { + "type": "string" + } + } + }, + "QueryResult": { + "description": "Result of query. It contains all columns listed under groupings and aggregation.", + "type": "object", + "properties": { + "value": { + "description": "The list of usage data.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Query" + } + } + } + }, + "Query": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/QueryProperties", + "title": "Query properties" + } + } + }, + "QueryProperties": { + "type": "object", + "properties": { + "nextLink": { + "type": "string" + }, + "columns": { + "description": "Array of columns", + "type": "array", + "items": { + "$ref": "#/definitions/QueryColumn" + } + }, + "rows": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + } + }, + "QueryColumn": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "ConnectorDefinitionListResult": { + "description": "Result of listing connector definitions. It contains a list of available connector definitions in the scope provided.", + "properties": { + "value": { + "description": "The list of connector definitions.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ConnectorDefinition" + } + } + } + }, + "ConnectorDefinition": { + "type": "object", + "description": "The Connector model definition", + "properties": { + "kind": { + "type": "string", + "description": "Connector kind (eg aws)" + }, + "id": { + "type": "string", + "readOnly": true, + "description": "Connector id" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Connector name" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Connector type" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ConnectorProperties", + "description": "Connector properties" + } + }, + "x-ms-azure-resource": true + }, + "ConnectorProperties": { + "type": "object", + "description": "The properties of a Connector", + "properties": { + "displayName": { + "type": "string", + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Connector DisplayName" + }, + "providerAccountId": { + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Connector providerAccountId (determined from credentials)", + "readOnly": true + }, + "credentialsKey": { + "type": "string", + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Credentials authentication key (eg AWS ARN)" + }, + "credentialsSecret": { + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ], + "description": "Credentials secret (eg AWS ExternalId)" + }, + "reportId": { + "type": "string", + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Identifying source report. (For AWS this is a CUR report name, defined with Daily and with Resources)" + }, + "createdOn": { + "format": "date-time", + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Connector definition creation datetime", + "readOnly": true + }, + "modifiedOn": { + "format": "date-time", + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Connector last modified datetime", + "readOnly": true + }, + "status": { + "enum": [ + "active", + "error", + "suspended" + ], + "x-ms-enum": { + "name": "ConnectorStatus", + "modelAsString": true + }, + "type": "string", + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Connector status" + }, + "defaultManagementGroupId": { + "type": "string", + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Default ManagementGroupId" + }, + "subscriptionId": { + "type": "string", + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Billing SubscriptionId" + }, + "billingModel": { + "enum": [ + "trial", + "autoUpgrade", + "premium", + "expired" + ], + "x-ms-enum": { + "name": "ConnectorBillingModel", + "modelAsString": true + }, + "type": "string", + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Connector billing model" + }, + "daysTrialRemaining": { + "type": "integer", + "x-nullable": true, + "x-ms-mutability": [ + "read" + ], + "description": "Number of days remaining of trial", + "readOnly": true + }, + "collectionInfo": { + "$ref": "#/definitions/ConnectorCollectionInfo", + "description": "Collection information", + "x-nullable": true, + "readOnly": true + } + } + }, + "ConnectorCollectionInfo": { + "type": "object", + "description": "Collection and ingestion information", + "properties": { + "lastChecked": { + "format": "date-time", + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Last time the data acquisition process initiated connecting to the external provider", + "readOnly": true + }, + "sourceLastUpdated": { + "format": "date-time", + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Source timestamp of external data currently available in Azure (eg AWS last processed CUR file timestamp)", + "readOnly": true + }, + "lastUpdated": { + "format": "date-time", + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Last time the external data was updated into Azure", + "readOnly": true + }, + "error": { + "$ref": "#/definitions/ConnectorCollectionErrorInfo", + "description": "Error information of last collection" + } + } + }, + "ConnectorCollectionErrorInfo": { + "type": "object", + "description": "Details of any error encountered on last collection attempt", + "properties": { + "errorMessage": { + "type": "string", + "description": "Detailed error message", + "readOnly": true + }, + "errorInnerMessage": { + "type": "string", + "description": "External Provider error message", + "readOnly": true + }, + "errorCode": { + "type": "string", + "description": "Short error code", + "readOnly": true + }, + "errorStartTime": { + "format": "date-time", + "type": "string", + "description": "Time the error started occurring (Last time error occurred in lastChecked)", + "readOnly": true + } + } + }, + "ExternalBillingAccountDefinitionListResult": { + "description": "Result of listing ExternalBillingAccount definitions. It contains a list of available ExternalBillingAccount definitions in the scope provided.", + "properties": { + "value": { + "description": "The list of ExternalBillingAccount definitions.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ExternalBillingAccountDefinition" + } + } + } + }, + "ExternalBillingAccountDefinition": { + "type": "object", + "description": "The ExternalBillingAccount model definition", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "ExternalBillingAccount id" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "ExternalBillingAccount name" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "ExternalBillingAccount type" + }, + "kind": { + "type": "string", + "readOnly": true, + "description": "ExternalBillingAccount kind (eg aws)" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ExternalBillingAccountProperties", + "description": "ExternalBillingAccount properties" + } + }, + "x-ms-azure-resource": true + }, + "ExternalBillingAccountProperties": { + "type": "object", + "description": "The properties of a ExternalBillingAccount", + "properties": { + "displayName": { + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "ExternalBillingAccount DisplayName", + "readOnly": true + }, + "connectorId": { + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Underlying ConnectorId", + "readOnly": true + } + } + }, + "ExternalSubscriptionDefinitionListResult": { + "description": "Result of listing ExternalSubscription definitions. It contains a list of available ExternalSubscription definitions in the scope provided.", + "properties": { + "value": { + "description": "The list of ExternalSubscription definitions.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ExternalSubscriptionDefinition" + } + } + } + }, + "ExternalSubscriptionDefinition": { + "type": "object", + "description": "The ExternalSubscription model definition", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "ExternalSubscription id" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "ExternalSubscription name" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "ExternalSubscription type" + }, + "kind": { + "type": "string", + "readOnly": true, + "description": "ExternalSubscription kind (eg aws)" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ExternalSubscriptionProperties", + "description": "ExternalSubscription properties" + } + }, + "x-ms-azure-resource": true + }, + "ExternalSubscriptionProperties": { + "type": "object", + "description": "The properties of a ExternalSubscription", + "properties": { + "displayName": { + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "ExternalSubscription DisplayName", + "readOnly": true + }, + "managementGroupId": { + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Assigned ManagementGroupId", + "readOnly": true + }, + "externalBillingAccountId": { + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Parent ExternalBillingAccountId", + "readOnly": true + } + } + }, + "EntityListResult": { + "description": "Describes the result of the request to view entities.", + "properties": { + "value": { + "description": "The list of entities.", + "type": "array", + "items": { + "$ref": "#/definitions/EntityInfo" + } + }, + "count": { + "description": "Total count of records that match the filter", + "type": "integer", + "readOnly": true + }, + "nextLink": { + "description": "The URL to use for getting the next set of results.", + "type": "string", + "readOnly": true + } + } + }, + "EntityInfo": { + "description": "The entity.", + "properties": { + "id": { + "type": "string", + "description": "The fully qualified ID for the entity. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000", + "readOnly": true, + "x-nullable": true + }, + "type": { + "type": "string", + "description": "The type of the resource. For example, /providers/Microsoft.Management/managementGroups", + "readOnly": true, + "x-nullable": true + }, + "name": { + "type": "string", + "description": "The name of the entity. For example, 00000000-0000-0000-0000-000000000000", + "readOnly": true + }, + "kind": { + "type": "string", + "readOnly": true, + "description": "The kind of the resource", + "x-nullable": true + }, + "properties": { + "title": "Properties", + "x-ms-client-flatten": true, + "x-nullable": true, + "$ref": "#/definitions/EntityInfoProperties" + } + } + }, + "EntityInfoProperties": { + "description": "The generic properties of an entity.", + "type": "object", + "properties": { + "tenantId": { + "type": "string", + "description": "The AAD Tenant ID associated with the entity. For example, 00000000-0000-0000-0000-000000000000", + "x-nullable": true + }, + "displayName": { + "type": "string", + "description": "The friendly name of the management group.", + "x-nullable": true + }, + "parent": { + "title": "Parent", + "$ref": "#/definitions/EntityParentGroupInfo", + "x-nullable": true + }, + "permissions": { + "title": "Permissions", + "x-nullable": true, + "$ref": "#/definitions/Permissions" + }, + "inheritedPermissions": { + "title": "Inherited Permissions", + "x-nullable": true, + "$ref": "#/definitions/Permissions" + }, + "numberOfDescendants": { + "title": "Number of Descendants", + "type": "integer", + "x-nullable": true + }, + "numberOfChildren": { + "title": "Number of Children", + "description": "Number of children is the number of Groups and Subscriptions that are exactly one level underneath the current Group.", + "type": "integer", + "x-nullable": true + }, + "numberOfChildGroups": { + "title": "Number of Child Groups", + "description": "Number of child groups is the number of Groups that are exactly one level underneath the current Group.", + "type": "integer", + "x-nullable": true + }, + "parentDisplayNameChain": { + "type": "array", + "description": "The parent display name chain from the root group to the immediate parent", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "parentNameChain": { + "type": "array", + "description": "The parent name chain from the root group to the immediate parent", + "x-nullable": true, + "items": { + "type": "string" + } + } + } + }, + "EntityParentGroupInfo": { + "description": "(Optional) The ID of the parent management group.", + "properties": { + "id": { + "type": "string", + "description": "The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000" + } + } + }, + "Permissions": { + "type": "string", + "enum": [ + "noaccess", + "view", + "edit", + "delete" + ], + "description": "The users specific permissions to this item." + }, + "OperationListResult": { + "description": "Result of listing cost management operations. It contains a list of operations and a URL link to get the next set of results.", + "properties": { + "value": { + "description": "List of cost management operations supported by the Microsoft.CostManagement resource provider.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Operation" + } + }, + "nextLink": { + "description": "URL to get the next set of operation list results if there are any.", + "type": "string", + "readOnly": true + } + } + }, + "Operation": { + "description": "A Cost management REST API operation.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + }, + "display": { + "description": "The object that represents the operation.", + "properties": { + "provider": { + "description": "Service provider: Microsoft.CostManagement.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "Resource on which the operation is performed: Dimensions, Query.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type: Read, write, delete, etc.", + "type": "string", + "readOnly": true + } + } + } + } + } + }, + "parameters": { + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Version of the API to be used with the client request. The current version is 2019-03-01-preview" + }, + "subscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "Azure Subscription ID.", + "required": true, + "type": "string" + }, + "billingAccountIdParameter": { + "name": "billingAccountId", + "in": "path", + "description": "BillingAccount ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "managementGroupIdParameter": { + "name": "managementGroupId", + "in": "path", + "description": "ManagementGroup 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": "Enrollment Account ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "resourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "Azure Resource Group Name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "connectorNameParameter": { + "name": "connectorName", + "in": "path", + "description": "Connector Name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "externalBillingAccountNameParameter": { + "name": "externalBillingAccountName", + "in": "path", + "description": "External Billing Account Name. (eg 'aws-{PayerAccountId}')", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "externalSubscriptionNameParameter": { + "name": "externalSubscriptionName", + "in": "path", + "description": "External Subscription Name. (eg 'aws-{UsageAccountId}')", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "EntityViewParameter": { + "name": "$view", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "FullHierarchy", + "GroupsOnly", + "SubscriptionsOnly", + "ExternalSubscriptionsOnly", + "Audit" + ], + "x-ms-parameter-location": "method", + "description": "The view parameter allows clients to filter the type of data that is returned by the getEntities call." + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsList.json new file mode 100644 index 000000000000..2148d6fc447b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsList.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "billingAccountId": "100" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceGroup_2018-12-01_2018-12-31", + "name": "dimensions_ResourceGroup_2018-12-01_2018-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 3, + "category": "SubscriptionGuid", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Subscription Guid", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceType_2018-12-01_2018-12-31", + "name": "dimensions_ResourceType_2018-12-01_2018-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "Account Name", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..261219b6d68d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "billingAccountId": "100", + "$expand": "properties/data", + "$top": 5 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceGroup_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceGroup_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceType_2018-12-31_2018-12-31_5", + "name": "dimensions_ResourceType_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListWithFilter.json new file mode 100644 index 000000000000..02adf3719dc8 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListWithFilter.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "billingAccountId": "100", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceId_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceId_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", + "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" + ], + "total": 1409, + "category": "ResourceId", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "http://management.azure.com/ccmapi/providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-03-01-preview&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountForecast.json new file mode 100644 index 000000000000..0d2b125d34e1 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountForecast.json @@ -0,0 +1,128 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "billingAccountId": "70664866", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-08-01T00:00:00.000Z", + "to": "2018-10-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "filter":{ + "and": [ + { + "or":[ + { + "dimension": { + "name": "SubscriptionName", + "operator": "In", + "values": [ + "Azure Dev", + "Azure Prod", + "Azure PPE" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "Dev", + "PPE", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "DepartmentName", + "operator": "In", + "values": [ + "Azure Dept" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Forecast/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Forecast", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Forecast?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + 20180831, + "Actual", + "USD" + ], + [ + 20.41979233490323, + 20180930, + "Actual", + "USD" + ], + [ + 21.322216562625452, + 20181031, + "Actual", + "USD" + ], + [ + 22.545363672276532, + 20180831, + "Actual", + "USD" + ], + [ + 23.41979675590323, + 20180930, + "Forecast", + "USD" + ], + [ + 24.359416562626652, + 20181031, + "Forecast", + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQuery.json new file mode 100644 index 000000000000..8c6186516458 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQuery.json @@ -0,0 +1,103 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "billingAccountId": "70664866", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-08-01T00:00:00.000Z", + "to": "2018-10-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "filter":{ + "and": [ + { + "or":[ + { + "dimension": { + "name": "SubscriptionName", + "operator": "In", + "values": [ + "Azure Dev", + "Azure Prod", + "Azure PPE" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "Dev", + "PPE", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "DepartmentName", + "operator": "In", + "values": [ + "Azure Dept" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + 20180831, + "USD" + ], + [ + 173.41979241290323, + 20180930, + "USD" + ], + [ + 20.359416562625452, + 20181031, + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQueryGrouping.json new file mode 100644 index 000000000000..df58f39472b5 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQueryGrouping.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "billingAccountId": "70664866", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-10-01T00:00:00.000Z", + "to": "2018-10-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "SubscriptionName" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "SubscriptionName", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "Trial Subscription", + "USD" + ], + [ + 173.41979241290323, + "DEV Subscription", + "USD" + ], + [ + 20.359416562625452, + "Cost Management Subscrioption", + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorDelete.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorDelete.json new file mode 100644 index 000000000000..6000c2609293 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorDelete.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "connectorName": "12345678-9012-3456-7890-111111111111" + }, + "responses": { + "200": { + } + } +} + diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGet.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGet.json new file mode 100644 index 000000000000..8805252a8b85 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGet.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "connectorName": "12345678-9012-3456-7890-111111111111" + }, + "responses": { + "200": { + "body": { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/12345678-9012-3456-7890-111111111111", + "name": "12345678-9012-3456-7890-111111111111", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-1", + "providerAccountId": "123456789012", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "reportId": "HourlyWithResources", + "createdOn": "2018-05-15T13:25:48Z", + "modifiedOn": "2018-05-23T09:21:11Z", + "status": "active", + "defaultManagementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ", + "subscriptionId": "22222222-3333-4444-1111-777777777777", + "billingModel": "autoUpgrade", + "daysTrialRemaining": 62 + } + } + } + } +} + diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGetExpand.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGetExpand.json new file mode 100644 index 000000000000..9910c33da554 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGetExpand.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "connectorName": "12345678-9012-3456-7890-111111111111", + "$expand": "collectionInfo" + }, + "responses": { + "200": { + "body": { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/12345678-9012-3456-7890-111111111111", + "name": "12345678-9012-3456-7890-111111111111", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-1", + "providerAccountId": "123456789012", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "reportId": "HourlyWithResources", + "createdOn": "2018-05-15T13:25:48Z", + "modifiedOn": "2018-05-23T09:21:11Z", + "status": "active", + "defaultManagementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ", + "subscriptionId": "22222222-3333-4444-1111-777777777777", + "billingModel": "autoUpgrade", + "daysTrialRemaining": 62, + "collectionInfo": { + "lastChecked": "2018-06-15T03:21:08Z", + "sourceLastUpdated": "2018-06-12T16:41:28Z", + "lastUpdated": "2018-06-12T17:25:28Z", + "error": { + "errorCode": "FailedToAssumeRole", + "errorMessage": "Failed to assume role", + "errorInnerMessage": "Insufficient access to assume role arn:aws:iam::123456789012:role/AzureCostManagementRole", + "errorStartTime": "2018-06-12T21:41:03Z" + } + } + } + } + } + } +} + diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorList.json new file mode 100644 index 000000000000..fc078b4226fb --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorList.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/12345678-9012-3456-7890-111111111111", + "name": "12345678-9012-3456-7890-111111111111", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-1", + "providerAccountId": "123456789012", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "reportId": "HourlyWithResources", + "createdOn": "2018-05-15T13:25:48Z", + "modifiedOn": "2018-05-23T09:21:11Z", + "status": "active", + "defaultManagementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ", + "subscriptionId": "22222222-3333-4444-1111-777777777777", + "billingModel": "autoUpgrade", + "daysTrialRemaining": 62 + } + }, + { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/11111111-2222-3333-4444-555555555555", + "name": "11111111-2222-3333-4444-555555555555", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-2", + "providerAccountId": "100000000007", + "credentialsKey": "arn:aws:iam::100000000007:role/AzureCostManagementRole", + "reportId": "CURHourlyWithResources", + "createdOn": "2018-06-16T11:23:44Z", + "modifiedOn": "2018-06-21T17:33:28Z", + "status": "suspended", + "defaultManagementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ", + "subscriptionId": "22222222-3333-4444-1111-777777777777", + "billingModel": "premium" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPatch.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPatch.json new file mode 100644 index 000000000000..7b1194753c45 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPatch.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "connectorName": "12345678-9012-3456-7890-111111111111", + "connector": { + "properties": { + "displayName": "AWS-Consolidated-3" + } + } + }, + "responses": { + "200": { + "body": { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/12345678-9012-3456-7890-111111111111", + "name": "12345678-9012-3456-7890-111111111111", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-3", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "reportId": "HourlyWithResources", + "createdOn": "2018-05-15T13:25:48Z", + "modifiedOn": "2018-05-23T09:21:11Z", + "status": "active", + "defaultManagementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ", + "subscriptionId": "22222222-3333-4444-1111-777777777777", + "billingModel": "autoUpgrade", + "daysTrialRemaining": 62 + } + } + } + } +} + diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPut.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPut.json new file mode 100644 index 000000000000..29c4fd1a13a9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPut.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "connectorName": "12345678-9012-3456-7890-111111111111", + "connector": { + "properties": { + "displayName": "AWS-Consolidated-1", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "credentialsSecret": "external-id", + "reportId": "HourlyWithResources", + "status": "active" + } + } + }, + "responses": { + "200": { + "body": { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/12345678-9012-3456-7890-111111111111", + "name": "12345678-9012-3456-7890-111111111111", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-1", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "reportId": "HourlyWithResources", + "createdOn": "2018-05-15T13:25:48Z", + "modifiedOn": "2018-05-23T09:21:11Z", + "status": "active", + "subscriptionId": "22222222-3333-4444-1111-777777777777", + "billingModel": "autoUpgrade", + "daysTrialRemaining": 62 + } + } + }, + "201": { + "body": { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/12345678-9012-3456-7890-111111111111", + "name": "12345678-9012-3456-7890-111111111111", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-1", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "reportId": "HourlyWithResources", + "createdOn": "2018-05-15T13:25:48Z", + "modifiedOn": "2018-05-23T09:21:11Z", + "status": "active", + "defaultManagementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ", + "subscriptionId": "22222222-3333-4444-1111-777777777777", + "billingModel": "autoUpgrade", + "daysTrialRemaining": 62 + } + } + } + } +} + diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsList.json new file mode 100644 index 000000000000..89b95546d1fc --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsList.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "billingAccountId": "100", + "departmentId": "123" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.consumption/dimensions_ResourceGroup_2018-12-01_2018-12-31", + "name": "dimensions_ResourceGroup_2018-12-01_2018-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.consumption/dimensions_ResourceType_2018-12-01_2018-12-31", + "name": "dimensions_ResourceType_2018-12-01_2018-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..c34403dc70b6 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListExpandAndTop.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "billingAccountId": "100", + "departmentId": "123", + "$expand": "properties/data", + "$top": 5 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.consumption/dimensions_ResourceGroup_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceGroup_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.consumption/dimensions_ResourceType_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceType_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListWithFilter.json new file mode 100644 index 000000000000..cae08c00c4b6 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListWithFilter.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "billingAccountId": "100", + "departmentId": "123", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.consumption/dimensions_ResourceId_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceId_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", + "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" + ], + "total": 1409, + "category": "ResourceId", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-03-01-preview&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentForecast.json new file mode 100644 index 000000000000..17f3f91e8830 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentForecast.json @@ -0,0 +1,129 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "billingAccountId": "70664866", + "departmentId": "123", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-10-01T00:00:00.000Z", + "to": "2018-12-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "filter":{ + "and": [ + { + "or":[ + { + "dimension": { + "name": "SubscriptionName", + "operator": "In", + "values": [ + "Azure Dev Subscription", + "Azure Prod Subscription", + "Azure PPE Subscription" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "Dev", + "PPE", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "AccountName", + "operator": "In", + "values": [ + "Azure Account" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Forecast/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Forecast", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Forecast?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + 20181026, + "Actual", + "USD" + ], + [ + 20.41179241293923, + 20181027, + "Actual", + "USD" + ], + [ + 21.359416562625452, + 20181028, + "Actual", + "USD" + ], + [ + 22.545363672276512, + 20181029, + "Forecast", + "USD" + ], + [ + 23.41979241290323, + 20181030, + "Forecast", + "USD" + ], + [ + 24.359416562625452, + 20181031, + "Forecast", + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQuery.json new file mode 100644 index 000000000000..7c05492c89b8 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQuery.json @@ -0,0 +1,104 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "billingAccountId": "70664866", + "departmentId": "123", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-10-01T00:00:00.000Z", + "to": "2018-12-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "filter":{ + "and": [ + { + "or":[ + { + "dimension": { + "name": "SubscriptionName", + "operator": "In", + "values": [ + "Azure Dev Subscription", + "Azure Prod Subscription", + "Azure PPE Subscription" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "Dev", + "PPE", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "AccountName", + "operator": "In", + "values": [ + "Azure Account" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + 20181031, + "USD" + ], + [ + 173.41979241290323, + 20181031, + "USD" + ], + [ + 20.359416562625452, + 20181031, + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQueryGrouping.json new file mode 100644 index 000000000000..78c9377d4d5e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQueryGrouping.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "billingAccountId": "70664866", + "departmentId": "123", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-08-01T00:00:00.000Z", + "to": "2018-10-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "AccountName" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "AccountName", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "Azure Dev Account", + "USD" + ], + [ + 173.41979241290323, + "Azure PPE Account", + "USD" + ], + [ + 20.359416562625452, + "Azure Prod Account", + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsList.json new file mode 100644 index 000000000000..1689becf8479 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsList.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "billingAccountId": "100", + "enrollmentAccountId": "456" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.consumption/dimensions_ResourceGroup_2018-12-01_2018-12-31", + "name": "dimensions_ResourceGroup_2018-12-01_2018-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.consumption/dimensions_ResourceType_2018-12-01_2018-12-31", + "name": "dimensions_ResourceType_2018-12-01_2018-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..c6765a2fe044 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "$expand": "properties/data", + "$top": 5 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.consumption/dimensions_ResourceGroup_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceGroup_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.consumption/dimensions_ResourceType_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceType_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json new file mode 100644 index 000000000000..3114a3bc5633 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.consumption/dimensions_ResourceId_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceId_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", + "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" + ], + "total": 1409, + "category": "ResourceId", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-03-01-preview&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountForecast.json new file mode 100644 index 000000000000..fa4247f3a054 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountForecast.json @@ -0,0 +1,116 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "billingAccountId": "70664866", + "enrollmentAccountId": "456", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-08-01T00:00:00.000Z", + "to": "2018-10-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "filter":{ + "or":[ + { + "dimension": { + "name": "SubscriptionName", + "operator": "In", + "values": [ + "Azure Dev Subscription", + "Azure Prod Subscription", + "Azure PPE Subscription" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "Dev", + "PPE", + "Prod" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Forecast/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Forecast", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Forecast?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 168.545323467227622, + 20180826, + "Actual", + "USD" + ], + [ + 169.41979241290344, + 20180927, + "Actual", + "USD" + ], + [ + 170.359416562338452, + 20181028, + "Actual", + "USD" + ], + [ + 172.545363234276512, + 20180829, + "Forecast", + "USD" + ], + [ + 173.41979241290323, + 20180930, + "Forecast", + "USD" + ], + [ + 174.359416562625452, + 20181031, + "Forecast", + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQuery.json new file mode 100644 index 000000000000..8b737fabd400 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQuery.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "billingAccountId": "70664866", + "enrollmentAccountId": "456", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-08-01T00:00:00.000Z", + "to": "2018-10-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "filter":{ + "or":[ + { + "dimension": { + "name": "SubscriptionName", + "operator": "In", + "values": [ + "Azure Dev Subscription", + "Azure Prod Subscription", + "Azure PPE Subscription" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "Dev", + "PPE", + "Prod" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + 20180831, + "USD" + ], + [ + 173.41979241290323, + 20180930, + "USD" + ], + [ + 20.359416562625452, + 20181031, + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQueryGrouping.json new file mode 100644 index 000000000000..65e6d86f817b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQueryGrouping.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "billingAccountId": "70664866", + "enrollmentAccountId": "456", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-08-01T00:00:00.000Z", + "to": "2018-10-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "SubscriptionName" + } + ], + "sorting": [ + { + "name": "UsageDate" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "SubscriptionName", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "Azure Dev Subscription", + 20180831, + "USD" + ], + [ + 173.41979241290323, + "Azure PPE Subscription", + 20180930, + "USD" + ], + [ + 20.359416562625452, + "Azure Prod Subscription", + 20181031, + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalBillingAccountExternalSubscriptionList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalBillingAccountExternalSubscriptionList.json new file mode 100644 index 000000000000..c937d61bed93 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalBillingAccountExternalSubscriptionList.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "externalBillingAccountName": "aws-123456789012" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321", + "name": "aws-654321654321", + "type": "Microsoft.CostManagement/externalSubscriptions", + "kind": "aws", + "properties": { + "displayName": "MyUsageAccount1", + "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "managementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalBillingAccountGet.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalBillingAccountGet.json new file mode 100644 index 000000000000..bcd1c2b75eac --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalBillingAccountGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "externalBillingAccountName": "aws-123456789012" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "name": "aws-123456789012", + "type": "Microsoft.CostManagement/externalBillingAccounts", + "kind": "aws", + "properties": { + "displayName": "Contoso Consolidated", + "connectorId": "/providers/Microsoft.CostManagement/cloudConnectors/12345678-9012-3456-7890-111111111111" + } + } + } + } +} + diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalBillingAccountList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalBillingAccountList.json new file mode 100644 index 000000000000..f9570937df4b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalBillingAccountList.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "name": "aws-123456789012", + "type": "Microsoft.CostManagement/externalBillingAccounts", + "kind": "aws", + "properties": { + "displayName": "Contoso Consolidated", + "connectorId": "/providers/Microsoft.CostManagement/cloudConnectors/12345678-9012-3456-7890-111111111111" + } + }, + { + "id": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-112233445566", + "name": "aws-112233445566", + "type": "Microsoft.CostManagement/externalBillingAccounts", + "kind": "aws", + "properties": { + "displayName": "Contoso Consolidated2", + "connectorId": "/providers/Microsoft.CostManagement/cloudConnectors/11111111-2222-3333-4444-555555555555" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionGet.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionGet.json new file mode 100644 index 000000000000..04ce17b57bd5 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionGet.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "externalSubscriptionName": "aws-654321654321" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321", + "name": "aws-654321654321", + "type": "Microsoft.CostManagement/externalSubscriptions", + "kind": "aws", + "properties": { + "displayName": "MyUsageAccount1", + "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "managementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ" + } + } + } + } +} + diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionList.json new file mode 100644 index 000000000000..885cedfc4bf8 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionList.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321", + "name": "aws-654321654321", + "type": "Microsoft.CostManagement/externalSubscriptions", + "kind": "aws", + "properties": { + "displayName": "MyUsageAccount1", + "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "managementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ" + } + }, + { + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-110011001100", + "name": "aws-110011001100", + "type": "Microsoft.CostManagement/externalSubscriptions", + "kind": "aws", + "properties": { + "displayName": "MyUsageAccount2", + "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-112233445566", + "managementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsList.json new file mode 100644 index 000000000000..3cd7bdbe6ab5 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsList.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "managementGroupId": "MyMgId" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.consumption/dimensions_ResourceGroup_2018-12-01_2018-12-31", + "name": "dimensions_ResourceGroup_2018-12-01_2018-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.consumption/dimensions_ResourceType_2018-12-01_2018-12-31", + "name": "dimensions_ResourceType_2018-12-01_2018-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..7b9960077fde --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "managementGroupId": "MyMgId", + "$expand": "properties/data", + "$top": 5 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.consumption/dimensions_ResourceGroup_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceGroup_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.consumption/dimensions_ResourceType_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceType_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListWithFilter.json new file mode 100644 index 000000000000..83a8ac2f5e94 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListWithFilter.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "managementGroupId": "MyMgId", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.consumption/dimensions_ResourceId_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceId_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", + "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" + ], + "total": 1409, + "category": "ResourceId", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "http://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2018-12-31-preview&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionList.json new file mode 100644 index 000000000000..7460c8c280b3 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionList.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "managementGroupId": "XYZ" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.CostManagement/externalSubscription/aws-654321654321", + "name": "aws-654321654321", + "type": "Microsoft.CostManagement/externalSubscription", + "properties": { + "displayName": "MyUsageAccount1", + "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "managementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ" + } + }, + { + "id": "/providers/Microsoft.CostManagement/externalSubscription/aws-110011001100", + "name": "aws-110011001100", + "type": "Microsoft.CostManagement/externalSubscription", + "properties": { + "displayName": "MyUsageAccount2", + "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-112233445566", + "managementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionPut.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionPut.json new file mode 100644 index 000000000000..3c1613933177 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionPut.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "managementGroupId": "XYZ", + "externalSubscriptionName": "aws-654321654321" + }, + "responses": { + "204": { + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupForecast.json new file mode 100644 index 000000000000..4cd999c72afe --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupForecast.json @@ -0,0 +1,115 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "managementGroupId": "MyMgId", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-11-01T00:00:00.000Z", + "to": "2019-01-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "filter":{ + "or":[ + { + "dimension": { + "name": "SubscriptionName", + "operator": "In", + "values": [ + "Azure Dev", + "Azure Prod", + "Azure PPE" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "Dev", + "PPE", + "Prod" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Forecast/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Forecast", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Forecast?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.045363672276512, + 20190126, + "Actual", + "USD" + ], + [ + 19.41979241290323, + 20190127, + "Actual", + "USD" + ], + [ + 20.359416562625452, + 20190128, + "Actual", + "USD" + ], + [ + 19.045363672276512, + 20190129, + "Forecast", + "USD" + ], + [ + 19.41979241290323, + 20190130, + "Forecast", + "USD" + ], + [ + 20.359416562625452, + 20190131, + "Forecast", + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupGetEntities.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupGetEntities.json new file mode 100644 index 000000000000..833ff97e59f2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupGetEntities.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "managementGroupId": "XYZ" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Management/managementGroups/XYZ", + "type": "/providers/Microsoft.Management/managementGroups", + "name": "XYZ", + "properties": { + "tenantId": "20000000-0000-0000-0000-000000000000", + "displayName": "XYZ Department", + "parent": { + "id": "/providers/Microsoft.Management/managementGroups/Engineering" + }, + "permissions": "noaccess", + "inheritedPermissions": "view", + "numberOfDescendants": 0, + "numberOfChildren": 0, + "numberOfChildGroups": 0, + "parentDisplayNameChain": [ + "20000000-0000-0000-0000-000000000000", + "Engineering" + ], + "parentNameChain": [ + "20000000-0000-0000-0000-000000000000", + "Engineering" + ] + } + }, + { + "id": "/subscriptions/88888888-3333-6666-1111-444444444444", + "type": "/subscriptions", + "name": "88888888-3333-6666-1111-444444444444", + "properties": { + "tenantId": "20000000-0000-0000-0000-000000000000", + "displayName": "XYZ Subscription", + "parent": { + "id": "/providers/Microsoft.Management/managementGroups/XYZ" + }, + "permissions": "noaccess", + "inheritedPermissions": "view", + "numberOfDescendants": 0, + "numberOfChildren": 0, + "numberOfChildGroups": 0, + "parentDisplayNameChain": [ + "20000000-0000-0000-0000-000000000000", + "Engineering", + "XYZ Department" + ], + "parentNameChain": [ + "20000000-0000-0000-0000-000000000000", + "Engineering", + "XYZ" + ] + } + }, + { + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321", + "type": "Microsoft.CostManagement/externalSubscriptions", + "name": "aws-654321654321", + "kind": "aws", + "properties": { + "tenantId": "20000000-0000-0000-0000-000000000000", + "displayName": "XYZ UsageAccount", + "parent": { + "id": "/providers/Microsoft.Management/managementGroups/XYZ" + }, + "permissions": "noaccess", + "inheritedPermissions": "view", + "numberOfDescendants": 0, + "numberOfChildren": 0, + "numberOfChildGroups": 0, + "parentDisplayNameChain": [ + "20000000-0000-0000-0000-000000000000", + "Engineering", + "XYZ Department" + ], + "parentNameChain": [ + "20000000-0000-0000-0000-000000000000", + "Engineering", + "XYZ" + ] + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQuery.json new file mode 100644 index 000000000000..426805646f4f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQuery.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "managementGroupId": "MyMgId", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-11-01T00:00:00.000Z", + "to": "2019-01-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "filter":{ + "or":[ + { + "dimension": { + "name": "SubscriptionName", + "operator": "In", + "values": [ + "Azure Dev", + "Azure Prod", + "Azure PPE" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "Dev", + "PPE", + "Prod" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + 20181131, + "USD" + ], + [ + 173.41979241290323, + 20181231, + "USD" + ], + [ + 20.359416562625452, + 20190131, + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQueryGrouping.json new file mode 100644 index 000000000000..f8b13c585079 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQueryGrouping.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "managementGroupId": "MyMgId", + "parameters": { + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-08-01T00:00:00.000Z", + "to": "2018-10-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "SubscriptionName" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "SubscriptionName", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "Trial Subscription", + "USD" + ], + [ + 173.41979241290323, + "DEV Subscription", + "USD" + ], + [ + 20.35941656262545, + "Cost Management Subscrioption", + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupDimensionsList.json new file mode 100644 index 000000000000..34aee5fa0cf0 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupDimensionsList.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "system.orlando", + "$expand": "properties/data", + "$top": 5 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/system.orlando/providers/microsoft.consumption/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "microsoft.storage/storageaccounts" + ], + "total": 1, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/system.orlando/providers/microsoft.consumption/dimensions_ResourceId_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/authprod", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/systemevents", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/armadminprod", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/publicsystemportal" + ], + "total": 27, + "category": "ResourceId", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupForecast.json new file mode 100644 index 000000000000..b214a77885fd --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupForecast.json @@ -0,0 +1,111 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "subscriptionId": "55312978-ba1b-415c-9304-c4b9c43c0481", + "resourceGroupName": "ScreenSharingTest-peer", + "parameters":{ + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter":{ + "and": [ + { + "or":[ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/55312978-ba1b-415c-9304-c4b9c43c0481/resourcegroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/Forecast/9af9459d-441d-4055-9ed0-83d4c4a363fb", + "name": "9af9459d-441d-4055-9ed0-83d4c4a363fb", + "type": "microsoft.costmanagement/Forecast", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.10333307059661, + 20180417, + "Actual", + "USD" + ], + [ + 20.10333307059661, + 20180418, + "Actual", + "USD" + ], + [ + 21.10333307059661, + 20180419, + "Forecast", + "USD" + ], + [ + 22.10333307059661, + 20180420, + "Forecast", + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupQuery.json new file mode 100644 index 000000000000..14eaef3e8f4f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupQuery.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "subscriptionId": "55312978-ba1b-415c-9304-c4b9c43c0481", + "resourceGroupName": "ScreenSharingTest-peer", + "parameters":{ + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter":{ + "and": [ + { + "or":[ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/55312978-ba1b-415c-9304-c4b9c43c0481/resourcegroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/Query/9af9459d-441d-4055-9ed0-83d4c4a363fb", + "name": "9af9459d-441d-4055-9ed0-83d4c4a363fb", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + 20180417, + "USD" + ], + [ + 20.10333307059661, + 20180418, + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionDimensionsList.json new file mode 100644 index 000000000000..ef1d011d3a1c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionDimensionsList.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "$top": 5, + "$expand": "properties/data" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/dimensions_ResourceGroup_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceGroup_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "dcrg", + "rg", + "offlinegalleryrg", + "system.orlando.adminkeyvault", + "system.orlando.keyvault" + ], + "total": 68, + "category": "ResourceGroup", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/dimensions_ResourceType_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceType_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "microsoft.storage/storageaccounts", + "microsoft.web.admin/role", + "microsoft.sql/servers", + "microsoft.compute/virtualmachines" + ], + "total": 4, + "category": "ResourceType", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionForecast.json new file mode 100644 index 000000000000..f12e2175568d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionForecast.json @@ -0,0 +1,124 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-10-01T00:00:00.000Z", + "to": "2018-12-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "filter":{ + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "Dev", + "PPE", + "Prod" + ] + } + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/Forecast/00000000-0000-0000-0000-000000000000", + "name": "55312978-ba1b-415c-9304-cfd9c43c0481", + "type": "microsoft.costmanagement/Forecast", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 214.68795741935486, + 20181222, + "Actual", + "USD" + ], + [ + 215.68795741935486, + 20181223, + "Actual", + "USD" + ], + [ + 216.68795741935486, + 20181224, + "Actual", + "USD" + ], + [ + 217.68795741935486, + 20181225, + "Actual", + "USD" + ], + [ + 218.68795741935486, + 20181226, + "Actual", + "USD" + ], + [ + 219.143849143581657052, + 20181227, + "Actual", + "USD" + ], + [ + 220.143849143588766052, + 20181228, + "Forecast", + "USD" + ], + [ + 221.143433143588766052, + 20181229, + "Forecast", + "USD" + ], + [ + 222.143433555588766052, + 20181230, + "Forecast", + "USD" + ], + [ + 223.143433555588743252, + 20181231, + "Forecast", + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionQuery.json new file mode 100644 index 000000000000..5bfac70c4632 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionQuery.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-10-01T00:00:00.000Z", + "to": "2018-12-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "filter":{ + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "Dev", + "PPE", + "Prod" + ] + } + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/Query/00000000-0000-0000-0000-000000000000", + "name": "55312978-ba1b-415c-9304-cfd9c43c0481", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + 20181017, + "USD" + ], + [ + 218.68795741935486, + 20181018, + "USD" + ], + [ + 0.14384913581657052, + 20181019, + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/readme.md b/specification/cost-management/resource-manager/readme.md index 2574976be824..e85f1a4a70e1 100644 --- a/specification/cost-management/resource-manager/readme.md +++ b/specification/cost-management/resource-manager/readme.md @@ -5,7 +5,9 @@ This is the AutoRest configuration file for Cost Management. --- + ## Getting Started + To build the SDK for Cost Management, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: > `autorest` @@ -13,20 +15,32 @@ To build the SDK for Cost Management, simply [Install AutoRest](https://aka.ms/a To see additional help and options, run: > `autorest --help` + --- ## Configuration ### Basic Information + These are the global settings for the Cost Management API. ``` yaml openapi-type: arm -tag: package-2018-05 +tag: package-preview-2019-03 azure-validator: true ``` --- + + +### Tag: package-preview-2019-03 + +These settings apply only when `--tag=package-preview-2019-03` is specified on the command line. + +```yaml $(tag) == 'package-preview-2019-03' +input-file: + - Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json +``` ### Tag: package-2018-05 These settings apply only when `--tag=package-2018-05` is specified on the command line. @@ -37,12 +51,17 @@ input-file: ``` ## Suppression + ``` yaml directive: - suppress: R2059 from: costmanagement.json where: $.paths reason: We are extending Microsoft.Billing RP in some scenarios + - suppress: R3023 + from: costmanagement.json + where: $.paths + reason: operations API for Microsoft.Billing are defined in Microsoft.Billing ``` ### Tag: package-2018-08-preview @@ -54,7 +73,6 @@ input-file: - Microsoft.CostManagement/preview/2018-08-01-preview/costmanagement.json ``` - ### Tag: package-2018-12-preview These settings apply only when `--tag=package-2018-12-preview` is specified on the command line. @@ -64,8 +82,8 @@ input-file: - Microsoft.CostManagement/preview/2018-12-01-preview/costmanagement.json ``` - --- + # Code Generation ## Swagger to SDK @@ -114,11 +132,13 @@ python: package-version: 1.2.0 clear-output-folder: true ``` + ``` yaml $(python) && $(python-mode) == 'update' python: no-namespace-folders: true output-folder: $(python-sdks-folder)/azure-mgmt-costmanagement/azure/mgmt/costmanagement ``` + ``` yaml $(python) && $(python-mode) == 'create' python: basic-setup-py: true @@ -188,4 +208,4 @@ java: output-folder: $(azure-libraries-for-java-folder)/costmanagement/resource-manager/v2018_12_01_preview regenerate-manager: true generate-interface: true -``` \ No newline at end of file +```