diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/common-types.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/common-types.json new file mode 100644 index 000000000000..f1c88d53ba01 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/common-types.json @@ -0,0 +1,231 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-03-01", + "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/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/resource-management/v2/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": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "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 + } + } + }, + "ErrorDetailsWithNestedDetails": { + "description": "The details of the error.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ErrorDetails" + } + ], + "properties": { + "details": { + "type": "array", + "readOnly": true, + "description": "The additional details of the error.", + "items": { + "$ref": "#/definitions/ErrorDetailsWithNestedDetails" + }, + "x-ms-identifiers": [] + } + } + }, + "ErrorResponseWithNestedDetails": { + "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/ErrorDetailsWithNestedDetails" + } + } + }, + "CostManagementOperation": { + "description": "A Cost management REST API operation.", + "type": "object", + "properties": { + "id": { + "description": "Operation id: {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/Operation" + } + ] + }, + "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/CostManagementOperation" + } + }, + "nextLink": { + "description": "URL to get the next set of operation list results if there are any.", + "type": "string", + "readOnly": true + } + } + }, + "CostManagementProxyResource": { + "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 + }, + "DownloadURL": { + "description": "The URL to download the generated report.", + "type": "object", + "properties": { + "expiryTime": { + "description": "The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "validTill": { + "description": "The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.", + "type": "string", + "format": "date-time" + }, + "downloadUrl": { + "description": "The URL to download the generated report.", + "type": "string" + } + } + } + }, + "parameters": { + "billingAccountIdParameter": { + "description": "Billing account ID", + "in": "path", + "name": "billingAccountId", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "billingProfileIdParameter": { + "description": "Billing profile ID.", + "in": "path", + "name": "billingProfileId", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/costmanagement.benefits.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/costmanagement.benefits.json new file mode 100644 index 000000000000..d5e5a6eef7af --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/costmanagement.benefits.json @@ -0,0 +1,1481 @@ +{ + "swagger": "2.0", + "info": { + "title": "CostManagementClient", + "description": "CostManagement management client provides access to CostManagement resources for Azure Enterprise Subscriptions.", + "version": "2023-03-01" + }, + "tags": [ + { + "name": "Benefits API", + "description": "APIs for getting benefit recommendations and benefit utilization summaries." + } + ], + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow.", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/{billingScope}/providers/Microsoft.CostManagement/benefitRecommendations": { + "get": { + "tags": [ + "BenefitRecommendations" + ], + "description": "List of recommendations for purchasing savings plan.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/CostManagement/" + }, + "x-ms-examples": { + "BenefitRecommendationsBillingAccountList": { + "$ref": "./examples/BenefitRecommendationsByBillingAccount.json" + } + }, + "operationId": "BenefitRecommendations_List", + "parameters": [ + { + "$ref": "#/parameters/benefitRecommendationsFilterParameter" + }, + { + "name": "$orderby", + "in": "query", + "description": "May be used to order the recommendations by: properties/armSkuName. For the savings plan, the results are in order by default. There is no need to use this clause.", + "type": "string", + "x-ms-parameter-location": "method" + }, + { + "name": "$expand", + "in": "query", + "description": "May be used to expand the properties by: properties/usage, properties/allRecommendationDetails", + "type": "string", + "x-ms-parameter-location": "method" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/billingScopeBenefitRecommendationParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/benefitRecommendationsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries": { + "get": { + "tags": [ + "BenefitUtilizationSummaries" + ], + "operationId": "BenefitUtilizationSummaries_ListByBillingAccountId", + "description": "Lists savings plan utilization summaries for the enterprise agreement scope. Supported at grain values: 'Daily' and 'Monthly'.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/cost-management/" + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "common-types.json#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/grainParameter" + }, + { + "name": "filter", + "in": "query", + "description": "Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate.", + "required": false, + "type": "string", + "x-ms-parameter-location": "method" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BenefitUtilizationSummariesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "SavingsPlanUtilizationSummaries-BillingAccount": { + "$ref": "./examples/BenefitUtilizationSummaries/SavingsPlan-BillingAccount.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries": { + "get": { + "tags": [ + "BenefitUtilizationSummaries" + ], + "operationId": "BenefitUtilizationSummaries_ListByBillingProfileId", + "description": "Lists savings plan utilization summaries for billing profile. Supported at grain values: 'Daily' and 'Monthly'.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/cost-management/" + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "common-types.json#/parameters/billingAccountIdParameter" + }, + { + "$ref": "common-types.json#/parameters/billingProfileIdParameter" + }, + { + "$ref": "#/parameters/grainParameter" + }, + { + "name": "filter", + "in": "query", + "description": "Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate.", + "required": false, + "type": "string", + "x-ms-parameter-location": "method" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BenefitUtilizationSummariesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "SavingsPlanUtilizationSummaries-BillingProfile": { + "$ref": "./examples/BenefitUtilizationSummaries/SavingsPlan-BillingProfile.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries": { + "get": { + "tags": [ + "BenefitUtilizationSummaries" + ], + "operationId": "BenefitUtilizationSummaries_ListBySavingsPlanOrder", + "description": "Lists the savings plan utilization summaries for daily or monthly grain.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/cost-management/" + }, + "x-ms-examples": { + "SavingsPlanUtilizationSummariesDaily": { + "$ref": "./examples/BenefitUtilizationSummaries/SavingsPlan-SavingsPlanOrderId-Daily.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "$filter", + "description": "Supports filtering by properties/usageDate.", + "in": "query", + "required": false, + "type": "string" + }, + { + "$ref": "#/parameters/grainParameter" + }, + { + "$ref": "#/parameters/savingsPlanOrderIdParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BenefitUtilizationSummariesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries": { + "get": { + "tags": [ + "BenefitUtilizationSummaries" + ], + "operationId": "BenefitUtilizationSummaries_ListBySavingsPlanId", + "description": "Lists the savings plan utilization summaries for daily or monthly grain.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/cost-management/" + }, + "x-ms-examples": { + "SavingsPlanUtilizationSummariesMonthlyWithSavingsPlanId": { + "$ref": "./examples/BenefitUtilizationSummaries/SavingsPlan-SavingsPlanId-Monthly.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "$filter", + "description": "Supports filtering by properties/usageDate.", + "in": "query", + "required": false, + "type": "string" + }, + { + "$ref": "#/parameters/grainParameter" + }, + { + "$ref": "#/parameters/savingsPlanOrderIdParameter" + }, + { + "$ref": "#/parameters/savingsPlanIdParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BenefitUtilizationSummariesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport": { + "post": { + "tags": [ + "BenefitUtilizationSummariesAsync" + ], + "operationId": "BillingAccountScope_GenerateBenefitUtilizationSummariesReport", + "description": "Triggers generation of a benefit utilization summaries report for the provided billing account. This API supports only enrollment accounts.", + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/cost-management/" + }, + "x-ms-examples": { + "GenerateUtilizationSummariesReportByBillingAccount": { + "$ref": "./examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByBillingAccount.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "common-types.json#/parameters/billingAccountIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "benefitUtilizationSummariesRequest", + "description": "Async Benefit Utilization Summary report to be created.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/BenefitUtilizationSummariesRequest" + } + } + ], + "responses": { + "200": { + "description": "The status of the generation of the benefit utilization summaries report. This could be in progress, failed, or completed.", + "schema": { + "$ref": "#/definitions/BenefitUtilizationSummariesOperationStatus" + } + }, + "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/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport": { + "post": { + "tags": [ + "BenefitUtilizationSummariesAsync" + ], + "operationId": "BillingProfileScope_GenerateBenefitUtilizationSummariesReport", + "description": "Triggers generation of a benefit utilization summaries report for the provided billing account and billing profile.", + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/cost-management/" + }, + "x-ms-examples": { + "GenerateUtilizationSummariesReportByBillingProfile": { + "$ref": "./examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByBillingProfile.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "common-types.json#/parameters/billingAccountIdParameter" + }, + { + "$ref": "common-types.json#/parameters/billingProfileIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "benefitUtilizationSummariesRequest", + "description": "Async Benefit Utilization Summary report to be created.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/BenefitUtilizationSummariesRequest" + } + } + ], + "responses": { + "200": { + "description": "The status of the generation of the benefit utilization summaries report. This could be in progress, failed, or completed.", + "schema": { + "$ref": "#/definitions/BenefitUtilizationSummariesOperationStatus" + } + }, + "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/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport": { + "post": { + "tags": [ + "BenefitUtilizationSummariesAsync" + ], + "operationId": "ReservationOrderScope_GenerateBenefitUtilizationSummariesReport", + "description": "Triggers generation of a benefit utilization summaries report for the provided reservation order.", + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/cost-management/" + }, + "x-ms-examples": { + "GenerateUtilizationSummariesReportByReservationOrder": { + "$ref": "./examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByReservationOrder.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "#/parameters/reservationOrderIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "benefitUtilizationSummariesRequest", + "description": "Async Benefit Utilization Summary report to be created.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/BenefitUtilizationSummariesRequest" + } + } + ], + "responses": { + "200": { + "description": "The status of the generation of the benefit utilization summaries report. This could be in progress, failed, or completed.", + "schema": { + "$ref": "#/definitions/BenefitUtilizationSummariesOperationStatus" + } + }, + "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/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport": { + "post": { + "tags": [ + "BenefitUtilizationSummariesAsync" + ], + "operationId": "ReservationScope_GenerateBenefitUtilizationSummariesReport", + "description": "Triggers generation of a benefit utilization summaries report for the provided reservation.", + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/cost-management/" + }, + "x-ms-examples": { + "GenerateUtilizationSummariesReportByReservation": { + "$ref": "./examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByReservation.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "#/parameters/reservationOrderIdParameter" + }, + { + "$ref": "#/parameters/reservationIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "benefitUtilizationSummariesRequest", + "description": "Async Benefit Utilization Summary report to be created.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/BenefitUtilizationSummariesRequest" + } + } + ], + "responses": { + "200": { + "description": "The status of the generation of the benefit utilization summaries report. This could be in progress, failed, or completed.", + "schema": { + "$ref": "#/definitions/BenefitUtilizationSummariesOperationStatus" + } + }, + "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/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport": { + "post": { + "tags": [ + "BenefitUtilizationSummariesAsync" + ], + "operationId": "SavingsPlanOrderScope_GenerateBenefitUtilizationSummariesReport", + "description": "Triggers generation of a benefit utilization summaries report for the provided savings plan order.", + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/cost-management/" + }, + "x-ms-examples": { + "GenerateUtilizationSummariesReportBySavingsPlanOrder": { + "$ref": "./examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportBySavingsPlanOrder.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "#/parameters/savingsPlanOrderIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "benefitUtilizationSummariesRequest", + "description": "Async Benefit Utilization Summary report to be created.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/BenefitUtilizationSummariesRequest" + } + } + ], + "responses": { + "200": { + "description": "The status of the generation of the benefit utilization summaries report. This could be in progress, failed, or completed.", + "schema": { + "$ref": "#/definitions/BenefitUtilizationSummariesOperationStatus" + } + }, + "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/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport": { + "post": { + "tags": [ + "BenefitUtilizationSummariesAsync" + ], + "operationId": "SavingsPlanScope_GenerateBenefitUtilizationSummariesReportAsync", + "description": "Triggers generation of a benefit utilization summaries report for the provided savings plan.", + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/cost-management/" + }, + "x-ms-examples": { + "GenerateUtilizationSummariesReportBySavingsPlan": { + "$ref": "./examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportBySavingsPlan.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "#/parameters/savingsPlanOrderIdParameter" + }, + { + "$ref": "#/parameters/savingsPlanIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "benefitUtilizationSummariesRequest", + "description": "Async Benefit Utilization Summary report to be created.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/BenefitUtilizationSummariesRequest" + } + } + ], + "responses": { + "200": { + "description": "The status of the generation of the benefit utilization summaries report. This could be in progress, failed, or completed.", + "schema": { + "$ref": "#/definitions/BenefitUtilizationSummariesOperationStatus" + } + }, + "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/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "benefitRecommendationsListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "description": "The list of benefit recommendations.", + "readOnly": true, + "items": { + "$ref": "#/definitions/benefitRecommendationModel" + } + }, + "nextLink": { + "type": "string", + "description": "The link (URL) to the next page of results.", + "readOnly": true, + "format": "uri" + } + }, + "description": "Result of listing benefit recommendations." + }, + "benefitRecommendationModel": { + "type": "object", + "description": "benefit plan recommendation details.", + "allOf": [ + { + "$ref": "#/definitions/BenefitResource" + } + ], + "properties": { + "properties": { + "type": "object", + "$ref": "#/definitions/benefitRecommendationProperties" + } + } + }, + "benefitRecommendationProperties": { + "type": "object", + "description": "The properties of the benefit recommendations.", + "discriminator": "scope", + "properties": { + "firstConsumptionDate": { + "type": "string", + "description": "The first usage date used for looking back for computing the recommendations.", + "readOnly": true, + "format": "date-time" + }, + "lastConsumptionDate": { + "type": "string", + "description": "The last usage date used for looking back for computing the recommendations.", + "readOnly": true, + "format": "date-time" + }, + "lookBackPeriod": { + "description": "The number of days of usage evaluated for computing the recommendations.", + "$ref": "#/definitions/LookBackPeriod" + }, + "totalHours": { + "type": "integer", + "format": "int32", + "description": "The total hours for which the cost is covered. Its equal to number of records in a property 'properties/usage/charges'.", + "readOnly": true + }, + "usage": { + "type": "object", + "description": "On-demand charges between firstConsumptionDate and lastConsumptionDate that were used for computing benefit recommendations.", + "$ref": "#/definitions/recommendationUsageDetails" + }, + "armSkuName": { + "description": "ARM SKU name. 'Compute_Savings_Plan' for SavingsPlan.", + "type": "string", + "readOnly": true + }, + "term": { + "description": "Term period of the benefit. For example, P1Y or P3Y.", + "$ref": "#/definitions/Term" + }, + "commitmentGranularity": { + "description": "Grain of the proposed commitment amount. Supported values: 'Hourly'", + "$ref": "#/definitions/Grain" + }, + "currencyCode": { + "type": "string", + "description": "An ISO 4217 currency code identifier for the costs and savings amounts.", + "readOnly": true + }, + "costWithoutBenefit": { + "type": "number", + "format": "decimal", + "description": "The current cost without benefit, corresponds to 'totalHours' in the look-back period.", + "readOnly": true + }, + "recommendationDetails": { + "type": "object", + "description": "The details of the proposed recommendation.", + "$ref": "#/definitions/allSavingsBenefitDetails" + }, + "allRecommendationDetails": { + "type": "object", + "description": "The list of all benefit recommendations with the recommendation details.", + "readOnly": true, + "$ref": "#/definitions/allSavingsList" + }, + "scope": { + "description": "Benefit scope. For example, Single or Shared.", + "$ref": "#/definitions/RecommendationScope" + } + }, + "required": [ + "scope" + ] + }, + "singleScopeBenefitRecommendationProperties": { + "type": "object", + "description": "The properties of the benefit recommendations when scope is 'Single'.", + "x-ms-discriminator-value": "Single", + "properties": { + "subscriptionId": { + "type": "string", + "description": "The subscription ID that this single scope recommendation is for. Applicable only if recommendation is for 'Single' scope.", + "readOnly": true + }, + "resourceGroup": { + "type": "string", + "description": "The resource group that this single scope recommendation is for. Applicable only if recommendation is for 'Single' scope and 'ResourceGroup' request scope.", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "#/definitions/benefitRecommendationProperties" + } + ] + }, + "sharedScopeBenefitRecommendationProperties": { + "type": "object", + "description": "The properties of the benefit recommendation when scope is 'Shared'.", + "x-ms-discriminator-value": "Shared", + "allOf": [ + { + "$ref": "#/definitions/benefitRecommendationProperties" + } + ] + }, + "recommendationUsageDetails": { + "type": "object", + "description": "On-demand charges between firstConsumptionDate and lastConsumptionDate that were used for computing benefit recommendations.", + "properties": { + "usageGrain": { + "description": "The grain of the usage. Supported values: 'Hourly'", + "$ref": "#/definitions/Grain" + }, + "charges": { + "type": "array", + "description": "On-demand charges for each hour between firstConsumptionDate and lastConsumptionDate that were used for computing benefit recommendations.", + "readOnly": true, + "items": { + "type": "number", + "format": "decimal" + } + } + } + }, + "allSavingsList": { + "type": "object", + "properties": { + "value": { + "type": "array", + "description": "The list of benefit recommendations with the recommendation details..", + "readOnly": true, + "items": { + "$ref": "#/definitions/allSavingsBenefitDetails" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "type": "string", + "description": "The link (URL) to the next page of results.", + "readOnly": true, + "format": "uri" + } + }, + "description": "The list of all benefit recommendations with the recommendation details." + }, + "allSavingsBenefitDetails": { + "description": "Benefit recommendation details.", + "type": "object", + "properties": { + "overageCost": { + "type": "number", + "format": "decimal", + "description": "The difference between total cost and benefit cost for the 'totalHours' in the look-back period.", + "readOnly": true + }, + "benefitCost": { + "type": "number", + "format": "decimal", + "description": "The estimated cost with benefit for the 'totalHours' in the look-back period. It's equal to (commitmentAmount * totalHours)", + "readOnly": true + }, + "totalCost": { + "type": "number", + "format": "decimal", + "description": "Total cost, which is sum of benefit cost and overage cost.", + "readOnly": true + }, + "savingsAmount": { + "type": "number", + "format": "decimal", + "description": "The amount saved for the 'totalHours' in the look-back period, by purchasing the recommended quantity of the benefit.", + "readOnly": true + }, + "savingsPercentage": { + "type": "number", + "format": "decimal", + "description": "The savings in percentage for the 'totalHours' in the look-back period, by purchasing the recommended quantity of benefit.", + "readOnly": true + }, + "coveragePercentage": { + "description": "Estimated benefit coverage percentage for the 'totalHours' in the look-back period, with this commitment.", + "type": "number", + "format": "decimal", + "readOnly": true + }, + "commitmentAmount": { + "description": "The commitment amount at the commitmentGranularity.", + "type": "number", + "format": "decimal", + "readOnly": true + }, + "averageUtilizationPercentage": { + "description": "Estimated average utilization percentage for the 'totalHours' in the look-back period, with this commitment.", + "type": "number", + "format": "decimal", + "readOnly": true + }, + "wastageCost": { + "description": "Estimated unused portion of the 'benefitCost'.", + "type": "number", + "format": "decimal", + "readOnly": true + } + } + }, + "BenefitKind": { + "type": "string", + "description": "Kind/type of the benefit.", + "enum": [ + "IncludedQuantity", + "Reservation", + "SavingsPlan" + ], + "x-ms-enum": { + "name": "benefitKind", + "modelAsString": true, + "values": [ + { + "value": "IncludedQuantity", + "description": "Benefit is IncludedQuantity.", + "name": "IncludedQuantity" + }, + { + "value": "Reservation", + "description": "Benefit is Reservation.", + "name": "Reservation" + }, + { + "value": "SavingsPlan", + "description": "Benefit is SavingsPlan.", + "name": "SavingsPlan" + } + ] + } + }, + "RecommendationScope": { + "type": "string", + "description": "Kind of the recommendation scope.", + "enum": [ + "Single", + "Shared" + ], + "x-ms-enum": { + "name": "scope", + "modelAsString": true, + "values": [ + { + "value": "Single", + "description": "Single scope recommendation.", + "name": "Single" + }, + { + "value": "Shared", + "description": "Shared scope recommendation.", + "name": "Shared" + } + ] + } + }, + "Grain": { + "type": "string", + "description": "Grain which corresponds to value.", + "enum": [ + "Hourly", + "Daily", + "Monthly" + ], + "x-ms-enum": { + "name": "grain", + "modelAsString": true, + "values": [ + { + "value": "Hourly", + "description": "Hourly grain corresponds to value per hour.", + "name": "Hourly" + }, + { + "value": "Daily", + "description": "Hourly grain corresponds to value per day.", + "name": "Daily" + }, + { + "value": "Monthly", + "description": "Hourly grain corresponds to value per month.", + "name": "Monthly" + } + ] + } + }, + "Term": { + "type": "string", + "description": "Grain which corresponds to value.", + "enum": [ + "P1Y", + "P3Y" + ], + "x-ms-enum": { + "name": "term", + "modelAsString": true, + "values": [ + { + "value": "P1Y", + "description": "Benefit term is 1 year.", + "name": "P1Y" + }, + { + "value": "P3Y", + "description": "Benefit term is 3 years.", + "name": "P3Y" + } + ] + } + }, + "LookBackPeriod": { + "type": "string", + "description": "The number of days used to look back.", + "enum": [ + "Last7Days", + "Last30Days", + "Last60Days" + ], + "x-ms-enum": { + "name": "lookBackPeriod", + "modelAsString": true, + "values": [ + { + "value": "Last7Days", + "description": "7 days used to look back.", + "name": "Last7Days" + }, + { + "value": "Last30Days", + "description": "30 days used to look back.", + "name": "Last30Days" + }, + { + "value": "Last60Days", + "description": "60 days used to look back.", + "name": "Last60Days" + } + ] + } + }, + "BenefitResource": { + "type": "object", + "description": "The benefit resource model definition.", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/Resource" + } + ], + "properties": { + "kind": { + "description": "Reservation or SavingsPlan.", + "$ref": "#/definitions/BenefitKind" + } + }, + "x-ms-azure-resource": true + }, + "BenefitUtilizationSummariesListResult": { + "description": "List of benefit utilization summaries.", + "type": "object", + "properties": { + "value": { + "description": "The list of benefit utilization summaries.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/BenefitUtilizationSummary" + } + }, + "nextLink": { + "description": "The link (URL) to the next page of results.", + "type": "string", + "readOnly": true, + "format": "uri" + } + } + }, + "BenefitUtilizationSummary": { + "description": "Benefit utilization summary resource.", + "discriminator": "kind", + "type": "object", + "required": [ + "kind" + ], + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/Resource" + } + ], + "properties": { + "kind": { + "description": "Supported values: 'SavingsPlan'.", + "$ref": "#/definitions/BenefitKind" + } + } + }, + "BenefitUtilizationSummaryProperties": { + "description": "The properties of a benefit utilization summary.", + "type": "object", + "properties": { + "armSkuName": { + "description": "ARM SKU name. For example, 'Compute_Savings_Plan' for savings plan.", + "type": "string", + "readOnly": true + }, + "benefitId": { + "description": "The benefit ID is the identifier of the benefit.", + "type": "string", + "readOnly": true + }, + "benefitOrderId": { + "description": "The benefit order ID is the identifier for a benefit purchase.", + "type": "string", + "readOnly": true + }, + "benefitType": { + "description": "The benefit type. Supported values: 'SavingsPlan'.", + "$ref": "#/definitions/BenefitKind" + }, + "usageDate": { + "description": "Date corresponding to the utilization summary record. If the grain of data is monthly, value for this field will be first day of the month.", + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "IncludedQuantityUtilizationSummary": { + "description": "Included Quantity utilization summary resource.", + "x-ms-discriminator-value": "IncludedQuantity", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/BenefitUtilizationSummary" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/IncludedQuantityUtilizationSummaryProperties", + "title": "Benefit utilization summary for benefit kind Included Quantity." + } + } + }, + "IncludedQuantityUtilizationSummaryProperties": { + "type": "object", + "description": "Included Quantity utilization summary properties.", + "allOf": [ + { + "$ref": "#/definitions/BenefitUtilizationSummaryProperties" + } + ], + "properties": { + "utilizationPercentage": { + "description": "This is the utilized percentage for the benefit ID.", + "type": "number", + "format": "decimal", + "readOnly": true + } + } + }, + "SavingsPlanUtilizationSummary": { + "description": "Savings plan utilization summary resource.", + "x-ms-discriminator-value": "SavingsPlan", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/BenefitUtilizationSummary" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/SavingsPlanUtilizationSummaryProperties", + "title": "Benefit utilization Summary for benefit kind savings plan." + } + } + }, + "SavingsPlanUtilizationSummaryProperties": { + "type": "object", + "description": "Savings plan utilization summary properties.", + "allOf": [ + { + "$ref": "#/definitions/BenefitUtilizationSummaryProperties" + } + ], + "properties": { + "avgUtilizationPercentage": { + "description": "This is the average hourly utilization for each date range that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > 2023-03-01 and usageDate < 2022-10-31 at a daily granularity. There will be one record per benefit id for each day. For a single day, the avgUtilizationPercentage value will be equal to the average of the set of values where the set contains 24 utilization percentage entries one for each hour in a specific day.", + "type": "number", + "format": "decimal", + "readOnly": true + }, + "minUtilizationPercentage": { + "description": "This is the minimum hourly utilization for each date range that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > 2023-03-01 and usageDate < 2022-10-31 at a daily granularity. There will be one record per benefit id for each day. For a single day, the minUtilizationPercentage value will be equal to the smallest in the set of values where the set contains 24 utilization percentage entries one for each hour in a specific day. If on the day 2022-10-18, the lowest utilization percentage was 10% at hour 4, then the value for the minUtilizationPercentage in the response will be 10%.", + "type": "number", + "format": "decimal", + "readOnly": true + }, + "maxUtilizationPercentage": { + "description": "This is the maximum hourly utilization for each date range that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > 2023-03-01 and usageDate < 2022-10-31 at a daily granularity. There will be one record per benefit id for each day. For a single day, the maxUtilizationPercentage value will be equal to the largest in the set of values where the set contains 24 utilization percentage entries one for each hour in a specific day. If on the day 2022-10-18, the largest utilization percentage was 90% at hour 5, then the value for the maxUtilizationPercentage in the response will be 90%.", + "type": "number", + "format": "decimal", + "readOnly": true + } + } + }, + "BenefitUtilizationSummariesOperationStatus": { + "type": "object", + "description": "Status of a benefit utilization summaries report. Provides Async Benefit Utilization Summaries Request input, status, and report sas url.", + "properties": { + "input": { + "$ref": "#/definitions/BenefitUtilizationSummariesRequest", + "description": "Input given to create the benefit utilization summaries report." + }, + "status": { + "description": "The status of the creation of the benefit utilization summaries report.", + "$ref": "#/definitions/AsyncOperationStatusEnum" + }, + "properties": { + "description": "Contains sas url to the async benefit utilization summaries report and a date that the url is valid until. These values will be empty if the report is in a Running or Failed state", + "$ref": "#/definitions/AsyncOperationStatusProperties" + } + } + }, + "AsyncOperationStatusEnum": { + "description": "Enum representing the status of an async operation.", + "type": "string", + "enum": [ + "Running", + "Complete", + "Failed" + ], + "x-ms-enum": { + "name": "OperationStatusType", + "modelAsString": true + } + }, + "AsyncOperationStatusProperties": { + "description": "Object representing the report url and valid until date of the async report generated.", + "type": "object", + "properties": { + "reportUrl": { + "description": "Sas url to the async benefit utilization summaries report. Will be empty if the report is in Running or Failed state.", + "$ref": "#/definitions/BenefitUtilizationSummaryReportSchema", + "x-ms-secret": true + }, + "secondaryReportUrl": { + "description": "Sas url to async benefit utilization summaries report in secondary storage in case of primary outage. Will be empty if the report is in Running or Failed state.", + "$ref": "#/definitions/BenefitUtilizationSummaryReportSchema", + "x-ms-secret": true + }, + "validUntil": { + "description": "The date that the sas url provided in reportUrl expires.", + "type": "string", + "format": "date-time" + } + } + }, + "BenefitUtilizationSummaryReportSchema": { + "description": "The CSV file from the reportUrl and secondaryReportUrl blob link will consist of the following columns of benefit utilization data. UtilizedPercentage will be 0 for savings plans reports and non data bricks reservations. Utilization percentages will be 0 for data bricks reservations.", + "type": "string", + "enum": [ + "Kind", + "AvgUtilizationPercentage", + "BenefitOrderId", + "BenefitId", + "BenefitType", + "MaxUtilizationPercentage", + "MinUtilizationPercentage", + "UsageDate", + "UtilizedPercentage" + ], + "x-ms-enum": { + "name": "BenefitUtilizationSummaryReportSchema", + "modelAsString": true + } + }, + "BenefitUtilizationSummariesRequest": { + "description": "Properties of an async benefit utilization summaries request.", + "type": "object", + "required": [ + "startDate", + "endDate", + "grain" + ], + "properties": { + "billingAccountId": { + "description": "Billing account the benefit utilization summaries report is for. Required for billing account and billing profile scopes. Not supported for any benefit scopes.", + "type": "string" + }, + "billingProfileId": { + "description": "Billing profile id the benefit utilization summaries report is for. Required for billing profile scope. Not supported for billing account or any benefit scopes.", + "type": "string" + }, + "benefitOrderId": { + "description": "Benefit order id the benefit utilization summaries report is for. Required for benefit order and benefit id scopes. Not supported for any billing scopes.", + "type": "string" + }, + "benefitId": { + "description": "Benefit id the benefit utilization summaries report is for. Required for benefit id scope. Not supported for benefit order or any billing scopes.", + "type": "string" + }, + "grain": { + "description": "The grain the summaries data is served at in the report. Accepted values are 'Daily' or 'Monthly'.", + "$ref": "#/definitions/Grain" + }, + "startDate": { + "description": "The start date of the summaries data that will be served in the report.", + "type": "string", + "format": "date-time" + }, + "endDate": { + "description": "The end date of the summaries data that will be served in the report.", + "type": "string", + "format": "date-time" + }, + "kind": { + "description": "The type of benefit data requested. Required for billing account and billing profile scopes. Implied and not to be passed at benefit scopes. Supported values are Reservation and SavingsPlan", + "$ref": "#/definitions/BenefitKind" + } + } + } + }, + "parameters": { + "benefitAsyncOperationIdParameter": { + "description": "Operation id of the report being generated", + "in": "path", + "name": "operationId", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "benefitRecommendationsFilterParameter": { + "name": "$filter", + "in": "query", + "description": "Can be used to filter benefitRecommendations by: properties/scope with allowed values ['Single', 'Shared'] and default value 'Shared'; and properties/lookBackPeriod with allowed values ['Last7Days', 'Last30Days', 'Last60Days'] and default value 'Last60Days'; properties/term with allowed values ['P1Y', 'P3Y'] and default value 'P3Y'; properties/subscriptionId; properties/resourceGroup", + "type": "string", + "x-ms-parameter-location": "method" + }, + "billingScopeBenefitRecommendationParameter": { + "name": "billingScope", + "in": "path", + "description": "The scope associated with benefit recommendation operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for enterprise agreement scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billing profile scope", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "grainParameter": { + "description": "Grain.", + "in": "query", + "required": false, + "x-ms-parameter-location": "method", + "type": "string", + "name": "grainParameter", + "enum": [ + "Hourly", + "Daily", + "Monthly" + ], + "x-ms-enum": { + "name": "grainParameter", + "modelAsString": true, + "values": [ + { + "value": "Hourly", + "description": "Hourly grain corresponds to value per hour.", + "name": "Hourly" + }, + { + "value": "Daily", + "description": "Hourly grain corresponds to value per day.", + "name": "Daily" + }, + { + "value": "Monthly", + "description": "Hourly grain corresponds to value per month.", + "name": "Monthly" + } + ] + } + }, + "reservationIdParameter": { + "description": "Reservation ID", + "in": "path", + "name": "reservationId", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "reservationOrderIdParameter": { + "description": "Reservation Order ID", + "in": "path", + "name": "reservationOrderId", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "savingsPlanIdParameter": { + "description": "Savings plan ID.", + "in": "path", + "name": "savingsPlanId", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "savingsPlanOrderIdParameter": { + "description": "Savings plan order ID.", + "in": "path", + "name": "savingsPlanOrderId", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/costmanagement.exports.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/costmanagement.exports.json new file mode 100644 index 000000000000..0736c266ab66 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/costmanagement.exports.json @@ -0,0 +1,799 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-03-01", + "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": { + "/{scope}/providers/Microsoft.CostManagement/exports": { + "get": { + "tags": [ + "Exports" + ], + "operationId": "Exports_List", + "description": "The operation to list all exports at the given scope.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExportsGetBySubscription": { + "$ref": "./examples/ExportsGetBySubscription.json" + }, + "ExportsGetByResourceGroup": { + "$ref": "./examples/ExportsGetByResourceGroup.json" + }, + "ExportsGetByBillingAccount": { + "$ref": "./examples/ExportsGetByBillingAccount.json" + }, + "ExportsGetByDepartment": { + "$ref": "./examples/ExportsGetByDepartment.json" + }, + "ExportsGetByEnrollmentAccount": { + "$ref": "./examples/ExportsGetByEnrollmentAccount.json" + }, + "ExportsGetByManagementGroup": { + "$ref": "./examples/ExportsGetByManagementGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeExportParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "$expand", + "description": "May be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information for the last run of each export.", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ExportListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}": { + "get": { + "tags": [ + "Exports" + ], + "operationId": "Exports_Get", + "description": "The operation to get the export for the defined scope by export name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExportGetBySubscription": { + "$ref": "./examples/ExportGetBySubscription.json" + }, + "ExportGetByResourceGroup": { + "$ref": "./examples/ExportGetByResourceGroup.json" + }, + "ExportGetByBillingAccount": { + "$ref": "./examples/ExportGetByBillingAccount.json" + }, + "ExportGetByDepartment": { + "$ref": "./examples/ExportGetByDepartment.json" + }, + "ExportGetByEnrollmentAccount": { + "$ref": "./examples/ExportGetByEnrollmentAccount.json" + }, + "ExportGetByManagementGroup": { + "$ref": "./examples/ExportGetByManagementGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeExportParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/exportNameParameter" + }, + { + "name": "$expand", + "description": "May be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information for the last 10 runs of the export.", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/Export" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Exports" + ], + "operationId": "Exports_CreateOrUpdate", + "description": "The operation to create or update a export. 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": { + "ExportCreateOrUpdateBySubscription": { + "$ref": "./examples/ExportCreateOrUpdateBySubscription.json" + }, + "ExportCreateOrUpdateByResourceGroup": { + "$ref": "./examples/ExportCreateOrUpdateByResourceGroup.json" + }, + "ExportCreateOrUpdateByBillingAccount": { + "$ref": "./examples/ExportCreateOrUpdateByBillingAccount.json" + }, + "ExportCreateOrUpdateByDepartment": { + "$ref": "./examples/ExportCreateOrUpdateByDepartment.json" + }, + "ExportCreateOrUpdateByEnrollmentAccount": { + "$ref": "./examples/ExportCreateOrUpdateByEnrollmentAccount.json" + }, + "ExportCreateOrUpdateByManagementGroup": { + "$ref": "./examples/ExportCreateOrUpdateByManagementGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeExportParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/exportNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Export" + }, + "description": "Parameters supplied to the CreateOrUpdate Export operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/Export" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/Export" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Exports" + ], + "operationId": "Exports_Delete", + "description": "The operation to delete a export.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExportDeleteBySubscription": { + "$ref": "./examples/ExportDeleteBySubscription.json" + }, + "ExportDeleteByResourceGroup": { + "$ref": "./examples/ExportDeleteByResourceGroup.json" + }, + "ExportDeleteByBillingAccount": { + "$ref": "./examples/ExportDeleteByBillingAccount.json" + }, + "ExportDeleteByEnrollmentAccount": { + "$ref": "./examples/ExportDeleteByEnrollmentAccount.json" + }, + "ExportDeleteByDepartment": { + "$ref": "./examples/ExportDeleteByDepartment.json" + }, + "ExportDeleteByManagementGroup": { + "$ref": "./examples/ExportDeleteByManagementGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeExportParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/exportNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/run": { + "post": { + "tags": [ + "Exports" + ], + "operationId": "Exports_Execute", + "description": "The operation to run an export.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExportRunBySubscription": { + "$ref": "./examples/ExportRunBySubscription.json" + }, + "ExportRunByResourceGroup": { + "$ref": "./examples/ExportRunByResourceGroup.json" + }, + "ExportRunByBillingAccount": { + "$ref": "./examples/ExportRunByBillingAccount.json" + }, + "ExportRunByDepartment": { + "$ref": "./examples/ExportRunByDepartment.json" + }, + "ExportRunByEnrollmentAccount": { + "$ref": "./examples/ExportRunByEnrollmentAccount.json" + }, + "ExportRunByManagementGroup": { + "$ref": "./examples/ExportRunByManagementGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeExportParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/exportNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/runHistory": { + "get": { + "tags": [ + "Exports" + ], + "operationId": "Exports_GetExecutionHistory", + "description": "The operation to get the run history of an export for the defined scope and export name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExportRunHistoryGetBySubscription": { + "$ref": "./examples/ExportRunHistoryGetBySubscription.json" + }, + "ExportRunHistoryGetByResourceGroup": { + "$ref": "./examples/ExportRunHistoryGetByResourceGroup.json" + }, + "ExportRunHistoryGetByBillingAccount": { + "$ref": "./examples/ExportRunHistoryGetByBillingAccount.json" + }, + "ExportRunHistoryGetByDepartment": { + "$ref": "./examples/ExportRunHistoryGetByDepartment.json" + }, + "ExportRunHistoryGetByEnrollmentAccount": { + "$ref": "./examples/ExportRunHistoryGetByEnrollmentAccount.json" + }, + "ExportRunHistoryGetByManagementGroup": { + "$ref": "./examples/ExportRunHistoryGetByManagementGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeExportParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/exportNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ExportExecutionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "ExportListResult": { + "description": "Result of listing exports. It contains a list of available exports in the scope provided.", + "type": "object", + "properties": { + "value": { + "description": "The list of exports.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Export" + } + } + } + }, + "Export": { + "description": "An export resource.", + "type": "object", + "allOf": [ + { + "$ref": "common-types.json#/definitions/CostManagementProxyResource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ExportProperties", + "title": "Export properties" + } + } + }, + "ExportProperties": { + "description": "The properties of the export.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/CommonExportProperties" + } + ], + "properties": { + "schedule": { + "description": "Has schedule information for the export.", + "$ref": "#/definitions/ExportSchedule" + } + } + }, + "CommonExportProperties": { + "description": "The common properties of the export.", + "type": "object", + "properties": { + "format": { + "description": "The format of the export being delivered. Currently only 'Csv' is supported.", + "type": "string", + "enum": [ + "Csv" + ], + "x-ms-enum": { + "name": "FormatType", + "modelAsString": true + } + }, + "deliveryInfo": { + "description": "Has delivery information for the export.", + "$ref": "#/definitions/ExportDeliveryInfo" + }, + "definition": { + "description": "Has the definition for the export.", + "$ref": "#/definitions/ExportDefinition" + }, + "runHistory": { + "description": "If requested, has the most recent run history for the export.", + "$ref": "#/definitions/ExportExecutionListResult" + }, + "partitionData": { + "description": "If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file. Note: this option is currently available only for Microsoft Customer Agreement commerce scopes.", + "type": "boolean" + }, + "nextRunTimeEstimate": { + "description": "If the export has an active schedule, provides an estimate of the next run time.", + "type": "string", + "format": "date-time", + "readOnly": true + } + }, + "required": [ + "deliveryInfo", + "definition" + ] + }, + "ExportSchedule": { + "description": "The schedule associated with the export.", + "type": "object", + "properties": { + "status": { + "description": "The status of the export's schedule. If 'Inactive', the export's schedule is paused.", + "type": "string", + "enum": [ + "Active", + "Inactive" + ], + "x-ms-enum": { + "name": "StatusType", + "modelAsString": true + } + }, + "recurrence": { + "description": "The schedule recurrence.", + "type": "string", + "enum": [ + "Daily", + "Weekly", + "Monthly", + "Annually" + ], + "x-ms-enum": { + "name": "RecurrenceType", + "modelAsString": true + } + }, + "recurrencePeriod": { + "description": "Has start and end date of the recurrence. The start date must be in future. If present, the end date must be greater than start date.", + "$ref": "#/definitions/ExportRecurrencePeriod" + } + } + }, + "ExportDeliveryInfo": { + "description": "The delivery information associated with a export.", + "type": "object", + "properties": { + "destination": { + "description": "Has destination for the export being delivered.", + "$ref": "#/definitions/ExportDeliveryDestination" + } + }, + "required": [ + "destination" + ] + }, + "ExportRecurrencePeriod": { + "description": "The start and end date for recurrence schedule.", + "type": "object", + "properties": { + "from": { + "description": "The start date of recurrence.", + "type": "string", + "format": "date-time" + }, + "to": { + "description": "The end date of recurrence.", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "from" + ] + }, + "ExportDeliveryDestination": { + "description": "This represents the blob storage account location where exports of costs will be delivered. There are two ways to configure the destination. The approach recommended for most customers is to specify the resourceId of the storage account. This requires a one-time registration of the account's subscription with the Microsoft.CostManagementExports resource provider in order to give Cost Management services access to the storage. When creating an export in the Azure portal this registration is performed automatically but API users may need to register the subscription explicitly (for more information see https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services ). Another way to configure the destination is available ONLY to Partners with a Microsoft Partner Agreement plan who are global admins of their billing account. These Partners, instead of specifying the resourceId of a storage account, can specify the storage account name along with a SAS token for the account. This allows exports of costs to a storage account in any tenant. The SAS token should be created for the blob service with Service/Container/Object resource types and with Read/Write/Delete/List/Add/Create permissions (for more information see https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key ).", + "type": "object", + "properties": { + "resourceId": { + "description": "The resource id of the storage account where exports will be delivered. This is not required if a sasToken and storageAccount are specified.", + "type": "string" + }, + "container": { + "description": "The name of the container where exports will be uploaded. If the container does not exist it will be created.", + "type": "string" + }, + "rootFolderPath": { + "description": "The name of the directory where exports will be uploaded.", + "type": "string" + }, + "sasToken": { + "description": "A SAS token for the storage account. For a restricted set of Azure customers this together with storageAccount can be specified instead of resourceId. Note: the value returned by the API for this property will always be obfuscated. Returning this same obfuscated value will not result in the SAS token being updated. To update this value a new SAS token must be specified.", + "type": "string", + "x-ms-secret": true + }, + "storageAccount": { + "description": "The storage account where exports will be uploaded. For a restricted set of Azure customers this together with sasToken can be specified instead of resourceId.", + "type": "string" + } + }, + "required": [ + "container" + ] + }, + "ExportDefinition": { + "description": "The definition of an export.", + "type": "object", + "properties": { + "type": { + "description": "The type of the export. Note that 'Usage' is equivalent to 'ActualCost' and is applicable to exports that do not yet provide data for charges or amortization for service reservations.", + "type": "string", + "enum": [ + "Usage", + "ActualCost", + "AmortizedCost" + ], + "x-ms-enum": { + "name": "ExportType", + "modelAsString": true + } + }, + "timeframe": { + "description": "The time frame for pulling data for the export. 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 export.", + "$ref": "#/definitions/ExportTimePeriod" + }, + "dataSet": { + "description": "The definition for data in the export.", + "$ref": "#/definitions/ExportDataset" + } + }, + "required": [ + "type", + "timeframe" + ] + }, + "ExportDataset": { + "description": "The definition for data in the export.", + "type": "object", + "properties": { + "granularity": { + "description": "The granularity of rows in the export. Currently only 'Daily' is supported.", + "type": "string", + "enum": [ + "Daily" + ], + "x-ms-enum": { + "name": "GranularityType", + "modelAsString": true + } + }, + "configuration": { + "description": "The export dataset configuration.", + "$ref": "#/definitions/ExportDatasetConfiguration" + } + } + }, + "ExportDatasetConfiguration": { + "description": "The export dataset configuration. Allows columns to be selected for the export. If not provided then the export will include all available columns.", + "type": "object", + "properties": { + "columns": { + "description": "Array of column names to be included in the export. If not provided then the export will include all available columns. The available columns can vary by customer channel (see examples).", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ExportTimePeriod": { + "description": "The date range for data in the export. This should only be specified with timeFrame set to 'Custom'. The maximum date range is 3 months.", + "type": "object", + "properties": { + "from": { + "description": "The start date for export data.", + "type": "string", + "format": "date-time" + }, + "to": { + "description": "The end date for export data.", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "from", + "to" + ] + }, + "ExportExecutionListResult": { + "description": "Result of listing the run history of an export.", + "type": "object", + "properties": { + "value": { + "description": "A list of export runs.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ExportRun" + } + } + } + }, + "ExportRun": { + "description": "An export run.", + "type": "object", + "allOf": [ + { + "$ref": "common-types.json#/definitions/CostManagementProxyResource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ExportRunProperties", + "title": "Export run properties" + } + } + }, + "ExportRunProperties": { + "description": "The properties of the export run.", + "type": "object", + "properties": { + "executionType": { + "description": "The type of the export run.", + "type": "string", + "enum": [ + "OnDemand", + "Scheduled" + ], + "x-ms-enum": { + "name": "ExecutionType", + "modelAsString": true + } + }, + "status": { + "description": "The last known status of the export run.", + "type": "string", + "enum": [ + "Queued", + "InProgress", + "Completed", + "Failed", + "Timeout", + "NewDataNotAvailable", + "DataNotAvailable" + ], + "x-ms-enum": { + "name": "ExecutionStatus", + "modelAsString": true + } + }, + "submittedBy": { + "description": "The identifier for the entity that triggered the export. For on-demand runs it is the user email. For scheduled runs it is 'System'.", + "type": "string" + }, + "submittedTime": { + "description": "The time when export was queued to be run.", + "type": "string", + "format": "date-time" + }, + "processingStartTime": { + "description": "The time when export was picked up to be run.", + "type": "string", + "format": "date-time" + }, + "processingEndTime": { + "description": "The time when the export run finished.", + "type": "string", + "format": "date-time" + }, + "fileName": { + "description": "The name of the exported file.", + "type": "string" + }, + "runSettings": { + "description": "The export settings that were in effect for this run.", + "$ref": "#/definitions/CommonExportProperties" + }, + "error": { + "description": "The details of any error.", + "$ref": "common-types.json#/definitions/ErrorDetails" + } + } + } + }, + "parameters": { + "scopeExportParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope associated with 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 + }, + "exportNameParameter": { + "name": "exportName", + "in": "path", + "description": "Export Name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/costmanagement.generatecostdetailsreport.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/costmanagement.generatecostdetailsreport.json new file mode 100644 index 000000000000..9ebe8e113d00 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/costmanagement.generatecostdetailsreport.json @@ -0,0 +1,405 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-03-01", + "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": { + "/{scope}/providers/Microsoft.CostManagement/generateCostDetailsReport": { + "post": { + "tags": [ + "CostDetails" + ], + "operationId": "GenerateCostDetailsReport_CreateOperation", + "description": "This API is the replacement for all previously release Usage Details APIs. Request to generate a cost details report for the provided date range, billing period (Only enterprise customers) or Invoice Id asynchronously at a certain scope. The initial call to request a report will return a 202 with a 'Location' and 'Retry-After' header. The 'Location' header will provide the endpoint to poll to get the result of the report generation. The 'Retry-After' provides the duration to wait before polling for the generated report. A call to poll the report operation will provide a 202 response with a 'Location' header if the operation is still in progress. Once the report generation operation completes, the polling endpoint will provide a 200 response along with details on the report blob(s) that are available for download. The details on the file(s) available for download will be available in the polling response body. To Understand cost details (formerly known as usage details) fields found in files ,see https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "GenerateCostDetailsReportByBillingProfileAndInvoiceId": { + "$ref": "./examples/GenerateCostDetailsReportByBillingProfileAndInvoiceId.json" + }, + "GenerateCostDetailsReportBySubscriptionAndTimePeriod": { + "$ref": "./examples/GenerateCostDetailsReportBySubscriptionAndTimePeriod.json" + }, + "GenerateCostDetailsReportByCustomerAndTimePeriod": { + "$ref": "./examples/GenerateCostDetailsReportByCustomerAndTimePeriod.json" + }, + "GenerateCostDetailsReportByBillingProfileAndInvoiceIdAndCustomerId": { + "$ref": "./examples/GenerateCostDetailsReportByBillingProfileAndInvoiceIdAndCustomerId.json" + }, + "GenerateCostDetailsReportByBillingAccountEnterpriseAgreementCustomerAndBillingPeriod": { + "$ref": "./examples/GenerateCostDetailsReportByBillingAccountEnterpriseAgreementCustomerAndBillingPeriod.json" + }, + "GenerateCostDetailsReportByDepartmentsAndTimePeriod": { + "$ref": "./examples/GenerateCostDetailsReportByDepartmentsAndTimePeriod.json" + }, + "GenerateCostDetailsReportByEnrollmentAccountsAndTimePeriod": { + "$ref": "./examples/GenerateCostDetailsReportByEnrollmentAccountsAndTimePeriod.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "#/parameters/scopeUsageDetailsParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GenerateCostDetailsReportRequestDefinition" + }, + "description": "Parameters supplied to the Create cost details operation." + } + ], + "responses": { + "200": { + "description": "Request processing completed.", + "schema": { + "$ref": "#/definitions/CostDetailsOperationResults" + } + }, + "202": { + "description": "Accepted. Request will be processed. Use the Location header to check the status.", + "headers": { + "Location": { + "description": "The URL to check the result 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" + } + } + }, + "204": { + "description": "No Content. The request has succeeded but returned no results." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/GenerateCostDetailsReportErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/costDetailsOperationResults/{operationId}": { + "get": { + "tags": [ + "CostDetails" + ], + "operationId": "GenerateCostDetailsReport_GetOperationResults", + "description": "Get the result of the specified operation. This link is provided in the CostDetails creation request response Location header.", + "x-ms-examples": { + "Get details of the operation result": { + "$ref": "./examples/CostDetailsOperationResultsBySubscriptionScope.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "#/parameters/scopeUsageDetailsParameter" + }, + { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "description": "The target operation Id." + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/CostDetailsOperationResults" + } + }, + "202": { + "description": "Accepted. The operation is ongoing." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "GenerateCostDetailsReportErrorResponse": { + "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 * 400 Bad Request - Invalid Request Payload. Request payload provided is not in a json format or had an invalid member not accepted in the request payload. \n\n * 400 Bad Request - Invalid request payload: can only have either timePeriod or invoiceId or billingPeriod. API only allows data to be pulled for either timePeriod or invoiceId or billingPeriod. Customer should provide only one of these parameters. \n\n * 400 Bad Request - Start date must be after . API only allows data to be pulled no older than 13 months from now. \n\n * 400 Bad Request - The maximum allowed date range is 1 months. API only allows data to be pulled for 1 month or less. \n\n * 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the \"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": "common-types.json#/definitions/ErrorDetails" + } + } + }, + "GenerateCostDetailsReportRequestDefinition": { + "description": "The definition of a cost detailed report.", + "type": "object", + "properties": { + "metric": { + "description": "The type of the detailed report. By default ActualCost is provided", + "type": "string", + "enum": [ + "ActualCost", + "AmortizedCost" + ], + "x-ms-enum": { + "name": "CostDetailsMetricType", + "modelAsString": true, + "values": [ + { + "value": "ActualCost", + "description": "Actual cost data.", + "name": "ActualCostCostDetailsMetricType" + }, + { + "value": "AmortizedCost", + "description": "Amortized cost data.", + "name": "AmortizedCostCostDetailsMetricType" + } + ] + } + }, + "timePeriod": { + "description": "The specific date range of cost details requested for the report. This parameter cannot be used alongside either the invoiceId or billingPeriod parameters. If a timePeriod, invoiceId or billingPeriod parameter is not provided in the request body the API will return the current month's cost. API only allows data to be pulled for 1 month or less and no older than 13 months. If no timePeriod or billingPeriod or invoiceId is provided the API defaults to the open month time period", + "$ref": "#/definitions/CostDetailsTimePeriod" + }, + "billingPeriod": { + "description": "This parameter can be used only by Enterprise Agreement customers. Use the YearMonth(e.g. 202008) format. This parameter cannot be used alongside either the invoiceId or timePeriod parameters. If a timePeriod, invoiceId or billingPeriod parameter is not provided in the request body the API will return the current month's cost.", + "type": "string" + }, + "invoiceId": { + "description": "This parameter can only be used by Microsoft Customer Agreement customers. Additionally, it can only be used at the Billing Profile or Customer scope. This parameter cannot be used alongside either the billingPeriod or timePeriod parameters. If a timePeriod, invoiceId or billingPeriod parameter is not provided in the request body the API will return the current month's cost.", + "type": "string" + } + } + }, + "CostDetailsTimePeriod": { + "description": "The start and end date for pulling data for the cost detailed report. API only allows data to be pulled for 1 month or less and no older than 13 months.", + "type": "object", + "properties": { + "start": { + "description": "The start date to pull data from. example format 2020-03-15", + "type": "string" + }, + "end": { + "description": "The end date to pull data to. example format 2020-03-15", + "type": "string" + } + }, + "required": [ + "start", + "end" + ] + }, + "CostDetailsOperationResults": { + "description": "The result of the long running operation for cost details Api.", + "type": "object", + "properties": { + "id": { + "description": "The id of the long running operation.", + "type": "string" + }, + "name": { + "description": "The name of the long running operation.", + "type": "string" + }, + "type": { + "description": "The type of the long running operation.", + "type": "string" + }, + "status": { + "description": "The status of the cost details operation", + "type": "string", + "enum": [ + "Completed", + "NoDataFound", + "Failed" + ], + "x-ms-enum": { + "name": "CostDetailsStatusType", + "modelAsString": true, + "values": [ + { + "value": "Completed", + "description": "Operation is Completed.", + "name": "CompletedCostDetailsStatusType" + }, + { + "value": "NoDataFound", + "description": "Operation is Completed and no cost data found.", + "name": "NoDataFoundCostDetailsStatusType" + }, + { + "value": "Failed", + "description": "Operation Failed.", + "name": "FailedCostDetailsStatusType" + } + ] + } + }, + "manifest": { + "x-ms-client-flatten": true, + "description": "The manifest of the report generated by the operation.", + "$ref": "#/definitions/ReportManifest" + }, + "validTill": { + "description": "The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.", + "type": "string", + "format": "date-time" + }, + "error": { + "description": "The details of the error.", + "$ref": "common-types.json#/definitions/ErrorDetails" + } + } + }, + "ReportManifest": { + "description": "The manifest of the report generated by the operation.", + "type": "object", + "properties": { + "manifestVersion": { + "description": "The Manifest version.", + "type": "string" + }, + "dataFormat": { + "description": "The data format of the report", + "type": "string", + "enum": [ + "Csv" + ], + "x-ms-enum": { + "name": "CostDetailsDataFormat", + "modelAsString": true, + "values": [ + { + "value": "Csv", + "description": "Csv data format.", + "name": "CsvCostDetailsDataFormat" + } + ] + } + }, + "byteCount": { + "description": "The total number of bytes in all blobs.", + "format": "int64", + "type": "integer" + }, + "blobCount": { + "description": "The total number of blobs.", + "format": "int32", + "type": "integer" + }, + "compressData": { + "description": "Is the data in compressed format.", + "type": "boolean" + }, + "requestContext": { + "x-ms-client-flatten": true, + "description": "The context of the Cost Details request.", + "$ref": "#/definitions/RequestContext" + }, + "blobs": { + "description": "List of blob information generated by this operation.", + "type": "array", + "items": { + "$ref": "#/definitions/BlobInfo" + }, + "x-ms-identifiers": [ + "blobLink" + ] + } + } + }, + "RequestContext": { + "description": "The context of the Cost Details request.", + "type": "object", + "properties": { + "requestScope": { + "description": "The request scope of the request.", + "type": "string" + }, + "requestBody": { + "description": "The request payload body provided in Cost Details call", + "$ref": "#/definitions/GenerateCostDetailsReportRequestDefinition" + } + } + }, + "BlobInfo": { + "description": "The blob information generated by this operation.", + "type": "object", + "properties": { + "blobLink": { + "description": "Link to the blob to download file.", + "type": "string" + }, + "byteCount": { + "description": "Bytes in the blob.", + "format": "int64", + "type": "integer" + } + } + } + }, + "parameters": { + "scopeUsageDetailsParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For details, see https://aka.ms/costmgmt/scopes.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/costmanagement.generatedetailedcostreport.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/costmanagement.generatedetailedcostreport.json new file mode 100644 index 000000000000..ee983b5c4fe7 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/costmanagement.generatedetailedcostreport.json @@ -0,0 +1,368 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-03-01", + "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": { + "/{scope}/providers/Microsoft.CostManagement/generateDetailedCostReport": { + "post": { + "tags": [ + "UsageDetails" + ], + "operationId": "GenerateDetailedCostReport_CreateOperation", + "description": "Generates the detailed cost report for provided date range, billing period(only enterprise customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the operation will provide the status and if the operation is completed the blob file where generated detailed cost report is being stored.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "GenerateDetailedCostReportByBillingProfileAndInvoiceId": { + "$ref": "./examples/GenerateDetailedCostReportByBillingProfileAndInvoiceId.json" + }, + "GenerateDetailedCostReportBySubscriptionAndTimePeriod": { + "$ref": "./examples/GenerateDetailedCostReportBySubscriptionAndTimePeriod.json" + }, + "GenerateDetailedCostReportByCustomerAndTimePeriod": { + "$ref": "./examples/GenerateDetailedCostReportByCustomerAndTimePeriod.json" + }, + "GenerateDetailedCostReportByBillingProfileAndInvoiceIdAndCustomerId": { + "$ref": "./examples/GenerateDetailedCostReportByBillingProfileAndInvoiceIdAndCustomerId.json" + }, + "GenerateDetailedCostReportByBillingAccountLegacyAndBillingPeriod": { + "$ref": "./examples/GenerateDetailedCostReportByBillingAccountLegacyAndBillingPeriod.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "#/parameters/scopeUsageDetailsParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GenerateDetailedCostReportDefinition" + }, + "description": "Parameters supplied to the Create detailed cost report operation." + } + ], + "responses": { + "200": { + "description": "Request processing completed.", + "schema": { + "$ref": "#/definitions/GenerateDetailedCostReportOperationResult" + } + }, + "202": { + "description": "Accepted. Request will be processed. Use the Location header to check the status.", + "headers": { + "Location": { + "description": "The URL to check the result of the asynchronous operation.", + "type": "string" + }, + "Azure-Consumption-AsyncOperation": { + "description": "The URL to check the status of the asynchronous operation.", + "type": "string" + }, + "Azure-AsyncOperation": { + "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": "#/definitions/GenerateDetailedCostReportErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/operationResults/{operationId}": { + "get": { + "tags": [ + "GenerateDetailedCostReportOperationResults" + ], + "operationId": "GenerateDetailedCostReportOperationResults_Get", + "description": "Gets the result of the specified operation. The link with this operationId is provided as a response header of the initial request.", + "x-ms-examples": { + "Get details of the operation result": { + "$ref": "./examples/GenerateDetailedCostReportOperationResultsBySubscriptionScope.json" + } + }, + "x-ms-long-running-operation": true, + "parameters": [ + { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "description": "The target operation Id." + }, + { + "$ref": "#/parameters/scopeUsageDetailsParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/GenerateDetailedCostReportOperationResult" + } + }, + "202": { + "description": "Accepted. The operation is ongoing." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/operationStatus/{operationId}": { + "get": { + "tags": [ + "GenerateDetailedCostReportOperationStatus" + ], + "operationId": "GenerateDetailedCostReportOperationStatus_Get", + "description": "Get the status of the specified operation. This link is provided in the GenerateDetailedCostReport creation request response header.", + "x-ms-examples": { + "Get details of the operation status": { + "$ref": "./examples/GenerateDetailedCostReportOperationStatusBySubscriptionScope.json" + } + }, + "parameters": [ + { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "description": "The target operation Id." + }, + { + "$ref": "#/parameters/scopeUsageDetailsParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/GenerateDetailedCostReportOperationStatuses" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "GenerateDetailedCostReportErrorResponse": { + "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 * 413 Request Entity Too Large - Request is throttled. The amount of data required to fulfill the request exceeds the maximum size permitted of 2Gb. Please utilize our Exports feature instead. \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": "common-types.json#/definitions/ErrorDetails" + } + } + }, + "GenerateDetailedCostReportDefinition": { + "description": "The definition of a cost detailed report.", + "properties": { + "metric": { + "description": "The type of the detailed report. By default ActualCost is provided", + "type": "string", + "enum": [ + "ActualCost", + "AmortizedCost" + ], + "x-ms-enum": { + "name": "GenerateDetailedCostReportMetricType", + "modelAsString": true + } + }, + "timePeriod": { + "description": "Has time period for pulling data for the cost detailed report. Can only have one of either timePeriod or invoiceId or billingPeriod parameters. If none provided current month cost is provided.", + "$ref": "#/definitions/GenerateDetailedCostReportTimePeriod" + }, + "billingPeriod": { + "description": "Billing period in YearMonth(e.g. 202008) format. Only for legacy enterprise customers can use this. Can only have one of either timePeriod or invoiceId or billingPeriod parameters. If none provided current month cost is provided.", + "type": "string" + }, + "invoiceId": { + "description": "Invoice ID for Pay-as-you-go and Microsoft Customer Agreement scopes. Can only have one of either timePeriod or invoiceId or billingPeriod parameters. If none provided current month cost is provided.", + "type": "string" + }, + "customerId": { + "description": "Customer ID for Microsoft Customer Agreement scopes (Invoice Id is also required for this).", + "type": "string" + } + } + }, + "GenerateDetailedCostReportTimePeriod": { + "description": "The start and end date for pulling data for the cost detailed report.", + "properties": { + "start": { + "description": "The start date to pull data from. example format 2020-03-15", + "type": "string" + }, + "end": { + "description": "The end date to pull data to. example format 2020-03-15", + "type": "string" + } + }, + "required": [ + "start", + "end" + ] + }, + "GenerateDetailedCostReportOperationStatuses": { + "description": "The status of the long running operation for cost detailed report.", + "properties": { + "id": { + "description": "The ID of the long running operation.", + "type": "string" + }, + "name": { + "description": "The name of the long running operation.", + "type": "string" + }, + "status": { + "description": "The status of the long running operation.", + "$ref": "#/definitions/Status" + }, + "startTime": { + "description": "The startTime of the operation.", + "type": "string" + }, + "endTime": { + "description": "The endTime of the operation.", + "type": "string" + }, + "type": { + "description": "The type of the long running operation.", + "type": "string" + }, + "error": { + "description": "The details of the error.", + "$ref": "common-types.json#/definitions/ErrorDetails" + }, + "properties": { + "x-ms-client-flatten": true, + "description": "The properties of the usage file generated.", + "$ref": "common-types.json#/definitions/DownloadURL" + } + } + }, + "GenerateDetailedCostReportOperationResult": { + "description": "The result of the long running operation for cost detailed report.", + "properties": { + "id": { + "description": "The ARM resource id of the long running operation.", + "type": "string" + }, + "name": { + "description": "The name of the long running operation.", + "type": "string" + }, + "type": { + "description": "The type of the long running operation.", + "type": "string" + }, + "properties": { + "x-ms-client-flatten": true, + "description": "The properties of the resource generated.", + "$ref": "common-types.json#/definitions/DownloadURL" + } + } + }, + "Status": { + "description": "The status of the long running operation.", + "properties": { + "status": { + "description": "The status of the long running operation.", + "type": "string", + "enum": [ + "InProgress", + "Completed", + "Failed", + "Queued", + "NoDataFound", + "ReadyToDownload", + "TimedOut" + ], + "x-ms-enum": { + "name": "ReportOperationStatusType", + "modelAsString": true + } + } + } + } + }, + "parameters": { + "scopeUsageDetailsParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For details, see https://aka.ms/costmgmt/scopes.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/costmanagement.json new file mode 100644 index 000000000000..42f0e7b58d9f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/costmanagement.json @@ -0,0 +1,2979 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-03-01", + "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/resource-management/v2/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/resource-management/v2/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/resource-management/v2/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/resource-management/v2/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/resource-management/v2/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/resource-management/v2/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/resource-management/v2/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/resource-management/v2/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/resource-management/v2/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/resource-management/v2/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/resource-management/v2/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/resource-management/v2/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/resource-management/v2/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/ForecastResult" + } + }, + "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/resource-management/v2/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/ForecastResult" + } + }, + "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-MCA": { + "$ref": "./examples/MCABillingAccountDimensionsList.json" + }, + "BillingAccountDimensionsListExpandAndTop-MCA": { + "$ref": "./examples/MCABillingAccountDimensionsListExpandAndTop.json" + }, + "BillingAccountDimensionsListWithFilter-MCA": { + "$ref": "./examples/MCABillingAccountDimensionsListWithFilter.json" + }, + "BillingProfileDimensionsList-MCA": { + "$ref": "./examples/MCABillingProfileDimensionsList.json" + }, + "BillingProfileDimensionsListExpandAndTop-MCA": { + "$ref": "./examples/MCABillingProfileDimensionsListExpandAndTop.json" + }, + "BillingProfileDimensionsListWithFilter-MCA": { + "$ref": "./examples/MCABillingProfileDimensionsListWithFilter.json" + }, + "InvoiceSectionDimensionsList-MCA": { + "$ref": "./examples/MCAInvoiceSectionDimensionsList.json" + }, + "InvoiceSectionDimensionsListExpandAndTop-MCA": { + "$ref": "./examples/MCAInvoiceSectionDimensionsListExpandAndTop.json" + }, + "InvoiceSectionDimensionsListWithFilter-MCA": { + "$ref": "./examples/MCAInvoiceSectionDimensionsListWithFilter.json" + }, + "CustomerDimensionsList-MCA": { + "$ref": "./examples/MCACustomerDimensionsList.json" + }, + "CustomerDimensionsListExpandAndTop-MCA": { + "$ref": "./examples/MCACustomerDimensionsListExpandAndTop.json" + }, + "CustomerDimensionsListWithFilter-MCA": { + "$ref": "./examples/MCACustomerDimensionsListWithFilter.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeDimensionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/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/resource-management/v2/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-MCA": { + "$ref": "./examples/MCABillingAccountQuery.json" + }, + "BillingAccountQueryGrouping-MCA": { + "$ref": "./examples/MCABillingAccountQueryGrouping.json" + }, + "BillingProfileQuery-MCA": { + "$ref": "./examples/MCABillingProfileQuery.json" + }, + "BillingProfileQueryGrouping-MCA": { + "$ref": "./examples/MCABillingProfileQueryGrouping.json" + }, + "InvoiceSectionQuery-MCA": { + "$ref": "./examples/MCAInvoiceSectionQuery.json" + }, + "InvoiceSectionQueryGrouping-MCA": { + "$ref": "./examples/MCAInvoiceSectionQueryGrouping.json" + }, + "CustomerQuery-MCA": { + "$ref": "./examples/MCACustomerQuery.json" + }, + "CustomerQueryGrouping-MCA": { + "$ref": "./examples/MCACustomerQueryGrouping.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeQueryParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/QueryDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Query 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}/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/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/QueryDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Query 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" + } + } + } + } + }, + "/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/resource-management/v2/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": "common-types.json#/parameters/billingAccountIdParameter" + }, + { + "$ref": "common-types.json#/parameters/billingProfileIdParameter" + }, + { + "$ref": "#/parameters/startDateParameter" + }, + { + "$ref": "#/parameters/endDateParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/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" + } + } + } + } + } + }, + "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": { + "$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": { + "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": [ + "TagKey", + "Dimension" + ], + "x-ms-enum": { + "name": "QueryColumnType", + "modelAsString": true, + "values": [ + { + "value": "TagKey", + "description": "The tag associated with the cost data." + }, + { + "value": "Dimension", + "description": "The dimension of cost data." + } + ] + } + }, + "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/CostManagementProxyResource" + } + ], + "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.", + "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" + } + } + }, + "CostManagementResource": { + "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/CostManagementResource" + } + ], + "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/CostManagementProxyResource" + } + ], + "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" + } + } + }, + "ForecastResult": { + "description": "Result of forecast. It contains all columns listed under groupings and aggregation.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/CostManagementResource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ForecastProperties", + "title": "Forecast properties" + } + } + }, + "ForecastProperties": { + "description": "Forecast 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/ForecastColumn" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "rows": { + "description": "Array of rows", + "type": "array", + "items": { + "type": "array", + "items": {}, + "x-ms-identifiers": [] + }, + "x-ms-identifiers": [] + } + } + }, + "ForecastColumn": { + "description": "Forecast column properties", + "type": "object", + "properties": { + "name": { + "description": "The name of column.", + "type": "string" + }, + "type": { + "description": "The type of column.", + "type": "string" + } + } + }, + "QueryResult": { + "description": "Result of query. It contains all columns listed under groupings and aggregation.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/CostManagementResource" + } + ], + "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" + } + } + }, + "ForecastDefinition": { + "description": "The definition of a forecast.", + "type": "object", + "properties": { + "type": { + "description": "The type of the forecast.", + "$ref": "#/definitions/ForecastType" + }, + "timeframe": { + "description": "The time frame for pulling data for the forecast. If custom, then a specific time period must be provided.", + "$ref": "#/definitions/ForecastTimeframe" + }, + "timePeriod": { + "description": "Has time period for pulling data for the forecast.", + "$ref": "#/definitions/ForecastTimePeriod" + }, + "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" + ] + }, + "ForecastType": { + "description": "The type of the forecast.", + "type": "string", + "enum": [ + "Usage", + "ActualCost", + "AmortizedCost" + ], + "x-ms-enum": { + "name": "ForecastType", + "modelAsString": true + } + }, + "ForecastTimeframe": { + "description": "The time frame for pulling data for the forecast.", + "type": "string", + "enum": [ + "Custom" + ], + "x-ms-enum": { + "name": "ForecastTimeframe", + "modelAsString": true + } + }, + "ForecastTimePeriod": { + "description": "Has time period for pulling data for the forecast.", + "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" + ] + }, + "ForecastDataset": { + "description": "The definition of data present in the forecast.", + "type": "object", + "properties": { + "granularity": { + "description": "The granularity of rows in the forecast.", + "$ref": "#/definitions/GranularityType" + }, + "configuration": { + "description": "Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided.", + "$ref": "#/definitions/ForecastDatasetConfiguration" + }, + "aggregation": { + "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.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ForecastAggregation" + }, + "maxItems": 2 + }, + "filter": { + "description": "Has filter expression to use in the forecast.", + "$ref": "#/definitions/ForecastFilter" + } + }, + "required": [ + "aggregation" + ] + }, + "GranularityType": { + "description": "The granularity of rows in the forecast.", + "type": "string", + "enum": [ + "Daily" + ], + "x-ms-enum": { + "name": "GranularityType", + "modelAsString": true + } + }, + "ForecastDatasetConfiguration": { + "description": "The configuration of dataset in the forecast.", + "type": "object", + "properties": { + "columns": { + "description": "Array of column names to be included in the forecast. Any valid forecast column name is allowed. If not provided, then forecast includes all columns.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ForecastAggregation": { + "description": "The aggregation expression to be used in the forecast.", + "type": "object", + "properties": { + "name": { + "description": "The name of the column to aggregate.", + "type": "string", + "enum": [ + "PreTaxCostUSD", + "Cost", + "CostUSD", + "PreTaxCost" + ], + "x-ms-enum": { + "name": "FunctionName", + "modelAsString": true + } + }, + "function": { + "description": "The name of the aggregation function to use.", + "type": "string", + "enum": [ + "Sum" + ], + "x-ms-enum": { + "name": "FunctionType", + "modelAsString": true + } + } + }, + "required": [ + "name", + "function" + ] + }, + "ForecastFilter": { + "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/ForecastFilter" + }, + "x-ms-identifiers": [], + "minItems": 2 + }, + "or": { + "description": "The logical \"OR\" expression. Must have at least 2 items.", + "type": "array", + "items": { + "$ref": "#/definitions/ForecastFilter" + }, + "x-ms-identifiers": [], + "minItems": 2 + }, + "dimensions": { + "description": "Has comparison expression for a dimension", + "$ref": "#/definitions/ForecastComparisonExpression" + }, + "tags": { + "description": "Has comparison expression for a tag", + "$ref": "#/definitions/ForecastComparisonExpression" + } + } + }, + "ForecastComparisonExpression": { + "description": "The comparison expression to be used in the forecast.", + "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": "ForecastOperatorType", + "modelAsString": true + } + }, + "values": { + "description": "Array of values to use for comparison", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + } + }, + "required": [ + "name", + "operator", + "values" + ] + }, + "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": { + "$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": { + "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, + "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", + "$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": [ + "TagKey", + "Dimension" + ], + "x-ms-enum": { + "name": "QueryColumnType", + "modelAsString": true, + "values": [ + { + "value": "TagKey", + "description": "The tag associated with the cost data." + }, + { + "value": "Dimension", + "description": "The dimension of cost data." + } + ] + } + }, + "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" + }, + "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/stable/2023-03-01/costmanagement.pricesheets.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/costmanagement.pricesheets.json new file mode 100644 index 000000000000..d7b9051c054c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/costmanagement.pricesheets.json @@ -0,0 +1,189 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-03-01", + "title": "CostManagementClient" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/providers/Microsoft.CostManagement/pricesheets/default/download": { + "post": { + "tags": [ + "PriceSheets" + ], + "x-ms-examples": { + "PricesheetDownload": { + "$ref": "./examples/PricesheetDownload.json" + } + }, + "operationId": "PriceSheet_Download", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "description": "Gets a URL to download the pricesheet for an invoice. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/billingProfileNameParameter" + }, + { + "$ref": "#/parameters/invoiceNameParameter" + } + ], + "responses": { + "202": { + "description": "Accepted.", + "headers": { + "Location": { + "description": "GET this URL to retrieve 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.", + "type": "string" + }, + "OData-EntityId": { + "description": "The operation entity Id GUID.", + "type": "string" + } + } + }, + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "common-types.json#/definitions/DownloadURL" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.CostManagement/pricesheets/default/download": { + "post": { + "tags": [ + "PriceSheets" + ], + "x-ms-examples": { + "PricesheetDownloadByBillingProfile": { + "$ref": "./examples/PricesheetDownloadByBillingProfile.json" + } + }, + "operationId": "PriceSheet_DownloadByBillingProfile", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "description": "Gets a URL to download the current month's pricesheet for a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.Due to Azure product growth, the Azure price sheet download experience in this preview version will be updated from a single csv file to a Zip file containing multiple csv files, each with max 200k records.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/billingProfileNameParameter" + } + ], + "responses": { + "202": { + "description": "Accepted.", + "headers": { + "Location": { + "description": "GET this URL to retrieve 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.", + "type": "string" + }, + "OData-EntityId": { + "description": "The operation entity Id GUID.", + "type": "string" + } + } + }, + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "common-types.json#/definitions/DownloadURL" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "parameters": { + "billingAccountNameParameter": { + "name": "billingAccountName", + "in": "path", + "description": "The ID that uniquely identifies a billing account.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "pattern": "([A-Za-z0-9]+(-[A-Za-z0-9]+)+):([A-Za-z0-9]+(-[A-Za-z0-9]+)+)_[0-9]{4}-[0-9]{2}-[0-9]{2}" + }, + "billingProfileNameParameter": { + "name": "billingProfileName", + "in": "path", + "description": "The ID that uniquely identifies a billing profile.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "pattern": "([A-Za-z0-9]+(-[A-Za-z0-9]+)+)" + }, + "invoiceNameParameter": { + "name": "invoiceName", + "in": "path", + "description": "The ID that uniquely identifies an invoice.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "pattern": "[A-Za-z0-9]+" + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitRecommendationsByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitRecommendationsByBillingAccount.json new file mode 100644 index 000000000000..35ab16be8909 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitRecommendationsByBillingAccount.json @@ -0,0 +1,122 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingScope": "providers/Microsoft.Billing/billingAccounts/123456", + "$expand": "properties/usage,properties/allRecommendationDetails", + "$filter": "properties/lookBackPeriod eq 'Last7Days' AND properties/term eq 'P1Y'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/benefitRecommendations/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.CostManagement/benefitRecommendations", + "kind": "SavingsPlan", + "properties": { + "firstConsumptionDate": "2022-10-18T00:00:00Z", + "lastConsumptionDate": "2022-10-25T00:00:00Z", + "lookBackPeriod": "Last7Days", + "totalHours": 168, + "usage": { + "usageGrain": "Hourly", + "charges": [ + 1.0, + 1.0, + 0.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 2.0, + 2.0, + 2.0, + 2.0 + ] + }, + "armSkuName": "Compute_Savings_Plan", + "term": "P1Y", + "commitmentGranularity": "Hourly", + "currencyCode": "USD", + "costWithoutBenefit": 218.267, + "scope": "Shared", + "recommendationDetails": { + "averageUtilizationPercentage": 99.330, + "coveragePercentage": 54.609, + "commitmentAmount": 0.164, + "overageCost": 144.841, + "benefitCost": 52.002, + "savingsAmount": 21.424, + "savingsPercentage": 9.815, + "totalCost": 196.843, + "wastageCost": 0.035 + }, + "allRecommendationDetails": { + "value": [ + { + "averageUtilizationPercentage": 99.330, + "coveragePercentage": 54.609, + "commitmentAmount": 0.164, + "overageCost": 144.841, + "benefitCost": 52.002, + "savingsAmount": 21.424, + "savingsPercentage": 9.815, + "totalCost": 196.843, + "wastageCost": 0.035 + }, + { + "averageUtilizationPercentage": 81.474, + "coveragePercentage": 56.748, + "commitmentAmount": 0.161, + "overageCost": 120.389, + "benefitCost": 83.754, + "savingsAmount": 14.124, + "savingsPercentage": 6.470, + "totalCost": 204.143, + "wastageCost": 0.100 + } + ] + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByBillingAccount.json new file mode 100644 index 000000000000..b0083867aca9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByBillingAccount.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "8099099", + "benefitUtilizationSummariesRequest": { + "kind": "Reservation", + "endDate": "2022-08-31T00:00:00Z", + "startDate": "2022-06-01T00:00:00Z", + "grain": "Daily" + } + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/8099099/providers/Microsoft.CostManagement/benefitUtilizationSummariesOperationResults/cf9f95c9-af6b-41dd-a622-e6f4fc60c3ee?api-version=2023-03-01", + "Retry-After": "60" + } + }, + "200": { + "body": { + "input": { + "grain": "Daily", + "billingAccountId": "8099099", + "kind": "Reservation", + "endDate": "2022-08-31T00:00:00Z", + "startDate": "2022-06-01T00:00:00Z" + }, + "status": "Complete", + "properties": { + "reportUrl": "https://storage.blob.core.windows.net/details/20220611/00000000-0000-0000-0000-000000000000?sv=2016-05-31&sr=b&sig=jep8HT2aphfUkyERRZa5LRfd9RPzjXbzB%2F9TNiQ", + "secondaryReportUrl": "https://storage-secondary.blob.core.windows.net/details/20220611/00000000-0000-0000-0000-000000000000?sv=2016-05-31&sr=b&sig=jep8HT2aphfUkyERRZa5LRfd9RPzjXbzB%2F9TNiQ", + "validUntil": "2022-06-12T02:56:55.5021869Z" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByBillingProfile.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByBillingProfile.json new file mode 100644 index 000000000000..81fc6da0b055 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByBillingProfile.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "00000000-0000-0000-0000-000000000000", + "billingProfileId": "CZSFR-SDFXC-DSDF", + "benefitUtilizationSummariesRequest": { + "kind": "Reservation", + "endDate": "2022-08-31T00:00:00Z", + "startDate": "2022-06-01T00:00:00Z", + "grain": "Daily" + } + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000/billingProfiles/CZSFR-SDFXC-DSDF/providers/Microsoft.CostManagement/benefitUtilizationSummariesOperationResults/cf9f95c9-af6b-41dd-a622-e6f4fc60c3ee?api-version=2023-03-01", + "Retry-After": "60" + } + }, + "200": { + "body": { + "input": { + "grain": "Daily", + "billingAccountId": "00000000-0000-0000-0000-000000000000", + "billingProfileId": "CZSFR-SDFXC-DSDF", + "kind": "Reservation", + "endDate": "2022-08-31T00:00:00Z", + "startDate": "2022-06-01T00:00:00Z" + }, + "status": "Complete", + "properties": { + "reportUrl": "https://storage.blob.core.windows.net/details/20220611/00000000-0000-0000-0000-000000000000?sv=2016-05-31&sr=b&sig=jep8HT2aphfUkyERRZa5LRfd9RPzjXbzB%2F9TNiQ", + "secondaryReportUrl": "https://storage-secondary.blob.core.windows.net/details/20220611/00000000-0000-0000-0000-000000000000?sv=2016-05-31&sr=b&sig=jep8HT2aphfUkyERRZa5LRfd9RPzjXbzB%2F9TNiQ", + "validUntil": "2022-06-12T02:56:55.5021869Z" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByReservation.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByReservation.json new file mode 100644 index 000000000000..aaa20b00d24e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByReservation.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "reservationOrderId": "00000000-0000-0000-0000-000000000000", + "reservationId": "00000000-0000-0000-0000-000000000000", + "benefitUtilizationSummariesRequest": { + "endDate": "2022-08-31T00:00:00Z", + "startDate": "2022-06-01T00:00:00Z", + "grain": "Daily" + } + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Capacity/reservationorders/00000000-0000-0000-0000-000000000000/reservations/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/benefitUtilizationSummariesOperationResults/cf9f95c9-af6b-41dd-a622-e6f4fc60c3ee?api-version=2023-03-01", + "Retry-After": "60" + } + }, + "200": { + "body": { + "input": { + "grain": "Daily", + "benefitOrderId": "00000000-0000-0000-0000-000000000000", + "benefitId": "00000000-0000-0000-0000-000000000000", + "kind": "Reservation", + "endDate": "2022-08-31T00:00:00Z", + "startDate": "2022-06-01T00:00:00Z" + }, + "status": "Complete", + "properties": { + "reportUrl": "https://storage.blob.core.windows.net/details/20220611/00000000-0000-0000-0000-000000000000?sv=2016-05-31&sr=b&sig=jep8HT2aphfUkyERRZa5LRfd9RPzjXbzB%2F9TNiQ", + "secondaryReportUrl": "https://storage-secondary.blob.core.windows.net/details/20220611/00000000-0000-0000-0000-000000000000?sv=2016-05-31&sr=b&sig=jep8HT2aphfUkyERRZa5LRfd9RPzjXbzB%2F9TNiQ", + "validUntil": "2022-06-12T02:56:55.5021869Z" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByReservationOrder.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByReservationOrder.json new file mode 100644 index 000000000000..13d7325c6100 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByReservationOrder.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "reservationOrderId": "00000000-0000-0000-0000-000000000000", + "benefitUtilizationSummariesRequest": { + "endDate": "2022-08-31T00:00:00Z", + "startDate": "2022-06-01T00:00:00Z", + "grain": "Daily" + } + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Capacity/reservationorders/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/benefitUtilizationSummariesOperationResults/cf9f95c9-af6b-41dd-a622-e6f4fc60c3ee?api-version=2023-03-01", + "Retry-After": "60" + } + }, + "200": { + "body": { + "input": { + "grain": "Daily", + "benefitOrderId": "00000000-0000-0000-0000-000000000000", + "kind": "Reservation", + "endDate": "2022-08-31T00:00:00Z", + "startDate": "2022-06-01T00:00:00Z" + }, + "status": "Complete", + "properties": { + "reportUrl": "https://storage.blob.core.windows.net/details/20220611/00000000-0000-0000-0000-000000000000?sv=2016-05-31&sr=b&sig=jep8HT2aphfUkyERRZa5LRfd9RPzjXbzB%2F9TNiQ", + "secondaryReportUrl": "https://storage-secondary.blob.core.windows.net/details/20220611/00000000-0000-0000-0000-000000000000?sv=2016-05-31&sr=b&sig=jep8HT2aphfUkyERRZa5LRfd9RPzjXbzB%2F9TNiQ", + "validUntil": "2022-06-12T02:56:55.5021869Z" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportBySavingsPlan.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportBySavingsPlan.json new file mode 100644 index 000000000000..77f66eb244c9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportBySavingsPlan.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "savingsPlanOrderId": "00000000-0000-0000-0000-000000000000", + "savingsPlanId": "00000000-0000-0000-0000-000000000000", + "benefitUtilizationSummariesRequest": { + "endDate": "2022-08-31T00:00:00Z", + "startDate": "2022-06-01T00:00:00Z", + "grain": "Daily" + } + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Capacity/savingsPlanOrders/00000000-0000-0000-0000-000000000000/savingsPlans/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/benefitUtilizationSummariesOperationResults/cf9f95c9-af6b-41dd-a622-e6f4fc60c3ee?api-version=2023-03-01", + "Retry-After": "60" + } + }, + "200": { + "body": { + "input": { + "grain": "Daily", + "benefitOrderId": "00000000-0000-0000-0000-000000000000", + "benefitId": "00000000-0000-0000-0000-000000000000", + "kind": "SavingsPlan", + "endDate": "2022-08-31T00:00:00Z", + "startDate": "2022-06-01T00:00:00Z" + }, + "status": "Complete", + "properties": { + "reportUrl": "https://storage.blob.core.windows.net/details/20220611/00000000-0000-0000-0000-000000000000?sv=2016-05-31&sr=b&sig=jep8HT2aphfUkyERRZa5LRfd9RPzjXbzB%2F9TNiQ", + "secondaryReportUrl": "https://storage-secondary.blob.core.windows.net/details/20220611/00000000-0000-0000-0000-000000000000?sv=2016-05-31&sr=b&sig=jep8HT2aphfUkyERRZa5LRfd9RPzjXbzB%2F9TNiQ", + "validUntil": "2022-06-12T02:56:55.5021869Z" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportBySavingsPlanOrder.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportBySavingsPlanOrder.json new file mode 100644 index 000000000000..585030123406 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportBySavingsPlanOrder.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "savingsPlanOrderId": "00000000-0000-0000-0000-000000000000", + "benefitUtilizationSummariesRequest": { + "endDate": "2022-08-31T00:00:00Z", + "startDate": "2022-06-01T00:00:00Z", + "grain": "Daily" + } + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.BillingBenefits/savingsPlanOrders/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/benefitUtilizationSummariesOperationResults/cf9f95c9-af6b-41dd-a622-e6f4fc60c3ee?api-version=2023-03-01", + "Retry-After": "60" + } + }, + "200": { + "body": { + "input": { + "grain": "Daily", + "benefitOrderId": "00000000-0000-0000-0000-000000000000", + "kind": "SavingsPlan", + "endDate": "2022-08-31T00:00:00Z", + "startDate": "2022-06-01T00:00:00Z" + }, + "status": "Complete", + "properties": { + "reportUrl": "https://storage.blob.core.windows.net/details/20220611/00000000-0000-0000-0000-000000000000?sv=2016-05-31&sr=b&sig=jep8HT2aphfUkyERRZa5LRfd9RPzjXbzB%2F9TNiQ", + "secondaryReportUrl": "https://storage-secondary.blob.core.windows.net/details/20220611/00000000-0000-0000-0000-000000000000?sv=2016-05-31&sr=b&sig=jep8HT2aphfUkyERRZa5LRfd9RPzjXbzB%2F9TNiQ", + "validUntil": "2022-06-12T02:56:55.5021869Z" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/SavingsPlan-BillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/SavingsPlan-BillingAccount.json new file mode 100644 index 000000000000..7bbbe5f0d7d4 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/SavingsPlan-BillingAccount.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "12345", + "filter": "properties/usageDate ge 2022-10-15 and properties/usageDate le 2022-10-18", + "grain": "Daily" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/billingAccounts/12345/providers/Microsoft.CostManagement/benefitUtilizationSummaries/66cccc66-6ccc-6c66-666c-66cc6c6c66c6_222d22dd-d2d2-2dd2-222d-2dd2222ddddd_20211116", + "kind": "SavingsPlan", + "name": "66cccc66-6ccc-6c66-666c-66cc6c6c66c6_222d22dd-d2d2-2dd2-222d-2dd2222ddddd_20211116", + "type": "Microsoft.CostManagement/benefitUtilizationSummaries", + "properties": { + "armSkuName": "Compute_Savings_Plan", + "avgUtilizationPercentage": 90, + "benefitOrderId": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/66cccc66-6ccc-6c66-666c-66cc6c6c66c6", + "benefitId": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/66cccc66-6ccc-6c66-666c-66cc6c6c66c6/savingsPlans/222d22dd-d2d2-2dd2-222d-2dd2222ddddd", + "benefitType": "SavingsPlan", + "maxUtilizationPercentage": 100, + "minUtilizationPercentage": 80, + "usageDate": "2022-10-16T00:00:00Z" + } + }, + { + "id": "/providers/Microsoft.Billing/billingAccounts/12345/providers/Microsoft.CostManagement/benefitUtilizationSummaries/88cccc88-8ccc-8c88-888c-88cc8c8c88c8_444d44dd-d4d4-4dd4-444d-4dd4444ddddd_20211117", + "kind": "SavingsPlan", + "name": "88cccc88-8ccc-8c88-888c-88cc8c8c88c8_444d44dd-d4d4-4dd4-444d-4dd4444ddddd_20211117", + "type": "Microsoft.CostManagement/benefitUtilizationSummaries", + "properties": { + "armSkuName": "Compute_Savings_Plan", + "avgUtilizationPercentage": 60, + "benefitOrderId": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/88cccc88-8ccc-8c88-888c-88cc8c8c88c8", + "benefitId": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/88cccc88-8ccc-8c88-888c-88cc8c8c88c8/savingsPlans/444d44dd-d4d4-4dd4-444d-4dd4444ddddd", + "benefitType": "SavingsPlan", + "maxUtilizationPercentage": 70, + "minUtilizationPercentage": 50, + "usageDate": "2022-10-17T00:00:00Z" + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/SavingsPlan-BillingProfile.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/SavingsPlan-BillingProfile.json new file mode 100644 index 000000000000..9b30dbbcb3d1 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/SavingsPlan-BillingProfile.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "c0a00000-0e04-5ee3-000e-f0c6e00000ec:c0a00000-0e04-5ee3-000e-f0c6e00000ec", + "billingProfileId": "200e5e90-000e-4960-8dcd-8d00a02db000", + "filter": "properties/usageDate ge 2022-10-15 and properties/usageDate le 2022-10-18", + "grain": "Daily" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Billing/billingAccounts/c0a00000-0e04-5ee3-000e-f0c6e00000ec:c0a00000-0e04-5ee3-000e-f0c6e00000ec/billingProfiles/200e5e90-000e-4960-8dcd-8d00a02db000/providers/Microsoft.CostManagement/benefitUtilizationSummaries/66cccc66-6ccc-6c66-666c-66cc6c6c66c6_222d22dd-d2d2-2dd2-222d-2dd2222ddddd_20211116", + "kind": "SavingsPlan", + "name": "66cccc66-6ccc-6c66-666c-66cc6c6c66c6_222d22dd-d2d2-2dd2-222d-2dd2222ddddd_20211116", + "type": "Microsoft.CostManagement/benefitUtilizationSummaries", + "properties": { + "armSkuName": "Compute_Savings_Plan", + "avgUtilizationPercentage": 90, + "benefitOrderId": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/66cccc66-6ccc-6c66-666c-66cc6c6c66c6", + "benefitId": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/66cccc66-6ccc-6c66-666c-66cc6c6c66c6/savingsPlans/222d22dd-d2d2-2dd2-222d-2dd2222ddddd", + "benefitType": "SavingsPlan", + "maxUtilizationPercentage": 100, + "minUtilizationPercentage": 80, + "usageDate": "2022-10-16T00:00:00Z" + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/SavingsPlan-SavingsPlanId-Monthly.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/SavingsPlan-SavingsPlanId-Monthly.json new file mode 100644 index 000000000000..e0d7d7c1f149 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/SavingsPlan-SavingsPlanId-Monthly.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "savingsPlanOrderId": "66cccc66-6ccc-6c66-666c-66cc6c6c66c6", + "savingsPlanId": "222d22dd-d2d2-2dd2-222d-2dd2222ddddd", + "filter": "properties/usageDate ge 2022-10-15 and properties/usageDate le 2022-10-18", + "grain": "Monthly" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/66cccc66-6ccc-6c66-666c-66cc6c6c66c6/savingsPlans/222d22dd-d2d2-2dd2-222d-2dd2222ddddd/providers/Microsoft.CostManagement/benefitUtilizationSummaries/66cccc66-6ccc-6c66-666c-66cc6c6c66c6_222d22dd-d2d2-2dd2-222d-2dd2222ddddd_202111", + "kind": "SavingsPlan", + "name": "66cccc66-6ccc-6c66-666c-66cc6c6c66c6_222d22dd-d2d2-2dd2-222d-2dd2222ddddd_202111", + "type": "Microsoft.CostManagement/benefitUtilizationSummaries", + "properties": { + "armSkuName": "Compute_Savings_Plan", + "avgUtilizationPercentage": 90, + "benefitOrderId": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/66cccc66-6ccc-6c66-666c-66cc6c6c66c6", + "benefitId": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/66cccc66-6ccc-6c66-666c-66cc6c6c66c6/savingsPlans/222d22dd-d2d2-2dd2-222d-2dd2222ddddd", + "benefitType": "SavingsPlan", + "maxUtilizationPercentage": 100, + "minUtilizationPercentage": 80, + "usageDate": "2022-10-16T00:00:00Z" + } + }, + { + "id": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/66cccc66-6ccc-6c66-666c-66cc6c6c66c6/savingsPlans/222d22dd-d2d2-2dd2-222d-2dd2222ddddd/providers/Microsoft.CostManagement/benefitUtilizationSummaries/66cccc66-6ccc-6c66-666c-66cc6c6c66c6_222d22dd-d2d2-2dd2-222d-2dd2222ddddd_202112", + "kind": "SavingsPlan", + "name": "66cccc66-6ccc-6c66-666c-66cc6c6c66c6_222d22dd-d2d2-2dd2-222d-2dd2222ddddd_202112", + "type": "Microsoft.CostManagement/benefitUtilizationSummaries", + "properties": { + "armSkuName": "Compute_Savings_Plan", + "avgUtilizationPercentage": 80, + "benefitOrderId": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/66cccc66-6ccc-6c66-666c-66cc6c6c66c6", + "benefitId": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/66cccc66-6ccc-6c66-666c-66cc6c6c66c6/savingsPlans/222d22dd-d2d2-2dd2-222d-2dd2222ddddd", + "benefitType": "SavingsPlan", + "maxUtilizationPercentage": 90, + "minUtilizationPercentage": 70, + "usageDate": "2022-10-17T00:00:00Z" + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/SavingsPlan-SavingsPlanOrderId-Daily.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/SavingsPlan-SavingsPlanOrderId-Daily.json new file mode 100644 index 000000000000..8668093b9ef7 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BenefitUtilizationSummaries/SavingsPlan-SavingsPlanOrderId-Daily.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "savingsPlanOrderId": "66cccc66-6ccc-6c66-666c-66cc6c6c66c6", + "filter": "properties/usageDate ge 2022-10-15 and properties/usageDate le 2022-10-18", + "grain": "Daily" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/66cccc66-6ccc-6c66-666c-66cc6c6c66c6/providers/Microsoft.CostManagement/benefitUtilizationSummaries/66cccc66-6ccc-6c66-666c-66cc6c6c66c6_222d22dd-d2d2-2dd2-222d-2dd2222ddddd_20211116", + "kind": "SavingsPlan", + "name": "66cccc66-6ccc-6c66-666c-66cc6c6c66c6_222d22dd-d2d2-2dd2-222d-2dd2222ddddd_20211116", + "type": "Microsoft.CostManagement/benefitUtilizationSummaries", + "properties": { + "armSkuName": "Compute_Savings_Plan", + "avgUtilizationPercentage": 90, + "benefitOrderId": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/66cccc66-6ccc-6c66-666c-66cc6c6c66c6", + "benefitId": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/66cccc66-6ccc-6c66-666c-66cc6c6c66c6/savingsPlans/222d22dd-d2d2-2dd2-222d-2dd2222ddddd", + "benefitType": "SavingsPlan", + "maxUtilizationPercentage": 100, + "minUtilizationPercentage": 80, + "usageDate": "2022-10-16T00:00:00Z" + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BillingAccountAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BillingAccountAlerts.json new file mode 100644 index 000000000000..595351568def --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BillingAccountAlerts.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "api-version": "2023-03-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/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/stable/2023-03-01/examples/BillingAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BillingAccountDimensionsList.json new file mode 100644 index 000000000000..f99a7cf56982 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BillingAccountDimensionsList.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2023-03-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": [ + "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", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "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/stable/2023-03-01/examples/BillingAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BillingAccountDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..cccdff09df8f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BillingAccountDimensionsListExpandAndTop.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/BillingAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BillingAccountDimensionsListWithFilter.json new file mode 100644 index 000000000000..7a72e1c35632 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BillingAccountDimensionsListWithFilter.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/BillingAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BillingAccountForecast.json new file mode 100644 index 000000000000..bcd3ccc5a612 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BillingAccountForecast.json @@ -0,0 +1,120 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "12345:6789", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789", + "parameters": { + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2022-08-01T00:00:00+00:00", + "to": "2022-08-31T23:59:59+00:00" + }, + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "Cost", + "function": "Sum" + } + }, + "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/stable/2023-03-01/examples/BillingAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BillingAccountQuery.json new file mode 100644 index 000000000000..7368afac675d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BillingAccountQuery.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/BillingAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BillingAccountQueryGrouping.json new file mode 100644 index 000000000000..ff3c0e605e06 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BillingAccountQueryGrouping.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/BillingProfileAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BillingProfileAlerts.json new file mode 100644 index 000000000000..2cc1f371f561 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BillingProfileAlerts.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2023-03-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/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/stable/2023-03-01/examples/BillingProfileForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BillingProfileForecast.json new file mode 100644 index 000000000000..9322b90d4c5e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/BillingProfileForecast.json @@ -0,0 +1,121 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579", + "parameters": { + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2022-08-01T00:00:00+00:00", + "to": "2022-08-31T23:59:59+00:00" + }, + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "Cost", + "function": "Sum" + } + }, + "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/stable/2023-03-01/examples/CostDetailsOperationResultsBySubscriptionScope.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/CostDetailsOperationResultsBySubscriptionScope.json new file mode 100644 index 000000000000..8372f7233e46 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/CostDetailsOperationResultsBySubscriptionScope.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "operationId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/costDetailsOperationResults/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "status": "Completed", + "manifest": { + "manifestVersion": "2023-03-01", + "dataFormat": "Csv", + "blobCount": 1, + "byteCount": 32741, + "compressData": false, + "requestContext": { + "requestScope": "subscriptions/00000000-0000-0000-0000-000000000000", + "requestBody": { + "metric": "ActualCost", + "timePeriod": { + "start": "2020-03-01", + "end": "2020-03-15" + } + } + }, + "blobs": [ + { + "blobLink": "https://ccmreportstorageeastus.blob.core.windows.net/armreports/00000/00000000-0000-0000-0000-000000000000?sv=2020-05-31&sr=b&sig=abcd", + "byteCount": 32741 + } + ] + }, + "validTill": "2022-05-10T08:08:46.1973252Z" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/costDetailsOperationResults/00000000-0000-0000-0000-000000000000?api-version=2023-03-01", + "Retry-After": "60" + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/DepartmentAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/DepartmentAlerts.json new file mode 100644 index 000000000000..6184e6454724 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/DepartmentAlerts.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "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/stable/2023-03-01/examples/DepartmentDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/DepartmentDimensionsList.json new file mode 100644 index 000000000000..4e7727e481ba --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/DepartmentDimensionsList.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2023-03-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": [ + "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", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31", + "type": "microsoft.CostManagement/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "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/stable/2023-03-01/examples/DepartmentDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/DepartmentDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..2d3ed4d25ac2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/DepartmentDimensionsListExpandAndTop.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/DepartmentDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/DepartmentDimensionsListWithFilter.json new file mode 100644 index 000000000000..8c5856935cb1 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/DepartmentDimensionsListWithFilter.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/DepartmentForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/DepartmentForecast.json new file mode 100644 index 000000000000..4f221943f0bb --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/DepartmentForecast.json @@ -0,0 +1,121 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "12345:6789", + "departmentId": "123", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/departments/123", + "parameters": { + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2022-08-01T00:00:00+00:00", + "to": "2022-08-31T23:59:59+00:00" + }, + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "Cost", + "function": "Sum" + } + }, + "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/stable/2023-03-01/examples/DepartmentQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/DepartmentQuery.json new file mode 100644 index 000000000000..0638f9ad0112 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/DepartmentQuery.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/DepartmentQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/DepartmentQueryGrouping.json new file mode 100644 index 000000000000..0cbe5dc2d0ba --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/DepartmentQueryGrouping.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/DismissResourceGroupAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/DismissResourceGroupAlerts.json new file mode 100644 index 000000000000..de3d9852116e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/DismissResourceGroupAlerts.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "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/stable/2023-03-01/examples/DismissSubscriptionAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/DismissSubscriptionAlerts.json new file mode 100644 index 000000000000..61b800559a74 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/DismissSubscriptionAlerts.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "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/stable/2023-03-01/examples/EnrollmentAccountAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/EnrollmentAccountAlerts.json new file mode 100644 index 000000000000..957355fc3ab2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/EnrollmentAccountAlerts.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "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/stable/2023-03-01/examples/EnrollmentAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/EnrollmentAccountDimensionsList.json new file mode 100644 index 000000000000..a7b6562243ad --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/EnrollmentAccountDimensionsList.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/EnrollmentAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/EnrollmentAccountDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..9cc2aad810d1 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/EnrollmentAccountDimensionsListExpandAndTop.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/EnrollmentAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/EnrollmentAccountDimensionsListWithFilter.json new file mode 100644 index 000000000000..bff438898aa6 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/EnrollmentAccountDimensionsListWithFilter.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/EnrollmentAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/EnrollmentAccountForecast.json new file mode 100644 index 000000000000..8d6350db5270 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/EnrollmentAccountForecast.json @@ -0,0 +1,121 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "12345:6789", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/enrollmentAccounts/456", + "parameters": { + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2022-08-01T00:00:00+00:00", + "to": "2022-08-31T23:59:59+00:00" + }, + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "Cost", + "function": "Sum" + } + }, + "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/stable/2023-03-01/examples/EnrollmentAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/EnrollmentAccountQuery.json new file mode 100644 index 000000000000..6339aad6517c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/EnrollmentAccountQuery.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/EnrollmentAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/EnrollmentAccountQueryGrouping.json new file mode 100644 index 000000000000..57fd0f12f531 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/EnrollmentAccountQueryGrouping.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/ExportCreateOrUpdateByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportCreateOrUpdateByBillingAccount.json new file mode 100644 index 000000000000..6c362814a53f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportCreateOrUpdateByBillingAccount.json @@ -0,0 +1,128 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "123456", + "scope": "providers/Microsoft.Billing/billingAccounts/123456", + "exportName": "TestExport", + "parameters": { + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportCreateOrUpdateByDepartment.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportCreateOrUpdateByDepartment.json new file mode 100644 index 000000000000..a861ad7dd911 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportCreateOrUpdateByDepartment.json @@ -0,0 +1,129 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "12", + "departmentId": "1234", + "scope": "providers/Microsoft.Billing/billingAccounts/12/departments/1234", + "exportName": "TestExport", + "parameters": { + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportCreateOrUpdateByEnrollmentAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportCreateOrUpdateByEnrollmentAccount.json new file mode 100644 index 000000000000..984f954e0e95 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportCreateOrUpdateByEnrollmentAccount.json @@ -0,0 +1,129 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", + "exportName": "TestExport", + "parameters": { + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportCreateOrUpdateByManagementGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportCreateOrUpdateByManagementGroup.json new file mode 100644 index 000000000000..458313e6e879 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportCreateOrUpdateByManagementGroup.json @@ -0,0 +1,128 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "managementGroupId": "TestMG", + "scope": "providers/Microsoft.Management/managementGroups/TestMG", + "exportName": "TestExport", + "parameters": { + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "200": { + "body": { + "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportCreateOrUpdateByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportCreateOrUpdateByResourceGroup.json new file mode 100644 index 000000000000..c0dd6b8e6836 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportCreateOrUpdateByResourceGroup.json @@ -0,0 +1,129 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "exportName": "TestExport", + "parameters": { + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportCreateOrUpdateBySubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportCreateOrUpdateBySubscription.json new file mode 100644 index 000000000000..9386bdb5effc --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportCreateOrUpdateBySubscription.json @@ -0,0 +1,128 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "exportName": "TestExport", + "parameters": { + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "MonthToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportDeleteByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportDeleteByBillingAccount.json new file mode 100644 index 000000000000..c84aecc5c40d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportDeleteByBillingAccount.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "123456", + "scope": "providers/Microsoft.Billing/billingAccounts/123456", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportDeleteByDepartment.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportDeleteByDepartment.json new file mode 100644 index 000000000000..5deee60f66e2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportDeleteByDepartment.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "12", + "departmentId": "1234", + "scope": "providers/Microsoft.Billing/billingAccounts/12/departments/1234", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportDeleteByEnrollmentAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportDeleteByEnrollmentAccount.json new file mode 100644 index 000000000000..864e756fd0cc --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportDeleteByEnrollmentAccount.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportDeleteByManagementGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportDeleteByManagementGroup.json new file mode 100644 index 000000000000..cd8558299d3c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportDeleteByManagementGroup.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "managementGroupId": "TestMG", + "scope": "providers/Microsoft.Management/managementGroups/TestMG", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportDeleteByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportDeleteByResourceGroup.json new file mode 100644 index 000000000000..98366316d22e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportDeleteByResourceGroup.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportDeleteBySubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportDeleteBySubscription.json new file mode 100644 index 000000000000..892829a173ad --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportDeleteBySubscription.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportGetByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportGetByBillingAccount.json new file mode 100644 index 000000000000..6bebb10a22de --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportGetByBillingAccount.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "123456", + "scope": "providers/Microsoft.Billing/billingAccounts/123456", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/{billingAccount-Id}/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-05-01T00:00:00Z", + "to": "2020-05-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportGetByDepartment.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportGetByDepartment.json new file mode 100644 index 000000000000..fcca19bd9281 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportGetByDepartment.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "12", + "departmentId": "1234", + "scope": "providers/Microsoft.Billing/billingAccounts/12/departments/1234", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-06-30T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportGetByEnrollmentAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportGetByEnrollmentAccount.json new file mode 100644 index 000000000000..5d05559eaf3e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportGetByEnrollmentAccount.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2019-09-01T00:00:00Z", + "to": "2019-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportGetByManagementGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportGetByManagementGroup.json new file mode 100644 index 000000000000..a84a39721436 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportGetByManagementGroup.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "managementGroupId": "TestMG", + "scope": "providers/Microsoft.Management/managementGroups/TestMG", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2019-09-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "UsageDate", + "MeterId", + "InstanceId", + "ResourceLocation", + "UsageQuantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportGetByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportGetByResourceGroup.json new file mode 100644 index 000000000000..82f6d5316ea0 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportGetByResourceGroup.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-06-30T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportGetBySubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportGetBySubscription.json new file mode 100644 index 000000000000..62b7a40f399d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportGetBySubscription.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport", + "name": "TestExport", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2019-06-01T00:00:00Z", + "to": "2019-07-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunByBillingAccount.json new file mode 100644 index 000000000000..c84aecc5c40d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunByBillingAccount.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "123456", + "scope": "providers/Microsoft.Billing/billingAccounts/123456", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunByDepartment.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunByDepartment.json new file mode 100644 index 000000000000..5deee60f66e2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunByDepartment.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "12", + "departmentId": "1234", + "scope": "providers/Microsoft.Billing/billingAccounts/12/departments/1234", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunByEnrollmentAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunByEnrollmentAccount.json new file mode 100644 index 000000000000..864e756fd0cc --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunByEnrollmentAccount.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunByManagementGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunByManagementGroup.json new file mode 100644 index 000000000000..cd8558299d3c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunByManagementGroup.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "managementGroupId": "TestMG", + "scope": "providers/Microsoft.Management/managementGroups/TestMG", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunByResourceGroup.json new file mode 100644 index 000000000000..98366316d22e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunByResourceGroup.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunBySubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunBySubscription.json new file mode 100644 index 000000000000..892829a173ad --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunBySubscription.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "exportName": "TestExport" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunHistoryGetByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunHistoryGetByBillingAccount.json new file mode 100644 index 000000000000..bc8c04082469 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunHistoryGetByBillingAccount.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "123456", + "scope": "providers/Microsoft.Billing/billingAccounts/123456", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/{billingAccount-id}/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100", + "properties": { + "executionType": "OnDemand", + "status": "Completed", + "submittedBy": "john.doe@gmail.com", + "submittedTime": "2018-08-03T07:52:15.6016681Z", + "processingStartTime": "2018-08-03T07:52:16.9123797Z", + "processingEndTime": "2018-08-03T07:52:28.0373318Z", + "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/{billingAccount-id}/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef", + "properties": { + "executionType": "Scheduled", + "status": "Completed", + "submittedBy": "System", + "submittedTime": "2018-08-03T09:03:58.5710244Z", + "processingStartTime": "2018-08-03T09:03:58.5710244Z", + "processingEndTime": "2018-08-03T09:04:19.7223808Z", + "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunHistoryGetByDepartment.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunHistoryGetByDepartment.json new file mode 100644 index 000000000000..e3456fc5d628 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunHistoryGetByDepartment.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "12", + "departmentId": "1234", + "scope": "providers/Microsoft.Billing/billingAccounts/12/departments/1234", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100", + "properties": { + "executionType": "OnDemand", + "status": "Completed", + "submittedBy": "john.doe@gmail.com", + "submittedTime": "2018-08-03T07:52:15.6016681Z", + "processingStartTime": "2018-08-03T07:52:16.9123797Z", + "processingEndTime": "2018-08-03T07:52:28.0373318Z", + "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef", + "properties": { + "executionType": "Scheduled", + "status": "Completed", + "submittedBy": "System", + "submittedTime": "2018-08-03T09:03:58.5710244Z", + "processingStartTime": "2018-08-03T09:03:58.5710244Z", + "processingEndTime": "2018-08-03T09:04:19.7223808Z", + "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunHistoryGetByEnrollmentAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunHistoryGetByEnrollmentAccount.json new file mode 100644 index 000000000000..9d095b3535cd --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunHistoryGetByEnrollmentAccount.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "scope": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100", + "properties": { + "executionType": "OnDemand", + "status": "Completed", + "submittedBy": "john.doe@gmail.com", + "submittedTime": "2018-08-03T07:52:15.6016681Z", + "processingStartTime": "2018-08-03T07:52:16.9123797Z", + "processingEndTime": "2018-08-03T07:52:28.0373318Z", + "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef", + "properties": { + "executionType": "Scheduled", + "status": "Completed", + "submittedBy": "System", + "submittedTime": "2018-08-03T09:03:58.5710244Z", + "processingStartTime": "2018-08-03T09:03:58.5710244Z", + "processingEndTime": "2018-08-03T09:04:19.7223808Z", + "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunHistoryGetByManagementGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunHistoryGetByManagementGroup.json new file mode 100644 index 000000000000..8f0f7c36a44e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunHistoryGetByManagementGroup.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "managementGroupId": "TestMG", + "scope": "providers/Microsoft.Management/managementGroups/TestMG", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100", + "properties": { + "executionType": "OnDemand", + "status": "Completed", + "submittedBy": "john.doe@gmail.com", + "submittedTime": "2018-08-03T07:52:15.6016681Z", + "processingStartTime": "2018-08-03T07:52:16.9123797Z", + "processingEndTime": "2018-08-03T07:52:28.0373318Z", + "fileName": "ScheduledForTestExport/TestExportSchedule/20180729-20180804/TestExportSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + { + "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef", + "properties": { + "executionType": "Scheduled", + "status": "Completed", + "submittedBy": "System", + "submittedTime": "2018-08-03T09:03:58.5710244Z", + "processingStartTime": "2018-08-03T09:03:58.5710244Z", + "processingEndTime": "2018-08-03T09:04:19.7223808Z", + "fileName": "ScheduledForTestExport/TestExportSchedule/20180729-20180804/TestExportSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunHistoryGetByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunHistoryGetByResourceGroup.json new file mode 100644 index 000000000000..a7589c61e2c6 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunHistoryGetByResourceGroup.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100", + "properties": { + "executionType": "OnDemand", + "status": "Completed", + "submittedBy": "john.doe@gmail.com", + "submittedTime": "2018-08-03T07:52:15.6016681Z", + "processingStartTime": "2018-08-03T07:52:16.9123797Z", + "processingEndTime": "2018-08-03T07:52:28.0373318Z", + "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef", + "properties": { + "executionType": "Scheduled", + "status": "Completed", + "submittedBy": "System", + "submittedTime": "2018-08-03T09:03:58.5710244Z", + "processingStartTime": "2018-08-03T09:03:58.5710244Z", + "processingEndTime": "2018-08-03T09:04:19.7223808Z", + "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunHistoryGetBySubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunHistoryGetBySubscription.json new file mode 100644 index 000000000000..4c95c4a6c261 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportRunHistoryGetBySubscription.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "exportName": "TestExport" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100", + "properties": { + "executionType": "OnDemand", + "status": "Completed", + "submittedBy": "john.doe@gmail.com", + "submittedTime": "2018-08-03T07:52:15.6016681Z", + "processingStartTime": "2018-08-03T07:52:16.9123797Z", + "processingEndTime": "2018-08-03T07:52:28.0373318Z", + "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef", + "properties": { + "executionType": "Scheduled", + "status": "Completed", + "submittedBy": "System", + "submittedTime": "2018-08-03T09:03:58.5710244Z", + "processingStartTime": "2018-08-03T09:03:58.5710244Z", + "processingEndTime": "2018-08-03T09:04:19.7223808Z", + "fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv", + "runSettings": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ScheduledTestsForJohnDoe" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportsGetByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportsGetByBillingAccount.json new file mode 100644 index 000000000000..40e1d9ed9e62 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportsGetByBillingAccount.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "123456", + "scope": "providers/Microsoft.Billing/billingAccounts/123456" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport1", + "name": "TestExport1", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport2", + "name": "TestExport2", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "WeekToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportsGetByDepartment.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportsGetByDepartment.json new file mode 100644 index 000000000000..abd98b2cfb92 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportsGetByDepartment.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "12", + "departmentId": "1234", + "scope": "providers/Microsoft.Billing/billingAccounts/12/departments/123" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport1", + "name": "TestExport1", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport2", + "name": "TestExport2", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "WeekToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportsGetByEnrollmentAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportsGetByEnrollmentAccount.json new file mode 100644 index 000000000000..4397aba31991 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportsGetByEnrollmentAccount.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2023-03-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/exports/TestExport1", + "name": "TestExport1", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport2", + "name": "TestExport2", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "WeekToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportsGetByManagementGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportsGetByManagementGroup.json new file mode 100644 index 000000000000..c3559024fe47 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportsGetByManagementGroup.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "managementGroupId": "TestMG", + "scope": "providers/Microsoft.Management/managementGroups/TestMG" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport1", + "name": "TestExport1", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + }, + { + "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport2", + "name": "TestExport2", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "WeekToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportsGetByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportsGetByResourceGroup.json new file mode 100644 index 000000000000..244bfe71f093 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportsGetByResourceGroup.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "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/exports/TestExport1", + "name": "TestExport1", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport2", + "name": "TestExport2", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "WeekToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportsGetBySubscription.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportsGetBySubscription.json new file mode 100644 index 000000000000..9318bf94c43b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExportsGetBySubscription.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "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/exports/TestExport1", + "name": "TestExport1", + "type": "Microsoft.CostManagement/exports", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "Custom", + "timePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + }, + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport2", + "name": "TestExport2", + "type": "Microsoft.CostManagement/exports", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2020-06-01T00:00:00Z", + "to": "2020-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "exports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "ActualCost", + "timeframe": "WeekToDate", + "dataSet": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "ResourceId", + "ResourceLocation", + "Quantity" + ] + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExternalBillingAccountAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExternalBillingAccountAlerts.json new file mode 100644 index 000000000000..82a6dfc82c88 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExternalBillingAccountAlerts.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "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/stable/2023-03-01/examples/ExternalBillingAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExternalBillingAccountForecast.json new file mode 100644 index 000000000000..02afa4f7d2ae --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExternalBillingAccountForecast.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "externalCloudProviderId": "100", + "externalCloudProviderType": "externalBillingAccounts", + "parameters": { + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2022-08-01T00:00:00+00:00", + "to": "2022-08-31T23:59:59+00:00" + }, + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "Cost", + "function": "Sum" + } + }, + "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/stable/2023-03-01/examples/ExternalBillingAccountsDimensions.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExternalBillingAccountsDimensions.json new file mode 100644 index 000000000000..32f3e51b75cc --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExternalBillingAccountsDimensions.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2023-03-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": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "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": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "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/stable/2023-03-01/examples/ExternalBillingAccountsQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExternalBillingAccountsQuery.json new file mode 100644 index 000000000000..ee5d2a096d40 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExternalBillingAccountsQuery.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/ExternalSubscriptionAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExternalSubscriptionAlerts.json new file mode 100644 index 000000000000..85a68d783c0b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExternalSubscriptionAlerts.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "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/stable/2023-03-01/examples/ExternalSubscriptionForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExternalSubscriptionForecast.json new file mode 100644 index 000000000000..b773b574dc65 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExternalSubscriptionForecast.json @@ -0,0 +1,92 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "externalCloudProviderId": "100", + "externalCloudProviderType": "externalSubscriptions", + "parameters": { + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2022-08-01T00:00:00+00:00", + "to": "2022-08-31T23:59:59+00:00" + }, + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "Cost", + "function": "Sum" + } + }, + "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/stable/2023-03-01/examples/ExternalSubscriptionsDimensions.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExternalSubscriptionsDimensions.json new file mode 100644 index 000000000000..3d9e781f8ca8 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExternalSubscriptionsDimensions.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2023-03-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": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "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": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "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/stable/2023-03-01/examples/ExternalSubscriptionsQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExternalSubscriptionsQuery.json new file mode 100644 index 000000000000..23204b334652 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ExternalSubscriptionsQuery.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/GenerateCostDetailsReportByBillingAccountEnterpriseAgreementCustomerAndBillingPeriod.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateCostDetailsReportByBillingAccountEnterpriseAgreementCustomerAndBillingPeriod.json new file mode 100644 index 000000000000..7309017f50d7 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateCostDetailsReportByBillingAccountEnterpriseAgreementCustomerAndBillingPeriod.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "scope": "providers/Microsoft.Billing/billingAccounts/12345", + "parameters": { + "metric": "ActualCost", + "billingPeriod": "202205" + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345/providers/Microsoft.CostManagement/costDetailsOperationResults/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "status": "Completed", + "manifest": { + "manifestVersion": "2023-03-01", + "dataFormat": "Csv", + "blobCount": 1, + "byteCount": 32741, + "compressData": false, + "requestContext": { + "requestScope": "providers/Microsoft.Billing/billingAccounts/12345", + "requestBody": { + "metric": "ActualCost", + "billingPeriod": "202205" + } + }, + "blobs": [ + { + "blobLink": "https://ccmreportstorageeastus.blob.core.windows.net/armreports/00000/00000000-0000-0000-0000-000000000000?sv=2020-05-31&sr=b&sig=abcd", + "byteCount": 32741 + } + ] + }, + "validTill": "2022-05-10T08:08:46.1973252Z" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345/providers/Microsoft.CostManagement/costDetailsOperationResults/00000000-0000-0000-0000-000000000000?api-version=2023-03-01", + "Retry-After": "60" + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateCostDetailsReportByBillingProfileAndInvoiceId.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateCostDetailsReportByBillingProfileAndInvoiceId.json new file mode 100644 index 000000000000..8241d4a83966 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateCostDetailsReportByBillingProfileAndInvoiceId.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579", + "parameters": { + "metric": "ActualCost", + "invoiceId": "M1234567" + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/costDetailsOperationResults/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "status": "Completed", + "manifest": { + "manifestVersion": "2023-03-01", + "dataFormat": "Csv", + "blobCount": 1, + "byteCount": 32741, + "compressData": false, + "requestContext": { + "requestScope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579", + "requestBody": { + "metric": "ActualCost", + "billingPeriod": "202205" + } + }, + "blobs": [ + { + "blobLink": "https://ccmreportstorageeastus.blob.core.windows.net/armreports/00000/00000000-0000-0000-0000-000000000000?sv=2020-05-31&sr=b&sig=abcd", + "byteCount": 32741 + } + ] + }, + "validTill": "2022-05-10T08:08:46.1973252Z" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/costDetailsOperationResults/00000000-0000-0000-0000-000000000000?api-version=2023-03-01", + "Retry-After": "60" + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateCostDetailsReportByBillingProfileAndInvoiceIdAndCustomerId.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateCostDetailsReportByBillingProfileAndInvoiceIdAndCustomerId.json new file mode 100644 index 000000000000..a6feb7e87839 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateCostDetailsReportByBillingProfileAndInvoiceIdAndCustomerId.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/13579", + "parameters": { + "metric": "ActualCost", + "invoiceId": "M1234567" + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/13579/providers/Microsoft.CostManagement/costDetailsOperationResults/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "status": "Completed", + "manifest": { + "manifestVersion": "2023-03-01", + "dataFormat": "Csv", + "blobCount": 1, + "byteCount": 32741, + "compressData": false, + "requestContext": { + "requestScope": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/13579", + "requestBody": { + "metric": "ActualCost", + "billingPeriod": "202205" + } + }, + "blobs": [ + { + "blobLink": "https://ccmreportstorageeastus.blob.core.windows.net/armreports/00000/00000000-0000-0000-0000-000000000000?sv=2020-05-31&sr=b&sig=abcd", + "byteCount": 32741 + } + ] + }, + "validTill": "2022-05-10T08:08:46.1973252Z" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/customers/13579/providers/Microsoft.CostManagement/costDetailsOperationResults/00000000-0000-0000-0000-000000000000?api-version=2023-03-01", + "Retry-After": "60" + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateCostDetailsReportByCustomerAndTimePeriod.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateCostDetailsReportByCustomerAndTimePeriod.json new file mode 100644 index 000000000000..41f35cabe9c2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateCostDetailsReportByCustomerAndTimePeriod.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/13579", + "parameters": { + "metric": "ActualCost", + "timePeriod": { + "start": "2020-03-01", + "end": "2020-03-15" + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/13579/providers/Microsoft.CostManagement/costDetailsOperationResults/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "status": "Completed", + "manifest": { + "manifestVersion": "2023-03-01", + "dataFormat": "Csv", + "blobCount": 1, + "byteCount": 32741, + "compressData": false, + "requestContext": { + "requestScope": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/13579", + "requestBody": { + "metric": "ActualCost", + "timePeriod": { + "start": "2020-03-01", + "end": "2020-03-15" + } + } + }, + "blobs": [ + { + "blobLink": "https://ccmreportstorageeastus.blob.core.windows.net/armreports/00000/00000000-0000-0000-0000-000000000000?sv=2020-05-31&sr=b&sig=abcd", + "byteCount": 32741 + } + ] + }, + "validTill": "2022-05-10T08:08:46.1973252Z" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/customers/13579/providers/Microsoft.CostManagement/costDetailsOperationResults/00000000-0000-0000-0000-000000000000?api-version=2023-03-01", + "Retry-After": "60" + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateCostDetailsReportByDepartmentsAndTimePeriod.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateCostDetailsReportByDepartmentsAndTimePeriod.json new file mode 100644 index 000000000000..42be038cd5bd --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateCostDetailsReportByDepartmentsAndTimePeriod.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "scope": "providers/Microsoft.Billing/departments/12345", + "parameters": { + "metric": "ActualCost", + "timePeriod": { + "start": "2020-03-01", + "end": "2020-03-15" + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/departments/12345/providers/Microsoft.CostManagement/costDetailsOperationResults/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "status": "Completed", + "manifest": { + "manifestVersion": "2023-03-01", + "dataFormat": "Csv", + "blobCount": 1, + "byteCount": 32741, + "compressData": false, + "requestContext": { + "requestScope": "providers/Microsoft.Billing/departments/12345", + "requestBody": { + "metric": "ActualCost", + "timePeriod": { + "start": "2020-03-01", + "end": "2020-03-15" + } + } + }, + "blobs": [ + { + "blobLink": "https://ccmreportstorageeastus.blob.core.windows.net/armreports/00000/00000000-0000-0000-0000-000000000000?sv=2020-05-31&sr=b&sig=abcd", + "byteCount": 32741 + } + ] + }, + "validTill": "2022-05-10T08:08:46.1973252Z" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/departments/12345/providers/Microsoft.CostManagement/costDetailsOperationResults/00000000-0000-0000-0000-000000000000?api-version=2023-03-01", + "Retry-After": "60" + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateCostDetailsReportByEnrollmentAccountsAndTimePeriod.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateCostDetailsReportByEnrollmentAccountsAndTimePeriod.json new file mode 100644 index 000000000000..3c7bfd085d3c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateCostDetailsReportByEnrollmentAccountsAndTimePeriod.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "scope": "providers/Microsoft.Billing/enrollmentAccounts/1234", + "parameters": { + "metric": "ActualCost", + "timePeriod": { + "start": "2020-03-01", + "end": "2020-03-15" + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Billing/enrollmentAccounts/1234/providers/Microsoft.CostManagement/costDetailsOperationResults/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "status": "Completed", + "manifest": { + "manifestVersion": "2023-03-01", + "dataFormat": "Csv", + "blobCount": 1, + "byteCount": 32741, + "compressData": false, + "requestContext": { + "requestScope": "providers/Microsoft.Billing/enrollmentAccounts/1234", + "requestBody": { + "metric": "ActualCost", + "timePeriod": { + "start": "2020-03-01", + "end": "2020-03-15" + } + } + }, + "blobs": [ + { + "blobLink": "https://ccmreportstorageeastus.blob.core.windows.net/armreports/00000/00000000-0000-0000-0000-000000000000?sv=2020-05-31&sr=b&sig=abcd", + "byteCount": 32741 + } + ] + }, + "validTill": "2022-05-10T08:08:46.1973252Z" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/enrollmentAccounts/1234/providers/Microsoft.CostManagement/costDetailsOperationResults/00000000-0000-0000-0000-000000000000?api-version=2023-03-01", + "Retry-After": "60" + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateCostDetailsReportBySubscriptionAndTimePeriod.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateCostDetailsReportBySubscriptionAndTimePeriod.json new file mode 100644 index 000000000000..3a171d15d83d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateCostDetailsReportBySubscriptionAndTimePeriod.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "parameters": { + "metric": "ActualCost", + "timePeriod": { + "start": "2020-03-01", + "end": "2020-03-15" + } + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/costDetailsOperationResults/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "status": "Completed", + "manifest": { + "manifestVersion": "2023-03-01", + "dataFormat": "Csv", + "blobCount": 1, + "byteCount": 32741, + "compressData": false, + "requestContext": { + "requestScope": "subscriptions/00000000-0000-0000-0000-000000000000", + "requestBody": { + "metric": "ActualCost", + "timePeriod": { + "start": "2020-03-01", + "end": "2020-03-15" + } + } + }, + "blobs": [ + { + "blobLink": "https://ccmreportstorageeastus.blob.core.windows.net/armreports/00000/00000000-0000-0000-0000-000000000000?sv=2020-05-31&sr=b&sig=abcd", + "byteCount": 32741 + } + ] + }, + "validTill": "2022-05-10T08:08:46.1973252Z" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/costDetailsOperationResults/00000000-0000-0000-0000-000000000000?api-version=2023-03-01", + "Retry-After": "60" + } + }, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateDetailedCostReportByBillingAccountLegacyAndBillingPeriod.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateDetailedCostReportByBillingAccountLegacyAndBillingPeriod.json new file mode 100644 index 000000000000..7db727ab8ae0 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateDetailedCostReportByBillingAccountLegacyAndBillingPeriod.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "scope": "providers/Microsoft.Billing/billingAccounts/12345", + "parameters": { + "metric": "ActualCost", + "billingPeriod": "202008" + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/operationResults/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.Consumption/operationResult", + "properties": { + "downloadUrl": "https://ccmreportstorageeastus.blob.core.windows.net/armreports/20201207/00000000-0000-0000-0000-000000000000?sv=2020-05-31&sr=b&sig=abcd", + "validTill": "2020-12-08T05:55:59.4394737Z" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345/providers/Microsoft.CostManagement/operationResults/ad0d632f-1186-41fe-89f9-ae29e198d223?api-version=2021-10-01", + "Azure-Consumption-AsyncOperation": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345/providers/Microsoft.CostManagement/operationStatus/ad0d632f-1186-41fe-89f9-ae29e198d223?api-version=2021-10-01", + "Retry-After": "60" + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateDetailedCostReportByBillingProfileAndInvoiceId.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateDetailedCostReportByBillingProfileAndInvoiceId.json new file mode 100644 index 000000000000..9d67458c5e49 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateDetailedCostReportByBillingProfileAndInvoiceId.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579", + "parameters": { + "metric": "ActualCost", + "invoiceId": "M1234567" + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/operationResults/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.Consumption/operationResult", + "properties": { + "downloadUrl": "https://ccmreportstorageeastus.blob.core.windows.net/armreports/20201207/00000000-0000-0000-0000-000000000000?sv=2020-05-31&sr=b&sig=abcd", + "validTill": "2020-12-08T05:55:59.4394737Z" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/operationResults/ad0d632f-1186-41fe-89f9-ae29e198d223?api-version=2021-10-01", + "Azure-Consumption-AsyncOperation": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/operationStatus/ad0d632f-1186-41fe-89f9-ae29e198d223?api-version=2021-10-01", + "Retry-After": "60" + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateDetailedCostReportByBillingProfileAndInvoiceIdAndCustomerId.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateDetailedCostReportByBillingProfileAndInvoiceIdAndCustomerId.json new file mode 100644 index 000000000000..c078a55fe0f5 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateDetailedCostReportByBillingProfileAndInvoiceIdAndCustomerId.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579", + "parameters": { + "metric": "ActualCost", + "invoiceId": "M1234567", + "customerId": "456789" + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/operationResults/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.Consumption/operationResult", + "properties": { + "downloadUrl": "https://ccmreportstorageeastus.blob.core.windows.net/armreports/20201207/00000000-0000-0000-0000-000000000000?sv=2020-05-31&sr=b&sig=abcd", + "validTill": "2020-12-08T05:55:59.4394737Z" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/operationResults/ad0d632f-1186-41fe-89f9-ae29e198d223?api-version=2021-10-01", + "Azure-Consumption-AsyncOperation": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/operationStatus/ad0d632f-1186-41fe-89f9-ae29e198d223?api-version=2021-10-01", + "Retry-After": "60" + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateDetailedCostReportByCustomerAndTimePeriod.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateDetailedCostReportByCustomerAndTimePeriod.json new file mode 100644 index 000000000000..f10762094b19 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateDetailedCostReportByCustomerAndTimePeriod.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/13579", + "parameters": { + "metric": "ActualCost", + "timePeriod": { + "start": "2020-03-01", + "end": "2020-03-15" + } + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/operationResults/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.Consumption/operationResult", + "properties": { + "downloadUrl": "https://ccmreportstorageeastus.blob.core.windows.net/armreports/20201207/00000000-0000-0000-0000-000000000000?sv=2020-05-31&sr=b&sig=abcd", + "validTill": "2020-12-08T05:55:59.4394737Z" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/customers/13579/providers/Microsoft.CostManagement/operationResults/ad0d632f-1186-41fe-89f9-ae29e198d223?api-version=2021-10-01", + "Azure-Consumption-AsyncOperation": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/customers/13579/providers/Microsoft.CostManagement/operationStatus/ad0d632f-1186-41fe-89f9-ae29e198d223?api-version=2021-10-01", + "Retry-After": "60" + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateDetailedCostReportBySubscriptionAndTimePeriod.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateDetailedCostReportBySubscriptionAndTimePeriod.json new file mode 100644 index 000000000000..0a87eb02a428 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateDetailedCostReportBySubscriptionAndTimePeriod.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "parameters": { + "metric": "ActualCost", + "timePeriod": { + "start": "2020-03-01", + "end": "2020-03-15" + } + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/operationResults/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.Consumption/operationResult", + "properties": { + "downloadUrl": "https://ccmreportstorageeastus.blob.core.windows.net/armreports/20201207/00000000-0000-0000-0000-000000000000?sv=2020-05-31&sr=b&sig=abcd", + "validTill": "2020-12-08T05:55:59.4394737Z" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/operationResults/00000000-0000-0000-0000-000000000000?api-version=2021-10-01", + "Azure-Consumption-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/operationStatus/00000000-0000-0000-0000-000000000000?api-version=2021-10-01", + "Retry-After": "60" + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateDetailedCostReportOperationResultsBySubscriptionScope.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateDetailedCostReportOperationResultsBySubscriptionScope.json new file mode 100644 index 000000000000..4aa38499e04c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateDetailedCostReportOperationResultsBySubscriptionScope.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "operationId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/operationResults/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "type": "Microsoft.Consumption/operationResult", + "properties": { + "downloadUrl": "https://ccmreportstorageeastus.blob.core.windows.net/armreports/20201207/00000000-0000-0000-0000-000000000000?sv=2020-05-31&sr=b&sig=abcd", + "validTill": "2020-12-08T05:55:59.4394737Z" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345/providers/Microsoft.CostManagement/operationResults/ad0d632f-1186-41fe-89f9-ae29e198d223?api-version=2021-10-01", + "Azure-Consumption-AsyncOperation": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345/providers/Microsoft.CostManagement/operationStatus/ad0d632f-1186-41fe-89f9-ae29e198d223?api-version=2021-10-01", + "Retry-After": "60" + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateDetailedCostReportOperationStatusBySubscriptionScope.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateDetailedCostReportOperationStatusBySubscriptionScope.json new file mode 100644 index 000000000000..58a9a30abc8f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateDetailedCostReportOperationStatusBySubscriptionScope.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "operationId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/operationStatus/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "status": "Completed", + "type": "Microsoft.Consumption/operationStatus", + "properties": { + "downloadUrl": "https://ccmreportstorageeastus.blob.core.windows.net/armreports/20201207/00000000-0000-0000-0000-000000000000?sv=2020-05-31&sr=b&sig=abcd", + "validTill": "2020-12-08T05:55:59.4394737Z" + }, + "error": { + "code": "0", + "message": null + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateReservationDetailsReportByBillingAccount.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateReservationDetailsReportByBillingAccount.json new file mode 100644 index 000000000000..a77658c50586 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateReservationDetailsReportByBillingAccount.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "billingAccountId": "9845612", + "startDate": "2020-01-01", + "endDate": "2020-01-30", + "api-version": "2023-03-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/stable/2023-03-01/examples/GenerateReservationDetailsReportByBillingProfile.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/GenerateReservationDetailsReportByBillingProfile.json new file mode 100644 index 000000000000..6662dda3c0ab --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/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": "2023-03-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/stable/2023-03-01/examples/InvoiceSectionAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/InvoiceSectionAlerts.json new file mode 100644 index 000000000000..0c37a27daf59 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/InvoiceSectionAlerts.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "api-version": "2023-03-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/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/stable/2023-03-01/examples/InvoiceSectionForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/InvoiceSectionForecast.json new file mode 100644 index 000000000000..71216fc8afbe --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/InvoiceSectionForecast.json @@ -0,0 +1,122 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountId": "12345:6789", + "billingProfileId": "13579", + "invoiceSectionId": "9876", + "scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876", + "parameters": { + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2022-08-01T00:00:00+00:00", + "to": "2022-08-31T23:59:59+00:00" + }, + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "Cost", + "function": "Sum" + } + }, + "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/stable/2023-03-01/examples/MCABillingAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCABillingAccountDimensionsList.json new file mode 100644 index 000000000000..92c6940a813f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCABillingAccountDimensionsList.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/MCABillingAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCABillingAccountDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..59e02a984a6c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCABillingAccountDimensionsListExpandAndTop.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/MCABillingAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCABillingAccountDimensionsListWithFilter.json new file mode 100644 index 000000000000..b088e0f4835a --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCABillingAccountDimensionsListWithFilter.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/MCABillingAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCABillingAccountQuery.json new file mode 100644 index 000000000000..be5d7af4776a --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCABillingAccountQuery.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/MCABillingAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCABillingAccountQueryGrouping.json new file mode 100644 index 000000000000..aa3f126204de --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCABillingAccountQueryGrouping.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/MCABillingProfileDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCABillingProfileDimensionsList.json new file mode 100644 index 000000000000..ef568d93ec4c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCABillingProfileDimensionsList.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/MCABillingProfileDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCABillingProfileDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..9e994339c099 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCABillingProfileDimensionsListExpandAndTop.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/MCABillingProfileDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCABillingProfileDimensionsListWithFilter.json new file mode 100644 index 000000000000..0dadede47d90 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCABillingProfileDimensionsListWithFilter.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/MCABillingProfileQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCABillingProfileQuery.json new file mode 100644 index 000000000000..01fce7b2e53a --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCABillingProfileQuery.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/MCABillingProfileQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCABillingProfileQueryGrouping.json new file mode 100644 index 000000000000..90e525c1eff9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCABillingProfileQueryGrouping.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/MCACustomerDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCACustomerDimensionsList.json new file mode 100644 index 000000000000..0ad6c02cf723 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCACustomerDimensionsList.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/MCACustomerDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCACustomerDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..44bb12d378f6 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCACustomerDimensionsListExpandAndTop.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/MCACustomerDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCACustomerDimensionsListWithFilter.json new file mode 100644 index 000000000000..10483dd12826 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCACustomerDimensionsListWithFilter.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/MCACustomerQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCACustomerQuery.json new file mode 100644 index 000000000000..b324f25a2d55 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCACustomerQuery.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/MCACustomerQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCACustomerQueryGrouping.json new file mode 100644 index 000000000000..0e9e2b25caf5 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCACustomerQueryGrouping.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/MCAInvoiceSectionDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCAInvoiceSectionDimensionsList.json new file mode 100644 index 000000000000..fbb815a3b119 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCAInvoiceSectionDimensionsList.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/MCAInvoiceSectionDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCAInvoiceSectionDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..fbbb0f7f27d8 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCAInvoiceSectionDimensionsListExpandAndTop.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/MCAInvoiceSectionDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCAInvoiceSectionDimensionsListWithFilter.json new file mode 100644 index 000000000000..c14b8c4e2c0b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCAInvoiceSectionDimensionsListWithFilter.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/MCAInvoiceSectionQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCAInvoiceSectionQuery.json new file mode 100644 index 000000000000..f16611366536 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCAInvoiceSectionQuery.json @@ -0,0 +1,110 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/MCAInvoiceSectionQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCAInvoiceSectionQueryGrouping.json new file mode 100644 index 000000000000..242524fb03f3 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/MCAInvoiceSectionQueryGrouping.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/ManagementGroupDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ManagementGroupDimensionsList.json new file mode 100644 index 000000000000..0aeaee3dbe48 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ManagementGroupDimensionsList.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/ManagementGroupDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ManagementGroupDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..1ff943265de2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ManagementGroupDimensionsListExpandAndTop.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/ManagementGroupDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ManagementGroupDimensionsListWithFilter.json new file mode 100644 index 000000000000..b4f1907bd2dc --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ManagementGroupDimensionsListWithFilter.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/ManagementGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ManagementGroupQuery.json new file mode 100644 index 000000000000..895b15700ba1 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ManagementGroupQuery.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/ManagementGroupQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ManagementGroupQueryGrouping.json new file mode 100644 index 000000000000..3cd05d713267 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ManagementGroupQueryGrouping.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/OperationList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/OperationList.json new file mode 100644 index 000000000000..4f3ed98fbccd --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/OperationList.json @@ -0,0 +1,113 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/PricesheetDownload.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/PricesheetDownload.json new file mode 100644 index 000000000000..090d39a8edf3 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/PricesheetDownload.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountName": "7c05a543-80ff-571e-9f98-1063b3b53cf2:99ad03ad-2d1b-4889-a452-090ad407d25f_2019-05-31", + "billingProfileName": "2USN-TPCD-BG7-TGB", + "invoiceName": "T000940677" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com:443/providers/Microsoft.Billing/billingAccounts/7c05a543-80ff-571e-9f98-1063b3b53cf2:99ad03ad-2d1b-4889-a452-090ad407d25f_2019-05-31/billingProfiles/2USN-TPCD-BG7-TGB/providers/Microsoft.CostManagement/operationResults/45000000-0000-0000-0000-000000000000?sessiontoken=0:000000&api-version=2023-03-01&OperationType=PriceSheet", + "Retry-After": "60", + "OData-EntityId": "45000000-0000-0000-0000-000000000000" + } + }, + "200": { + "body": { + "downloadUrl": "https://myaccount.blob.core.windows.net/?restype=service&comp=properties&sv=2015-04-05&ss=bf&srt=s&st=2015-04-29T22%3A18%3A26Z&se=2015-04-30T02%3A23%3A26Z&sr=b&sp=rw&spr=https&sig=G%2TEST%4B", + "expiryTime": "2022-09-30T17:32:28Z" + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/PricesheetDownloadByBillingProfile.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/PricesheetDownloadByBillingProfile.json new file mode 100644 index 000000000000..104fce67edc1 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/PricesheetDownloadByBillingProfile.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "billingAccountName": "7c05a543-80ff-571e-9f98-1063b3b53cf2:99ad03ad-2d1b-4889-a452-090ad407d25f_2019-05-31", + "billingProfileName": "2USN-TPCD-BG7-TGB" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com:443/providers/Microsoft.Billing/billingAccounts/7c05a543-80ff-571e-9f98-1063b3b53cf2:99ad03ad-2d1b-4889-a452-090ad407d25f_2019-05-31/billingProfiles/2USN-TPCD-BG7-TGB/providers/Microsoft.CostManagement/operationResults/45000000-0000-0000-0000-000000000000?sessiontoken=0:000000&api-version=2023-03-01&OperationType=PriceSheet", + "Retry-After": "60", + "OData-EntityId": "45000000-0000-0000-0000-000000000000" + } + }, + "200": { + "body": { + "downloadUrl": "https://myaccount.blob.core.windows.net/?restype=service&comp=properties&sv=2015-04-05&ss=bf&srt=s&st=2015-04-29T22%3A18%3A26Z&se=2015-04-30T02%3A23%3A26Z&sr=b&sp=rw&spr=https&sig=G%2TEST%4B", + "expiryTime": "2018-07-21T17:32:28Z" + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/PrivateView.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/PrivateView.json new file mode 100644 index 000000000000..8462b7105286 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/PrivateView.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/PrivateViewCreateOrUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/PrivateViewCreateOrUpdate.json new file mode 100644 index 000000000000..b7a8c93d7b75 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/PrivateViewCreateOrUpdate.json @@ -0,0 +1,185 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/PrivateViewDelete.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/PrivateViewDelete.json new file mode 100644 index 000000000000..a863ede8643c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/PrivateViewDelete.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "viewName": "TestView" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/PrivateViewList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/PrivateViewList.json new file mode 100644 index 000000000000..61403c9f5ec8 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/PrivateViewList.json @@ -0,0 +1,131 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/ResourceGroupAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ResourceGroupAlerts.json new file mode 100644 index 000000000000..ee22caf21713 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ResourceGroupAlerts.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "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/stable/2023-03-01/examples/ResourceGroupDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ResourceGroupDimensionsList.json new file mode 100644 index 000000000000..69417af03d1b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ResourceGroupDimensionsList.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/ResourceGroupForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ResourceGroupForecast.json new file mode 100644 index 000000000000..6ca405f16c78 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ResourceGroupForecast.json @@ -0,0 +1,103 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "ScreenSharingTest-peer", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer", + "parameters": { + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2022-08-01T00:00:00+00:00", + "to": "2022-08-31T23:59:59+00:00" + }, + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "Cost", + "function": "Sum" + } + }, + "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/stable/2023-03-01/examples/ResourceGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ResourceGroupQuery.json new file mode 100644 index 000000000000..f2bf6f9fd9f2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ResourceGroupQuery.json @@ -0,0 +1,97 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/ResourceGroupQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ResourceGroupQueryGrouping.json new file mode 100644 index 000000000000..6ad8dfa680e8 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ResourceGroupQueryGrouping.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/SingleResourceGroupAlert.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/SingleResourceGroupAlert.json new file mode 100644 index 000000000000..89a6a0d19abf --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/SingleResourceGroupAlert.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "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/stable/2023-03-01/examples/SingleSubscriptionAlert.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/SingleSubscriptionAlert.json new file mode 100644 index 000000000000..b7e52644760c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/SingleSubscriptionAlert.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "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/stable/2023-03-01/examples/SubscriptionAlerts.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/SubscriptionAlerts.json new file mode 100644 index 000000000000..5ed22f4a48f8 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/SubscriptionAlerts.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "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/stable/2023-03-01/examples/SubscriptionDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/SubscriptionDimensionsList.json new file mode 100644 index 000000000000..8e08dbac3722 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/SubscriptionDimensionsList.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/SubscriptionForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/SubscriptionForecast.json new file mode 100644 index 000000000000..281f50349df4 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/SubscriptionForecast.json @@ -0,0 +1,120 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "parameters": { + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2022-08-01T00:00:00+00:00", + "to": "2022-08-31T23:59:59+00:00" + }, + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "Cost", + "function": "Sum" + } + }, + "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/stable/2023-03-01/examples/SubscriptionQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/SubscriptionQuery.json new file mode 100644 index 000000000000..a4e16b42610c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/SubscriptionQuery.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/SubscriptionQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/SubscriptionQueryGrouping.json new file mode 100644 index 000000000000..10bf40ae85f9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/SubscriptionQueryGrouping.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/ViewByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ViewByResourceGroup.json new file mode 100644 index 000000000000..946a588792b6 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ViewByResourceGroup.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/ViewCreateOrUpdateByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ViewCreateOrUpdateByResourceGroup.json new file mode 100644 index 000000000000..cff4318f031a --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ViewCreateOrUpdateByResourceGroup.json @@ -0,0 +1,186 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/ViewDeleteByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ViewDeleteByResourceGroup.json new file mode 100644 index 000000000000..da7cce811b6e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ViewDeleteByResourceGroup.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2023-03-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/stable/2023-03-01/examples/ViewListByResourceGroup.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ViewListByResourceGroup.json new file mode 100644 index 000000000000..62b812141348 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/ViewListByResourceGroup.json @@ -0,0 +1,132 @@ +{ + "parameters": { + "api-version": "2023-03-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" + } + ] + } + } + ] + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/checkNameAvailability-private-scheduledAction.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/checkNameAvailability-private-scheduledAction.json new file mode 100644 index 000000000000..d96ab5e66d7c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/checkNameAvailability-private-scheduledAction.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "checkNameAvailabilityRequest": { + "name": "testName", + "type": "Microsoft.CostManagement/ScheduledActions" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": false, + "reason": "AlreadyExists", + "message": "A private scheduled action with name 'testName' is already present. Please specify a differnt name." + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/checkNameAvailability-shared-scheduledAction.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/checkNameAvailability-shared-scheduledAction.json new file mode 100644 index 000000000000..5ab0c12d240d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/checkNameAvailability-shared-scheduledAction.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "checkNameAvailabilityRequest": { + "name": "testName", + "type": "Microsoft.CostManagement/ScheduledActions" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": true + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-createOrUpdate-private.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-createOrUpdate-private.json new file mode 100644 index 000000000000..c4e1a2802ce6 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-createOrUpdate-private.json @@ -0,0 +1,127 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "name": "monthlyCostByResource", + "If-Match": "", + "scheduledAction": { + "kind": "Email", + "properties": { + "displayName": "Monthly Cost By Resource", + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + }, + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample" + } + } + }, + "responses": { + "201": { + "body": { + "id": "providers/Microsoft.CostManagement/scheduledActions/monthlyCostByResource", + "name": "monthlyCostByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d10\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Monthly Cost By Resource", + "notification": { + "language": "fr", + "regionalFormat": "fr", + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + }, + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "scope": "", + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample" + } + } + }, + "200": { + "body": { + "id": "providers/Microsoft.CostManagement/scheduledActions/monthlyCostByResource", + "name": "monthlyCostByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d10\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-19T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Monthly Cost By Resource", + "notification": { + "language": "fr", + "regionalFormat": "fr", + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + }, + "scope": "", + "status": "Enabled", + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-createOrUpdate-shared.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-createOrUpdate-shared.json new file mode 100644 index 000000000000..2857e79e9a96 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-createOrUpdate-shared.json @@ -0,0 +1,134 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "name": "monthlyCostByResource", + "If-Match": "", + "scheduledAction": { + "kind": "Email", + "properties": { + "displayName": "Monthly Cost By Resource", + "fileDestination": { + "fileFormats": [ + "Csv" + ] + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + }, + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample" + } + } + }, + "responses": { + "201": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/scheduledActions/monthlyCostByResource", + "name": "monthlyCostByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d10\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Monthly Cost By Resource", + "fileDestination": { + "fileFormats": [ + "Csv" + ] + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + }, + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample" + } + } + }, + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/scheduledActions/monthlyCostByResource", + "name": "monthlyCostByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d10\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-19T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Monthly Cost By Resource", + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + }, + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-delete-private.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-delete-private.json new file mode 100644 index 000000000000..c52cf8ef8f9c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-delete-private.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "name": "monthlyCostByResource" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-delete-shared.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-delete-shared.json new file mode 100644 index 000000000000..4c42c8c13acb --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-delete-shared.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "name": "monthlyCostByResource" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-get-private.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-get-private.json new file mode 100644 index 000000000000..c7a8703d2a60 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-get-private.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "name": "monthlyCostByResource" + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.CostManagement/scheduledActions/monthlyCostByResource", + "name": "monthlyCostByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d10\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Monthly Cost By Resource", + "scope": "", + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample", + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-get-shared.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-get-shared.json new file mode 100644 index 000000000000..b9c3e7536678 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-get-shared.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "name": "monthlyCostByResource" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/scheduledActions/monthlyCostByResource", + "name": "monthlyCostByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d10\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Monthly Cost By Resource", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample", + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-insightAlert-createOrUpdate-shared.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-insightAlert-createOrUpdate-shared.json new file mode 100644 index 000000000000..a841073fe12d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-insightAlert-createOrUpdate-shared.json @@ -0,0 +1,106 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "name": "dailyAnomalyByResource", + "If-Match": "", + "scheduledAction": { + "kind": "InsightAlert", + "properties": { + "displayName": "Daily anomaly by resource", + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost anomaly detected in the resource" + }, + "schedule": { + "frequency": "Daily", + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample" + } + } + }, + "responses": { + "201": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/scheduledActions/dailyAnomalyByResource", + "name": "dailyAnomalyByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "InsightAlert", + "eTag": "\"1d4ff9fe66f1d10\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Daily anomaly by resource", + "fileDestination": { + "fileFormats": [] + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost anomaly detected in the resource" + }, + "schedule": { + "frequency": "Daily", + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample" + } + } + }, + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/scheduledActions/dailyAnomalyByResource", + "name": "dailyAnomalyByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "InsightAlert", + "eTag": "\"1d4ff9fe66f1d10\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-19T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Daily anomaly by resource", + "fileDestination": { + "fileFormats": [] + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost anomaly detected in the resource" + }, + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "schedule": { + "frequency": "Daily", + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-sendNow-private.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-sendNow-private.json new file mode 100644 index 000000000000..e298170359d4 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-sendNow-private.json @@ -0,0 +1,9 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "name": "monthlyCostByResource" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-sendNow-shared.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-sendNow-shared.json new file mode 100644 index 000000000000..1f2efa5b67d0 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledAction-sendNow-shared.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "name": "monthlyCostByResource" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledActions-list-private.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledActions-list-private.json new file mode 100644 index 000000000000..9da1195af1ce --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledActions-list-private.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2023-03-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.CostManagement/scheduledActions/monthlyCostByResource", + "name": "monthlyCostByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d10\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Monthly Cost By Resource", + "scope": "", + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample", + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + } + } + }, + { + "id": "providers/Microsoft.CostManagement/scheduledActions/dailyCostByResource", + "name": "dailyCostByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d15\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Daily Cost By Resource", + "scope": "", + "status": "Disabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample", + "schedule": { + "frequency": "Daily", + "hourOfDay": 12, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Daily Cost By Resource" + } + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledActions-list-shared.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledActions-list-shared.json new file mode 100644 index 000000000000..a645c559c592 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledActions-list-shared.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/scheduledActions/monthlyCostByResource", + "name": "monthlyCostByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d10\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Monthly Cost By Resource", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample", + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + } + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/scheduledActions/dailyCostByResource", + "name": "dailyCostByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d15\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Daily Cost By Resource", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "status": "Disabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample", + "schedule": { + "frequency": "Daily", + "hourOfDay": 12, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Daily Cost By Resource" + } + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledActions-listWithFilter-private.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledActions-listWithFilter-private.json new file mode 100644 index 000000000000..77e887284c8c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledActions-listWithFilter-private.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "$filter": "properties/viewId eq '/providers/Microsoft.CostManagement/views/swaggerExample'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.CostManagement/scheduledActions/monthlyCostByResource", + "name": "monthlyCostByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d10\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Monthly Cost By Resource", + "scope": "", + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample", + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + } + } + }, + { + "id": "providers/Microsoft.CostManagement/scheduledActions/dailyCostByResource", + "name": "dailyCostByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d15\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Daily Cost By Resource", + "scope": "", + "status": "Disabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample", + "schedule": { + "frequency": "Daily", + "hourOfDay": 12, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Daily Cost By Resource" + } + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledActions-listWithFilter-shared.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledActions-listWithFilter-shared.json new file mode 100644 index 000000000000..eacc6ddd8ca9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/examples/scheduledActions/scheduledActions-listWithFilter-shared.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "api-version": "2023-03-01", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "$filter": "properties/viewId eq '/providers/Microsoft.CostManagement/views/swaggerExample'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/scheduledActions/monthlyCostByResource", + "name": "monthlyCostByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d10\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Monthly Cost By Resource", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample", + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + } + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/scheduledActions/dailyCostByResource", + "name": "dailyCostByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d15\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Daily Cost By Resource", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "status": "Disabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample", + "schedule": { + "frequency": "Daily", + "hourOfDay": 12, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Daily Cost By Resource" + } + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/scheduledActions.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/scheduledActions.json new file mode 100644 index 000000000000..4cb3f87ed5dc --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-03-01/scheduledActions.json @@ -0,0 +1,932 @@ +{ + "swagger": "2.0", + "info": { + "title": "CostManagementClient", + "version": "2023-03-01" + }, + "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/scheduledActions": { + "get": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_List", + "description": "List all private scheduled actions.", + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/cost-management/" + }, + "x-ms-examples": { + "PrivateScheduledActionsList": { + "$ref": "./examples/scheduledActions/scheduledActions-list-private.json" + }, + "PrivateScheduledActionsListFilterByViewId": { + "$ref": "./examples/scheduledActions/scheduledActions-listWithFilter-private.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "$filter", + "description": "May be used to filter scheduled actions by properties/viewId. Supported operator is 'eq'.", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ScheduledActionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponseWithNestedDetails" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/scheduledActions": { + "get": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_ListByScope", + "description": "List all shared scheduled actions within the given scope.", + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/cost-management/" + }, + "x-ms-examples": { + "ScheduledActionsListByScope": { + "$ref": "./examples/scheduledActions/scheduledActions-list-shared.json" + }, + "ScheduledActionsListByScopeFilterByViewId": { + "$ref": "./examples/scheduledActions/scheduledActions-listWithFilter-shared.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "$filter", + "description": "May be used to filter scheduled actions by properties/viewId. Supported operator is 'eq'.", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ScheduledActionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponseWithNestedDetails" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.CostManagement/scheduledActions/{name}": { + "put": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_CreateOrUpdate", + "description": "Create or update a private scheduled action.", + "x-ms-examples": { + "CreateOrUpdatePrivateScheduledAction": { + "$ref": "./examples/scheduledActions/scheduledAction-createOrUpdate-private.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scheduledActionNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "scheduledAction", + "description": "Scheduled action to be created or updated.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ScheduledAction" + } + }, + { + "$ref": "#/parameters/IfMatchOptionalParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ScheduledAction" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/ScheduledAction" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponseWithNestedDetails" + } + } + } + }, + "get": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_Get", + "description": "Get the private scheduled action by name.", + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/cost-management/" + }, + "x-ms-examples": { + "PrivateScheduledAction": { + "$ref": "./examples/scheduledActions/scheduledAction-get-private.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scheduledActionNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ScheduledAction" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponseWithNestedDetails" + } + } + } + }, + "delete": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_Delete", + "description": "Delete a private scheduled action.", + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/cost-management/" + }, + "x-ms-examples": { + "PrivateScheduledActionDelete": { + "$ref": "./examples/scheduledActions/scheduledAction-delete-private.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scheduledActionNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "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/ErrorResponseWithNestedDetails" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}": { + "put": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_CreateOrUpdateByScope", + "description": "Create or update a shared scheduled action within the given scope.", + "x-ms-examples": { + "CreateOrUpdateScheduledActionByScope": { + "$ref": "./examples/scheduledActions/scheduledAction-createOrUpdate-shared.json" + }, + "CreateOrUpdateInsightAlertScheduledActionByScope": { + "$ref": "./examples/scheduledActions/scheduledAction-insightAlert-createOrUpdate-shared.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeParameter" + }, + { + "$ref": "#/parameters/scheduledActionNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "scheduledAction", + "description": "Scheduled action to be created or updated.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ScheduledAction" + } + }, + { + "$ref": "#/parameters/IfMatchOptionalParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ScheduledAction" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/ScheduledAction" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponseWithNestedDetails" + } + } + } + }, + "get": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_GetByScope", + "description": "Get the shared scheduled action from the given scope by name.", + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/cost-management/" + }, + "x-ms-examples": { + "ScheduledActionByScope": { + "$ref": "./examples/scheduledActions/scheduledAction-get-shared.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeParameter" + }, + { + "$ref": "#/parameters/scheduledActionNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ScheduledAction" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponseWithNestedDetails" + } + } + } + }, + "delete": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_DeleteByScope", + "description": "Delete a scheduled action within the given scope.", + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/cost-management/" + }, + "x-ms-examples": { + "ScheduledActionDeleteByScope": { + "$ref": "./examples/scheduledActions/scheduledAction-delete-shared.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeParameter" + }, + { + "$ref": "#/parameters/scheduledActionNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "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/ErrorResponseWithNestedDetails" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/scheduledActions/{name}/execute": { + "post": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_Run", + "description": "Processes a private scheduled action.", + "x-ms-examples": { + "ScheduledActionSendNow": { + "$ref": "./examples/scheduledActions/scheduledAction-sendNow-private.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scheduledActionNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded. It might take up to an hour to receive the email." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponseWithNestedDetails" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}/execute": { + "post": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_RunByScope", + "description": "Runs a shared scheduled action within the given scope.", + "x-ms-examples": { + "ScheduledActionRunByScope": { + "$ref": "./examples/scheduledActions/scheduledAction-sendNow-shared.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeParameter" + }, + { + "$ref": "#/parameters/scheduledActionNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded. It might take up to an hour to receive cost analysis information." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponseWithNestedDetails" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/checkNameAvailability": { + "post": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_CheckNameAvailability", + "description": "Checks availability and correctness of the name for a scheduled action.", + "x-ms-examples": { + "ScheduledActionCheckNameAvailability": { + "$ref": "./examples/scheduledActions/checkNameAvailability-private-scheduledAction.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "checkNameAvailabilityRequest", + "description": "Scheduled action to be created or updated.", + "in": "body", + "required": true, + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/CheckNameAvailabilityRequest" + } + } + ], + "responses": { + "200": { + "description": "Response of scheduled action name availability.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/CheckNameAvailabilityResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponseWithNestedDetails" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/checkNameAvailability": { + "post": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_CheckNameAvailabilityByScope", + "description": "Checks availability and correctness of the name for a scheduled action within the given scope.", + "x-ms-examples": { + "ScheduledActionCheckNameAvailabilityByScope": { + "$ref": "./examples/scheduledActions/checkNameAvailability-shared-scheduledAction.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "checkNameAvailabilityRequest", + "description": "Scheduled action to be created or updated.", + "in": "body", + "required": true, + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/CheckNameAvailabilityRequest" + } + } + ], + "responses": { + "200": { + "description": "Response of scheduled action name availability.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/CheckNameAvailabilityResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "common-types.json#/definitions/ErrorResponseWithNestedDetails" + } + } + } + } + } + }, + "definitions": { + "DaysOfWeek": { + "type": "string", + "description": "Days of Week.", + "enum": [ + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "x-ms-enum": { + "name": "DaysOfWeek", + "modelAsString": true + } + }, + "FileDestination": { + "type": "object", + "description": "Destination of the view data. This is optional. Currently only CSV format is supported.", + "properties": { + "fileFormats": { + "type": "array", + "description": "Destination of the view data. Currently only CSV format is supported.", + "items": { + "$ref": "#/definitions/FileFormat" + } + } + } + }, + "FileFormat": { + "type": "string", + "description": "Destination of the view data. Currently only CSV format is supported.", + "enum": [ + "Csv" + ], + "x-ms-enum": { + "name": "FileFormat", + "modelAsString": true + } + }, + "Language": { + "type": "string", + "description": "Language in which the email is localized, for ex: 'Fr'. When the specified language is not supported, email will be in english. The supported languages are cs (Czech), da (Danish), de (German), en (English), es (Spanish), fr (French), hu (Hungarian), id (Indonesian), it (Lithuanian), ja (Japanese), ko (Korean), nb (Norwegian Bokmål), nl (Dutch), pl (Polish), pt (Portuguese), ru (Russian), sv (Swedish), tr (Turkish), zh (Chinese) " + }, + "NotificationEmail": { + "type": "string", + "description": "Email address of the point of contact that should get the unsubscribe requests and notification emails." + }, + "NotificationProperties": { + "type": "object", + "description": "The properties of the scheduled action notification.", + "required": [ + "to", + "subject" + ], + "properties": { + "to": { + "description": "Array of email addresses.", + "type": "array", + "items": { + "type": "string", + "pattern": "^[A-Za-z0-9._%+-]+@(?:[A-Za-z0-9-]+\\.)+[A-Za-z]{2,}$" + }, + "minItems": 1, + "maxItems": 20 + }, + "language": { + "description": "Locale of the email.", + "$ref": "#/definitions/Language" + }, + "message": { + "description": "Optional message to be added in the email. Length is limited to 250 characters.", + "type": "string" + }, + "regionalFormat": { + "description": "Regional format used for formatting date/time and currency values in the email.", + "$ref": "#/definitions/RegionalFormat" + }, + "subject": { + "description": "Subject of the email. Length is limited to 70 characters.", + "type": "string" + } + } + }, + "RegionalFormat": { + "type": "string", + "description": "Language for formatting the date/time and currency values in the email. For ex: 'fr'. Defaulted to English, when the specified regional format is not supported. " + }, + "ScheduledActionProxyResource": { + "description": "The Resource model definition.", + "properties": { + "eTag": { + "type": "string", + "readOnly": true, + "description": "Resource Etag. For update calls, eTag is optional and can be specified to achieve optimistic concurrency. Fetch the resource's eTag by doing a 'GET' call first and then including the latest eTag as part of the request body or 'If-Match' header while performing the update. For create calls, eTag is not required." + }, + "kind": { + "$ref": "#/definitions/ScheduledActionKind", + "description": "Kind of the scheduled action." + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "description": "Kind of the scheduled action." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "type": "object", + "x-ms-azure-resource": true + }, + "ScheduledAction": { + "description": "Scheduled action definition.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ScheduledActionProxyResource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ScheduledActionProperties", + "title": "Scheduled action properties" + } + } + }, + "ScheduledActionKind": { + "type": "string", + "description": "Kind of the scheduled action.", + "enum": [ + "Email", + "InsightAlert" + ], + "x-ms-enum": { + "name": "ScheduledActionKind", + "modelAsString": true, + "values": [ + { + "value": "Email", + "description": "Cost analysis data will be emailed.", + "name": "Email" + }, + { + "value": "InsightAlert", + "description": "Cost anomaly information will be emailed. Available only on subscription scope at daily frequency. If no anomaly is detected on the resource, an email won't be sent.", + "name": "InsightAlert" + } + ] + } + }, + "ScheduledActionListResult": { + "description": "Scheduled actions list result. It contains a list of scheduled actions.", + "type": "object", + "properties": { + "value": { + "description": "The list of scheduled actions.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ScheduledAction" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ScheduledActionProperties": { + "type": "object", + "description": "The properties of the scheduled action.", + "required": [ + "displayName", + "notification", + "schedule", + "status", + "viewId" + ], + "properties": { + "displayName": { + "description": "Scheduled action name.", + "type": "string" + }, + "fileDestination": { + "description": "Destination format of the view data. This is optional.", + "$ref": "#/definitions/FileDestination" + }, + "notification": { + "description": "Notification properties based on scheduled action kind.", + "$ref": "#/definitions/NotificationProperties" + }, + "notificationEmail": { + "description": "Email address of the point of contact that should get the unsubscribe requests and notification emails.", + "$ref": "#/definitions/NotificationEmail" + }, + "schedule": { + "description": "Schedule of the scheduled action.", + "$ref": "#/definitions/ScheduleProperties" + }, + "scope": { + "description": "Cost Management scope like '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.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope.", + "type": "string" + }, + "status": { + "$ref": "#/definitions/ScheduledActionStatus", + "description": "Status of the scheduled action." + }, + "viewId": { + "description": "Cost analysis viewId used for scheduled action. For example, '/providers/Microsoft.CostManagement/views/swaggerExample'", + "type": "string" + } + } + }, + "ScheduledActionStatus": { + "type": "string", + "description": "Status of the scheduled action.", + "enum": [ + "Enabled", + "Expired", + "Disabled" + ], + "x-ms-enum": { + "name": "ScheduledActionStatus", + "modelAsString": true, + "values": [ + { + "value": "Disabled", + "description": "Scheduled action is saved but will not be run.", + "name": "Disabled" + }, + { + "value": "Enabled", + "description": "Scheduled action is saved and will be run.", + "name": "Enabled" + }, + { + "value": "Expired", + "description": "Scheduled action is expired.", + "name": "Expired" + } + ] + } + }, + "ScheduleFrequency": { + "type": "string", + "description": "Frequency of the schedule.", + "enum": [ + "Daily", + "Weekly", + "Monthly" + ], + "x-ms-enum": { + "name": "ScheduleFrequency", + "modelAsString": true, + "values": [ + { + "value": "Daily", + "description": "Cost analysis data will be emailed every day.", + "name": "Daily" + }, + { + "value": "Weekly", + "description": "Cost analysis data will be emailed every week.", + "name": "Weekly" + }, + { + "value": "Monthly", + "description": "Cost analysis data will be emailed every month.", + "name": "Monthly" + } + ] + } + }, + "ScheduleProperties": { + "type": "object", + "description": "The properties of the schedule.", + "required": [ + "endDate", + "frequency", + "startDate" + ], + "properties": { + "frequency": { + "$ref": "#/definitions/ScheduleFrequency", + "description": "Frequency of the schedule." + }, + "hourOfDay": { + "type": "integer", + "description": "UTC time at which cost analysis data will be emailed.", + "format": "int32" + }, + "daysOfWeek": { + "description": "Day names in english on which cost analysis data will be emailed. This property is applicable when frequency is Weekly or Monthly.", + "type": "array", + "items": { + "$ref": "#/definitions/DaysOfWeek" + } + }, + "weeksOfMonth": { + "description": "Weeks in which cost analysis data will be emailed. This property is applicable when frequency is Monthly and used in combination with daysOfWeek.", + "type": "array", + "items": { + "$ref": "#/definitions/WeeksOfMonth" + } + }, + "dayOfMonth": { + "type": "integer", + "description": "UTC day on which cost analysis data will be emailed. Must be between 1 and 31. This property is applicable when frequency is Monthly and overrides weeksOfMonth or daysOfWeek.", + "format": "int32" + }, + "startDate": { + "description": "The start date and time of the scheduled action (UTC).", + "type": "string", + "format": "date-time" + }, + "endDate": { + "description": "The end date and time of the scheduled action (UTC).", + "type": "string", + "format": "date-time" + } + } + }, + "WeeksOfMonth": { + "type": "string", + "description": "Weeks of month.", + "enum": [ + "First", + "Second", + "Third", + "Fourth", + "Last" + ], + "x-ms-enum": { + "name": "WeeksOfMonth", + "modelAsString": true + } + } + }, + "parameters": { + "scopeParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope associated with scheduled action 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.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope. Note: Insight Alerts are only available on subscription scope.", + "x-ms-parameter-location": "method" + }, + "scheduledActionNameParameter": { + "name": "name", + "in": "path", + "description": "Scheduled action name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "IfMatchOptionalParameter": { + "name": "If-Match", + "in": "header", + "required": false, + "description": "ETag of the Entity. Not required when creating an entity. Optional when updating an entity and can be specified to achieve optimistic concurrency.", + "type": "string", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/cost-management/resource-manager/readme.md b/specification/cost-management/resource-manager/readme.md index 5eb6de73b3f7..4ce2974ed4eb 100644 --- a/specification/cost-management/resource-manager/readme.md +++ b/specification/cost-management/resource-manager/readme.md @@ -26,18 +26,33 @@ These are the global settings for the Cost Management API. ``` yaml openapi-type: arm -tag: package-2022-10 +tag: package-2023-03 azure-validator: false ``` --- +### Tag: package-2023-03 + +These settings apply only when `--tag=package-2023-03` is specified on the command line. + +```yaml $(tag) == 'package-2023-03' +input-file: + - Microsoft.CostManagement/stable/2023-03-01/common-types.json + - Microsoft.CostManagement/stable/2023-03-01/costmanagement.benefits.json + - Microsoft.CostManagement/stable/2023-03-01/costmanagement.exports.json + - Microsoft.CostManagement/stable/2023-03-01/costmanagement.generatecostdetailsreport.json + - Microsoft.CostManagement/stable/2023-03-01/costmanagement.generatedetailedcostreport.json + - Microsoft.CostManagement/stable/2023-03-01/costmanagement.json + - Microsoft.CostManagement/stable/2023-03-01/costmanagement.pricesheets.json + - Microsoft.CostManagement/stable/2023-03-01/scheduledActions.json +``` ### Tag: package-preview-2023-04 These settings apply only when `--tag=package-preview-2023-04` is specified on the command line. -```yaml $(tag) == 'package-preview-2023-04' +``` yaml $(tag) == 'package-preview-2023-04' input-file: - Microsoft.CostManagement/preview/2023-04-01-preview/common-types.json - Microsoft.CostManagement/preview/2023-04-01-preview/costmanagement.benefits.json @@ -49,6 +64,7 @@ input-file: - Microsoft.CostManagement/preview/2023-04-01-preview/costmanagement.pricesheets.json - Microsoft.CostManagement/preview/2023-04-01-preview/scheduledActions.json ``` + ### Tag: package-2022-10 These settings apply only when `--tag=package-2022-10` is specified on the command line.