diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json new file mode 100644 index 000000000000..fb2828fc1053 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json @@ -0,0 +1,4062 @@ +{ + "swagger": "2.0", + "info": { + "version": "2019-04-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_UsageByManagementGroup", + "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_UsageByManagementGroup", + "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_Update": { + "$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" + }, + "ExternalBillingAccount_Get_Expand": { + "$ref": "./examples/ExternalBillingAccountGetExpand.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/externalBillingAccountNameParameter" + }, + { + "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/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" + }, + "ExternalSubscription_Get_Expand": { + "$ref": "./examples/ExternalSubscriptionGetExpand.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/externalSubscriptionNameParameter" + }, + { + "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/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" + }, + { + "name": "$recurse", + "description": "The $recurse=true query string parameter allows returning externalSubscriptions associated with the specified managementGroup, or any of its descendants.", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "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_UpdateManagementGroup", + "description": "Updates the management group of an ExternalSubscription", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ManagementGroupExternalSubscription_Put": { + "$ref": "./examples/ManagementGroupExternalSubscriptionUpdate.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.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/showbackRules": { + "get": { + "tags": [ + "ShowbackRules" + ], + "operationId": "ShowbackRules_List", + "description": "Get list all Showback Rules.", + "x-ms-examples": { + "ShowbackRules_List": { + "$ref": "./examples/ShowbackRulesList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ShowbackRuleListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/showbackRules/{ruleName}": { + "get": { + "tags": [ + "ShowbackRules" + ], + "operationId": "ShowbackRule_GetBillingAccountId", + "description": "Gets the showback rule by rule name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ShowbackRules": { + "$ref": "./examples/ShowbackRuleGet.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/ruleNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ShowbackRule" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "ShowbackRules" + ], + "operationId": "ShowbackRule_CreateUpdateRule", + "description": "Create/Update showback rule for billing account.", + "x-ms-examples": { + "ShowbackRules": { + "$ref": "./examples/ShowbackRulePut.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/ruleNameParameter" + }, + { + "name": "showbackRule", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ShowbackRuleProperties" + }, + "description": "Showback rule to create or update." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ShowbackRule" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/views": { + "get": { + "tags": [ + "Views" + ], + "operationId": "Views_List", + "description": "Lists all views at the given scope.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ResourceGroupViewList": { + "$ref": "./examples/ViewListByResourceGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeViewParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ViewListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}/views":{ + "get": { + "tags": [ + "Views" + ], + "operationId": "Views_ListByExternalBillingAccount", + "description": "List all views by external billing account", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalBillingAccountViewList": { + "$ref": "./examples/ViewListByExternalBillingAccount.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/externalBillingAccountNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ViewListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}/views":{ + "get": { + "tags": [ + "Views" + ], + "operationId": "Views_ListByExternalSubscription", + "description": "List all views by external subscription", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalSubscriptionViewList": { + "$ref": "./examples/ViewListByExternalSubscription.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/externalSubscriptionNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ViewListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/views/{viewName}": { + "get": { + "tags": [ + "Views" + ], + "operationId": "Views_Get", + "description": "Gets the view for the defined scope by view name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ResourceGroupView": { + "$ref": "./examples/ViewByResourceGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeViewParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/viewNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/View" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Views" + ], + "operationId": "Views_CreateOrUpdate", + "description": "The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ResourceGroupCreateOrUpdateView": { + "$ref": "./examples/ViewCreateOrUpdateByResourceGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeViewParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/viewNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/View" + }, + "description": "Parameters supplied to the CreateOrUpdate View operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/View" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/View" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Views" + ], + "operationId": "Views_Delete", + "description": "The operation to delete a view.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ResourceGroupDeleteView": { + "$ref": "./examples/ViewDeleteByResourceGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeViewParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/viewNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}/views/{viewName}":{ + "get": { + "tags": [ + "Views" + ], + "operationId": "Views_GetByExternalBillingAccount", + "description": "Gets the view for external billing account by view name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalBillingAccountView": { + "$ref": "./examples/ViewByExternalBillingAccount.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/externalBillingAccountNameParameter" + }, + { + "$ref": "#/parameters/viewNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/View" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Views" + ], + "operationId": "Views_CreateOrUpdateByExternalBillingAccount", + "description": "The operation to create or update a view by external billing account. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalBillingAccountCreateOrUpdateView": { + "$ref": "./examples/ViewCreateOrUpdateByExternalBillingAccount.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/externalBillingAccountNameParameter" + }, + { + "$ref": "#/parameters/viewNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/View" + }, + "description": "Parameters supplied to the CreateOrUpdate View operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/View" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/View" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Views" + ], + "operationId": "Views_DeleteByExternalBillingAccount", + "description": "The operation to delete a view by external billing account.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalBillingAccountDeleteView": { + "$ref": "./examples/ViewDeleteByExternalBillingAccount.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/externalBillingAccountNameParameter" + }, + { + "$ref": "#/parameters/viewNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}/views/{viewName}":{ + "get": { + "tags": [ + "Views" + ], + "operationId": "Views_GetByExternalSubscription", + "description": "Gets the view for external subscription by view name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalSubscriptionView": { + "$ref": "./examples/ViewByExternalSubscription.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/externalSubscriptionNameParameter" + }, + { + "$ref": "#/parameters/viewNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/View" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Views" + ], + "operationId": "Views_CreateOrUpdateByExternalSubscription", + "description": "The operation to create or update a view by external subscription. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalSubscriptionCreateOrUpdateView": { + "$ref": "./examples/ViewCreateOrUpdateByExternalSubscription.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/externalSubscriptionNameParameter" + }, + { + "$ref": "#/parameters/viewNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/View" + }, + "description": "Parameters supplied to the CreateOrUpdate View operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/View" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/View" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Views" + ], + "operationId": "Views_DeleteByExternalSubscription", + "description": "The operation to delete a view by external subscription.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalSubscriptionDeleteView": { + "$ref": "./examples/ViewDeleteByExternalSubscription.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/externalSubscriptionNameParameter" + }, + { + "$ref": "#/parameters/viewNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/checkNameAvailability": { + "post":{ + "tags":[ + "CostManagement" + ], + "operationId": "CostManagement_CheckNameAvailability", + "description": "The operation to check resource name availability under cost management. A name is available if no other resource exists with the same name, type and scope.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ResourceGroupCheckNameAvailabilityAvailable": { + "$ref": "./examples/CheckNameAvailabilityByResourceGroup_Available.json" + }, + "ResourceGroupCheckNameAvailabilityNotAvailable": { + "$ref": "./examples/CheckNameAvailabilityByResourceGroup_NotAvailable.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeCheckNameAvailabilityParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityRequestBody" + }, + "description": "Parameters about Resource type and Resource name." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityResult" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}/checkNameAvailability":{ + "post":{ + "tags":[ + "CostManagement" + ], + "operationId": "CostManagement_CheckNameAvailabilityByExternalBillingAccount", + "description": "The operation to check resource name availability by external billing account under cost management. A name is available if no other resource exists with the same name, type and scope.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalBillingAccountCheckNameAvailabilityAvailable": { + "$ref": "./examples/CheckNameAvailabilityByExternalBillingAccount_Available.json" + }, + "ExternalBillingAccountCheckNameAvailabilityNotAvailable": { + "$ref": "./examples/CheckNameAvailabilityByExternalBillingAccount_NotAvailable.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/externalBillingAccountNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityRequestBody" + }, + "description": "Parameters about Resource type and Resource name." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityResult" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}/checkNameAvailability":{ + "post":{ + "tags":[ + "CostManagement" + ], + "operationId": "CostManagement_CheckNameAvailabilityByExternalSubscription", + "description": "The operation to check resource name availability by external subscription under cost management. A name is available if no other resource exists with the same name, type and scope.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalSubscriptionCheckNameAvailabilityAvailable": { + "$ref": "./examples/CheckNameAvailabilityByExternalSubscription_Available.json" + }, + "ExternalSubscriptionCheckNameAvailabilityNotAvailable": { + "$ref": "./examples/CheckNameAvailabilityByExternalSubscription_NotAvailable.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/externalSubscriptionNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "input", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityRequestBody" + }, + "description": "Parameters about Resource type and Resource name." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityResult" + } + } + } + } + }, + "/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 + }, + "ProxyResource": { + "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." + }, + "eTag": { + "type": "string", + "description": "eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not." + } + }, + "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" + }, + "providerBillingAccountId": { + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Connector providerBillingAccountId, determined from credentials (eg AWS Consolidated account number)", + "readOnly": true + }, + "providerBillingAccountDisplayName": { + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "The display name of the providerBillingAccountId as defined on the external provider", + "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", + "expired", + "warning" + ], + "x-ms-enum": { + "name": "ConnectorStatus", + "modelAsString": true + }, + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Connector status", + "readOnly": true + }, + "externalBillingAccountId": { + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Associated ExternalBillingAccountId", + "readOnly": true + }, + "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 + }, + "providerBillingAccountId": { + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Provider BillingAccountId (eg AWS Consolidated Account number)", + "readOnly": true + }, + "connectorId": { + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Underlying ConnectorId", + "readOnly": true + }, + "collectionInfo": { + "$ref": "#/definitions/ConnectorCollectionInfo", + "description": "Collection information", + "x-nullable": true, + "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 + }, + "providerBillingAccountId": { + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Provider BillingAccountId (eg AWS Consolidated Account number)", + "readOnly": true + }, + "providerAccountId": { + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Provider AccountId (eg AWS Linked Account number)", + "readOnly": true + }, + "externalBillingAccountId": { + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Parent ExternalBillingAccountId", + "readOnly": true + }, + "collectionInfo": { + "$ref": "#/definitions/ConnectorCollectionInfo", + "description": "Collection information", + "x-nullable": true, + "readOnly": true + } + } + }, + "ExternalSubscriptionIdListRequest": { + "properties": { + "value": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The list of ExternalSubscriptionIds." + } + }, + "description": "The list of ExternalSubscriptionIds operation request." + }, + "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 + } + } + } + } + }, + "ShowbackRuleListResult": { + "description": "Result of listing showback rules. It contains a list of available rules in the scope provided.", + "properties": { + "value": { + "description": "The list of showback rules.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ShowbackRule" + } + } + } + }, + "ShowbackRule": { + "type": "object", + "description": "The showback rule model definition", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Rule id" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Rule name" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Rule type" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ShowbackRuleProperties", + "description": "Showback rule properties" + } + } + }, + "ShowbackRuleProperties": { + "description": "The properties of a showback rule.", + "discriminator": "RuleType", + "properties": { + "description": { + "description": "Description of a showback rule.", + "type": "string" + }, + "status": { + "description": "The current status of the showback rule.", + "type": "string", + "enum": [ + "NotActive", + "Active" + ], + "x-ms-enum": { + "name": "ShowbackRuleStatus", + "modelAsString": true + } + }, + "version": { + "description": "The current version of showback rule.", + "type": "integer", + "readOnly": true + }, + "scopes": { + "description": "List of authorized assigned scopes.", + "type": "array", + "items": { + "$ref": "#/definitions/Scope" + } + }, + "creationTime": { + "format": "date-time", + "description": "The time when the showback rule was created.", + "type": "string", + "readOnly": true + }, + "deprecationTime": { + "description": "The current time when showback rule was deprecate.", + "format": "date-time", + "type": "string", + "readOnly": true + }, + "modificationTime": { + "description": "The current status when showback rule was modified.", + "format": "date-time", + "type": "string", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "#/definitions/ShowbackRulesKind" + } + ] + }, + "CustomPrice": { + "x-ms-discriminator-value": "CustomPrice", + "type": "object", + "description": "Represents Custom price showback rule model", + "allOf": [ + { + "$ref": "#/definitions/ShowbackRuleProperties" + } + ], + "properties": { + "details": { + "$ref": "#/definitions/CustomPriceProperties" + } + } + }, + "CustomPriceProperties": { + "type": "object", + "title": "Custom price showback rule properties", + "properties": { + "pricesheet": { + "type": "string" + }, + "benefits": { + "description": "Array of benefits.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "None", + "All", + "AHUB", + "Reservations" + ], + "x-ms-enum": { + "name": "FunctionType", + "modelAsString": true + } + } + }, + "markups": { + "description": "List of markups.", + "type": "array", + "items": { + "$ref": "#/definitions/Markup" + } + } + } + }, + "CustomCharge": { + "x-ms-discriminator-value": "CustomCharge", + "type": "object", + "description": "Represents custom charge showback rule model", + "allOf": [ + { + "$ref": "#/definitions/ShowbackRuleProperties" + } + ], + "properties": { + "details": { + "$ref": "#/definitions/CustomChargeProperties" + } + } + }, + "CustomChargeProperties": { + "type": "object", + "title": "Custom charge showback rule properties", + "properties": { + "recurring": { + "description": "Recurring of the charge.", + "type": "string", + "readOnly": true, + "enum": [ + "true", + "false" + ], + "x-ms-enum": { + "name": "CustomChargeRecurring", + "modelAsString": true + } + }, + "chargeType": { + "type": "string" + }, + "ChargeValue": { + "type": "string" + }, + "EffectiveMonth": { + "format": "date-time", + "type": "string" + }, + "EndMonth": { + "format": "date-time", + "type": "string" + } + } + }, + "CostAllocation": { + "x-ms-discriminator-value": "CostAllocation", + "type": "object", + "description": "Represents cost allocation showback rule model", + "allOf": [ + { + "$ref": "#/definitions/ShowbackRuleProperties" + } + ], + "properties": { + "details": { + "$ref": "#/definitions/CostAllocationProperties" + } + } + }, + "CostAllocationProperties": { + "type": "object", + "title": "Cost allocation showback rule properties", + "properties": {} + }, + "ShowbackRulesKind": { + "type": "object", + "description": "Describes Showback rule with rule type", + "properties": { + "RuleType": { + "type": "string", + "description": "The rule type of the showback rule solution", + "enum": [ + "CustomPrice", + "CustomChange", + "CostAllocation" + ], + "x-ms-enum": { + "name": "ShowbackRulesKind", + "modelAsString": true + } + } + } + }, + "Scope": { + "type": "object", + "description": "The Scope model definition", + "properties": { + "id": { + "type": "string", + "description": "Scope id" + }, + "name": { + "type": "string", + "description": "Scope name" + }, + "type": { + "type": "string", + "description": "Scope type" + }, + "childScope": { + "$ref": "#/definitions/Scope" + } + } + }, + "Markup": { + "type": "object", + "description": "The Markup model definition", + "properties": { + "percentage": { + "type": "string" + } + } + }, + "ViewListResult": { + "description": "Result of listing views. It contains a list of available views.", + "type": "object", + "properties": { + "value": { + "description": "The list of views.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/View" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "View": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ViewProperties", + "title": "View properties" + } + } + }, + "ViewProperties": { + "type": "object", + "description": "The properties of the view.", + "properties": { + "version": { + "description": "View API version used to create the view.", + "type": "string" + }, + "queryVersion": { + "description": "Query API version to use.", + "type": "string" + }, + "displayName": { + "description": "User input name of the view. Required.", + "type": "string" + }, + "scope": { + "description": "Cost Management scope to save the view on.", + "type": "string" + }, + "createdOn": { + "description": "Date the user created this view.", + "type": "string", + "format": "date-time" + }, + "modifiedOn": { + "description": "Date when the user last modified this view.", + "type": "string", + "format": "date-time" + }, + "query": { + "description": "Query body configuration. Required.", + "type": "object", + "x-ms-client-flatten": true, + "$ref": "#/definitions/ReportConfigDefinition" + }, + "chart": { + "description": "Chart type of the main view in Cost Analysis. Required.", + "type": "string", + "enum": [ + "Area", + "GroupedBar", + "GroupedColumn", + "Line", + "StackedBar", + "Table" + ], + "x-ms-enum": { + "name": "ChartType", + "modelAsString": true + } + }, + "accumulated": { + "description": "Show costs accumulated over time.", + "type": "boolean" + }, + "metric": { + "description": "Metric to use when displaying costs.", + "type": "string", + "enum": [ + "ActualCost", + "AmortizedCost", + "AHUB" + ], + "x-ms-enum": { + "name": "MetricType", + "modelAsString": true + } + }, + "kpis": { + "description": "List of KPIs to show in Cost Analysis UI.", + "type": "array", + "items": { + "$ref": "#/definitions/KpiProperties" + } + }, + "pivots": { + "description": "Configuration of 3 sub-views in the Cost Analysis UI.", + "type": "array", + "items": { + "$ref": "#/definitions/PivotProperties" + } + } + } + }, + "KpiProperties": { + "description": "Each KPI must contain a 'type' and 'enabled' key.", + "type": "object", + "properties": { + "type": { + "description": "KPI type (Forecast, Budget).", + "type": "string", + "enum": [ + "Forecast", + "Budget" + ], + "x-ms-enum": { + "name": "TypeType", + "modelAsString": true + } + }, + "id": { + "description": "ID of resource related to metric (budget).", + "type": "string" + }, + "enabled": { + "description": "show the KPI in the UI?", + "type": "boolean" + } + } + }, + "PivotProperties": { + "description": "Each pivot must contain a 'type' and 'name'.", + "type": "object", + "properties": { + "type": { + "description": "Data type to show in view.", + "type": "string", + "enum": [ + "Dimension", + "TagKey" + ], + "x-ms-enum": { + "name": "TypeType", + "modelAsString": true + } + }, + "name": { + "description": "Data field to show in view.", + "type": "string" + } + } + }, + "CheckNameAvailabilityRequestBody": { + "description": "Resource Name availability input parameters - Resource type and resource name", + "type": "object", + "properties": { + "type": { + "description": "Describes the Resource type: Microsoft.CostManagement/Views", + "type": "string" + }, + "name": { + "description": "Resource name for which availability needs to be checked", + "type": "string" + } + } + }, + "CheckNameAvailabilityResult": { + "description": "Response for check name availability API. Resource provider will set availability as true | false.", + "type": "object", + "properties": { + "nameAvailable": { + "description": "Required. True indicates name is valid and available. False indicates the name is invalid, unavailable, or both.", + "type": "boolean" + }, + "reason": { + "description": "Required if nameAvailable == false. Invalid indicates the name provided does not match the resource provider's naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable.", + "type": "string" + }, + "message": { + "description": "Required if nameAvailable == false, indicating why name is not available.", + "type": "string" + } + } + } + }, + "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-04-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" + }, + "ruleNameParameter": { + "name": "ruleName", + "in": "path", + "description": "Showback rule name", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "scopeViewParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope and 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope.", + "x-ms-parameter-location": "method" + }, + "viewNameParameter": { + "name": "viewName", + "in": "path", + "description": "View name", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "scopeCheckNameAvailabilityParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope and 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/BillingAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/BillingAccountDimensionsList.json new file mode 100644 index 000000000000..8ce82d8e3d73 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/BillingAccountDimensionsList.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..269dd1b6c96b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-01-preview/examples/BillingAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/BillingAccountDimensionsListWithFilter.json new file mode 100644 index 000000000000..2e880f9ad303 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/BillingAccountDimensionsListWithFilter.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-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-04-01-preview/examples/BillingAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/BillingAccountForecast.json new file mode 100644 index 000000000000..7d50f6c7a110 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/BillingAccountForecast.json @@ -0,0 +1,128 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-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-04-01-preview/examples/BillingAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/BillingAccountQuery.json new file mode 100644 index 000000000000..0a1338c9da72 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/BillingAccountQuery.json @@ -0,0 +1,103 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-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-04-01-preview/examples/BillingAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/BillingAccountQueryGrouping.json new file mode 100644 index 000000000000..6eebe6005170 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/BillingAccountQueryGrouping.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-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-04-01-preview/examples/CheckNameAvailabilityByExternalBillingAccount_Available.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CheckNameAvailabilityByExternalBillingAccount_Available.json new file mode 100644 index 000000000000..06407ed986ea --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CheckNameAvailabilityByExternalBillingAccount_Available.json @@ -0,0 +1,17 @@ +{ + "parameters":{ + "externalBillingAccountName": "aws-123456789012", + "api-version": "2019-04-01-preview", + "input":{ + "name":"swaggerExample", + "type": "Microsoft.CostManagement/Views" + } + }, + "responses":{ + "200":{ + "body":{ + "nameAvailable": true + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CheckNameAvailabilityByExternalBillingAccount_NotAvailable.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CheckNameAvailabilityByExternalBillingAccount_NotAvailable.json new file mode 100644 index 000000000000..02b6dea77d11 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CheckNameAvailabilityByExternalBillingAccount_NotAvailable.json @@ -0,0 +1,19 @@ +{ + "parameters":{ + "externalBillingAccountName": "aws-123456789012", + "api-version": "2019-04-01-preview", + "input":{ + "name":"swaggerExample2", + "type": "Microsoft.CostManagement/Views" + } + }, + "responses":{ + "200":{ + "body":{ + "nameAvailable": false, + "reason": "AlreadyExists", + "message": "Resource already exists with the same name." + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CheckNameAvailabilityByExternalSubscription_Available.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CheckNameAvailabilityByExternalSubscription_Available.json new file mode 100644 index 000000000000..fec5653cdb90 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CheckNameAvailabilityByExternalSubscription_Available.json @@ -0,0 +1,17 @@ +{ + "parameters":{ + "externalSubscriptionName":"aws-654321654321", + "api-version": "2019-04-01-preview", + "input":{ + "name":"swaggerExample", + "type": "Microsoft.CostManagement/Views" + } + }, + "responses":{ + "200":{ + "body":{ + "nameAvailable": true + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CheckNameAvailabilityByExternalSubscription_NotAvailable.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CheckNameAvailabilityByExternalSubscription_NotAvailable.json new file mode 100644 index 000000000000..61279a34ac90 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CheckNameAvailabilityByExternalSubscription_NotAvailable.json @@ -0,0 +1,19 @@ +{ + "parameters":{ + "externalSubscriptionName":"aws-654321654321", + "api-version": "2019-04-01-preview", + "input":{ + "name":"swaggerExample2", + "type": "Microsoft.CostManagement/Views" + } + }, + "responses":{ + "200":{ + "body":{ + "nameAvailable": false, + "reason": "AlreadyExists", + "message": "Resource already exists with the same name." + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CheckNameAvailabilityByResourceGroup_Available.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CheckNameAvailabilityByResourceGroup_Available.json new file mode 100644 index 000000000000..c75637675461 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CheckNameAvailabilityByResourceGroup_Available.json @@ -0,0 +1,17 @@ +{ + "parameters":{ + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "api-version": "2019-04-01-preview", + "input":{ + "name":"swaggerExample", + "type": "Microsoft.CostManagement/Views" + } + }, + "responses":{ + "200":{ + "body":{ + "nameAvailable": true + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CheckNameAvailabilityByResourceGroup_NotAvailable.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CheckNameAvailabilityByResourceGroup_NotAvailable.json new file mode 100644 index 000000000000..5215a781c488 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CheckNameAvailabilityByResourceGroup_NotAvailable.json @@ -0,0 +1,19 @@ +{ + "parameters":{ + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "api-version": "2019-04-01-preview", + "input":{ + "name":"swaggerExample2", + "type": "Microsoft.CostManagement/Views" + } + }, + "responses":{ + "200":{ + "body":{ + "nameAvailable": false, + "reason": "AlreadyExists", + "message": "Resource already exists with the same name." + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CloudConnectorDelete.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CloudConnectorDelete.json new file mode 100644 index 000000000000..845875d09529 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CloudConnectorDelete.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "connectorName": "aws-123456789012" + }, + "responses": { + "200": { + } + } +} + diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CloudConnectorGet.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CloudConnectorGet.json new file mode 100644 index 000000000000..eb1b063e68fd --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CloudConnectorGet.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "connectorName": "aws-123456789012" + }, + "responses": { + "200": { + "body": { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/aws-123456789012", + "name": "aws-123456789012", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-1", + "providerBillingAccountId": "123456789012", + "providerBillingAccountDisplayName": "MyCompany Consolidated", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "reportId": "HourlyWithResources", + "createdOn": "2018-05-15T13:25:48Z", + "modifiedOn": "2018-05-23T09:21:11Z", + "status": "active", + "externalBillingAccountId" : "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "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-04-01-preview/examples/CloudConnectorGetExpand.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CloudConnectorGetExpand.json new file mode 100644 index 000000000000..8e2ac67f998d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CloudConnectorGetExpand.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "connectorName": "aws-123456789012", + "$expand": "collectionInfo" + }, + "responses": { + "200": { + "body": { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/aws-123456789012", + "name": "aws-123456789012", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-1", + "providerBillingAccountId": "123456789012", + "providerBillingAccountDisplayName": "MyCompany Consolidated", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "reportId": "HourlyWithResources", + "createdOn": "2018-05-15T13:25:48Z", + "modifiedOn": "2018-05-23T09:21:11Z", + "status": "warning", + "externalBillingAccountId" : "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "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-04-01-preview/examples/CloudConnectorList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CloudConnectorList.json new file mode 100644 index 000000000000..fc72b395b793 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CloudConnectorList.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/aws-123456789012", + "name": "aws-123456789012", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-1", + "providerBillingAccountId": "123456789012", + "providerBillingAccountDisplayName": "MyCompany Consolidated", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "reportId": "HourlyWithResources", + "createdOn": "2018-05-15T13:25:48Z", + "modifiedOn": "2018-05-23T09:21:11Z", + "status": "active", + "externalBillingAccountId" : "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "defaultManagementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ", + "subscriptionId": "22222222-3333-4444-1111-777777777777", + "billingModel": "autoUpgrade", + "daysTrialRemaining": 62 + } + }, + { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/aws-100000000007", + "name": "aws-100000000007", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-2", + "providerBillingAccountId": "100000000007", + "credentialsKey": "arn:aws:iam::100000000007:role/AzureCostManagementRole", + "reportId": "CURHourlyWithResources", + "createdOn": "2018-06-16T11:23:44Z", + "modifiedOn": "2018-06-21T17:33:28Z", + "status": "active", + "externalBillingAccountId" : "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-100000000007", + "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-04-01-preview/examples/CloudConnectorPatch.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CloudConnectorPatch.json new file mode 100644 index 000000000000..3a2ab6baf20d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CloudConnectorPatch.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "connectorName": "aws-123456789012", + "connector": { + } + }, + "responses": { + "200": { + "body": { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/aws-123456789012", + "name": "aws-123456789012", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-3", + "providerBillingAccountId": "123456789012", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "reportId": "HourlyWithResources", + "createdOn": "2018-05-15T13:25:48Z", + "modifiedOn": "2018-05-23T09:21:11Z", + "status": "active", + "externalBillingAccountId" : "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "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-04-01-preview/examples/CloudConnectorPut.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CloudConnectorPut.json new file mode 100644 index 000000000000..a2405ffd3d91 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/CloudConnectorPut.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "connectorName": "aws-123456789012", + "connector": { + "properties": { + "displayName": "AWS-Consolidated-1", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "credentialsSecret": "external-id", + "reportId": "HourlyWithResources" + } + } + }, + "responses": { + "200": { + "body": { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/aws-123456789012", + "name": "aws-123456789012", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-1", + "providerBillingAccountId": "123456789012", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "reportId": "HourlyWithResources", + "createdOn": "2018-05-15T13:25:48Z", + "modifiedOn": "2018-05-23T09:21:11Z", + "status": "active", + "externalBillingAccountId" : "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "defaultManagementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ", + "subscriptionId": "22222222-3333-4444-1111-777777777777", + "billingModel": "autoUpgrade", + "daysTrialRemaining": 62 + } + } + }, + "201": { + "body": { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/aws-123456789012", + "name": "aws-123456789012", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-1", + "providerBillingAccountId": "123456789012", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "reportId": "HourlyWithResources", + "createdOn": "2018-05-15T13:25:48Z", + "modifiedOn": "2018-05-23T09:21:11Z", + "status": "active", + "externalBillingAccountId" : "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "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-04-01-preview/examples/DepartmentDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/DepartmentDimensionsList.json new file mode 100644 index 000000000000..3204b5afd94e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/DepartmentDimensionsList.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-01-preview/examples/DepartmentDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/DepartmentDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..5b73e04a16ce --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/DepartmentDimensionsListExpandAndTop.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-01-preview/examples/DepartmentDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/DepartmentDimensionsListWithFilter.json new file mode 100644 index 000000000000..a16faf354e5e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/DepartmentDimensionsListWithFilter.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-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-04-01-preview/examples/DepartmentForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/DepartmentForecast.json new file mode 100644 index 000000000000..3a42bacac7f9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/DepartmentForecast.json @@ -0,0 +1,129 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-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-04-01-preview/examples/DepartmentQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/DepartmentQuery.json new file mode 100644 index 000000000000..d0eb712bfcac --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/DepartmentQuery.json @@ -0,0 +1,104 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-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-04-01-preview/examples/DepartmentQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/DepartmentQueryGrouping.json new file mode 100644 index 000000000000..f711e76a6c47 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/DepartmentQueryGrouping.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-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-04-01-preview/examples/EnrollmentAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/EnrollmentAccountDimensionsList.json new file mode 100644 index 000000000000..62eb04b597e5 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/EnrollmentAccountDimensionsList.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..31a62e88bad1 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json new file mode 100644 index 000000000000..662e068944f5 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-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-04-01-preview/examples/EnrollmentAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/EnrollmentAccountForecast.json new file mode 100644 index 000000000000..fa2b1ef95542 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/EnrollmentAccountForecast.json @@ -0,0 +1,116 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-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-04-01-preview/examples/EnrollmentAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/EnrollmentAccountQuery.json new file mode 100644 index 000000000000..36fd039266c8 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/EnrollmentAccountQuery.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-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-04-01-preview/examples/EnrollmentAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/EnrollmentAccountQueryGrouping.json new file mode 100644 index 000000000000..7d68fcb2659b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/EnrollmentAccountQueryGrouping.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-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-04-01-preview/examples/ExternalBillingAccountExternalSubscriptionList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ExternalBillingAccountExternalSubscriptionList.json new file mode 100644 index 000000000000..8cedebb233e9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ExternalBillingAccountExternalSubscriptionList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2019-04-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", + "providerAccountId": "654321654321", + "providerBillingAccountId": "123456789012", + "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-04-01-preview/examples/ExternalBillingAccountGet.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ExternalBillingAccountGet.json new file mode 100644 index 000000000000..319db1dda0a9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ExternalBillingAccountGet.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2019-04-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": "MyCompany Consolidated", + "providerBillingAccountId": "123456789012", + "connectorId": "/providers/Microsoft.CostManagement/cloudConnectors/aws-123456789012" + } + } + } + } +} + diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ExternalBillingAccountGetExpand.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ExternalBillingAccountGetExpand.json new file mode 100644 index 000000000000..555534db5e7a --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ExternalBillingAccountGetExpand.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "externalBillingAccountName": "aws-123456789012", + "$expand": "collectionInfo" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "name": "aws-123456789012", + "type": "Microsoft.CostManagement/externalBillingAccounts", + "kind": "aws", + "properties": { + "displayName": "MyCompany Consolidated", + "providerBillingAccountId": "123456789012", + "connectorId": "/providers/Microsoft.CostManagement/cloudConnectors/aws-123456789012", + "collectionInfo": { + "sourceLastUpdated": "2018-06-12T16:41:28Z", + "lastUpdated": "2018-06-12T17:25:28Z" + } + } + } + } + } +} + diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ExternalBillingAccountList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ExternalBillingAccountList.json new file mode 100644 index 000000000000..0095f35d5546 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ExternalBillingAccountList.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "name": "aws-123456789012", + "type": "Microsoft.CostManagement/externalBillingAccounts", + "kind": "aws", + "properties": { + "displayName": "MyCompany Consolidated", + "providerBillingAccountId": "123456789012", + "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": "MyCompany Consolidated2", + "providerBillingAccountId": "112233445566", + "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-04-01-preview/examples/ExternalSubscriptionGet.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ExternalSubscriptionGet.json new file mode 100644 index 000000000000..23383cfab1e0 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ExternalSubscriptionGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2019-04-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", + "providerAccountId": "654321654321", + "providerBillingAccountId": "123456789012", + "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-04-01-preview/examples/ExternalSubscriptionGetExpand.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ExternalSubscriptionGetExpand.json new file mode 100644 index 000000000000..36c865a17316 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ExternalSubscriptionGetExpand.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "externalSubscriptionName": "aws-654321654321", + "$expand": "collectionInfo" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321", + "name": "aws-654321654321", + "type": "Microsoft.CostManagement/externalSubscriptions", + "kind": "aws", + "properties": { + "displayName": "MyUsageAccount1", + "providerAccountId": "654321654321", + "providerBillingAccountId": "123456789012", + "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "managementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ", + "collectionInfo": { + "sourceLastUpdated": "2018-06-12T16:41:28Z", + "lastUpdated": "2018-06-12T17:25:28Z" + } + } + } + } + } +} + diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ExternalSubscriptionList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ExternalSubscriptionList.json new file mode 100644 index 000000000000..774658fef049 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ExternalSubscriptionList.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2019-04-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", + "providerAccountId": "654321654321", + "providerBillingAccountId": "123456789012", + "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", + "providerAccountId": "110011001100", + "providerBillingAccountId": "112233445566", + "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-04-01-preview/examples/ManagementGroupDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ManagementGroupDimensionsList.json new file mode 100644 index 000000000000..bbd567548f14 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ManagementGroupDimensionsList.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..13e3e8ab1b9a --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-01-preview/examples/ManagementGroupDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ManagementGroupDimensionsListWithFilter.json new file mode 100644 index 000000000000..f0cf5147716a --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ManagementGroupDimensionsListWithFilter.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-01-preview/examples/ManagementGroupExternalSubscriptionList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ManagementGroupExternalSubscriptionList.json new file mode 100644 index 000000000000..24db86d718c3 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ManagementGroupExternalSubscriptionList.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "managementGroupId": "XYZ" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321", + "name": "aws-654321654321", + "type": "Microsoft.CostManagement/externalSubscriptions", + "properties": { + "displayName": "MyUsageAccount1", + "providerAccountId": "654321654321", + "providerBillingAccountId": "123456789012", + "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", + "properties": { + "displayName": "MyUsageAccount2", + "providerAccountId": "110011001100", + "providerBillingAccountId": "112233445566", + "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-04-01-preview/examples/ManagementGroupExternalSubscriptionUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ManagementGroupExternalSubscriptionUpdate.json new file mode 100644 index 000000000000..28b56cdd5993 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ManagementGroupExternalSubscriptionUpdate.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-01-preview/examples/ManagementGroupForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ManagementGroupForecast.json new file mode 100644 index 000000000000..b0f30547f0c4 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ManagementGroupForecast.json @@ -0,0 +1,115 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-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-04-01-preview/examples/ManagementGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ManagementGroupQuery.json new file mode 100644 index 000000000000..d79e643ed611 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ManagementGroupQuery.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-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-04-01-preview/examples/ManagementGroupQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ManagementGroupQueryGrouping.json new file mode 100644 index 000000000000..5fa36373f826 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ManagementGroupQueryGrouping.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-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-04-01-preview/examples/ResourceGroupDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ResourceGroupDimensionsList.json new file mode 100644 index 000000000000..f5d50d56038a --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ResourceGroupDimensionsList.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-01-preview/examples/ResourceGroupForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ResourceGroupForecast.json new file mode 100644 index 000000000000..cbc46b1347f6 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ResourceGroupForecast.json @@ -0,0 +1,111 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-01-preview/examples/ResourceGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ResourceGroupQuery.json new file mode 100644 index 000000000000..611b12846c80 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ResourceGroupQuery.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-01-preview/examples/ShowbackRuleGet.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ShowbackRuleGet.json new file mode 100644 index 000000000000..575af04da1e3 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ShowbackRuleGet.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "billingAccountId": "100", + "ruleName": "testRule" + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.CostManagement/showbackRules/testRule", + "name": "testRule", + "type": "Microsoft.CostManagement/showbackRules", + "eTag": null, + "properties": { + "description": "This is a testRule", + "status": "NotActive", + "version": 1, + "deprecationTime": "0001-01-01T00:00:00", + "creationTime": "2019-01-16T09:18:20.8665509Z", + "modificationTime": "0001-01-01T00:00:00", + "ruleType": "CustomPrice", + "assignedScopes": null, + "details": { + "pricesheet": "Pay-As-You-Go (0003P)", + "AHUBenefits": true, + "markup": null + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ShowbackRulePut.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ShowbackRulePut.json new file mode 100644 index 000000000000..344b8abf0519 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ShowbackRulePut.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "billingAccountId": "100", + "ruleName": "testRule", + "showbackRule": { + "properties": { + "name": "demo", + "description": "Welcome to Showback demo", + "status": "Active", + "ruleType": "CustomPrice", + "assignedScopes": [ + { + "entityType": "Enrollment", + "entityId": "292105a9-680d-48cf-bdad-1d023104d69f", + "childScope": null + } + ], + "details": { + "pricesheet": "Pay-As-You-Go (0003P)", + "AHUBenefits": true, + "markup": [ + { + "percentage": 1.1, + "filters": [] + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/71824150/providers/Microsoft.CostManagement/showbackRules/demo", + "name": "demo", + "type": "Microsoft.CostManagement/showbackRules", + "eTag": null, + "properties": { + "version": 999, + "deprecationTime": "0001-01-01T00:00:00", + "creationTime": "2019-01-16T09:18:20.8665509Z", + "modificationTime": "0001-01-01T00:00:00", + "description": "Welcome to Showback demo", + "status": "NotActive", + "ruleType": "CustomPrice", + "details": { + "pricesheet": "Pay-As-You-Go (0003P)", + "AHUBenefits": true, + "markup": [ + { + "percentage": 1.1, + "filters": [] + } + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ShowbackRulesList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ShowbackRulesList.json new file mode 100644 index 000000000000..2a222a24a4e9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ShowbackRulesList.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "billingAccountId": "100" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.CostManagement/showbackRules/testRule", + "name": "testRule", + "type": "Microsoft.CostManagement/showbackRules", + "eTag": null, + "properties": { + "description": "This is a testRule", + "status": "NotActive", + "version": 1, + "deprecationTime": "0001-01-01T00:00:00", + "creationTime": "2019-01-16T09:18:20.8665509Z", + "modificationTime": "0001-01-01T00:00:00", + "ruleType": "CustomPrice", + "assignedScopes": null, + "details": { + "pricesheet": "Pay-As-You-Go (0003P)", + "AHUBenefits": true, + "markup": null + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/SubscriptionDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/SubscriptionDimensionsList.json new file mode 100644 index 000000000000..7fe88090f9fa --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/SubscriptionDimensionsList.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-01-preview/examples/SubscriptionForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/SubscriptionForecast.json new file mode 100644 index 000000000000..51290f1503b9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/SubscriptionForecast.json @@ -0,0 +1,124 @@ +{ + "parameters": { + "api-version": "2019-04-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-04-01-preview/examples/SubscriptionQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/SubscriptionQuery.json new file mode 100644 index 000000000000..c340ea373ea8 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/SubscriptionQuery.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "api-version": "2019-04-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/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewByExternalBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewByExternalBillingAccount.json new file mode 100644 index 000000000000..d300d7b5bb50 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewByExternalBillingAccount.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "externalBillingAccountName": "aws-123456789012", + "viewName": "swaggerExample" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "version": "2019-04-01-preview", + "queryVersion": "2019-04-01-preview", + "displayName": "swagger Example", + "scope": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": true, + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewByExternalSubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewByExternalSubscription.json new file mode 100644 index 000000000000..a3fd655e94f2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewByExternalSubscription.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "externalSubscriptionName": "aws-654321654321", + "viewName": "swaggerExample" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "version": "2019-04-01-preview", + "queryVersion": "2019-04-01-preview", + "displayName": "swagger Example", + "scope": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": true, + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewByResourceGroup.json new file mode 100644 index 000000000000..91349aea2103 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewByResourceGroup.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "viewName": "swaggerExample", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "version": "2019-04-01-preview", + "queryVersion": "2019-04-01-preview", + "displayName": "swagger Example", + "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": true, + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewCreateOrUpdateByExternalBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewCreateOrUpdateByExternalBillingAccount.json new file mode 100644 index 000000000000..f19af0216484 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewCreateOrUpdateByExternalBillingAccount.json @@ -0,0 +1,191 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "externalBillingAccountName": "aws-123456789012", + "viewName": "swaggerExample", + "parameters": { + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "queryVersion": "2019-04-01-preview", + "displayName": "swagger Example", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": true, + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + }, + "responses": { + "201": { + "body": { + "id": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "version": "2019-04-01-preview", + "queryVersion": "2019-04-01-preview", + "displayName": "swagger Example", + "scope": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": true, + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + }, + "200": { + "body": { + "id": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "version": "2019-04-01-preview", + "queryVersion": "2019-04-01-preview", + "displayName": "swagger Example", + "scope": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": true, + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewCreateOrUpdateByExternalSubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewCreateOrUpdateByExternalSubscription.json new file mode 100644 index 000000000000..5b460c21c4dc --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewCreateOrUpdateByExternalSubscription.json @@ -0,0 +1,191 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "externalSubscriptionName": "aws-654321654321", + "viewName": "swaggerExample", + "parameters": { + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "queryVersion": "2019-04-01-preview", + "displayName": "swagger Example", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": true, + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + }, + "responses": { + "201": { + "body": { + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "version": "2019-04-01-preview", + "queryVersion": "2019-04-01-preview", + "displayName": "swagger Example", + "scope": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": true, + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + }, + "200": { + "body": { + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "version": "2019-04-01-preview", + "queryVersion": "2019-04-01-preview", + "displayName": "swagger Example", + "scope": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": true, + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json new file mode 100644 index 000000000000..e5189980d951 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json @@ -0,0 +1,191 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "viewName": "swaggerExample", + "parameters": { + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "queryVersion": "2019-04-01-preview", + "displayName": "swagger Example", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": true, + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "version": "2019-04-01-preview", + "queryVersion": "2019-04-01-preview", + "displayName": "swagger Example", + "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": true, + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + }, + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "version": "2019-04-01-preview", + "queryVersion": "2019-04-01-preview", + "displayName": "swagger Example", + "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": true, + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewDeleteByExternalBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewDeleteByExternalBillingAccount.json new file mode 100644 index 000000000000..6a8b6e28d243 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewDeleteByExternalBillingAccount.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "externalBillingAccountName": "aws-123456789012", + "viewName": "TestView" + }, + "responses": { + "200": { + } + } + } \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewDeleteByExternalSubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewDeleteByExternalSubscription.json new file mode 100644 index 000000000000..bdd680c17c69 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewDeleteByExternalSubscription.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "externalSubscriptionName": "aws-654321654321", + "viewName": "TestView" + }, + "responses": { + "200": { + } + } + } \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewDeleteByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewDeleteByResourceGroup.json new file mode 100644 index 000000000000..bfe4a7d480d4 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewDeleteByResourceGroup.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "viewName": "TestView" + }, + "responses": { + "200": { + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewListByExternalBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewListByExternalBillingAccount.json new file mode 100644 index 000000000000..216596cadefb --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewListByExternalBillingAccount.json @@ -0,0 +1,136 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "externalBillingAccountName": "aws-123456789012" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "version": "2019-04-01-preview", + "queryVersion": "2019-04-01-preview", + "displayName": "swagger Example", + "scope": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": true, + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + }, + { + "id": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012/providers/Microsoft.CostManagement/views/swaggerExample2", + "name": "swaggerExample2", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "version": "2019-04-01-preview", + "queryVersion": "2019-04-01-preview", + "displayName": "swagger Example 2", + "scope": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "query": { + "type": "Usage", + "timeframe": "LastMonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "GroupedColumn", + "accumulated": true, + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewListByExternalSubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewListByExternalSubscription.json new file mode 100644 index 000000000000..e43cfa294435 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewListByExternalSubscription.json @@ -0,0 +1,136 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "externalSubscriptionName": "aws-654321654321" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "version": "2019-04-01-preview", + "queryVersion": "2019-04-01-preview", + "displayName": "swagger Example", + "scope": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": true, + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + }, + { + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321/providers/Microsoft.CostManagement/views/swaggerExample2", + "name": "swaggerExample2", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "version": "2019-04-01-preview", + "queryVersion": "2019-04-01-preview", + "displayName": "swagger Example 2", + "scope": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321", + "query": { + "type": "Usage", + "timeframe": "LastMonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "GroupedColumn", + "accumulated": true, + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewListByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewListByResourceGroup.json new file mode 100644 index 000000000000..18e3dfde6df0 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-04-01-preview/examples/ViewListByResourceGroup.json @@ -0,0 +1,136 @@ +{ + "parameters": { + "api-version": "2019-04-01-preview", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "version": "2019-04-01-preview", + "queryVersion": "2019-04-01-preview", + "displayName": "swagger Example", + "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "query": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "Table", + "accumulated": true, + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample2", + "name": "swaggerExample2", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "version": "2019-04-01-preview", + "queryVersion": "2019-04-01-preview", + "displayName": "swagger Example 2", + "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "query": { + "type": "Usage", + "timeframe": "LastMonthToDate", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [], + "sorting": [ + { + "direction": "Ascending", + "name": "UsageDate" + } + ] + } + }, + "chart": "GroupedColumn", + "accumulated": true, + "metric": "ActualCost", + "kpis": [ + { + "type": "Forecast", + "id": null, + "enabled": true + }, + { + "type": "Budget", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo", + "enabled": true + } + ], + "pivots": [ + { + "type": "Dimension", + "name": "ServiceName" + }, + { + "type": "Dimension", + "name": "MeterCategory" + }, + { + "type": "TagKey", + "name": "swaggerTagKey" + } + ] + } + } + ] + } + } + } +} \ 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 9be7e6389925..15473afd519d 100644 --- a/specification/cost-management/resource-manager/readme.md +++ b/specification/cost-management/resource-manager/readme.md @@ -26,28 +26,39 @@ These are the global settings for the Cost Management API. ``` yaml openapi-type: arm -tag: package-2019-01 +tag: package-preview-2019-04 azure-validator: true ``` --- + +### Tag: package-preview-2019-04 + +These settings apply only when `--tag=package-preview-2019-04` is specified on the command line. + +```yaml $(tag) == 'package-preview-2019-04' +input-file: + - Microsoft.CostManagement/preview/2019-04-01-preview/costmanagement.json +``` ### Tag: package-2019-01 These settings apply only when `--tag=package-2019-01` is specified on the command line. -```yaml $(tag) == 'package-2019-01' +``` yaml $(tag) == 'package-2019-01' input-file: - Microsoft.CostManagement/stable/2019-01-01/costmanagement.json ``` + ### 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' +``` 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.