From b98fc23fa5c15c55a9a33027ec61f32b63724d36 Mon Sep 17 00:00:00 2001 From: Theertharaj <40805847+thramu@users.noreply.github.com> Date: Mon, 12 Sep 2022 20:58:12 -0700 Subject: [PATCH 01/18] Adds base for updating Microsoft.CostManagement from version preview/2022-08-01-preview to version 2022-10-01-preview --- .../2022-10-01-preview/common-types.json | 71 + .../2022-10-01-preview/costmanagement.json | 2891 +++++++++++++++++ .../examples/BillingAccountAlerts.json | 98 + .../BillingAccountDimensionsList.json | 46 + ...lingAccountDimensionsListExpandAndTop.json | 60 + ...illingAccountDimensionsListWithFilter.json | 41 + .../examples/BillingAccountForecast.json | 110 + .../examples/BillingAccountQuery.json | 108 + .../examples/BillingAccountQueryGrouping.json | 70 + .../examples/BillingProfileAlerts.json | 99 + .../examples/BillingProfileForecast.json | 111 + .../examples/DepartmentAlerts.json | 99 + .../examples/DepartmentDimensionsList.json | 47 + .../DepartmentDimensionsListExpandAndTop.json | 61 + .../DepartmentDimensionsListWithFilter.json | 42 + .../examples/DepartmentForecast.json | 111 + .../examples/DepartmentQuery.json | 109 + .../examples/DepartmentQueryGrouping.json | 71 + .../examples/DismissResourceGroupAlerts.json | 59 + .../examples/DismissSubscriptionAlerts.json | 58 + .../examples/EnrollmentAccountAlerts.json | 99 + .../EnrollmentAccountDimensionsList.json | 47 + ...mentAccountDimensionsListExpandAndTop.json | 61 + ...llmentAccountDimensionsListWithFilter.json | 42 + .../examples/EnrollmentAccountForecast.json | 111 + .../examples/EnrollmentAccountQuery.json | 109 + .../EnrollmentAccountQueryGrouping.json | 78 + .../ExternalBillingAccountAlerts.json | 98 + .../ExternalBillingAccountForecast.json | 99 + .../ExternalBillingAccountsDimensions.json | 45 + .../ExternalBillingAccountsQuery.json | 99 + .../examples/ExternalSubscriptionAlerts.json | 98 + .../ExternalSubscriptionForecast.json | 82 + .../ExternalSubscriptionsDimensions.json | 45 + .../examples/ExternalSubscriptionsQuery.json | 78 + ...ervationDetailsReportByBillingAccount.json | 25 + ...ervationDetailsReportByBillingProfile.json | 26 + .../examples/InvoiceSectionAlerts.json | 100 + .../examples/InvoiceSectionForecast.json | 112 + .../MCABillingAccountDimensionsList.json | 46 + ...lingAccountDimensionsListExpandAndTop.json | 60 + ...illingAccountDimensionsListWithFilter.json | 41 + .../examples/MCABillingAccountQuery.json | 108 + .../MCABillingAccountQueryGrouping.json | 70 + .../MCABillingProfileDimensionsList.json | 47 + ...lingProfileDimensionsListExpandAndTop.json | 61 + ...illingProfileDimensionsListWithFilter.json | 42 + .../examples/MCABillingProfileQuery.json | 109 + .../MCABillingProfileQueryGrouping.json | 71 + .../examples/MCACustomerDimensionsList.json | 47 + ...MCACustomerDimensionsListExpandAndTop.json | 61 + .../MCACustomerDimensionsListWithFilter.json | 42 + .../examples/MCACustomerQuery.json | 109 + .../examples/MCACustomerQueryGrouping.json | 71 + .../MCAInvoiceSectionDimensionsList.json | 48 + ...oiceSectionDimensionsListExpandAndTop.json | 62 + ...nvoiceSectionDimensionsListWithFilter.json | 43 + .../examples/MCAInvoiceSectionQuery.json | 110 + .../MCAInvoiceSectionQueryGrouping.json | 72 + .../ManagementGroupDimensionsList.json | 46 + ...gementGroupDimensionsListExpandAndTop.json | 60 + ...nagementGroupDimensionsListWithFilter.json | 41 + .../examples/ManagementGroupQuery.json | 108 + .../ManagementGroupQueryGrouping.json | 77 + .../examples/OperationList.json | 113 + .../examples/PrivateView.json | 69 + .../examples/PrivateViewCreateOrUpdate.json | 185 ++ .../examples/PrivateViewDelete.json | 10 + .../examples/PrivateViewList.json | 131 + .../examples/ResourceGroupAlerts.json | 99 + .../examples/ResourceGroupDimensionsList.json | 57 + .../examples/ResourceGroupForecast.json | 93 + .../examples/ResourceGroupQuery.json | 97 + .../examples/ResourceGroupQueryGrouping.json | 72 + .../examples/SingleResourceGroupAlert.json | 54 + .../examples/SingleSubscriptionAlert.json | 53 + .../examples/SubscriptionAlerts.json | 98 + .../examples/SubscriptionDimensionsList.json | 59 + .../examples/SubscriptionForecast.json | 110 + .../examples/SubscriptionQuery.json | 108 + .../examples/SubscriptionQueryGrouping.json | 75 + .../examples/ViewByResourceGroup.json | 70 + .../ViewCreateOrUpdateByResourceGroup.json | 186 ++ .../examples/ViewDeleteByResourceGroup.json | 11 + .../examples/ViewListByResourceGroup.json | 132 + 85 files changed, 9350 insertions(+) create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingProfileAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingProfileForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DismissResourceGroupAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DismissSubscriptionAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalBillingAccountAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalBillingAccountForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalBillingAccountsDimensions.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalBillingAccountsQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalSubscriptionAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalSubscriptionForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalSubscriptionsDimensions.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalSubscriptionsQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/GenerateReservationDetailsReportByBillingAccount.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/GenerateReservationDetailsReportByBillingProfile.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/InvoiceSectionAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/InvoiceSectionForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingAccountDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingAccountDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingAccountDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingAccountQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingAccountQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingProfileDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingProfileDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingProfileDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingProfileQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingProfileQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCACustomerDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCACustomerDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCACustomerDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCACustomerQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCACustomerQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCAInvoiceSectionDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCAInvoiceSectionDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCAInvoiceSectionDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCAInvoiceSectionQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCAInvoiceSectionQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ManagementGroupDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ManagementGroupDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ManagementGroupQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ManagementGroupQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/OperationList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/PrivateView.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/PrivateViewCreateOrUpdate.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/PrivateViewDelete.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/PrivateViewList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ResourceGroupAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ResourceGroupDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ResourceGroupForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ResourceGroupQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ResourceGroupQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SingleResourceGroupAlert.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SingleSubscriptionAlert.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SubscriptionAlerts.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SubscriptionDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SubscriptionForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SubscriptionQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SubscriptionQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ViewByResourceGroup.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ViewDeleteByResourceGroup.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ViewListByResourceGroup.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json new file mode 100644 index 000000000000..286119be63a9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json @@ -0,0 +1,71 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-10-01", + "title": "Cost Management common types" + }, + "paths": {}, + "definitions": { + "ErrorResponse": { + "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. \n\nSome Error responses: \n\n * 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the \"x-ms-ratelimit-microsoft.consumption-retry-after\" header. \n\n * 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the \"Retry-After\" header.", + "type": "object", + "properties": { + "error": { + "description": "The details of the error.", + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "ErrorDetails": { + "description": "The details of the error.", + "type": "object", + "properties": { + "code": { + "description": "Error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string", + "readOnly": true + } + } + }, + "ProxyResource": { + "description": "The Resource model definition.", + "type": "object", + "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 + } + }, + "parameters": { + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Version of the API to be used with the client request." + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json new file mode 100644 index 000000000000..64ef875950fe --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json @@ -0,0 +1,2891 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-08-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.CostManagement/views": { + "get": { + "tags": [ + "Views" + ], + "operationId": "Views_List", + "description": "Lists all views by tenant and object.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "PrivateViewList": { + "$ref": "./examples/PrivateViewList.json" + } + }, + "parameters": [ + { + "$ref": "common-types.json#/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": "common-types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/views": { + "get": { + "tags": [ + "Views" + ], + "operationId": "Views_ListByScope", + "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": "common-types.json#/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": "common-types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.CostManagement/views/{viewName}": { + "get": { + "tags": [ + "Views" + ], + "operationId": "Views_Get", + "description": "Gets the view by view name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "PrivateView": { + "$ref": "./examples/PrivateView.json" + } + }, + "parameters": [ + { + "$ref": "common-types.json#/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": "common-types.json#/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": { + "CreateOrUpdatePrivateView": { + "$ref": "./examples/PrivateViewCreateOrUpdate.json" + } + }, + "parameters": [ + { + "$ref": "common-types.json#/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": "common-types.json#/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": { + "DeletePrivateView": { + "$ref": "./examples/PrivateViewDelete.json" + } + }, + "parameters": [ + { + "$ref": "common-types.json#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/viewNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "204": { + "description": "NoContent. Resource is not available." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/views/{viewName}": { + "get": { + "tags": [ + "Views" + ], + "operationId": "Views_GetByScope", + "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": "common-types.json#/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": "common-types.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Views" + ], + "operationId": "Views_CreateOrUpdateByScope", + "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": "common-types.json#/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": "common-types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Views" + ], + "operationId": "Views_DeleteByScope", + "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": "common-types.json#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/viewNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "204": { + "description": "NoContent. Resource is not available." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/alerts": { + "get": { + "tags": [ + "Alerts" + ], + "operationId": "Alerts_List", + "description": "Lists the alerts for scope defined.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "BillingAccountAlerts": { + "$ref": "./examples/BillingAccountAlerts.json" + }, + "BillingProfileAlerts": { + "$ref": "./examples/BillingProfileAlerts.json" + }, + "InvoiceSectionAlerts": { + "$ref": "./examples/InvoiceSectionAlerts.json" + }, + "EnrollmentAccountAlerts": { + "$ref": "./examples/EnrollmentAccountAlerts.json" + }, + "DepartmentAlerts": { + "$ref": "./examples/DepartmentAlerts.json" + }, + "SubscriptionAlerts": { + "$ref": "./examples/SubscriptionAlerts.json" + }, + "ResourceGroupAlerts": { + "$ref": "./examples/ResourceGroupAlerts.json" + } + }, + "parameters": [ + { + "$ref": "common-types.json#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/scopeAlertParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/AlertsResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}": { + "get": { + "tags": [ + "Alerts" + ], + "operationId": "Alerts_Get", + "description": "Gets the alert for the scope by alert ID.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "SingleSubscriptionAlerts": { + "$ref": "./examples/SingleSubscriptionAlert.json" + }, + "SingleResourceGroupAlerts": { + "$ref": "./examples/SingleResourceGroupAlert.json" + } + }, + "parameters": [ + { + "$ref": "common-types.json#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/scopeAlertParameter" + }, + { + "$ref": "#/parameters/alertIdParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/Alert" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "Alerts" + ], + "operationId": "Alerts_Dismiss", + "description": "Dismisses the specified alert", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "PatchSubscriptionAlerts": { + "$ref": "./examples/DismissSubscriptionAlerts.json" + }, + "PatchResourceGroupAlerts": { + "$ref": "./examples/DismissResourceGroupAlerts.json" + } + }, + "parameters": [ + { + "$ref": "common-types.json#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/scopeAlertParameter" + }, + { + "$ref": "#/parameters/alertIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DismissAlertPayload" + }, + "description": "Parameters supplied to the Dismiss Alert operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/Alert" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts": { + "get": { + "tags": [ + "Alerts" + ], + "operationId": "Alerts_ListExternal", + "description": "Lists the Alerts for external cloud provider type defined.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalBillingAccountAlerts": { + "$ref": "./examples/ExternalBillingAccountAlerts.json" + }, + "ExternalSubscriptionAlerts": { + "$ref": "./examples/ExternalSubscriptionAlerts.json" + } + }, + "parameters": [ + { + "$ref": "common-types.json#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/externalCloudProviderTypeParameter" + }, + { + "$ref": "#/parameters/externalCloudProviderIdParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/AlertsResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_Usage", + "description": "Lists the forecast charges for scope defined.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "BillingAccountForecast": { + "$ref": "./examples/BillingAccountForecast.json" + }, + "BillingProfileForecast": { + "$ref": "./examples/BillingProfileForecast.json" + }, + "InvoiceSectionForecast": { + "$ref": "./examples/InvoiceSectionForecast.json" + }, + "EnrollmentAccountForecast": { + "$ref": "./examples/EnrollmentAccountForecast.json" + }, + "DepartmentForecast": { + "$ref": "./examples/DepartmentForecast.json" + }, + "SubscriptionForecast": { + "$ref": "./examples/SubscriptionForecast.json" + }, + "ResourceGroupForecast": { + "$ref": "./examples/ResourceGroupForecast.json" + } + }, + "parameters": [ + { + "name": "$filter", + "description": "May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "$ref": "common-types.json#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/scopeForecastParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ForecastDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Forecast Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "204": { + "description": "No Content. Resource is not available." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_ExternalCloudProviderUsage", + "description": "Lists the forecast charges for external cloud provider type defined.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalBillingAccountForecast": { + "$ref": "./examples/ExternalBillingAccountForecast.json" + }, + "ExternalSubscriptionForecast": { + "$ref": "./examples/ExternalSubscriptionForecast.json" + } + }, + "parameters": [ + { + "name": "$filter", + "description": "May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "$ref": "common-types.json#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/externalCloudProviderTypeParameter" + }, + { + "$ref": "#/parameters/externalCloudProviderIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ForecastDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Forecast 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": "common-types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "Dimensions_List", + "description": "Lists the dimensions by the defined scope.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "SubscriptionDimensionsList-Legacy": { + "$ref": "./examples/SubscriptionDimensionsList.json" + }, + "ResourceGroupDimensionsList-Legacy": { + "$ref": "./examples/ResourceGroupDimensionsList.json" + }, + "ManagementGroupDimensionsList-Legacy": { + "$ref": "./examples/ManagementGroupDimensionsList.json" + }, + "ManagementGroupDimensionsListExpandAndTop-Legacy": { + "$ref": "./examples/ManagementGroupDimensionsListExpandAndTop.json" + }, + "ManagementGroupDimensionsListWithFilter-Legacy": { + "$ref": "./examples/ManagementGroupDimensionsListWithFilter.json" + }, + "DepartmentDimensionsList-Legacy": { + "$ref": "./examples/DepartmentDimensionsList.json" + }, + "DepartmentDimensionsListExpandAndTop-Legacy": { + "$ref": "./examples/DepartmentDimensionsListExpandAndTop.json" + }, + "DepartmentDimensionsListWithFilter-Legacy": { + "$ref": "./examples/DepartmentDimensionsListWithFilter.json" + }, + "EnrollmentAccountDimensionsList-Legacy": { + "$ref": "./examples/EnrollmentAccountDimensionsList.json" + }, + "EnrollmentAccountDimensionsListExpandAndTop-Legacy": { + "$ref": "./examples/EnrollmentAccountDimensionsListExpandAndTop.json" + }, + "EnrollmentAccountDimensionsListWithFilter-Legacy": { + "$ref": "./examples/EnrollmentAccountDimensionsListWithFilter.json" + }, + "BillingAccountDimensionsList-Legacy": { + "$ref": "./examples/BillingAccountDimensionsList.json" + }, + "BillingAccountDimensionsListExpandAndTop-Legacy": { + "$ref": "./examples/BillingAccountDimensionsListExpandAndTop.json" + }, + "BillingAccountDimensionsListWithFilter-Legacy": { + "$ref": "./examples/BillingAccountDimensionsListWithFilter.json" + }, + "BillingAccountDimensionsList-Modern": { + "$ref": "./examples/MCABillingAccountDimensionsList.json" + }, + "BillingAccountDimensionsListExpandAndTop-Modern": { + "$ref": "./examples/MCABillingAccountDimensionsListExpandAndTop.json" + }, + "BillingAccountDimensionsListWithFilter-Modern": { + "$ref": "./examples/MCABillingAccountDimensionsListWithFilter.json" + }, + "BillingProfileDimensionsList-Modern": { + "$ref": "./examples/MCABillingProfileDimensionsList.json" + }, + "BillingProfileDimensionsListExpandAndTop-Modern": { + "$ref": "./examples/MCABillingProfileDimensionsListExpandAndTop.json" + }, + "BillingProfileDimensionsListWithFilter-Modern": { + "$ref": "./examples/MCABillingProfileDimensionsListWithFilter.json" + }, + "InvoiceSectionDimensionsList-Modern": { + "$ref": "./examples/MCAInvoiceSectionDimensionsList.json" + }, + "InvoiceSectionDimensionsListExpandAndTop-Modern": { + "$ref": "./examples/MCAInvoiceSectionDimensionsListExpandAndTop.json" + }, + "InvoiceSectionDimensionsListWithFilter-Modern": { + "$ref": "./examples/MCAInvoiceSectionDimensionsListWithFilter.json" + }, + "CustomerDimensionsList-Modern": { + "$ref": "./examples/MCACustomerDimensionsList.json" + }, + "CustomerDimensionsListExpandAndTop-Modern": { + "$ref": "./examples/MCACustomerDimensionsListExpandAndTop.json" + }, + "CustomerDimensionsListWithFilter-Modern": { + "$ref": "./examples/MCACustomerDimensionsListWithFilter.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeDimensionParameter" + }, + { + "$ref": "common-types.json#/parameters/apiVersionParameter" + }, + { + "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, + "format": "int32" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "204": { + "description": "No Content. Resource is not available." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "Dimensions_ByExternalCloudProviderType", + "description": "Lists the dimensions by the external cloud provider type.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalBillingAccountDimensionList": { + "$ref": "./examples/ExternalBillingAccountsDimensions.json" + }, + "ExternalSubscriptionDimensionList": { + "$ref": "./examples/ExternalSubscriptionsDimensions.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/externalCloudProviderTypeParameter" + }, + { + "$ref": "#/parameters/externalCloudProviderIdParameter" + }, + { + "$ref": "common-types.json#/parameters/apiVersionParameter" + }, + { + "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, + "format": "int32" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "Query_Usage", + "description": "Query the usage data for scope defined.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "SubscriptionQuery-Legacy": { + "$ref": "./examples/SubscriptionQuery.json" + }, + "SubscriptionQueryGrouping-Legacy": { + "$ref": "./examples/SubscriptionQueryGrouping.json" + }, + "ResourceGroupQuery-Legacy": { + "$ref": "./examples/ResourceGroupQuery.json" + }, + "ResourceGroupQueryGrouping-Legacy": { + "$ref": "./examples/ResourceGroupQueryGrouping.json" + }, + "BillingAccountQuery-Legacy": { + "$ref": "./examples/BillingAccountQuery.json" + }, + "BillingAccountQueryGrouping-Legacy": { + "$ref": "./examples/BillingAccountQueryGrouping.json" + }, + "EnrollmentAccountQuery-Legacy": { + "$ref": "./examples/EnrollmentAccountQuery.json" + }, + "EnrollmentAccountQueryGrouping-Legacy": { + "$ref": "./examples/EnrollmentAccountQueryGrouping.json" + }, + "DepartmentQuery-Legacy": { + "$ref": "./examples/DepartmentQuery.json" + }, + "DepartmentQueryGrouping-Legacy": { + "$ref": "./examples/DepartmentQueryGrouping.json" + }, + "ManagementGroupQuery-Legacy": { + "$ref": "./examples/ManagementGroupQuery.json" + }, + "ManagementGroupQueryGrouping-Legacy": { + "$ref": "./examples/ManagementGroupQueryGrouping.json" + }, + "BillingAccountQuery-Modern": { + "$ref": "./examples/MCABillingAccountQuery.json" + }, + "BillingAccountQueryGrouping-Modern": { + "$ref": "./examples/MCABillingAccountQueryGrouping.json" + }, + "BillingProfileQuery-Modern": { + "$ref": "./examples/MCABillingProfileQuery.json" + }, + "BillingProfileQueryGrouping-Modern": { + "$ref": "./examples/MCABillingProfileQueryGrouping.json" + }, + "InvoiceSectionQuery-Modern": { + "$ref": "./examples/MCAInvoiceSectionQuery.json" + }, + "InvoiceSectionQueryGrouping-Modern": { + "$ref": "./examples/MCAInvoiceSectionQueryGrouping.json" + }, + "CustomerQuery-Modern": { + "$ref": "./examples/MCACustomerQuery.json" + }, + "CustomerQueryGrouping-Modern": { + "$ref": "./examples/MCACustomerQueryGrouping.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeQueryParameter" + }, + { + "$ref": "common-types.json#/parameters/apiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/QueryDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Query Config operation." + }, + { + "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" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "204": { + "description": "No Content. Resource is not available." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "Query_UsageByExternalCloudProviderType", + "description": "Query the usage data for external cloud provider type defined.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalBillingAccountQueryList": { + "$ref": "./examples/ExternalBillingAccountsQuery.json" + }, + "ExternalSubscriptionsQuery": { + "$ref": "./examples/ExternalSubscriptionsQuery.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/externalCloudProviderTypeParameter" + }, + { + "$ref": "#/parameters/externalCloudProviderIdParameter" + }, + { + "$ref": "common-types.json#/parameters/apiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/QueryDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Query Config operation." + }, + { + "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" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateReservationDetailsReport": { + "post": { + "tags": [ + "ReservedInstances" + ], + "operationId": "GenerateReservationDetailsReport_ByBillingAccountId", + "description": "Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ReservationDetails": { + "$ref": "./examples/GenerateReservationDetailsReportByBillingAccount.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "#/parameters/enrollmentIdParameter" + }, + { + "$ref": "#/parameters/startDateParameter" + }, + { + "$ref": "#/parameters/endDateParameter" + }, + { + "$ref": "common-types.json#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Request processing completed.", + "schema": { + "$ref": "#/definitions/OperationStatus" + } + }, + "202": { + "description": "Accepted. Request will be processed. Use the location header to check the status.", + "headers": { + "Location": { + "description": "The URL to check the status of the asynchronous operation.", + "type": "string" + }, + "Retry-After": { + "description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.", + "format": "int32", + "type": "integer" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateReservationDetailsReport": { + "post": { + "tags": [ + "ReservedInstances" + ], + "operationId": "GenerateReservationDetailsReport_ByBillingProfileId", + "description": "Generates the reservations details report for provided date range asynchronously by billing profile. The Reservation usage details can be viewed by only certain enterprise roles by default. For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ReservationDetails": { + "$ref": "./examples/GenerateReservationDetailsReportByBillingProfile.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/billingProfileIdParameter" + }, + { + "$ref": "#/parameters/startDateParameter" + }, + { + "$ref": "#/parameters/endDateParameter" + }, + { + "$ref": "common-types.json#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Request processing completed.", + "schema": { + "$ref": "#/definitions/OperationStatus" + } + }, + "202": { + "description": "Accepted. Request will be processed. Use the Location header to check the status.", + "headers": { + "Location": { + "description": "The URL to check the status of the asynchronous operation.", + "type": "string" + }, + "Retry-After": { + "description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.", + "format": "int32", + "type": "integer" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists all of the available cost management REST API operations.", + "x-ms-examples": { + "OperationList": { + "$ref": "./examples/OperationList.json" + } + }, + "parameters": [ + { + "$ref": "common-types.json#/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": "common-types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "ReportConfigDefinition": { + "description": "The definition of a report config.", + "type": "object", + "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": "ReportTimeframeType", + "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" + }, + "includeMonetaryCommitment": { + "description": "If true, report includes monetary commitment.", + "type": "boolean" + } + }, + "required": [ + "type", + "timeframe" + ] + }, + "ReportConfigTimePeriod": { + "description": "The start and end date for pulling data for the report.", + "type": "object", + "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.", + "type": "object", + "properties": { + "granularity": { + "description": "The granularity of rows in the report.", + "type": "string", + "enum": [ + "Daily", + "Monthly" + ], + "x-ms-enum": { + "name": "ReportGranularityType", + "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" + }, + "x-ms-identifiers": [ + "name" + ], + "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" + }, + "x-ms-identifiers": [ + "name", + "type" + ], + "maxItems": 2 + }, + "sorting": { + "description": "Array of order by expression to use in the report.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigSorting" + }, + "x-ms-identifiers": [] + }, + "filter": { + "type": "object", + "description": "Has filter expression to use in the report.", + "$ref": "#/definitions/ReportConfigFilter" + } + } + }, + "ReportConfigDatasetConfiguration": { + "description": "The configuration of dataset in the report.", + "type": "object", + "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.", + "type": "object", + "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.", + "type": "object", + "properties": { + "direction": { + "description": "Direction of sort.", + "type": "string", + "enum": [ + "Ascending", + "Descending" + ], + "x-ms-enum": { + "name": "ReportConfigSortingType", + "modelAsString": true + } + }, + "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.", + "type": "object", + "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.", + "type": "object", + "properties": { + "and": { + "description": "The logical \"AND\" expression. Must have at least 2 items.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigFilter" + }, + "x-ms-identifiers": [], + "minItems": 2 + }, + "or": { + "description": "The logical \"OR\" expression. Must have at least 2 items.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigFilter" + }, + "x-ms-identifiers": [], + "minItems": 2 + }, + "dimensions": { + "description": "Has comparison expression for a dimension", + "$ref": "#/definitions/ReportConfigComparisonExpression" + }, + "tags": { + "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.", + "type": "object", + "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" + ] + }, + "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": { + "description": "States and configurations of Cost Analysis.", + "type": "object", + "allOf": [ + { + "$ref": "common-types.json#/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": { + "displayName": { + "description": "User input name of the view. Required.", + "type": "string" + }, + "scope": { + "description": "Cost Management scope to save the view on. 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, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope.", + "type": "string" + }, + "createdOn": { + "description": "Date the user created this view.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "modifiedOn": { + "description": "Date when the user last modified this view.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "dateRange": { + "description": "Date range of the current view.", + "type": "string", + "readOnly": true + }, + "currency": { + "description": "Currency of the current view.", + "type": "string", + "readOnly": true + }, + "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", + "Line", + "StackedColumn", + "GroupedColumn", + "Table" + ], + "x-ms-enum": { + "name": "ChartType", + "modelAsString": true + } + }, + "accumulated": { + "description": "Show costs accumulated over time.", + "type": "string", + "enum": [ + "true", + "false" + ], + "x-ms-enum": { + "name": "AccumulatedType", + "modelAsString": true + } + }, + "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" + }, + "x-ms-identifiers": [ + "name" + ] + } + } + }, + "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": "KpiTypeType", + "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": "PivotTypeType", + "modelAsString": true + } + }, + "name": { + "description": "Data field to show in view.", + "type": "string" + } + } + }, + "Resource": { + "description": "The Resource model definition.", + "type": "object", + "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." + }, + "location": { + "readOnly": true, + "type": "string", + "description": "Location of the resource." + }, + "sku": { + "readOnly": true, + "type": "string", + "description": "SKU of the resource." + }, + "eTag": { + "readOnly": true, + "type": "string", + "description": "ETag of the resource." + }, + "tags": { + "readOnly": true, + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags." + } + }, + "x-ms-azure-resource": true + }, + "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": { + "description": "List of Dimension.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DimensionProperties", + "title": "Dimension properties" + } + } + }, + "DimensionProperties": { + "description": "Dimension properties.", + "type": "object", + "properties": { + "description": { + "description": "Dimension description.", + "type": "string", + "readOnly": true + }, + "filterEnabled": { + "description": "Filter enabled.", + "type": "boolean", + "readOnly": true + }, + "groupingEnabled": { + "description": "Grouping enabled.", + "type": "boolean", + "readOnly": true + }, + "data": { + "description": "Dimension data.", + "type": "array", + "items": { + "description": "Dimension data item.", + "type": "string", + "readOnly": true + } + }, + "total": { + "description": "Total number of data for the dimension.", + "format": "int32", + "type": "integer", + "readOnly": true + }, + "category": { + "description": "Dimension category.", + "type": "string", + "readOnly": true + }, + "usageStart": { + "description": "Usage start.", + "format": "date-time", + "type": "string", + "readOnly": true + }, + "usageEnd": { + "description": "Usage end.", + "format": "date-time", + "type": "string", + "readOnly": true + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "AlertsResult": { + "description": "Result of alerts.", + "type": "object", + "properties": { + "value": { + "description": "List of alerts.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Alert" + } + }, + "nextLink": { + "description": "URL to get the next set of alerts results if there are any.", + "type": "string", + "readOnly": true + } + } + }, + "Alert": { + "description": "An individual alert.", + "type": "object", + "allOf": [ + { + "$ref": "common-types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/AlertProperties", + "title": "Alert properties" + } + } + }, + "AlertProperties": { + "description": "Alert properties.", + "type": "object", + "properties": { + "definition": { + "description": "defines the type of alert", + "type": "object", + "properties": { + "type": { + "description": "type of alert", + "type": "string", + "enum": [ + "Budget", + "Invoice", + "Credit", + "Quota", + "General", + "xCloud", + "BudgetForecast" + ], + "x-ms-enum": { + "name": "AlertType", + "modelAsString": true + } + }, + "category": { + "description": "Alert category", + "type": "string", + "enum": [ + "Cost", + "Usage", + "Billing", + "System" + ], + "x-ms-enum": { + "name": "AlertCategory", + "modelAsString": true + } + }, + "criteria": { + "description": "Criteria that triggered alert", + "type": "string", + "enum": [ + "CostThresholdExceeded", + "UsageThresholdExceeded", + "CreditThresholdApproaching", + "CreditThresholdReached", + "QuotaThresholdApproaching", + "QuotaThresholdReached", + "MultiCurrency", + "ForecastCostThresholdExceeded", + "ForecastUsageThresholdExceeded", + "InvoiceDueDateApproaching", + "InvoiceDueDateReached", + "CrossCloudNewDataAvailable", + "CrossCloudCollectionError", + "GeneralThresholdError" + ], + "x-ms-enum": { + "name": "AlertCriteria", + "modelAsString": true + } + } + } + }, + "description": { + "description": "Alert description", + "type": "string" + }, + "source": { + "description": "Source of alert", + "type": "string", + "enum": [ + "Preset", + "User" + ], + "x-ms-enum": { + "name": "AlertSource", + "modelAsString": true + } + }, + "details": { + "description": "Alert details", + "type": "object", + "properties": { + "timeGrainType": { + "description": "Type of timegrain cadence", + "type": "string", + "enum": [ + "None", + "Monthly", + "Quarterly", + "Annually", + "BillingMonth", + "BillingQuarter", + "BillingAnnual" + ], + "x-ms-enum": { + "name": "AlertTimeGrainType", + "modelAsString": true + } + }, + "periodStartDate": { + "description": "datetime of periodStartDate", + "type": "string" + }, + "triggeredBy": { + "description": "notificationId that triggered this alert", + "type": "string" + }, + "resourceGroupFilter": { + "description": "array of resourceGroups to filter by", + "type": "array", + "items": {}, + "x-ms-identifiers": [] + }, + "resourceFilter": { + "description": "array of resources to filter by", + "type": "array", + "items": {}, + "x-ms-identifiers": [] + }, + "meterFilter": { + "description": "array of meters to filter by", + "type": "array", + "items": {}, + "x-ms-identifiers": [] + }, + "tagFilter": { + "description": "tags to filter by", + "type": "object", + "properties": {} + }, + "threshold": { + "description": "notification threshold percentage as a decimal which activated this alert", + "type": "number", + "format": "decimal" + }, + "operator": { + "description": "operator used to compare currentSpend with amount", + "type": "string", + "enum": [ + "None", + "EqualTo", + "GreaterThan", + "GreaterThanOrEqualTo", + "LessThan", + "LessThanOrEqualTo" + ], + "x-ms-enum": { + "name": "AlertOperator", + "modelAsString": true + } + }, + "amount": { + "description": "budget threshold amount", + "type": "number", + "format": "decimal" + }, + "unit": { + "description": "unit of currency being used", + "type": "string" + }, + "currentSpend": { + "description": "current spend", + "type": "number", + "format": "decimal" + }, + "contactEmails": { + "description": "list of emails to contact", + "type": "array", + "items": { + "type": "string" + } + }, + "contactGroups": { + "description": "list of action groups to broadcast to", + "type": "array", + "items": { + "type": "string" + } + }, + "contactRoles": { + "description": "list of contact roles", + "type": "array", + "items": { + "type": "string" + } + }, + "overridingAlert": { + "description": "overriding alert", + "type": "string" + }, + "departmentName": { + "description": "department name", + "type": "string" + }, + "companyName": { + "description": "company name", + "type": "string" + }, + "enrollmentNumber": { + "description": "enrollment number", + "type": "string" + }, + "enrollmentStartDate": { + "description": "datetime of enrollmentStartDate", + "type": "string" + }, + "enrollmentEndDate": { + "description": "datetime of enrollmentEndDate", + "type": "string" + }, + "invoicingThreshold": { + "description": "invoicing threshold", + "type": "number", + "format": "decimal" + } + } + }, + "costEntityId": { + "description": "related budget", + "type": "string" + }, + "status": { + "description": "alert status", + "type": "string", + "enum": [ + "None", + "Active", + "Overridden", + "Resolved", + "Dismissed" + ], + "x-ms-enum": { + "name": "AlertStatus", + "modelAsString": true + } + }, + "creationTime": { + "description": "dateTime in which alert was created", + "type": "string" + }, + "closeTime": { + "description": "dateTime in which alert was closed", + "type": "string" + }, + "modificationTime": { + "description": "dateTime in which alert was last modified", + "type": "string" + }, + "statusModificationUserName": { + "description": "User who last modified the alert", + "type": "string" + }, + "statusModificationTime": { + "description": "dateTime in which the alert status was last modified", + "type": "string" + } + } + }, + "DismissAlertPayload": { + "description": "The request payload to update an alert", + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/AlertProperties", + "title": "Alert properties" + } + } + }, + "QueryResult": { + "description": "Result of query. It contains all columns listed under groupings and aggregation.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/QueryProperties", + "title": "Query properties" + } + } + }, + "QueryProperties": { + "description": "Query properties", + "type": "object", + "properties": { + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string" + }, + "columns": { + "description": "Array of columns", + "type": "array", + "items": { + "$ref": "#/definitions/QueryColumn" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "rows": { + "description": "Array of rows", + "type": "array", + "items": { + "type": "array", + "items": {}, + "x-ms-identifiers": [] + }, + "x-ms-identifiers": [] + } + } + }, + "QueryColumn": { + "description": "QueryColumn properties", + "type": "object", + "properties": { + "name": { + "description": "The name of column.", + "type": "string" + }, + "type": { + "description": "The type of column.", + "type": "string" + } + } + }, + "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.", + "type": "object", + "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": { + "id": { + "description": "Operation id: {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Operation name: {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + }, + "display": { + "description": "The object that represents the operation.", + "type": "object", + "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 + }, + "description": { + "description": "Operation description", + "type": "string", + "readOnly": true + } + } + } + } + }, + "ForecastDefinition": { + "description": "The definition of a forecast.", + "type": "object", + "properties": { + "type": { + "description": "The type of the forecast.", + "type": "string", + "enum": [ + "Usage", + "ActualCost", + "AmortizedCost" + ], + "x-ms-enum": { + "name": "ForecastType", + "modelAsString": true + } + }, + "timeframe": { + "description": "The time frame for pulling data for the forecast. If custom, then a specific time period must be provided.", + "type": "string", + "enum": [ + "MonthToDate", + "BillingMonthToDate", + "TheLastMonth", + "TheLastBillingMonth", + "WeekToDate", + "Custom" + ], + "x-ms-enum": { + "name": "ForecastTimeframeType", + "modelAsString": true + } + }, + "timePeriod": { + "description": "Has time period for pulling data for the forecast.", + "$ref": "#/definitions/QueryTimePeriod" + }, + "dataset": { + "description": "Has definition for data in this forecast.", + "$ref": "#/definitions/ForecastDataset" + }, + "includeActualCost": { + "description": "a boolean determining if actualCost will be included", + "type": "boolean" + }, + "includeFreshPartialCost": { + "description": "a boolean determining if FreshPartialCost will be included", + "type": "boolean" + } + }, + "required": [ + "type", + "timeframe", + "dataset" + ] + }, + "ForecastDataset": { + "description": "The definition of data present in the forecast.", + "type": "object", + "properties": { + "granularity": { + "description": "The granularity of rows in the forecast.", + "type": "string", + "enum": [ + "Daily" + ], + "x-ms-enum": { + "name": "GranularityType", + "modelAsString": true + } + }, + "configuration": { + "description": "Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided.", + "$ref": "#/definitions/QueryDatasetConfiguration" + }, + "aggregation": { + "type": "object", + "description": "Dictionary of aggregation expression to use in the forecast. The key of each item in the dictionary is the alias for the aggregated column. forecast can have up to 2 aggregation clauses.", + "additionalProperties": { + "type": "object", + "$ref": "#/definitions/QueryAggregation" + }, + "maxItems": 2 + }, + "filter": { + "type": "object", + "description": "Has filter expression to use in the forecast.", + "$ref": "#/definitions/QueryFilter" + } + } + }, + "QueryDefinition": { + "description": "The definition of a query.", + "type": "object", + "properties": { + "type": { + "description": "The type of the query.", + "type": "string", + "enum": [ + "Usage", + "ActualCost", + "AmortizedCost" + ], + "x-ms-enum": { + "name": "ExportType", + "modelAsString": true + } + }, + "timeframe": { + "description": "The time frame for pulling data for the query. If custom, then a specific time period must be provided.", + "type": "string", + "enum": [ + "MonthToDate", + "BillingMonthToDate", + "TheLastMonth", + "TheLastBillingMonth", + "WeekToDate", + "Custom" + ], + "x-ms-enum": { + "name": "TimeframeType", + "modelAsString": true + } + }, + "timePeriod": { + "description": "Has time period for pulling data for the query.", + "$ref": "#/definitions/QueryTimePeriod" + }, + "dataset": { + "description": "Has definition for data in this query.", + "$ref": "#/definitions/QueryDataset" + } + }, + "required": [ + "type", + "timeframe", + "dataset" + ] + }, + "QueryTimePeriod": { + "description": "The start and end date for pulling data for the query.", + "type": "object", + "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" + ] + }, + "QueryDataset": { + "description": "The definition of data present in the query.", + "type": "object", + "properties": { + "granularity": { + "description": "The granularity of rows in the query.", + "type": "string", + "enum": [ + "Daily" + ], + "x-ms-enum": { + "name": "GranularityType", + "modelAsString": true + } + }, + "configuration": { + "description": "Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided.", + "$ref": "#/definitions/QueryDatasetConfiguration" + }, + "aggregation": { + "type": "object", + "description": "Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses.", + "additionalProperties": { + "type": "object", + "$ref": "#/definitions/QueryAggregation" + }, + "maxItems": 2 + }, + "grouping": { + "description": "Array of group by expression to use in the query. Query can have up to 2 group by clauses.", + "type": "array", + "items": { + "$ref": "#/definitions/QueryGrouping" + }, + "x-ms-identifiers": [ + "name", + "type" + ], + "maxItems": 2 + }, + "filter": { + "type": "object", + "description": "The filter expression to use in the query. Please reference our Query API REST documentation for how to properly format the filter.", + "$ref": "#/definitions/QueryFilter" + } + } + }, + "OperationStatus": { + "description": "The status of the long running operation.", + "type": "object", + "properties": { + "status": { + "description": "The status of the long running operation.", + "type": "string", + "enum": [ + "Running", + "Completed", + "Failed" + ], + "x-ms-enum": { + "name": "OperationStatusType", + "modelAsString": true + } + }, + "properties": { + "x-ms-client-flatten": true, + "type": "object", + "description": "The properties of the resource generated.", + "$ref": "#/definitions/ReportURL" + } + } + }, + "ReportURL": { + "description": "The URL to download the generated report.", + "type": "object", + "properties": { + "reportUrl": { + "description": "The CSV file from the reportUrl blob link consists of reservation usage data with the following schema at daily granularity", + "type": "string", + "$ref": "#/definitions/ReservationReportSchema" + }, + "validUntil": { + "description": "The time at which report URL becomes invalid.", + "type": "string", + "format": "date-time" + } + } + }, + "QueryDatasetConfiguration": { + "description": "The configuration of dataset in the query.", + "type": "object", + "properties": { + "columns": { + "description": "Array of column names to be included in the query. Any valid query column name is allowed. If not provided, then query includes all columns.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "QueryAggregation": { + "description": "The aggregation expression to be used in the query.", + "type": "object", + "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" + ] + }, + "QueryGrouping": { + "description": "The group by expression to be used in the query.", + "type": "object", + "properties": { + "type": { + "description": "Has type of the column to group.", + "$ref": "#/definitions/QueryColumnType" + }, + "name": { + "description": "The name of the column to group.", + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "QueryFilter": { + "description": "The filter expression to be used in the export.", + "type": "object", + "properties": { + "and": { + "description": "The logical \"AND\" expression. Must have at least 2 items.", + "type": "array", + "items": { + "$ref": "#/definitions/QueryFilter" + }, + "x-ms-identifiers": [], + "minItems": 2 + }, + "or": { + "description": "The logical \"OR\" expression. Must have at least 2 items.", + "type": "array", + "items": { + "$ref": "#/definitions/QueryFilter" + }, + "x-ms-identifiers": [], + "minItems": 2 + }, + "dimensions": { + "description": "Has comparison expression for a dimension", + "$ref": "#/definitions/QueryComparisonExpression" + }, + "tags": { + "description": "Has comparison expression for a tag", + "$ref": "#/definitions/QueryComparisonExpression" + } + } + }, + "QueryColumnType": { + "description": "The type of the column in the export.", + "type": "string", + "enum": [ + "Tag", + "Dimension" + ], + "x-ms-enum": { + "name": "QueryColumnType", + "modelAsString": true + } + }, + "QueryComparisonExpression": { + "description": "The comparison expression to be used in the query.", + "type": "object", + "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" + ], + "x-ms-enum": { + "name": "QueryOperatorType", + "modelAsString": true + } + }, + "values": { + "description": "Array of values to use for comparison", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + } + }, + "required": [ + "name", + "operator", + "values" + ] + }, + "ReservationReportSchema": { + "description": "The CSV file from the reportUrl blob link consists of reservation usage data with the following schema at daily granularity", + "type": "string", + "enum": [ + "InstanceFlexibilityGroup", + "InstanceFlexibilityRatio", + "InstanceId", + "Kind", + "ReservationId", + "ReservationOrderId", + "ReservedHours", + "SkuName", + "TotalReservedQuantity", + "UsageDate", + "UsedHours" + ], + "x-ms-enum": { + "name": "ReservationReportSchema", + "modelAsString": true + } + } + }, + "parameters": { + "viewNameParameter": { + "name": "viewName", + "in": "path", + "description": "View 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, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope.", + "x-ms-parameter-location": "method" + }, + "scopeDimensionParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope associated with dimension 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.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "scopeAlertParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "scopeForecastParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope associated with forecast operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "scopeQueryParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope associated with query and export operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "subscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "Azure Subscription ID.", + "required": true, + "type": "string" + }, + "resourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "Azure Resource Group Name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "startDateParameter": { + "name": "startDate", + "in": "query", + "description": "Start Date", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "endDateParameter": { + "name": "endDate", + "in": "query", + "description": "End Date", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "enrollmentIdParameter": { + "name": "billingAccountId", + "in": "path", + "description": "Enrollment ID (Legacy BillingAccount ID)", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "billingAccountIdParameter": { + "name": "billingAccountId", + "in": "path", + "description": "BillingAccount ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "billingProfileIdParameter": { + "name": "billingProfileId", + "in": "path", + "description": "BillingProfile 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" + }, + "externalCloudProviderTypeParameter": { + "name": "externalCloudProviderType", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "externalSubscriptions", + "externalBillingAccounts" + ], + "x-ms-enum": { + "name": "externalCloudProviderType", + "modelAsString": true + }, + "description": "The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.", + "x-ms-parameter-location": "method" + }, + "externalCloudProviderIdParameter": { + "name": "externalCloudProviderId", + "in": "path", + "required": true, + "type": "string", + "description": "This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.", + "x-ms-parameter-location": "method" + }, + "alertIdParameter": { + "name": "alertId", + "in": "path", + "description": "Alert ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountAlerts.json new file mode 100644 index 000000000000..92e85a187afc --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountAlerts.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "api-version": "2021-10-01-preview", + "billingAccountId": "12345:6789", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", + "name": "11111111-1111-1111-111111111111", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "11111111-1111-1111-111111111111_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 171000.32, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2019-06-24T05:51:52.8713179Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2019-08-31T17:51:55.1808807Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountDimensionsList.json new file mode 100644 index 000000000000..3a0b12d378b4 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountDimensionsList.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "100", + "scope": "providers/Microsoft.Billing/billingAccounts/100" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 37, + "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 + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..34c0efbeedf4 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "100", + "$expand": "properties/data", + "$top": 5, + "scope": "providers/Microsoft.Billing/billingAccounts/100" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "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 + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountDimensionsListWithFilter.json new file mode 100644 index 000000000000..79382668a3d6 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountDimensionsListWithFilter.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "100", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'", + "scope": "providers/Microsoft.Billing/billingAccounts/100" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceId_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/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-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "http://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountForecast.json new file mode 100644 index 000000000000..c930b012cc6c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountForecast.json @@ -0,0 +1,110 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "12345:6789", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimensions": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tags": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimensions": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + }, + "includeActualCost": false, + "includeFreshPartialCost": false + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/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/12345:6789/providers/Microsoft.CostManagement/Forecast?api-version=2021-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + 20180331, + "Forecast", + "USD" + ], + [ + 218.68795741935486, + 20180331, + "Forecast", + "USD" + ], + [ + 0.14384913581657052, + 20180401, + "Forecast", + "USD" + ], + [ + 0.009865586851323632, + 20180429, + "Forecast", + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountQuery.json new file mode 100644 index 000000000000..7cb9e38ee05f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountQuery.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "70664866", + "scope": "providers/Microsoft.Billing/billingAccounts/70664866", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimensions": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tags": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimensions": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "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=2021-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 0.16677720329728665, + "gs-stms-dev", + 20180331, + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountQueryGrouping.json new file mode 100644 index 000000000000..88006102fe55 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingAccountQueryGrouping.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "70664866", + "scope": "providers/Microsoft.Billing/billingAccounts/70664866", + "parameters": { + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "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=2021-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingProfileAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingProfileAlerts.json new file mode 100644 index 000000000000..62dc930b9a7f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingProfileAlerts.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2021-10-01-preview", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", + "name": "11111111-1111-1111-111111111111", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "11111111-1111-1111-111111111111_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 171000.32, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2019-06-24T05:51:52.8713179Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2019-08-31T17:51:55.1808807Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingProfileForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingProfileForecast.json new file mode 100644 index 000000000000..967338b46cd4 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/BillingProfileForecast.json @@ -0,0 +1,111 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimensions": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tags": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimensions": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + }, + "includeActualCost": false, + "includeFreshPartialCost": false + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/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/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/Forecast?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + 20180331, + "Forecast", + "USD" + ], + [ + 218.68795741935486, + 20180331, + "Forecast", + "USD" + ], + [ + 0.14384913581657052, + 20180401, + "Forecast", + "USD" + ], + [ + 0.009865586851323632, + 20180429, + "Forecast", + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentAlerts.json new file mode 100644 index 000000000000..a274d64fcd98 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentAlerts.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2021-10-01-preview", + "billingAccountId": "12345:6789", + "departmentId": "123", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/departments/123" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/departments/123/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/departments/123/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", + "name": "11111111-1111-1111-111111111111", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "11111111-1111-1111-111111111111_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 171000.32, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2019-06-24T05:51:52.8713179Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2019-08-31T17:51:55.1808807Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentDimensionsList.json new file mode 100644 index 000000000000..041eeed53578 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentDimensionsList.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "100", + "departmentId": "123", + "scope": "providers/Microsoft.Billing/billingAccounts/100/departments/123" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 37, + "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 + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..e9d8435a14ba --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentDimensionsListExpandAndTop.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "100", + "departmentId": "123", + "$expand": "properties/data", + "$top": 5, + "scope": "providers/Microsoft.Billing/billingAccounts/100/departments/123" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "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 + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentDimensionsListWithFilter.json new file mode 100644 index 000000000000..c30e2c6a89a9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentDimensionsListWithFilter.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "100", + "departmentId": "123", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'", + "scope": "providers/Microsoft.Billing/billingAccounts/100/departments/123" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.CostManagement/dimensions_ResourceId_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/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-05-01T00:00:00-07:00", + "usageEnd": "2018-05-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.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentForecast.json new file mode 100644 index 000000000000..23c5074f3e0c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentForecast.json @@ -0,0 +1,111 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "12345:6789", + "departmentId": "123", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/departments/123", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimensions": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tags": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimensions": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + }, + "includeActualCost": false, + "includeFreshPartialCost": false + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/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/12345:6789/departments/123/providers/Microsoft.CostManagement/Forecast?api-version=2021-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + 20180331, + "Forecast", + "USD" + ], + [ + 218.68795741935486, + 20180331, + "Forecast", + "USD" + ], + [ + 0.14384913581657052, + 20180401, + "Forecast", + "USD" + ], + [ + 0.009865586851323632, + 20180429, + "Forecast", + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentQuery.json new file mode 100644 index 000000000000..606fac536ecc --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentQuery.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "70664866", + "departmentId": "123", + "scope": "providers/Microsoft.Billing/billingAccounts/100/departments/123", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimensions": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tags": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimensions": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "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=2021-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 0.16677720329728665, + "gs-stms-dev", + 20180331, + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentQueryGrouping.json new file mode 100644 index 000000000000..ad8e4e324e7c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DepartmentQueryGrouping.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "70664866", + "departmentId": "123", + "scope": "providers/Microsoft.Billing/billingAccounts/100/departments/123", + "parameters": { + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "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=2021-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DismissResourceGroupAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DismissResourceGroupAlerts.json new file mode 100644 index 000000000000..5cd608f81392 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DismissResourceGroupAlerts.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "ScreenSharingTest-peer", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer", + "alertId": "22222222-2222-2222-2222-222222222222", + "parameters": { + "properties": { + "status": "Dismissed" + } + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/alerts/22222222-2222-2222-2222-222222222222", + "name": "22222222-2222-2222-2222-222222222222", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "22222222-2222-2222-2222-222222222222_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Dismissed", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DismissSubscriptionAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DismissSubscriptionAlerts.json new file mode 100644 index 000000000000..863ac58f95b8 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/DismissSubscriptionAlerts.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "alertId": "22222222-2222-2222-2222-222222222222", + "parameters": { + "properties": { + "status": "Dismissed" + } + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/alerts/22222222-2222-2222-2222-222222222222", + "name": "22222222-2222-2222-2222-222222222222", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "22222222-2222-2222-2222-222222222222_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Dismissed", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountAlerts.json new file mode 100644 index 000000000000..3a6b90445694 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountAlerts.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2021-10-01-preview", + "billingAccountId": "12345:6789", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/enrollmentAccounts/456" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/enrollmentAccounts/456/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/enrollmentAccounts/456/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", + "name": "11111111-1111-1111-111111111111", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "11111111-1111-1111-111111111111_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 171000.32, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2019-06-24T05:51:52.8713179Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2019-08-31T17:51:55.1808807Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountDimensionsList.json new file mode 100644 index 000000000000..4219114de7bd --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountDimensionsList.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 37, + "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 + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..0611011ef86b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "$expand": "properties/data", + "$top": 5, + "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "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 + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json new file mode 100644 index 000000000000..8d2f3a997657 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'", + "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.CostManagement/dimensions_ResourceId_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/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-05-01T00:00:00-07:00", + "usageEnd": "2018-05-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.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountForecast.json new file mode 100644 index 000000000000..093ec2218244 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountForecast.json @@ -0,0 +1,111 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "12345:6789", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/enrollmentAccounts/456", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimensions": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tags": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimensions": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + }, + "includeActualCost": false, + "includeFreshPartialCost": false + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/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/12345:6789/enrollmentAccounts/456/providers/Microsoft.CostManagement/Forecast?api-version=2021-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + 20180331, + "Forecast", + "USD" + ], + [ + 218.68795741935486, + 20180331, + "Forecast", + "USD" + ], + [ + 0.14384913581657052, + 20180401, + "Forecast", + "USD" + ], + [ + 0.009865586851323632, + 20180429, + "Forecast", + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountQuery.json new file mode 100644 index 000000000000..95c6cb59521f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountQuery.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "70664866", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimensions": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tags": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimensions": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "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=2021-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 0.16677720329728665, + "gs-stms-dev", + 20180331, + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountQueryGrouping.json new file mode 100644 index 000000000000..caa6d869a95f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/EnrollmentAccountQueryGrouping.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "70664866", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", + "parameters": { + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "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=2021-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalBillingAccountAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalBillingAccountAlerts.json new file mode 100644 index 000000000000..d69d7a968e57 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalBillingAccountAlerts.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "api-version": "2021-10-01-preview", + "externalCloudProviderId": "100", + "externalCloudProviderType": "externalBillingAccounts" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.CostManagement/externalBillingAccounts/100/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + }, + { + "id": "providers/Microsoft.CostManagement/externalBillingAccounts/100/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", + "name": "11111111-1111-1111-111111111111", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "11111111-1111-1111-111111111111_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 171000.32, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2019-06-24T05:51:52.8713179Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2019-08-31T17:51:55.1808807Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalBillingAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalBillingAccountForecast.json new file mode 100644 index 000000000000..167367d188ab --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalBillingAccountForecast.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "externalCloudProviderId": "100", + "externalCloudProviderType": "externalBillingAccounts", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimensions": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tags": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimensions": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.CostManagement/externalBillingAccounts/100/query/6dc7b06a-d90a-4df5-b655-ce6cf1c0814d", + "name": "6dc7b06a-d90a-4df5-b655-ce6cf1c0814d", + "type": "Microsoft.CostManagement/query", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 0.0, + "Forecast", + "USD" + ], + [ + 30.2572751438, + "Forecast", + "USD" + ], + [ + 0.076757602000000022, + "Forecast", + "USD" + ], + [ + 50.430964190400012, + "Forecast", + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalBillingAccountsDimensions.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalBillingAccountsDimensions.json new file mode 100644 index 000000000000..705d4fcd3fb4 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalBillingAccountsDimensions.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "externalCloudProviderId": "100", + "externalCloudProviderType": "externalBillingAccounts" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.CostManagement/externalBillingAccounts/100/dimensions_ResourceType_2019-12-01_2019-12-31", + "name": "dimensions_ResourceType_2019-12-01_2019-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 0, + "category": "ResourceType", + "description": "Resource type", + "usageStart": "2019-12-01T00:00:00Z", + "usageEnd": "2019-12-31T00:00:00Z", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.CostManagement/externalBillingAccounts/100/dimensions_ResourceId_2019-12-01_2019-12-31", + "name": "dimensions_ResourceId_2019-12-01_2019-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 0, + "category": "ResourceId", + "description": "Resource ID", + "usageStart": "2019-12-01T00:00:00Z", + "usageEnd": "2019-12-31T00:00:00Z", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalBillingAccountsQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalBillingAccountsQuery.json new file mode 100644 index 000000000000..b21025b0a41f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalBillingAccountsQuery.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "externalCloudProviderId": "100", + "externalCloudProviderType": "externalBillingAccounts", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimensions": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tags": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimensions": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.CostManagement/externalBillingAccounts/100/query/6dc7b06a-d90a-4df5-b655-ce6cf1c0814d", + "name": "6dc7b06a-d90a-4df5-b655-ce6cf1c0814d", + "type": "Microsoft.CostManagement/query", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ServiceName", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 0.0, + "abc db", + "USD" + ], + [ + 30.2572751438, + "abc compute cloud", + "USD" + ], + [ + 0.076757602000000022, + "abc file system", + "USD" + ], + [ + 50.430964190400012, + "abc elasticache", + "USD" + ] + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalSubscriptionAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalSubscriptionAlerts.json new file mode 100644 index 000000000000..92436a022d8f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalSubscriptionAlerts.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "api-version": "2021-10-01-preview", + "externalCloudProviderId": "100", + "externalCloudProviderType": "externalSubscriptions" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.CostManagement/externalSubscriptions/100/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + }, + { + "id": "providers/Microsoft.CostManagement/externalSubscriptions/100/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", + "name": "11111111-1111-1111-111111111111", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "11111111-1111-1111-111111111111_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 171000.32, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2019-06-24T05:51:52.8713179Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2019-08-31T17:51:55.1808807Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalSubscriptionForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalSubscriptionForecast.json new file mode 100644 index 000000000000..f651e5cec87a --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalSubscriptionForecast.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "externalCloudProviderId": "100", + "externalCloudProviderType": "externalSubscriptions", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimensions": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tags": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimensions": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.CostManagement/externalSubscriptions/100/query/d99477af-7510-40ee-aca2-e59bdca0d10d", + "name": "d99477af-7510-40ee-aca2-e59bdca0d10d", + "type": "Microsoft.CostManagement/query", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalSubscriptionsDimensions.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalSubscriptionsDimensions.json new file mode 100644 index 000000000000..7f2217ebf526 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalSubscriptionsDimensions.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "externalCloudProviderId": "100", + "externalCloudProviderType": "externalSubscriptions" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.CostManagement/externalSubscriptions/123/dimensions_ResourceType_2019-12-01_2019-12-31", + "name": "dimensions_ResourceType_2019-12-01_2019-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 0, + "category": "ResourceType", + "description": "Resource type", + "usageStart": "2019-12-01T00:00:00Z", + "usageEnd": "2019-12-31T00:00:00Z", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.CostManagement/externalSubscriptions/123/dimensions_ResourceId_2019-12-01_2019-12-31", + "name": "dimensions_ResourceId_2019-12-01_2019-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 0, + "category": "ResourceId", + "description": "Resource ID", + "usageStart": "2019-12-01T00:00:00Z", + "usageEnd": "2019-12-31T00:00:00Z", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalSubscriptionsQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalSubscriptionsQuery.json new file mode 100644 index 000000000000..b71101e08ff2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ExternalSubscriptionsQuery.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "externalCloudProviderId": "100", + "externalCloudProviderType": "externalSubscriptions", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimensions": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tags": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimensions": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.CostManagement/externalSubscriptions/100/query/d99477af-7510-40ee-aca2-e59bdca0d10d", + "name": "d99477af-7510-40ee-aca2-e59bdca0d10d", + "type": "Microsoft.CostManagement/query", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/GenerateReservationDetailsReportByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/GenerateReservationDetailsReportByBillingAccount.json new file mode 100644 index 000000000000..d8c8f0f40faf --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/GenerateReservationDetailsReportByBillingAccount.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "billingAccountId": "9845612", + "startDate": "2020-01-01", + "endDate": "2020-01-30", + "api-version": "2019-11-01" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/9845612/providers/Microsoft.CostManagement/reservationDetailsOperationResults/cf9f95c9-af6b-41dd-a622-e6f4fc60c3ee?api-version=2019-11-01", + "Retry-After": "60" + } + }, + "200": { + "body": { + "status": "Completed", + "properties": { + "reportUrl": "https://storage.blob.core.windows.net/details/20200911/00000000-0000-0000-0000-000000000000?sv=2016-05-31&sr=b&sig=jep8HT2aphfUkyERRZa5LRfd9RPzjXbzB%2F9TNiQ", + "validUntil": "2020-09-12T02:56:55.5021869Z" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/GenerateReservationDetailsReportByBillingProfile.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/GenerateReservationDetailsReportByBillingProfile.json new file mode 100644 index 000000000000..a4bd203ef284 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/GenerateReservationDetailsReportByBillingProfile.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "billingAccountId": "00000000-0000-0000-0000-000000000000", + "billingProfileId": "CZSFR-SDFXC-DSDF", + "startDate": "2020-01-01", + "endDate": "2020-01-30", + "api-version": "2019-11-01" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000/billingProfiles/CZSFR-SDFXC-DSDF/providers/Microsoft.CostManagement/reservationDetailsOperationResults/cf9f95c9-af6b-41dd-a622-e6f4fc60c3ee?api-version=2019-11-01", + "Retry-After": "60" + } + }, + "200": { + "body": { + "status": "Completed", + "properties": { + "reportUrl": "https://storage.blob.core.windows.net/details/20200911/00000000-0000-0000-0000-000000000000?sv=2016-05-31&sr=b&sig=jep8HT2aphfUkyERRZa5LRfd9RPzjXbzB%2F9TNiQ", + "validUntil": "2020-09-12T02:56:55.5021869Z" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/InvoiceSectionAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/InvoiceSectionAlerts.json new file mode 100644 index 000000000000..d90fc5a57b18 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/InvoiceSectionAlerts.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "api-version": "2021-10-01-preview", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "invoiceSectionId": "9876", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", + "name": "11111111-1111-1111-111111111111", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "11111111-1111-1111-111111111111_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 171000.32, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2019-06-24T05:51:52.8713179Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2019-08-31T17:51:55.1808807Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/InvoiceSectionForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/InvoiceSectionForecast.json new file mode 100644 index 000000000000..2b2bf5ee04c8 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/InvoiceSectionForecast.json @@ -0,0 +1,112 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "invoiceSectionId": "9876", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimensions": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tags": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimensions": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + }, + "includeActualCost": false, + "includeFreshPartialCost": false + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/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/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/Forecast?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + 20180331, + "Forecast", + "USD" + ], + [ + 218.68795741935486, + 20180331, + "Forecast", + "USD" + ], + [ + 0.14384913581657052, + 20180401, + "Forecast", + "USD" + ], + [ + 0.009865586851323632, + 20180429, + "Forecast", + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingAccountDimensionsList.json new file mode 100644 index 000000000000..7a30ed852d58 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingAccountDimensionsList.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "12345:6789", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", + "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", + "name": "dimensions_ResourceType_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingAccountDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..12a93024cf15 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingAccountDimensionsListExpandAndTop.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "$expand": "properties/data", + "$top": 5, + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", + "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", + "name": "dimensions_ResourceType_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingAccountDimensionsListWithFilter.json new file mode 100644 index 000000000000..f8c6a0ddb4b5 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingAccountDimensionsListWithFilter.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/microsoft.CostManagement/dimensions_ResourceId_2019-10-01_2019-10-31", + "name": "dimensions_ResourceId_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/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": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "http://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingAccountQuery.json new file mode 100644 index 000000000000..dfd81bcbd7cd --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingAccountQuery.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "12345:6789", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimensions": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tags": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimensions": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/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/12345:6789/providers/Microsoft.CostManagement/Query?api-version=2021-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 0.16677720329728665, + "gs-stms-dev", + 20180331, + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingAccountQueryGrouping.json new file mode 100644 index 000000000000..31f0ffbf4ad9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingAccountQueryGrouping.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "12345:6789", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789", + "parameters": { + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/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/12345:6789/providers/Microsoft.CostManagement/Query?api-version=2021-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingProfileDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingProfileDimensionsList.json new file mode 100644 index 000000000000..61a209e80977 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingProfileDimensionsList.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", + "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", + "name": "dimensions_ResourceType_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingProfileDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingProfileDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..fca61ffb8f2d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingProfileDimensionsListExpandAndTop.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "$expand": "properties/data", + "$top": 5, + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", + "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", + "name": "dimensions_ResourceType_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingProfileDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingProfileDimensionsListWithFilter.json new file mode 100644 index 000000000000..946a0fe6665d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingProfileDimensionsListWithFilter.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/microsoft.CostManagement/dimensions_ResourceId_2019-10-01_2019-10-31", + "name": "dimensions_ResourceId_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/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": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "http://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingProfileQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingProfileQuery.json new file mode 100644 index 000000000000..90eff4558051 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingProfileQuery.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimensions": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tags": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimensions": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/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/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/Query?api-version=2021-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 0.16677720329728665, + "gs-stms-dev", + 20180331, + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingProfileQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingProfileQueryGrouping.json new file mode 100644 index 000000000000..e110931544a8 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCABillingProfileQueryGrouping.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579", + "parameters": { + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/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/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/Query?api-version=2021-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCACustomerDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCACustomerDimensionsList.json new file mode 100644 index 000000000000..d085114ab90d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCACustomerDimensionsList.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "12345:6789", + "customerId": "5678", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", + "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", + "name": "dimensions_ResourceType_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCACustomerDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCACustomerDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..638b70eb595b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCACustomerDimensionsListExpandAndTop.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "customerId": "5678", + "$expand": "properties/data", + "$top": 5, + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", + "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", + "name": "dimensions_ResourceType_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCACustomerDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCACustomerDimensionsListWithFilter.json new file mode 100644 index 000000000000..3ecc017c6f8e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCACustomerDimensionsListWithFilter.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "customerId": "13579", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/microsoft.CostManagement/dimensions_ResourceId_2019-10-01_2019-10-31", + "name": "dimensions_ResourceId_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/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": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "http://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCACustomerQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCACustomerQuery.json new file mode 100644 index 000000000000..a14f5498e0bf --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCACustomerQuery.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "12345:6789", + "customerId": "5678", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimensions": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tags": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimensions": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/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/12345:6789/customers/5678/providers/Microsoft.CostManagement/Query?api-version=2021-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 0.16677720329728665, + "gs-stms-dev", + 20180331, + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCACustomerQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCACustomerQueryGrouping.json new file mode 100644 index 000000000000..a2da465d67e3 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCACustomerQueryGrouping.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "12345:6789", + "customerId": "5678", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678", + "parameters": { + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678/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/12345:6789/customers/5678/providers/Microsoft.CostManagement/Query?api-version=2021-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCAInvoiceSectionDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCAInvoiceSectionDimensionsList.json new file mode 100644 index 000000000000..529439b0acbf --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCAInvoiceSectionDimensionsList.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "invoiceSectionId": "9876", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", + "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", + "name": "dimensions_ResourceType_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCAInvoiceSectionDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCAInvoiceSectionDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..4a1cca2dea2a --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCAInvoiceSectionDimensionsListExpandAndTop.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "invoiceSectionId": "9876", + "$expand": "properties/data", + "$top": 5, + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/microsoft.CostManagement/dimensions_ResourceGroup_2019-10-01_2019-10-31", + "name": "dimensions_ResourceGroup_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/microsoft.CostManagement/dimensions_ResourceType_2019-10-01_2019-10-31", + "name": "dimensions_ResourceType_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCAInvoiceSectionDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCAInvoiceSectionDimensionsListWithFilter.json new file mode 100644 index 000000000000..3d737cf438d1 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCAInvoiceSectionDimensionsListWithFilter.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "invoiceSectionId": "9876", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/microsoft.CostManagement/dimensions_ResourceId_2019-10-01_2019-10-31", + "name": "dimensions_ResourceId_2019-10-01_2019-10-31", + "type": "microsoft.CostManagement/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": "2019-10-01T00:00:00-07:00", + "usageEnd": "2019-10-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "http://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCAInvoiceSectionQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCAInvoiceSectionQuery.json new file mode 100644 index 000000000000..909f643e09a0 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCAInvoiceSectionQuery.json @@ -0,0 +1,110 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "invoiceSectionId": "9876", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimensions": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tags": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimensions": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/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/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/Query?api-version=2021-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 0.16677720329728665, + "gs-stms-dev", + 20180331, + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCAInvoiceSectionQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCAInvoiceSectionQueryGrouping.json new file mode 100644 index 000000000000..8c4f73f459bf --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/MCAInvoiceSectionQueryGrouping.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "invoiceSectionId": "9876", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876", + "parameters": { + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876/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/12345:6789/billingProfiles/13579/invoiceSections/9876/providers/Microsoft.CostManagement/Query?api-version=2021-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ManagementGroupDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ManagementGroupDimensionsList.json new file mode 100644 index 000000000000..381dd37759c6 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ManagementGroupDimensionsList.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "managementGroupId": "MyMgId", + "scope": "providers/Microsoft.Management/managementGroups/MyMgId" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [], + "total": 37, + "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 + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..f0d980973533 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "managementGroupId": "MyMgId", + "$expand": "properties/data", + "$top": 5, + "scope": "providers/Microsoft.Management/managementGroups/MyMgId" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "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 + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ManagementGroupDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ManagementGroupDimensionsListWithFilter.json new file mode 100644 index 000000000000..121645f857ba --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ManagementGroupDimensionsListWithFilter.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "managementGroupId": "MyMgId", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'", + "scope": "providers/Microsoft.Management/managementGroups/MyMgId" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.CostManagement/dimensions_ResourceId_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/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-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "http://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ManagementGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ManagementGroupQuery.json new file mode 100644 index 000000000000..a36839a00351 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ManagementGroupQuery.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "managementGroupId": "MyMgId", + "scope": "providers/Microsoft.Management/managementGroups/MyMgId", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimensions": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tags": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimensions": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "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=2021-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 0.16677720329728665, + "gs-stms-dev", + 20180331, + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ManagementGroupQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ManagementGroupQueryGrouping.json new file mode 100644 index 000000000000..6765ec668659 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ManagementGroupQueryGrouping.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "managementGroupId": "MyMgId", + "scope": "providers/Microsoft.Management/managementGroups/MyMgId", + "parameters": { + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "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=2021-10-01&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/OperationList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/OperationList.json new file mode 100644 index 000000000000..bb657778f56f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/OperationList.json @@ -0,0 +1,113 @@ +{ + "parameters": { + "api-version": "2021-10-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "Microsoft.CostManagement/budgets/read", + "name": "Microsoft.CostManagement/budgets/read", + "display": { + "provider": "Microsoft.CostManagement", + "resource": "Budgets", + "operation": "List budgets", + "description": "List the budgets by a subscription or a management group." + } + }, + { + "id": "Microsoft.CostManagement/query/action", + "name": "Microsoft.CostManagement/query/action", + "display": { + "provider": "Microsoft.CostManagement", + "resource": "Query", + "operation": "Query usage data", + "description": "Query usage data by a scope." + } + }, + { + "id": "Microsoft.CostManagement/exports/read", + "name": "Microsoft.CostManagement/exports/read", + "display": { + "provider": "Microsoft.CostManagement", + "resource": "Exports", + "operation": "List exports", + "description": "List the exports by scope." + } + }, + { + "id": "Microsoft.CostManagement/exports/write", + "name": "Microsoft.CostManagement/exports/write", + "display": { + "provider": "Microsoft.CostManagement", + "resource": "Exports", + "operation": "Create and update export", + "description": "Create or update the specified export." + } + }, + { + "id": "Microsoft.CostManagement/exports/action", + "name": "Microsoft.CostManagement/exports/action", + "display": { + "provider": "Microsoft.CostManagement", + "resource": "Exports", + "operation": "Run export", + "description": "Run the specified export." + } + }, + { + "id": "Microsoft.CostManagement/exports/run/action", + "name": "Microsoft.CostManagement/exports/run/action", + "display": { + "provider": "Microsoft.CostManagement", + "resource": "exports/run", + "operation": "Run exports", + "description": "Run exports." + } + }, + { + "id": "Microsoft.CostManagement/alerts/read", + "name": "Microsoft.CostManagement/alerts/read", + "display": { + "provider": "Microsoft.CostManagement", + "resource": "Alerts", + "operation": "List Alerts", + "description": "List alerts." + } + }, + { + "id": "Microsoft.CostManagement/operations/read", + "name": "Microsoft.CostManagement/operations/read", + "display": { + "provider": "Microsoft.CostManagement", + "resource": "Operations", + "operation": "List supported operations", + "description": "List all supported operations by Microsoft.CostManagement resource provider." + } + }, + { + "id": "Microsoft.CostManagement/views/action", + "name": "Microsoft.CostManagement/views/action", + "display": { + "provider": "Microsoft.CostManagement", + "resource": "Views", + "operation": "Create views", + "description": "Create view." + } + }, + { + "id": "Microsoft.CostManagement/views/write", + "name": "Microsoft.CostManagement/views/write", + "display": { + "provider": "Microsoft.CostManagement", + "resource": "Views", + "operation": "Update views", + "description": "Update view." + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/PrivateView.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/PrivateView.json new file mode 100644 index 000000000000..4c5a6ee3e54b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/PrivateView.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "viewName": "swaggerExample" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "displayName": "swagger Example", + "scope": "", + "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" + } + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/PrivateViewCreateOrUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/PrivateViewCreateOrUpdate.json new file mode 100644 index 000000000000..13fce4b9f5aa --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/PrivateViewCreateOrUpdate.json @@ -0,0 +1,185 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "viewName": "swaggerExample", + "parameters": { + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "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": "/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "displayName": "swagger Example", + "scope": "", + "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": "/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "displayName": "swagger Example", + "scope": "", + "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" + } + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/PrivateViewDelete.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/PrivateViewDelete.json new file mode 100644 index 000000000000..3e6638272399 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/PrivateViewDelete.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "viewName": "TestView" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/PrivateViewList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/PrivateViewList.json new file mode 100644 index 000000000000..6fc6bfdf7a68 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/PrivateViewList.json @@ -0,0 +1,131 @@ +{ + "parameters": { + "api-version": "2021-10-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.CostManagement/views/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "displayName": "swagger Example", + "scope": "", + "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": "/providers/Microsoft.CostManagement/views/swaggerExample2", + "name": "swaggerExample2", + "type": "Microsoft.CostManagement/Views", + "eTag": "\"1d4ffa5a9c2430c\"", + "properties": { + "displayName": "swagger Example 2", + "scope": "", + "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" + } + ] + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ResourceGroupAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ResourceGroupAlerts.json new file mode 100644 index 000000000000..d6b7e3e6eb4a --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ResourceGroupAlerts.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "ScreenSharingTest-peer", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", + "name": "11111111-1111-1111-111111111111", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "11111111-1111-1111-111111111111_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 171000.32, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2019-06-24T05:51:52.8713179Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2019-08-31T17:51:55.1808807Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ResourceGroupDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ResourceGroupDimensionsList.json new file mode 100644 index 000000000000..b8f59b39981d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ResourceGroupDimensionsList.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "system.orlando", + "$expand": "properties/data", + "$top": 5, + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/system.orlando" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/system.orlando/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/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.CostManagement/dimensions_ResourceId_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/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 + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ResourceGroupForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ResourceGroupForecast.json new file mode 100644 index 000000000000..20fd7ba2f22e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ResourceGroupForecast.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "ScreenSharingTest-peer", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimensions": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tags": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimensions": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + }, + "includeActualCost": false, + "includeFreshPartialCost": false + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer/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": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + 20180331, + "Forecast", + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ResourceGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ResourceGroupQuery.json new file mode 100644 index 000000000000..fe2e639a90b7 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ResourceGroupQuery.json @@ -0,0 +1,97 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "subscriptionId": "55312978-ba1b-415c-9304-c4b9c43c0481", + "resourceGroupName": "ScreenSharingTest-peer", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimensions": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tags": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimensions": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "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": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + "ScreenSharingTest-peer", + 20180417, + "USD" + ], + [ + 20.10333307059661, + "ScreenSharingTest-peer", + 20180418, + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ResourceGroupQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ResourceGroupQueryGrouping.json new file mode 100644 index 000000000000..ec3b75e7a4fd --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ResourceGroupQueryGrouping.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "ScreenSharingTest-peer", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer", + "parameters": { + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceType" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/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": "ResourceType", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + "Microsoft.SqlServer", + 20180417, + "USD" + ], + [ + 20.10333307059661, + "Microsoft.Compute", + 20180418, + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SingleResourceGroupAlert.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SingleResourceGroupAlert.json new file mode 100644 index 000000000000..0e43a5319f88 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SingleResourceGroupAlert.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "ScreenSharingTest-peer", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer", + "alertId": "22222222-2222-2222-2222-222222222222" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/alerts/22222222-2222-2222-2222-222222222222", + "name": "22222222-2222-2222-2222-222222222222", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "22222222-2222-2222-2222-222222222222_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SingleSubscriptionAlert.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SingleSubscriptionAlert.json new file mode 100644 index 000000000000..4c2a74b2f55c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SingleSubscriptionAlert.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "alertId": "22222222-2222-2222-2222-222222222222" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/alerts/22222222-2222-2222-2222-222222222222", + "name": "22222222-2222-2222-2222-222222222222", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "22222222-2222-2222-2222-222222222222_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SubscriptionAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SubscriptionAlerts.json new file mode 100644 index 000000000000..76075cc1225c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SubscriptionAlerts.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 161000.12, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2020-04-27T11:07:52.7143901Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2020-04-28T11:06:02.8999373Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", + "name": "11111111-1111-1111-111111111111", + "type": "Microsoft.CostManagement/alerts", + "properties": { + "definition": { + "type": "Budget", + "category": "Cost", + "criteria": "CostThresholdExceeded" + }, + "description": "", + "source": "Preset", + "details": { + "timeGrainType": "Quarterly", + "periodStartDate": "2020-03-01T00:00:00Z", + "triggeredBy": "11111111-1111-1111-111111111111_1_01", + "resourceGroupFilter": [], + "resourceFilter": [], + "meterFilter": [], + "tagFilter": {}, + "threshold": 0.8, + "operator": "GreaterThan", + "amount": 200000.0, + "unit": "USD", + "currentSpend": 171000.32, + "contactEmails": [ + "1234@contoso.com" + ], + "contactGroups": [], + "contactRoles": [], + "overridingAlert": null + }, + "costEntityId": "budget1", + "status": "Active", + "creationTime": "2019-06-24T05:51:52.8713179Z", + "closeTime": "0001-01-01T00:00:00", + "modificationTime": "2019-08-31T17:51:55.1808807Z", + "statusModificationUserName": null, + "statusModificationTime": "0001-01-01T00:00:00" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SubscriptionDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SubscriptionDimensionsList.json new file mode 100644 index 000000000000..7ea7c1d89059 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SubscriptionDimensionsList.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2019-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "$top": 5, + "$expand": "properties/data", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "dcrg", + "rg", + "offlinegalleryrg", + "system.orlando.adminkeyvault", + "system.orlando.keyvault" + ], + "total": 68, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "microsoft.storage/storageaccounts", + "microsoft.web.admin/role", + "microsoft.sql/servers", + "microsoft.compute/virtualmachines" + ], + "total": 4, + "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 + } + } + ] + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SubscriptionForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SubscriptionForecast.json new file mode 100644 index 000000000000..47679e6bcdf7 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SubscriptionForecast.json @@ -0,0 +1,110 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimensions": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tags": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimensions": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + }, + "includeActualCost": false, + "includeFreshPartialCost": false + } + }, + "responses": { + "200": { + "body": { + "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": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + 20180331, + "Forecast", + "USD" + ], + [ + 218.68795741935486, + 20180331, + "Forecast", + "USD" + ], + [ + 0.14384913581657052, + 20180401, + "Forecast", + "USD" + ], + [ + 0.009865586851323632, + 20180429, + "Forecast", + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SubscriptionQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SubscriptionQuery.json new file mode 100644 index 000000000000..23534733adf4 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SubscriptionQuery.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "parameters": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter": { + "and": [ + { + "or": [ + { + "dimensions": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tags": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimensions": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "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": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + "ScreenSharingTest-peer", + 20180331, + "USD" + ], + [ + 218.68795741935486, + "Ict_StratAndPlan_GoldSprova_Prod", + 20180331, + "USD" + ], + [ + 0.14384913581657052, + "ssbciotelement01", + 20180401, + "USD" + ], + [ + 0.009865586851323632, + "ict_stratandplan_goldsprova_prod", + 20180429, + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SubscriptionQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SubscriptionQueryGrouping.json new file mode 100644 index 000000000000..41803cc11041 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/SubscriptionQueryGrouping.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "parameters": { + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "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": "ResourceGroup", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 0.009865586851323632, + "Ict_StratAndPlan_GoldSprova_Prod_0", + "USD" + ], + [ + 218.68795741935486, + "Ict_StratAndPlan_GoldSprova_Prod_1", + "USD" + ], + [ + 2.10333307059661, + "ScreenSharingTest-peer1", + "USD" + ], + [ + 0.14384913581657052, + "Ssbciotelement01", + "USD" + ] + ] + } + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ViewByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ViewByResourceGroup.json new file mode 100644 index 000000000000..e6ad7bccb6db --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ViewByResourceGroup.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "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": { + "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" + } + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json new file mode 100644 index 000000000000..797191b41bee --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ViewCreateOrUpdateByResourceGroup.json @@ -0,0 +1,186 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "viewName": "swaggerExample", + "parameters": { + "eTag": "\"1d4ff9fe66f1d10\"", + "properties": { + "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": { + "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": { + "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" + } + ] + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ViewDeleteByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ViewDeleteByResourceGroup.json new file mode 100644 index 000000000000..2ebf54df8ad3 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ViewDeleteByResourceGroup.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "viewName": "TestView" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ViewListByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ViewListByResourceGroup.json new file mode 100644 index 000000000000..6cbb6c7431b9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/ViewListByResourceGroup.json @@ -0,0 +1,132 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "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": { + "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": { + "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" + } + ] + } + } + ] + } + } + } +} From c4d44282b4072c43d4eac9727190c8809053717a Mon Sep 17 00:00:00 2001 From: Theertharaj <40805847+thramu@users.noreply.github.com> Date: Mon, 12 Sep 2022 20:58:16 -0700 Subject: [PATCH 02/18] Updates readme --- .../cost-management/resource-manager/readme.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/specification/cost-management/resource-manager/readme.md b/specification/cost-management/resource-manager/readme.md index 701a298211f3..b88bc0df4767 100644 --- a/specification/cost-management/resource-manager/readme.md +++ b/specification/cost-management/resource-manager/readme.md @@ -26,17 +26,27 @@ These are the global settings for the Cost Management API. ``` yaml openapi-type: arm -tag: package-2022-05 +tag: package-preview-2022-10 azure-validator: false ``` --- + +### Tag: package-preview-2022-10 + +These settings apply only when `--tag=package-preview-2022-10` is specified on the command line. + +```yaml $(tag) == 'package-preview-2022-10' +input-file: + - Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json + - Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json +``` ### Tag: package-preview-2022-08 These settings apply only when `--tag=package-preview-2022-08` is specified on the command line. -```yaml $(tag) == 'package-preview-2022-08' +``` yaml $(tag) == 'package-preview-2022-08' input-file: - Microsoft.CostManagement/preview/2022-08-01-preview/costmanagement.json ``` @@ -68,7 +78,7 @@ input-file: These settings apply only when `--tag=package-preview-2022-06` is specified on the command line. -```yaml $(tag) == 'package-preview-2022-06' +``` yaml $(tag) == 'package-preview-2022-06' input-file: - Microsoft.CostManagement/preview/2022-06-01-preview/scheduledActions.json - Microsoft.CostManagement/stable/2021-10-01/costmanagement.json @@ -90,7 +100,7 @@ input-file: These settings apply only when `--tag=package-preview-2022-02` is specified on the command line. -```yaml $(tag) == 'package-preview-2022-02' +``` yaml $(tag) == 'package-preview-2022-02' input-file: - Microsoft.CostManagement/preview/2022-02-01-preview/costmanagement.pricesheets.json ``` From 9d9209db9302eb8b8be304f8548c5fb5ef3a0ee6 Mon Sep 17 00:00:00 2001 From: Theertharaj <40805847+thramu@users.noreply.github.com> Date: Mon, 12 Sep 2022 20:58:19 -0700 Subject: [PATCH 03/18] Updates API version in new specs and examples --- .../preview/2022-10-01-preview/costmanagement.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json index 64ef875950fe..433e168c9a02 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2022-08-01-preview", + "version": "2022-10-01-preview", "title": "CostManagementClient" }, "host": "management.azure.com", From 33c44d87d52e81fd0519acba093b75056989d063 Mon Sep 17 00:00:00 2001 From: Theertharaj Ramu Date: Mon, 12 Sep 2022 21:09:56 -0700 Subject: [PATCH 04/18] Adding New Settings API to Cost Management RP. --- .../2022-10-01-preview/costmanagement.json | 240 ++++++++++++++++++ .../examples/setting-delete.json | 11 + .../examples/setting-get.json | 19 ++ .../examples/settings-createOrUpdate.json | 24 ++ .../examples/settingsList.json | 22 ++ 5 files changed, 316 insertions(+) create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/setting-delete.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/setting-get.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settingsList.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json index 433e168c9a02..ba929407d059 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json @@ -1287,6 +1287,173 @@ "nextLinkName": "nextLink" } } + }, + "/{scope}/providers/Microsoft.CostManagement/settings": { + "get": { + "tags": [ + "Settings" + ], + "operationId": "Settings_List", + "description": "List all cost management settings in the requested scope.", + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/cost-management/" + }, + "x-ms-examples": { + "SettingsList": { + "$ref": "./examples/settingsList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeSettingParameter" + }, + { + "$ref": "common-types.json#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/SettingsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/settings/{type}": { + "put": { + "tags": [ + "Settings" + ], + "operationId": "Settings_CreateOrUpdateByScope", + "description": "Create or update a setting within the given scope.", + "x-ms-examples": { + "CreateOrUpdateSettingByScope": { + "$ref": "./examples/settings-createOrUpdate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeSettingParameter" + }, + { + "$ref": "#/parameters/settingTypeParameter" + }, + { + "$ref": "common-types.json#/parameters/apiVersionParameter" + }, + { + "name": "setting", + "description": "Setting to be created or updated.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Setting" + } + } + ], + "responses": { + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/Setting" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "Settings" + ], + "operationId": "Settings_GetByScope", + "description": "Get the setting from the given scope by name.", + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/cost-management/" + }, + "x-ms-examples": { + "SettingByScope": { + "$ref": "./examples/setting-get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeSettingParameter" + }, + { + "$ref": "#/parameters/settingTypeParameter" + }, + { + "$ref": "common-types.json#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/Setting" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Settings" + ], + "operationId": "Settings_DeleteByScope", + "description": "Delete a setting within the given scope.", + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/cost-management/" + }, + "x-ms-examples": { + "SettingDeleteByScope": { + "$ref": "./examples/setting-delete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeSettingParameter" + }, + { + "$ref": "#/parameters/settingTypeParameter" + }, + { + "$ref": "common-types.json#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "204": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + } } }, "definitions": { @@ -2720,6 +2887,49 @@ "name": "ReservationReportSchema", "modelAsString": true } + }, + "Setting": { + "description": "Setting definition.", + "type": "object", + "allOf": [ + { + "$ref": "common-types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/TagInheritanceProperties", + "title": "Tag Inheritance properties" + } + } + }, + "SettingsListResult": { + "description": "Setting list result. It contains a list of settings.", + "type": "object", + "properties": { + "value": { + "description": "The list of settings.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Setting" + } + } + } + }, + "TagInheritanceProperties": { + "type": "object", + "description": "The properties of the tag inheritance setting.", + "required": [ + "preferContainerTags" + ], + "properties": { + "preferContainerTags": { + "description": "Prefer Container tags to override container tags with resource tags in case of conflicts.", + "type": "boolean" + } + } } }, "parameters": { @@ -2731,6 +2941,28 @@ "type": "string", "x-ms-parameter-location": "method" }, + "settingTypeParameter": { + "name": "type", + "in": "path", + "description": "Setting type.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "enum": [ + "taginheritance" + ], + "x-ms-enum": { + "name": "SettingType", + "modelAsString": true, + "values": [ + { + "value": "taginheritance", + "description": "Tag Inheritance Settings is to inherit user defined tags from container(subscription/resource group) to its respective resources.", + "name": "TagInheritance" + } + ] + } + }, "scopeViewParameter": { "name": "scope", "in": "path", @@ -2739,6 +2971,14 @@ "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, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope.", "x-ms-parameter-location": "method" }, + "scopeSettingParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope associated with setting. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billing profile scope.", + "x-ms-parameter-location": "method" + }, "scopeDimensionParameter": { "name": "scope", "in": "path", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/setting-delete.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/setting-delete.json new file mode 100644 index 000000000000..f00c036f2f0c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/setting-delete.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2022-10-01-preview", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "type": "taginheritance" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/setting-get.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/setting-get.json new file mode 100644 index 000000000000..5c8095b221d8 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/setting-get.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2022-10-01-preview", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "type": "taginheritance" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/settings/taginheritance", + "name": "taginheritance", + "type": "Microsoft.CostManagement/Settings", + "properties": { + "preferContainerTags": false + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json new file mode 100644 index 000000000000..c4d9529c74ba --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2022-10-01-preview", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "type": "taginheritance", + "setting": { + "properties": { + "preferContainerTags": true + } + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/settings/taginheritance", + "name": "taginheritance", + "type": "Microsoft.CostManagement/Settings", + "properties": { + "preferContainerTags": true + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settingsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settingsList.json new file mode 100644 index 000000000000..3b5bfb9c0755 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settingsList.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2022-10-01-preview", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/settings/taginheritance", + "name": "taginheritance", + "type": "Microsoft.CostManagement/Settings", + "properties": { + "preferContainerTags": false + } + } + ] + } + } + } +} From c80b1cc522f20681a8ac100352e29a6fc0a9b162 Mon Sep 17 00:00:00 2001 From: Theertharaj Ramu Date: Mon, 12 Sep 2022 21:13:37 -0700 Subject: [PATCH 05/18] Updating the configurations --- specification/cost-management/resource-manager/readme.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/specification/cost-management/resource-manager/readme.md b/specification/cost-management/resource-manager/readme.md index b88bc0df4767..af8fa3f1b930 100644 --- a/specification/cost-management/resource-manager/readme.md +++ b/specification/cost-management/resource-manager/readme.md @@ -26,7 +26,7 @@ These are the global settings for the Cost Management API. ``` yaml openapi-type: arm -tag: package-preview-2022-10 +tag: package-2022-05 azure-validator: false ``` @@ -39,7 +39,6 @@ These settings apply only when `--tag=package-preview-2022-10` is specified on t ```yaml $(tag) == 'package-preview-2022-10' input-file: - - Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json - Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json ``` ### Tag: package-preview-2022-08 From 679abc3c4d5c9ddb712010e1504808f126212af2 Mon Sep 17 00:00:00 2001 From: Theertharaj Ramu Date: Mon, 12 Sep 2022 21:19:15 -0700 Subject: [PATCH 06/18] Adding taginheritance to custom words --- custom-words.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/custom-words.txt b/custom-words.txt index f8378e663c79..efe0805af364 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -2727,3 +2727,4 @@ autogrid KubeProxyConfig IPVS TCPFIN +taginheritance From c73d532097bd458d79a34d2255590ed6499a1b11 Mon Sep 17 00:00:00 2001 From: Theertharaj Ramu Date: Mon, 12 Sep 2022 21:44:25 -0700 Subject: [PATCH 07/18] Adding 200 response for update --- .../preview/2022-10-01-preview/costmanagement.json | 6 ++++++ .../examples/settings-createOrUpdate.json | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json index ba929407d059..a8c6f118c4c1 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json @@ -1366,6 +1366,12 @@ "$ref": "#/definitions/Setting" } }, + "200": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/Setting" + } + }, "default": { "description": "Error response describing why the operation failed.", "schema": { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json index c4d9529c74ba..2668d1ee87c5 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json @@ -19,6 +19,16 @@ "preferContainerTags": true } } + }, + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/settings/taginheritance", + "name": "taginheritance", + "type": "Microsoft.CostManagement/Settings", + "properties": { + "preferContainerTags": true + } + } } } } From eac81a700f50e792540a73f8a33269583aefe49f Mon Sep 17 00:00:00 2001 From: Theertharaj Ramu Date: Mon, 12 Sep 2022 21:51:31 -0700 Subject: [PATCH 08/18] removing x-ms-client-flatten = true --- .../preview/2022-10-01-preview/costmanagement.json | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json index a8c6f118c4c1..c6b0691a5bcd 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json @@ -2904,7 +2904,6 @@ ], "properties": { "properties": { - "x-ms-client-flatten": true, "$ref": "#/definitions/TagInheritanceProperties", "title": "Tag Inheritance properties" } From bc7ddb5514c1639135e58f2b5dba1a61aec86eca Mon Sep 17 00:00:00 2001 From: Theertharaj Ramu Date: Mon, 12 Sep 2022 23:05:06 -0700 Subject: [PATCH 09/18] Implementing Discriminator Pattern for the settingType --- .../preview/2022-10-01-preview/costmanagement.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json index c6b0691a5bcd..bc54dfa2bcc6 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json @@ -2896,11 +2896,22 @@ }, "Setting": { "description": "Setting definition.", + "discriminator": "name", "type": "object", "allOf": [ { "$ref": "common-types.json#/definitions/ProxyResource" } + ] + }, + "TagInheritanceSetting": { + "description": "Tag Inheritance Setting definition.", + "type": "object", + "x-ms-discriminator-value": "taginheritance", + "allOf": [ + { + "$ref": "#/definitions/Setting" + } ], "properties": { "properties": { From e887fd11a15d840d5ae52d6ef7d2e7f2a82ea5aa Mon Sep 17 00:00:00 2001 From: Theertharaj Ramu Date: Mon, 12 Sep 2022 23:15:24 -0700 Subject: [PATCH 10/18] MISC --- .../preview/2022-10-01-preview/costmanagement.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json index bc54dfa2bcc6..b9a64f66adee 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json @@ -1367,7 +1367,7 @@ } }, "200": { - "description": "Created.", + "description": "Ok.", "schema": { "$ref": "#/definitions/Setting" } From 64f91fbc6b0b9cfea6c45e05a41682fc515302c6 Mon Sep 17 00:00:00 2001 From: Theertharaj Ramu Date: Mon, 12 Sep 2022 23:19:05 -0700 Subject: [PATCH 11/18] Description updated --- .../preview/2022-10-01-preview/costmanagement.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json index b9a64f66adee..61731b02b534 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json @@ -1361,13 +1361,13 @@ ], "responses": { "201": { - "description": "Created.", + "description": "Setting Created.", "schema": { "$ref": "#/definitions/Setting" } }, "200": { - "description": "Ok.", + "description": "Setting Updated.", "schema": { "$ref": "#/definitions/Setting" } From 9eaba1764e0f7f20aa99d206fa17c860b8458d90 Mon Sep 17 00:00:00 2001 From: Theertharaj Ramu Date: Tue, 13 Sep 2022 11:53:18 -0700 Subject: [PATCH 12/18] MISC --- .../preview/2022-10-01-preview/common-types.json | 1 + .../2022-10-01-preview/examples/settings-createOrUpdate.json | 1 + 2 files changed, 2 insertions(+) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json index 286119be63a9..928708259248 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json @@ -43,6 +43,7 @@ }, "name": { "readOnly": true, + "required": true, "type": "string", "description": "Resource name." }, diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json index 2668d1ee87c5..ace5a88199cf 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json @@ -4,6 +4,7 @@ "scope": "subscriptions/00000000-0000-0000-0000-000000000000", "type": "taginheritance", "setting": { + "name": "taginheritance", "properties": { "preferContainerTags": true } From e0ddde9f2fa61f1fef2c26917adbcfbfbdfcfa4a Mon Sep 17 00:00:00 2001 From: Theertharaj Ramu Date: Tue, 13 Sep 2022 12:01:11 -0700 Subject: [PATCH 13/18] FIx Model Validations due to descriminator --- .../preview/2022-10-01-preview/common-types.json | 1 - .../preview/2022-10-01-preview/costmanagement.json | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json index 928708259248..286119be63a9 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json @@ -43,7 +43,6 @@ }, "name": { "readOnly": true, - "required": true, "type": "string", "description": "Resource name." }, diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json index 61731b02b534..5268d651d400 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json @@ -2902,6 +2902,9 @@ { "$ref": "common-types.json#/definitions/ProxyResource" } + ], + "required": [ + "name" ] }, "TagInheritanceSetting": { From 2762b1538718abf919b12643bdbe3483a46832a0 Mon Sep 17 00:00:00 2001 From: Theertharaj Ramu Date: Tue, 13 Sep 2022 13:08:38 -0700 Subject: [PATCH 14/18] Remove readonly property --- .../preview/2022-10-01-preview/common-types.json | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json index 286119be63a9..974ae5b42ea4 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json @@ -42,7 +42,6 @@ "description": "Resource Id." }, "name": { - "readOnly": true, "type": "string", "description": "Resource name." }, From 78c18a5e40dc032339f69ddb954f0508e25e1146 Mon Sep 17 00:00:00 2001 From: Theertharaj Ramu Date: Tue, 13 Sep 2022 13:41:17 -0700 Subject: [PATCH 15/18] Revert the readonly property --- .../preview/2022-10-01-preview/common-types.json | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json index 974ae5b42ea4..286119be63a9 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/common-types.json @@ -42,6 +42,7 @@ "description": "Resource Id." }, "name": { + "readOnly": true, "type": "string", "description": "Resource name." }, From 4ce6f71fbb7dac90a617745828158480cd57db5e Mon Sep 17 00:00:00 2001 From: Theertharaj Ramu Date: Tue, 13 Sep 2022 19:15:25 -0700 Subject: [PATCH 16/18] Adding Kind as discriminator property --- .../2022-10-01-preview/costmanagement.json | 17 +++++++++++++++-- .../examples/settings-createOrUpdate.json | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json index 5268d651d400..1bd4208ae61a 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json @@ -2896,15 +2896,28 @@ }, "Setting": { "description": "Setting definition.", - "discriminator": "name", + "discriminator": "kind", "type": "object", "allOf": [ { "$ref": "common-types.json#/definitions/ProxyResource" } ], + "properties": { + "kind": { + "type": "string", + "description": "Specifies the kind of settings.", + "enum": [ + "taginheritance" + ], + "x-ms-enum": { + "name": "SetingsKind", + "modelAsString": true + } + } + }, "required": [ - "name" + "kind" ] }, "TagInheritanceSetting": { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json index ace5a88199cf..efa30b3c2177 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json @@ -4,7 +4,7 @@ "scope": "subscriptions/00000000-0000-0000-0000-000000000000", "type": "taginheritance", "setting": { - "name": "taginheritance", + "kind": "taginheritance", "properties": { "preferContainerTags": true } From 8ed478b81f5c9bf1ca4eb5208ff0ec0da615fbc3 Mon Sep 17 00:00:00 2001 From: Theertharaj Ramu Date: Wed, 14 Sep 2022 13:17:00 -0700 Subject: [PATCH 17/18] MISC --- .../preview/2022-10-01-preview/costmanagement.json | 2 +- .../preview/2022-10-01-preview/examples/setting-get.json | 1 + .../2022-10-01-preview/examples/settings-createOrUpdate.json | 1 + .../preview/2022-10-01-preview/examples/settingsList.json | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json index 1bd4208ae61a..fc6b6a73a383 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/costmanagement.json @@ -2911,7 +2911,7 @@ "taginheritance" ], "x-ms-enum": { - "name": "SetingsKind", + "name": "SettingsKind", "modelAsString": true } } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/setting-get.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/setting-get.json index 5c8095b221d8..21b130330eab 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/setting-get.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/setting-get.json @@ -10,6 +10,7 @@ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/settings/taginheritance", "name": "taginheritance", "type": "Microsoft.CostManagement/Settings", + "kind": "taginheritance", "properties": { "preferContainerTags": false } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json index efa30b3c2177..215a8ad1d927 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json @@ -26,6 +26,7 @@ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/settings/taginheritance", "name": "taginheritance", "type": "Microsoft.CostManagement/Settings", + "kind": "taginheritance", "properties": { "preferContainerTags": true } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settingsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settingsList.json index 3b5bfb9c0755..736fd3e74f6e 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settingsList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settingsList.json @@ -11,6 +11,7 @@ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/settings/taginheritance", "name": "taginheritance", "type": "Microsoft.CostManagement/Settings", + "kind": "taginheritance", "properties": { "preferContainerTags": false } From 6433f86b4a4f3d34043d88d15307fd8123428574 Mon Sep 17 00:00:00 2001 From: Theertharaj Ramu Date: Wed, 14 Sep 2022 13:54:59 -0700 Subject: [PATCH 18/18] MISC --- .../2022-10-01-preview/examples/settings-createOrUpdate.json | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json index 215a8ad1d927..c2196c318c6f 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-10-01-preview/examples/settings-createOrUpdate.json @@ -16,6 +16,7 @@ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/settings/taginheritance", "name": "taginheritance", "type": "Microsoft.CostManagement/Settings", + "kind": "taginheritance", "properties": { "preferContainerTags": true }