From 57687e150a5ce256d34880df21789fd0358277fd Mon Sep 17 00:00:00 2001 From: Arieh Faiga Date: Thu, 10 Jan 2019 08:38:01 +0200 Subject: [PATCH 01/17] Adds base for updating Microsoft.CostManagement from version preview/2018-12-01-preview to version 2019-03-01-preview --- .../2019-03-01-preview/costmanagement.json | 1735 +++++++++++++++++ .../BillingAccountDimensionsList.json | 44 + ...lingAccountDimensionsListExpandAndTop.json | 58 + ...illingAccountDimensionsListWithFilter.json | 39 + .../examples/BillingAccountForecast.json | 128 ++ .../examples/BillingAccountQuery.json | 103 + .../examples/BillingAccountQueryGrouping.json | 76 + .../examples/DepartmentDimensionsList.json | 45 + .../DepartmentDimensionsListExpandAndTop.json | 59 + .../DepartmentDimensionsListWithFilter.json | 40 + .../examples/DepartmentForecast.json | 129 ++ .../examples/DepartmentQuery.json | 104 + .../examples/DepartmentQueryGrouping.json | 77 + .../EnrollmentAccountDimensionsList.json | 45 + ...mentAccountDimensionsListExpandAndTop.json | 59 + ...llmentAccountDimensionsListWithFilter.json | 40 + .../examples/EnrollmentAccountForecast.json | 116 ++ .../examples/EnrollmentAccountQuery.json | 91 + .../EnrollmentAccountQueryGrouping.json | 89 + .../ManagementGroupDimensionsList.json | 44 + ...gementGroupDimensionsListExpandAndTop.json | 58 + ...nagementGroupDimensionsListWithFilter.json | 39 + .../examples/ManagementGroupForecast.json | 115 ++ .../examples/ManagementGroupQuery.json | 90 + .../ManagementGroupQueryGrouping.json | 76 + .../examples/ResourceGroupDimensionsList.json | 55 + .../examples/ResourceGroupForecast.json | 111 ++ .../examples/ResourceGroupQuery.json | 93 + .../examples/SubscriptionDimensionsList.json | 57 + .../examples/SubscriptionForecast.json | 124 ++ .../examples/SubscriptionQuery.json | 75 + 31 files changed, 4014 insertions(+) create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQueryGrouping.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionForecast.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionQuery.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json new file mode 100644 index 000000000000..8beb3487b66c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json @@ -0,0 +1,1735 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-12-01-preview", + "title": "CostManagementClient" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "Dimensions_ListByBillingAccount", + "description": "Lists the dimensions by billingAccount Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "BillingAccountDimensionsList": { + "$ref": "./examples/BillingAccountDimensionsList.json" + }, + "BillingAccountDimensionsListExpandAndTop": { + "$ref": "./examples/BillingAccountDimensionsListExpandAndTop.json" + }, + "BillingAccountDimensionsListWithFilter": { + "$ref": "./examples/BillingAccountDimensionsListWithFilter.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "name": "$filter", + "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N dimension data.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "Dimensions_ListByEnrollmentAccount", + "description": "Lists the dimensions by Enrollment Account Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "EnrollmentAccountDimensionsList": { + "$ref": "./examples/EnrollmentAccountDimensionsList.json" + }, + "EnrollmentAccountDimensionsListExpandAndTop": { + "$ref": "./examples/EnrollmentAccountDimensionsListExpandAndTop.json" + }, + "EnrollmentAccountDimensionsListWithFilter": { + "$ref": "./examples/EnrollmentAccountDimensionsListWithFilter.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/enrollmentAccountIdParameter" + }, + { + "name": "$filter", + "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N dimension data.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "Dimensions_ListByDepartment", + "description": "Lists the dimensions by Department Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "DepartmentDimensionsList": { + "$ref": "./examples/DepartmentDimensionsList.json" + }, + "DepartmentDimensionsListExpandAndTop": { + "$ref": "./examples/DepartmentDimensionsListExpandAndTop.json" + }, + "DepartmentDimensionsListWithFilter": { + "$ref": "./examples/DepartmentDimensionsListWithFilter.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/departmentIdParameter" + }, + { + "name": "$filter", + "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N dimension data.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "Dimensions_ListByManagementGroup", + "description": "Lists the dimensions by managementGroup Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ManagementGroupDimensionsList": { + "$ref": "./examples/ManagementGroupDimensionsList.json" + }, + "ManagementGroupDimensionsListExpandAndTop": { + "$ref": "./examples/ManagementGroupDimensionsListExpandAndTop.json" + }, + "ManagementGroupDimensionsListWithFilter": { + "$ref": "./examples/ManagementGroupDimensionsListWithFilter.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "name": "$filter", + "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N dimension data.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "Dimensions_ListBySubscription", + "description": "Lists the dimensions by subscription Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "SubscriptionDimensionsList": { + "$ref": "./examples/SubscriptionDimensionsList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "name": "$filter", + "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N dimension data.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/Query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "Query_UsageBySubscription", + "description": "Query the usage data for subscriptionId.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "SubscriptionQuery": { + "$ref": "./examples/SubscriptionQuery.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/Forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_UsageBySubscription", + "description": "Forecast the usage data for subscriptionId.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "SubscriptionForecast": { + "$ref": "./examples/SubscriptionForecast.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "Dimensions_ListByResourceGroup", + "description": "Lists the dimensions by resource group Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ResourceGroupDimensionsList": { + "$ref": "./examples/ResourceGroupDimensionsList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "$filter", + "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N dimension data.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.CostManagement/Query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "Query_UsageByResourceGroup", + "description": "Query the usage data for subscriptionId and resource group.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ResourceGroupQuery": { + "$ref": "./examples/ResourceGroupQuery.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.CostManagement/Forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_UsageByResourceGroup", + "description": "Forecast the usage data for subscriptionId and resource group.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ResourceGroupForecast": { + "$ref": "./examples/ResourceGroupForecast.json" + } + + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/Query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "Query_UsageByBillingAccount", + "description": "Query the usage data for billing account.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "BillingAccountQuery": { + "$ref": "./examples/BillingAccountQuery.json" + }, + "BillingAccountQueryGroupingUsage": { + "$ref": "./examples/BillingAccountQueryGrouping.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/Forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_UsageByBillingAccount", + "description": "Forecast the usage data for billing account.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "BillingAccountForecast": { + "$ref": "./examples/BillingAccountForecast.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.CostManagement/Query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "Query_UsageByEnrollmentAccount", + "description": "Query the usage data for an enrollment account.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "EnrollmentAccountQuery": { + "$ref": "./examples/EnrollmentAccountQuery.json" + }, + "EnrollmentAccountQueryGroupingUsage": { + "$ref": "./examples/EnrollmentAccountQueryGrouping.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/enrollmentAccountIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.CostManagement/Forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_UsageByEnrollmentAccount", + "description": "Forecast the usage data for an enrollment account.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "EnrollmentAccountForecast": { + "$ref": "./examples/EnrollmentAccountForecast.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/enrollmentAccountIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.CostManagement/Query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "Query_UsageByDepartment", + "description": "Query the usage data for department.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "DepartmentQuery": { + "$ref": "./examples/DepartmentQuery.json" + }, + "DepartmentQueryGroupingUsage": { + "$ref": "./examples/DepartmentQueryGrouping.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/departmentIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.CostManagement/Forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_UsageByDepartment", + "description": "Forecast the usage data for department.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "DepartmentForecast": { + "$ref": "./examples/DepartmentForecast.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/departmentIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.CostManagement/Query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "Query_UsageByManagmentGroup", + "description": "Lists the usage data for management group.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ManagementGroupQuery": { + "$ref": "./examples/ManagementGroupQuery.json" + }, + "ManagementGroupQueryGroupingUsage": { + "$ref": "./examples/ManagementGroupQueryGrouping.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.CostManagement/Forecast": { + "post": { + "tags": [ + "Forecast" + ], + "operationId": "Forecast_UsageByManagmentGroup", + "description": "Lists the usage data for management group.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ManagementGroupForecast": { + "$ref": "./examples/ManagementGroupForecast.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.CostManagement/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists all of the available consumption REST API operations.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "ErrorDetails": { + "description": "The details of the error.", + "properties": { + "code": { + "description": "Error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string", + "readOnly": true + } + } + }, + "ErrorResponse": { + "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", + "type": "object", + "properties": { + "error": { + "description": "The details of the error.", + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "Resource": { + "description": "The Resource model definition.", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Resource Id." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "Resource name." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type." + }, + "tags": { + "readOnly": true, + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags." + } + }, + "x-ms-azure-resource": true + }, + "ReportConfigDefinition": { + "description": "The definition of a report config.", + "properties": { + "type": { + "description": "The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates.", + "type": "string", + "enum": [ + "Usage" + ], + "x-ms-enum": { + "name": "ReportType", + "modelAsString": true + } + }, + "timeframe": { + "description": "The time frame for pulling data for the report. If custom, then a specific time period must be provided.", + "type": "string", + "enum": [ + "WeekToDate", + "MonthToDate", + "YearToDate", + "Custom" + ], + "x-ms-enum": { + "name": "TimeframeType", + "modelAsString": true + } + }, + "timePeriod": { + "description": "Has time period for pulling data for the report.", + "$ref": "#/definitions/ReportConfigTimePeriod" + }, + "dataset": { + "description": "Has definition for data in this report config.", + "$ref": "#/definitions/ReportConfigDataset" + } + }, + "required": [ + "type", + "timeframe" + ] + }, + "ReportConfigTimePeriod": { + "description": "The start and end date for pulling data for the report.", + "properties": { + "from": { + "description": "The start date to pull data from.", + "type": "string", + "format": "date-time" + }, + "to": { + "description": "The end date to pull data to.", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "from", + "to" + ] + }, + "ReportConfigDataset": { + "description": "The definition of data present in the report.", + "properties": { + "granularity": { + "description": "The granularity of rows in the report.", + "type": "string", + "enum": [ + "Daily", + "Monthly" + ], + "x-ms-enum": { + "name": "GranularityType", + "modelAsString": true + } + }, + "configuration": { + "description": "Has configuration information for the data in the report. The configuration will be ignored if aggregation and grouping are provided.", + "$ref": "#/definitions/ReportConfigDatasetConfiguration" + }, + "aggregation": { + "type": "object", + "description": "Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses.", + "additionalProperties": { + "type": "object", + "$ref": "#/definitions/ReportConfigAggregation" + }, + "maxItems": 2 + }, + "grouping": { + "description": "Array of group by expression to use in the report. Report can have up to 2 group by clauses.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigGrouping" + }, + "maxItems": 2 + }, + "sorting": { + "description": "Array of order by expression to use in the report.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigSorting" + } + }, + "filter": { + "type": "object", + "description": "Has filter expression to use in the report.", + "$ref": "#/definitions/ReportConfigFilter" + } + } + }, + "ReportConfigDatasetConfiguration": { + "description": "The configuration of dataset in the report.", + "properties": { + "columns": { + "description": "Array of column names to be included in the report. Any valid report column name is allowed. If not provided, then report includes all columns.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ReportConfigAggregation": { + "description": "The aggregation expression to be used in the report.", + "properties": { + "name": { + "description": "The name of the column to aggregate.", + "type": "string" + }, + "function": { + "description": "The name of the aggregation function to use.", + "type": "string", + "enum": [ + "Sum" + ], + "x-ms-enum": { + "name": "FunctionType", + "modelAsString": true + } + } + }, + "required": [ + "name", + "function" + ] + }, + "ReportConfigSorting": { + "description": "The order by expression to be used in the report.", + "properties": { + "direction": { + "description": "Direction of sort.", + "type": "string", + "enum": [ + "Ascending", + "Descending" + ] + }, + "name": { + "description": "The name of the column to sort.", + "type": "string" + } + }, + "required": [ + "name" + ] + }, + "ReportConfigGrouping": { + "description": "The group by expression to be used in the report.", + "properties": { + "type": { + "description": "Has type of the column to group.", + "$ref": "#/definitions/ReportConfigColumnType" + }, + "name": { + "description": "The name of the column to group. This version supports subscription lowest possible grain.", + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "ReportConfigFilter": { + "description": "The filter expression to be used in the report.", + "properties": { + "and": { + "description": "The logical \"AND\" expression. Must have at least 2 items.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigFilter" + }, + "minItems": 2 + }, + "or": { + "description": "The logical \"OR\" expression. Must have at least 2 items.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigFilter" + }, + "minItems": 2 + }, + "not": { + "description": "The logical \"NOT\" expression.", + "$ref": "#/definitions/ReportConfigFilter" + }, + "dimension": { + "description": "Has comparison expression for a dimension", + "$ref": "#/definitions/ReportConfigComparisonExpression" + }, + "tag": { + "description": "Has comparison expression for a tag", + "$ref": "#/definitions/ReportConfigComparisonExpression" + } + } + }, + "ReportConfigColumnType": { + "description": "The type of the column in the report.", + "type": "string", + "enum": [ + "Tag", + "Dimension" + ], + "x-ms-enum": { + "name": "ReportConfigColumnType", + "modelAsString": true + } + }, + "ReportConfigComparisonExpression": { + "description": "The comparison expression to be used in the report.", + "properties": { + "name": { + "description": "The name of the column to use in comparison.", + "type": "string" + }, + "operator": { + "description": "The operator to use for comparison.", + "type": "string", + "enum": [ + "In", + "Contains" + ], + "x-ms-enum": { + "name": "OperatorType", + "modelAsString": true + } + }, + "values": { + "description": "Array of values to use for comparison", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + } + }, + "required": [ + "name", + "operator", + "values" + ] + }, + "DimensionsListResult": { + "description": "Result of listing dimensions. It contains a list of available dimensions.", + "type": "object", + "properties": { + "value": { + "description": "The list of dimensions.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Dimension" + } + } + } + }, + "Dimension": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DimensionProperties", + "title": "Dimension properties" + } + } + }, + "DimensionProperties": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "filterEnabled": { + "type": "boolean" + }, + "groupingEnabled": { + "type": "boolean" + }, + "data": { + "type": "array", + "items": { + "type": "string" + } + }, + "total": { + "format": "int32", + "type": "integer" + }, + "category": { + "type": "string" + }, + "usageStart": { + "format": "date-time", + "type": "string" + }, + "usageEnd": { + "format": "date-time", + "type": "string" + }, + "nextLink": { + "type": "string" + } + } + }, + "QueryResult": { + "description": "Result of query. It contains all columns listed under groupings and aggregation.", + "type": "object", + "properties": { + "value": { + "description": "The list of usage data.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Query" + } + } + } + }, + "Query": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/QueryProperties", + "title": "Query properties" + } + } + }, + "QueryProperties": { + "type": "object", + "properties": { + "nextLink": { + "type": "string" + }, + "columns": { + "description": "Array of columns", + "type": "array", + "items": { + "$ref": "#/definitions/QueryColumn" + } + }, + "rows": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + } + }, + "QueryColumn": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "OperationListResult": { + "description": "Result of listing cost management operations. It contains a list of operations and a URL link to get the next set of results.", + "properties": { + "value": { + "description": "List of cost management operations supported by the Microsoft.CostManagement resource provider.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Operation" + } + }, + "nextLink": { + "description": "URL to get the next set of operation list results if there are any.", + "type": "string", + "readOnly": true + } + } + }, + "Operation": { + "description": "A Cost management REST API operation.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + }, + "display": { + "description": "The object that represents the operation.", + "properties": { + "provider": { + "description": "Service provider: Microsoft.CostManagement.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "Resource on which the operation is performed: Dimensions, Query.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type: Read, write, delete, etc.", + "type": "string", + "readOnly": true + } + } + } + } + } + }, + "parameters": { + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Version of the API to be used with the client request. The current version is 2018-05-31." + }, + "subscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "Azure Subscription ID.", + "required": true, + "type": "string" + }, + "billingAccountIdParameter": { + "name": "billingAccountId", + "in": "path", + "description": "BillingAccount ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "managementGroupIdParameter": { + "name": "managementGroupId", + "in": "path", + "description": "ManagementGroup ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "departmentIdParameter": { + "name": "departmentId", + "in": "path", + "description": "Department ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "enrollmentAccountIdParameter": { + "name": "enrollmentAccountId", + "in": "path", + "description": "Enrollment Account ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "resourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "Azure Resource Group Name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsList.json new file mode 100644 index 000000000000..83dfa612b0d3 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsList.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "100" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceGroup_2018-12-01_2018-12-31", + "name": "dimensions_ResourceGroup_2018-12-01_2018-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 3, + "category": "SubscriptionGuid", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Subscription Guid", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceType_2018-12-01_2018-12-31", + "name": "dimensions_ResourceType_2018-12-01_2018-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "Account Name", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..f7856e1ab6be --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "100", + "$expand": "properties/data", + "$top": 5 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceGroup_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceGroup_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceType_2018-12-31_2018-12-31_5", + "name": "dimensions_ResourceType_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListWithFilter.json new file mode 100644 index 000000000000..55d76d565be7 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListWithFilter.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "100", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceId_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceId_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", + "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" + ], + "total": 1409, + "category": "ResourceId", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "http://management.azure.com/ccmapi/providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2018-12-01-preview&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountForecast.json new file mode 100644 index 000000000000..e47da91768e7 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountForecast.json @@ -0,0 +1,128 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "70664866", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-08-01T00:00:00.000Z", + "to": "2018-10-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "filter":{ + "and": [ + { + "or":[ + { + "dimension": { + "name": "SubscriptionName", + "operator": "In", + "values": [ + "Azure Dev", + "Azure Prod", + "Azure PPE" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "Dev", + "PPE", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "DepartmentName", + "operator": "In", + "values": [ + "Azure Dept" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Forecast/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Forecast", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Forecast?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + 20180831, + "Actual", + "USD" + ], + [ + 20.41979233490323, + 20180930, + "Actual", + "USD" + ], + [ + 21.322216562625452, + 20181031, + "Actual", + "USD" + ], + [ + 22.545363672276532, + 20180831, + "Actual", + "USD" + ], + [ + 23.41979675590323, + 20180930, + "Forecast", + "USD" + ], + [ + 24.359416562626652, + 20181031, + "Forecast", + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQuery.json new file mode 100644 index 000000000000..a25ce920278b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQuery.json @@ -0,0 +1,103 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "70664866", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-08-01T00:00:00.000Z", + "to": "2018-10-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "filter":{ + "and": [ + { + "or":[ + { + "dimension": { + "name": "SubscriptionName", + "operator": "In", + "values": [ + "Azure Dev", + "Azure Prod", + "Azure PPE" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "Dev", + "PPE", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "DepartmentName", + "operator": "In", + "values": [ + "Azure Dept" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + 20180831, + "USD" + ], + [ + 173.41979241290323, + 20180930, + "USD" + ], + [ + 20.359416562625452, + 20181031, + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQueryGrouping.json new file mode 100644 index 000000000000..f296688bd632 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQueryGrouping.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "70664866", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-10-01T00:00:00.000Z", + "to": "2018-10-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "SubscriptionName" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "SubscriptionName", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "Trial Subscription", + "USD" + ], + [ + 173.41979241290323, + "DEV Subscription", + "USD" + ], + [ + 20.359416562625452, + "Cost Management Subscrioption", + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsList.json new file mode 100644 index 000000000000..3765b9a63bd4 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsList.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "100", + "departmentId": "123" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.consumption/dimensions_ResourceGroup_2018-12-01_2018-12-31", + "name": "dimensions_ResourceGroup_2018-12-01_2018-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.consumption/dimensions_ResourceType_2018-12-01_2018-12-31", + "name": "dimensions_ResourceType_2018-12-01_2018-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..5f691d16df86 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListExpandAndTop.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "100", + "departmentId": "123", + "$expand": "properties/data", + "$top": 5 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.consumption/dimensions_ResourceGroup_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceGroup_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.consumption/dimensions_ResourceType_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceType_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListWithFilter.json new file mode 100644 index 000000000000..35bf6908b9af --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListWithFilter.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "100", + "departmentId": "123", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.consumption/dimensions_ResourceId_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceId_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", + "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" + ], + "total": 1409, + "category": "ResourceId", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2018-12-01-preview&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentForecast.json new file mode 100644 index 000000000000..8d2842b87a33 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentForecast.json @@ -0,0 +1,129 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "70664866", + "departmentId": "123", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-10-01T00:00:00.000Z", + "to": "2018-12-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "filter":{ + "and": [ + { + "or":[ + { + "dimension": { + "name": "SubscriptionName", + "operator": "In", + "values": [ + "Azure Dev Subscription", + "Azure Prod Subscription", + "Azure PPE Subscription" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "Dev", + "PPE", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "AccountName", + "operator": "In", + "values": [ + "Azure Account" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Forecast/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Forecast", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Forecast?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + 20181026, + "Actual", + "USD" + ], + [ + 20.41179241293923, + 20181027, + "Actual", + "USD" + ], + [ + 21.359416562625452, + 20181028, + "Actual", + "USD" + ], + [ + 22.545363672276512, + 20181029, + "Forecast", + "USD" + ], + [ + 23.41979241290323, + 20181030, + "Forecast", + "USD" + ], + [ + 24.359416562625452, + 20181031, + "Forecast", + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQuery.json new file mode 100644 index 000000000000..57a9053bedd1 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQuery.json @@ -0,0 +1,104 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "70664866", + "departmentId": "123", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-10-01T00:00:00.000Z", + "to": "2018-12-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "filter":{ + "and": [ + { + "or":[ + { + "dimension": { + "name": "SubscriptionName", + "operator": "In", + "values": [ + "Azure Dev Subscription", + "Azure Prod Subscription", + "Azure PPE Subscription" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "Dev", + "PPE", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "AccountName", + "operator": "In", + "values": [ + "Azure Account" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + 20181031, + "USD" + ], + [ + 173.41979241290323, + 20181031, + "USD" + ], + [ + 20.359416562625452, + 20181031, + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQueryGrouping.json new file mode 100644 index 000000000000..b8912a44733b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQueryGrouping.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "70664866", + "departmentId": "123", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-08-01T00:00:00.000Z", + "to": "2018-10-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "AccountName" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "AccountName", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "Azure Dev Account", + "USD" + ], + [ + 173.41979241290323, + "Azure PPE Account", + "USD" + ], + [ + 20.359416562625452, + "Azure Prod Account", + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsList.json new file mode 100644 index 000000000000..c42c05a4e8d9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsList.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "100", + "enrollmentAccountId": "456" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.consumption/dimensions_ResourceGroup_2018-12-01_2018-12-31", + "name": "dimensions_ResourceGroup_2018-12-01_2018-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.consumption/dimensions_ResourceType_2018-12-01_2018-12-31", + "name": "dimensions_ResourceType_2018-12-01_2018-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..759945cd88c2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "$expand": "properties/data", + "$top": 5 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.consumption/dimensions_ResourceGroup_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceGroup_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.consumption/dimensions_ResourceType_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceType_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json new file mode 100644 index 000000000000..ad29cf2e52f8 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.consumption/dimensions_ResourceId_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceId_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", + "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" + ], + "total": 1409, + "category": "ResourceId", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2018-12-01-preview&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountForecast.json new file mode 100644 index 000000000000..2857e80970b4 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountForecast.json @@ -0,0 +1,116 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "70664866", + "enrollmentAccountId": "456", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-08-01T00:00:00.000Z", + "to": "2018-10-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "filter":{ + "or":[ + { + "dimension": { + "name": "SubscriptionName", + "operator": "In", + "values": [ + "Azure Dev Subscription", + "Azure Prod Subscription", + "Azure PPE Subscription" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "Dev", + "PPE", + "Prod" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Forecast/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Forecast", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Forecast?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 168.545323467227622, + 20180826, + "Actual", + "USD" + ], + [ + 169.41979241290344, + 20180927, + "Actual", + "USD" + ], + [ + 170.359416562338452, + 20181028, + "Actual", + "USD" + ], + [ + 172.545363234276512, + 20180829, + "Forecast", + "USD" + ], + [ + 173.41979241290323, + 20180930, + "Forecast", + "USD" + ], + [ + 174.359416562625452, + 20181031, + "Forecast", + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQuery.json new file mode 100644 index 000000000000..1dfc1ebdeff8 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQuery.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "70664866", + "enrollmentAccountId": "456", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-08-01T00:00:00.000Z", + "to": "2018-10-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "filter":{ + "or":[ + { + "dimension": { + "name": "SubscriptionName", + "operator": "In", + "values": [ + "Azure Dev Subscription", + "Azure Prod Subscription", + "Azure PPE Subscription" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "Dev", + "PPE", + "Prod" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + 20180831, + "USD" + ], + [ + 173.41979241290323, + 20180930, + "USD" + ], + [ + 20.359416562625452, + 20181031, + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQueryGrouping.json new file mode 100644 index 000000000000..6eceb17ced64 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQueryGrouping.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "billingAccountId": "70664866", + "enrollmentAccountId": "456", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-08-01T00:00:00.000Z", + "to": "2018-10-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "SubscriptionName" + } + ], + "sorting": [ + { + "name": "UsageDate" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "SubscriptionName", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "Azure Dev Subscription", + 20180831, + "USD" + ], + [ + 173.41979241290323, + "Azure PPE Subscription", + 20180930, + "USD" + ], + [ + 20.359416562625452, + "Azure Prod Subscription", + 20181031, + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsList.json new file mode 100644 index 000000000000..76f48ed059a3 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsList.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "managementGroupId": "MyMgId" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.consumption/dimensions_ResourceGroup_2018-12-01_2018-12-31", + "name": "dimensions_ResourceGroup_2018-12-01_2018-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.consumption/dimensions_ResourceType_2018-12-01_2018-12-31", + "name": "dimensions_ResourceType_2018-12-01_2018-12-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..6d0d67ca44e9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "managementGroupId": "MyMgId", + "$expand": "properties/data", + "$top": 5 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.consumption/dimensions_ResourceGroup_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceGroup_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.consumption/dimensions_ResourceType_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceType_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListWithFilter.json new file mode 100644 index 000000000000..fd6e243a8491 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListWithFilter.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "managementGroupId": "MyMgId", + "$expand": "properties/data", + "$top": 5, + "$filter": "properties/category eq 'resourceId'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.consumption/dimensions_ResourceId_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceId_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", + "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" + ], + "total": 1409, + "category": "ResourceId", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "http://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2018-12-31-preview&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupForecast.json new file mode 100644 index 000000000000..f29b980bf41e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupForecast.json @@ -0,0 +1,115 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "managementGroupId": "MyMgId", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-11-01T00:00:00.000Z", + "to": "2019-01-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "filter":{ + "or":[ + { + "dimension": { + "name": "SubscriptionName", + "operator": "In", + "values": [ + "Azure Dev", + "Azure Prod", + "Azure PPE" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "Dev", + "PPE", + "Prod" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Forecast/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Forecast", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Forecast?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.045363672276512, + 20190126, + "Actual", + "USD" + ], + [ + 19.41979241290323, + 20190127, + "Actual", + "USD" + ], + [ + 20.359416562625452, + 20190128, + "Actual", + "USD" + ], + [ + 19.045363672276512, + 20190129, + "Forecast", + "USD" + ], + [ + 19.41979241290323, + 20190130, + "Forecast", + "USD" + ], + [ + 20.359416562625452, + 20190131, + "Forecast", + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQuery.json new file mode 100644 index 000000000000..605abffa2f5b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQuery.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "managementGroupId": "MyMgId", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-11-01T00:00:00.000Z", + "to": "2019-01-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "filter":{ + "or":[ + { + "dimension": { + "name": "SubscriptionName", + "operator": "In", + "values": [ + "Azure Dev", + "Azure Prod", + "Azure PPE" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "Dev", + "PPE", + "Prod" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + 20181131, + "USD" + ], + [ + 173.41979241290323, + 20181231, + "USD" + ], + [ + 20.359416562625452, + 20190131, + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQueryGrouping.json new file mode 100644 index 000000000000..3bc79bcf59cc --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQueryGrouping.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "managementGroupId": "MyMgId", + "parameters": { + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-08-01T00:00:00.000Z", + "to": "2018-10-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "SubscriptionName" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "SubscriptionName", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "Trial Subscription", + "USD" + ], + [ + 173.41979241290323, + "DEV Subscription", + "USD" + ], + [ + 20.35941656262545, + "Cost Management Subscrioption", + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupDimensionsList.json new file mode 100644 index 000000000000..8d35d5174284 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupDimensionsList.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "system.orlando", + "$expand": "properties/data", + "$top": 5 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/system.orlando/providers/microsoft.consumption/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "microsoft.storage/storageaccounts" + ], + "total": 1, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/system.orlando/providers/microsoft.consumption/dimensions_ResourceId_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/authprod", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/systemevents", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/armadminprod", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/publicsystemportal" + ], + "total": 27, + "category": "ResourceId", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupForecast.json new file mode 100644 index 000000000000..137391629751 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupForecast.json @@ -0,0 +1,111 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "subscriptionId": "55312978-ba1b-415c-9304-c4b9c43c0481", + "resourceGroupName": "ScreenSharingTest-peer", + "parameters":{ + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter":{ + "and": [ + { + "or":[ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/55312978-ba1b-415c-9304-c4b9c43c0481/resourcegroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/Forecast/9af9459d-441d-4055-9ed0-83d4c4a363fb", + "name": "9af9459d-441d-4055-9ed0-83d4c4a363fb", + "type": "microsoft.costmanagement/Forecast", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.10333307059661, + 20180417, + "Actual", + "USD" + ], + [ + 20.10333307059661, + 20180418, + "Actual", + "USD" + ], + [ + 21.10333307059661, + 20180419, + "Forecast", + "USD" + ], + [ + 22.10333307059661, + 20180420, + "Forecast", + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupQuery.json new file mode 100644 index 000000000000..ef7aefedfdfd --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupQuery.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "subscriptionId": "55312978-ba1b-415c-9304-c4b9c43c0481", + "resourceGroupName": "ScreenSharingTest-peer", + "parameters":{ + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "filter":{ + "and": [ + { + "or":[ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/55312978-ba1b-415c-9304-c4b9c43c0481/resourcegroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/Query/9af9459d-441d-4055-9ed0-83d4c4a363fb", + "name": "9af9459d-441d-4055-9ed0-83d4c4a363fb", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + 20180417, + "USD" + ], + [ + 20.10333307059661, + 20180418, + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionDimensionsList.json new file mode 100644 index 000000000000..5187597f2fab --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionDimensionsList.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "$top": 5, + "$expand": "properties/data" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/dimensions_ResourceGroup_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceGroup_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "dcrg", + "rg", + "offlinegalleryrg", + "system.orlando.adminkeyvault", + "system.orlando.keyvault" + ], + "total": 68, + "category": "ResourceGroup", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/dimensions_ResourceType_2018-12-01_2018-12-31_5", + "name": "dimensions_ResourceType_2018-12-01_2018-12-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "microsoft.storage/storageaccounts", + "microsoft.web.admin/role", + "microsoft.sql/servers", + "microsoft.compute/virtualmachines" + ], + "total": 4, + "category": "ResourceType", + "usageStart": "2018-12-01T00:00:00-07:00", + "usageEnd": "2018-12-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionForecast.json new file mode 100644 index 000000000000..5616d3b57ffb --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionForecast.json @@ -0,0 +1,124 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-10-01T00:00:00.000Z", + "to": "2018-12-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "filter":{ + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "Dev", + "PPE", + "Prod" + ] + } + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/Forecast/00000000-0000-0000-0000-000000000000", + "name": "55312978-ba1b-415c-9304-cfd9c43c0481", + "type": "microsoft.costmanagement/Forecast", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "CostStatus", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 214.68795741935486, + 20181222, + "Actual", + "USD" + ], + [ + 215.68795741935486, + 20181223, + "Actual", + "USD" + ], + [ + 216.68795741935486, + 20181224, + "Actual", + "USD" + ], + [ + 217.68795741935486, + 20181225, + "Actual", + "USD" + ], + [ + 218.68795741935486, + 20181226, + "Actual", + "USD" + ], + [ + 219.143849143581657052, + 20181227, + "Actual", + "USD" + ], + [ + 220.143849143588766052, + 20181228, + "Forecast", + "USD" + ], + [ + 221.143433143588766052, + 20181229, + "Forecast", + "USD" + ], + [ + 222.143433555588766052, + 20181230, + "Forecast", + "USD" + ], + [ + 223.143433555588743252, + 20181231, + "Forecast", + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionQuery.json new file mode 100644 index 000000000000..6847e8584028 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionQuery.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "api-version": "2018-12-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "parameters":{ + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-10-01T00:00:00.000Z", + "to": "2018-12-31T00:00:00.000Z" + }, + "dataset": { + "granularity": "Daily", + "filter":{ + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "Dev", + "PPE", + "Prod" + ] + } + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/Query/00000000-0000-0000-0000-000000000000", + "name": "55312978-ba1b-415c-9304-cfd9c43c0481", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + 20181017, + "USD" + ], + [ + 218.68795741935486, + 20181018, + "USD" + ], + [ + 0.14384913581657052, + 20181019, + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file From dcf2d337fb9c6509cd9e14e217e4defcbbf5c506 Mon Sep 17 00:00:00 2001 From: Arieh Faiga Date: Thu, 10 Jan 2019 08:38:02 +0200 Subject: [PATCH 02/17] Updates readme --- .../resource-manager/readme.md | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/specification/cost-management/resource-manager/readme.md b/specification/cost-management/resource-manager/readme.md index 2574976be824..332f5246771c 100644 --- a/specification/cost-management/resource-manager/readme.md +++ b/specification/cost-management/resource-manager/readme.md @@ -5,7 +5,9 @@ This is the AutoRest configuration file for Cost Management. --- + ## Getting Started + To build the SDK for Cost Management, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: > `autorest` @@ -13,20 +15,32 @@ To build the SDK for Cost Management, simply [Install AutoRest](https://aka.ms/a To see additional help and options, run: > `autorest --help` + --- ## Configuration ### Basic Information + These are the global settings for the Cost Management API. ``` yaml openapi-type: arm -tag: package-2018-05 +tag: package-preview-2019-03 azure-validator: true ``` --- + + +### Tag: package-preview-2019-03 + +These settings apply only when `--tag=package-preview-2019-03` is specified on the command line. + +```yaml $(tag) == 'package-preview-2019-03' +input-file: + - Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json +``` ### Tag: package-2018-05 These settings apply only when `--tag=package-2018-05` is specified on the command line. @@ -37,6 +51,7 @@ input-file: ``` ## Suppression + ``` yaml directive: - suppress: R2059 @@ -54,7 +69,6 @@ input-file: - Microsoft.CostManagement/preview/2018-08-01-preview/costmanagement.json ``` - ### Tag: package-2018-12-preview These settings apply only when `--tag=package-2018-12-preview` is specified on the command line. @@ -64,8 +78,8 @@ input-file: - Microsoft.CostManagement/preview/2018-12-01-preview/costmanagement.json ``` - --- + # Code Generation ## Swagger to SDK @@ -114,11 +128,13 @@ python: package-version: 1.2.0 clear-output-folder: true ``` + ``` yaml $(python) && $(python-mode) == 'update' python: no-namespace-folders: true output-folder: $(python-sdks-folder)/azure-mgmt-costmanagement/azure/mgmt/costmanagement ``` + ``` yaml $(python) && $(python-mode) == 'create' python: basic-setup-py: true @@ -188,4 +204,4 @@ java: output-folder: $(azure-libraries-for-java-folder)/costmanagement/resource-manager/v2018_12_01_preview regenerate-manager: true generate-interface: true -``` \ No newline at end of file +``` From c43f78ccf513931405528438308824b932662002 Mon Sep 17 00:00:00 2001 From: Arieh Faiga Date: Thu, 10 Jan 2019 08:38:04 +0200 Subject: [PATCH 03/17] Updates API version in new specs and examples --- .../preview/2019-03-01-preview/costmanagement.json | 2 +- .../examples/BillingAccountDimensionsList.json | 2 +- .../examples/BillingAccountDimensionsListExpandAndTop.json | 2 +- .../examples/BillingAccountDimensionsListWithFilter.json | 4 ++-- .../2019-03-01-preview/examples/BillingAccountForecast.json | 4 ++-- .../2019-03-01-preview/examples/BillingAccountQuery.json | 4 ++-- .../examples/BillingAccountQueryGrouping.json | 4 ++-- .../2019-03-01-preview/examples/DepartmentDimensionsList.json | 2 +- .../examples/DepartmentDimensionsListExpandAndTop.json | 2 +- .../examples/DepartmentDimensionsListWithFilter.json | 4 ++-- .../2019-03-01-preview/examples/DepartmentForecast.json | 4 ++-- .../preview/2019-03-01-preview/examples/DepartmentQuery.json | 4 ++-- .../2019-03-01-preview/examples/DepartmentQueryGrouping.json | 4 ++-- .../examples/EnrollmentAccountDimensionsList.json | 2 +- .../examples/EnrollmentAccountDimensionsListExpandAndTop.json | 2 +- .../examples/EnrollmentAccountDimensionsListWithFilter.json | 4 ++-- .../examples/EnrollmentAccountForecast.json | 4 ++-- .../2019-03-01-preview/examples/EnrollmentAccountQuery.json | 4 ++-- .../examples/EnrollmentAccountQueryGrouping.json | 4 ++-- .../examples/ManagementGroupDimensionsList.json | 2 +- .../examples/ManagementGroupDimensionsListExpandAndTop.json | 2 +- .../examples/ManagementGroupDimensionsListWithFilter.json | 2 +- .../2019-03-01-preview/examples/ManagementGroupForecast.json | 4 ++-- .../2019-03-01-preview/examples/ManagementGroupQuery.json | 4 ++-- .../examples/ManagementGroupQueryGrouping.json | 4 ++-- .../examples/ResourceGroupDimensionsList.json | 2 +- .../2019-03-01-preview/examples/ResourceGroupForecast.json | 2 +- .../2019-03-01-preview/examples/ResourceGroupQuery.json | 2 +- .../examples/SubscriptionDimensionsList.json | 2 +- .../2019-03-01-preview/examples/SubscriptionForecast.json | 2 +- .../2019-03-01-preview/examples/SubscriptionQuery.json | 2 +- 31 files changed, 46 insertions(+), 46 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json index 8beb3487b66c..f72403dd8fa3 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2018-12-01-preview", + "version": "2019-03-01-preview", "title": "CostManagementClient" }, "host": "management.azure.com", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsList.json index 83dfa612b0d3..2148d6fc447b 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsList.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "billingAccountId": "100" }, "responses": { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json index f7856e1ab6be..261219b6d68d 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListExpandAndTop.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "billingAccountId": "100", "$expand": "properties/data", "$top": 5 diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListWithFilter.json index 55d76d565be7..02adf3719dc8 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListWithFilter.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountDimensionsListWithFilter.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "billingAccountId": "100", "$expand": "properties/data", "$top": 5, @@ -29,7 +29,7 @@ "description": "Resource Id", "filterEnabled": true, "groupingEnabled": true, - "nextLink": "http://management.azure.com/ccmapi/providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2018-12-01-preview&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + "nextLink": "http://management.azure.com/ccmapi/providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-03-01-preview&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" } } ] diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountForecast.json index e47da91768e7..0d2b125d34e1 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountForecast.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountForecast.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "billingAccountId": "70664866", "parameters":{ "type": "Usage", @@ -62,7 +62,7 @@ "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", "type": "microsoft.costmanagement/Forecast", "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Forecast?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Forecast?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", "columns": [ { "name": "PreTaxCost", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQuery.json index a25ce920278b..8c6186516458 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQuery.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQuery.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "billingAccountId": "70664866", "parameters":{ "type": "Usage", @@ -62,7 +62,7 @@ "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=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", "columns": [ { "name": "PreTaxCost", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQueryGrouping.json index f296688bd632..df58f39472b5 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQueryGrouping.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/BillingAccountQueryGrouping.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "billingAccountId": "70664866", "parameters":{ "type": "Usage", @@ -35,7 +35,7 @@ "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=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", "columns": [ { "name": "PreTaxCost", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsList.json index 3765b9a63bd4..89b95546d1fc 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsList.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "billingAccountId": "100", "departmentId": "123" }, diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListExpandAndTop.json index 5f691d16df86..c34403dc70b6 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListExpandAndTop.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListExpandAndTop.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "billingAccountId": "100", "departmentId": "123", "$expand": "properties/data", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListWithFilter.json index 35bf6908b9af..cae08c00c4b6 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListWithFilter.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentDimensionsListWithFilter.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "billingAccountId": "100", "departmentId": "123", "$expand": "properties/data", @@ -30,7 +30,7 @@ "description": "Resource Id", "filterEnabled": true, "groupingEnabled": true, - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2018-12-01-preview&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-03-01-preview&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" } } ] diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentForecast.json index 8d2842b87a33..17f3f91e8830 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentForecast.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentForecast.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "billingAccountId": "70664866", "departmentId": "123", "parameters":{ @@ -63,7 +63,7 @@ "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", "type": "microsoft.costmanagement/Forecast", "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Forecast?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Forecast?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", "columns": [ { "name": "PreTaxCost", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQuery.json index 57a9053bedd1..7c05492c89b8 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQuery.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQuery.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "billingAccountId": "70664866", "departmentId": "123", "parameters":{ @@ -63,7 +63,7 @@ "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=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", "columns": [ { "name": "PreTaxCost", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQueryGrouping.json index b8912a44733b..78c9377d4d5e 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQueryGrouping.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/DepartmentQueryGrouping.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "billingAccountId": "70664866", "departmentId": "123", "parameters":{ @@ -36,7 +36,7 @@ "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=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", "columns": [ { "name": "PreTaxCost", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsList.json index c42c05a4e8d9..1689becf8479 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsList.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "billingAccountId": "100", "enrollmentAccountId": "456" }, diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json index 759945cd88c2..c6765a2fe044 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListExpandAndTop.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "billingAccountId": "100", "enrollmentAccountId": "456", "$expand": "properties/data", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json index ad29cf2e52f8..3114a3bc5633 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountDimensionsListWithFilter.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "billingAccountId": "100", "enrollmentAccountId": "456", "$expand": "properties/data", @@ -30,7 +30,7 @@ "description": "Resource Id", "filterEnabled": true, "groupingEnabled": true, - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2018-12-01-preview&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-03-01-preview&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" } } ] diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountForecast.json index 2857e80970b4..fa4247f3a054 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountForecast.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountForecast.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "billingAccountId": "70664866", "enrollmentAccountId": "456", "parameters":{ @@ -50,7 +50,7 @@ "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", "type": "microsoft.costmanagement/Forecast", "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Forecast?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Forecast?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", "columns": [ { "name": "PreTaxCost", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQuery.json index 1dfc1ebdeff8..8b737fabd400 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQuery.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQuery.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "billingAccountId": "70664866", "enrollmentAccountId": "456", "parameters":{ @@ -50,7 +50,7 @@ "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=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", "columns": [ { "name": "PreTaxCost", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQueryGrouping.json index 6eceb17ced64..65e6d86f817b 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQueryGrouping.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/EnrollmentAccountQueryGrouping.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "billingAccountId": "70664866", "enrollmentAccountId": "456", "parameters":{ @@ -41,7 +41,7 @@ "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=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", "columns": [ { "name": "PreTaxCost", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsList.json index 76f48ed059a3..3cd7bdbe6ab5 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsList.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "managementGroupId": "MyMgId" }, "responses": { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json index 6d0d67ca44e9..7b9960077fde 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListExpandAndTop.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "managementGroupId": "MyMgId", "$expand": "properties/data", "$top": 5 diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListWithFilter.json index fd6e243a8491..83a8ac2f5e94 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListWithFilter.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupDimensionsListWithFilter.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "managementGroupId": "MyMgId", "$expand": "properties/data", "$top": 5, diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupForecast.json index f29b980bf41e..4cd999c72afe 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupForecast.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupForecast.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "managementGroupId": "MyMgId", "parameters":{ "type": "Usage", @@ -49,7 +49,7 @@ "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", "type": "microsoft.costmanagement/Forecast", "properties": { - "nextLink": "https://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Forecast?api-version=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "nextLink": "https://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Forecast?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", "columns": [ { "name": "PreTaxCost", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQuery.json index 605abffa2f5b..426805646f4f 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQuery.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQuery.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "managementGroupId": "MyMgId", "parameters":{ "type": "Usage", @@ -49,7 +49,7 @@ "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=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "nextLink": "https://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", "columns": [ { "name": "PreTaxCost", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQueryGrouping.json index 3bc79bcf59cc..f8b13c585079 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQueryGrouping.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupQueryGrouping.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "managementGroupId": "MyMgId", "parameters": { "type": "Usage", @@ -35,7 +35,7 @@ "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=2018-12-01-preview&$skiptoken=AQAAAA%3D%3D", + "nextLink": "https://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query?api-version=2019-03-01-preview&$skiptoken=AQAAAA%3D%3D", "columns": [ { "name": "PreTaxCost", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupDimensionsList.json index 8d35d5174284..34aee5fa0cf0 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupDimensionsList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupDimensionsList.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "system.orlando", "$expand": "properties/data", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupForecast.json index 137391629751..b214a77885fd 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupForecast.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupForecast.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "subscriptionId": "55312978-ba1b-415c-9304-c4b9c43c0481", "resourceGroupName": "ScreenSharingTest-peer", "parameters":{ diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupQuery.json index ef7aefedfdfd..14eaef3e8f4f 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupQuery.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ResourceGroupQuery.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "subscriptionId": "55312978-ba1b-415c-9304-c4b9c43c0481", "resourceGroupName": "ScreenSharingTest-peer", "parameters":{ diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionDimensionsList.json index 5187597f2fab..ef1d011d3a1c 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionDimensionsList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionDimensionsList.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "subscriptionId": "00000000-0000-0000-0000-000000000000", "$top": 5, "$expand": "properties/data" diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionForecast.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionForecast.json index 5616d3b57ffb..f12e2175568d 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionForecast.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionForecast.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "subscriptionId": "00000000-0000-0000-0000-000000000000", "parameters":{ "type": "Usage", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionQuery.json index 6847e8584028..5bfac70c4632 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionQuery.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/SubscriptionQuery.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-12-01-preview", + "api-version": "2019-03-01-preview", "subscriptionId": "00000000-0000-0000-0000-000000000000", "parameters":{ "type": "Usage", From 175b5c2a299820ed2913d5dfdd40bf59a2ba52ce Mon Sep 17 00:00:00 2001 From: ariehf Date: Mon, 14 Jan 2019 15:58:45 +0200 Subject: [PATCH 04/17] Add Microsoft.CostManagment/cloudConnectors --- .../2019-03-01-preview/costmanagement.json | 501 +++++++++++++++++- .../examples/CloudConnectorDelete.json | 11 + .../examples/CloudConnectorGet.json | 28 + .../examples/CloudConnectorGetExpand.json | 40 ++ .../examples/CloudConnectorList.json | 47 ++ .../examples/CloudConnectorPatch.json | 30 ++ .../examples/CloudConnectorPut.json | 50 ++ 7 files changed, 705 insertions(+), 2 deletions(-) create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorDelete.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGet.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGetExpand.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPatch.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPut.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json index f72403dd8fa3..39469d82174a 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json @@ -1147,6 +1147,226 @@ } } }, + "/providers/Microsoft.CostManagement/cloudConnectors": { + "get": { + "tags": [ + "CloudConnectors" + ], + "operationId": "CloudConnector_List", + "description": "List all cloud connector definitions", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "CloudConnector_List": { + "$ref": "./examples/CloudConnectorList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ConnectorDefinitionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.CostManagement/cloudConnectors/{connectorName}": { + "get": { + "tags": [ + "CloudConnectors" + ], + "operationId": "CloudConnector_Get", + "description": "Get a cloud connector definition", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "CloudConnector_Get": { + "$ref": "./examples/CloudConnectorGet.json" + }, + "CloudConnector_Get_Expand": { + "$ref": "./examples/CloudConnectorGetExpand.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/connectorNameParameter" + }, + { + "name": "$expand", + "description": "May be used to expand the collectionInfo property. By default, collectionInfo is not included.", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ConnectorDefinition" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "CloudConnectors" + ], + "operationId": "CloudConnector_CreateOrUpdate", + "description": "Create or update a cloud connector definition", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "CloudConnector_Put": { + "$ref": "./examples/CloudConnectorPut.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/connectorNameParameter" + }, + { + "name": "connector", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ConnectorDefinition" + }, + "description": "Connector details" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ConnectorDefinition" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/ConnectorDefinition" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "CloudConnectors" + ], + "operationId": "CloudConnector_Delete", + "description": "Delete a cloud connector definition", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "CloudConnector_Delete": { + "$ref": "./examples/CloudConnectorDelete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/connectorNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "CloudConnectors" + ], + "operationId": "CloudConnector_Update", + "description": "Update a cloud connector definition", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "CloudConnector_Patch": { + "$ref": "./examples/CloudConnectorPatch.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/connectorNameParameter" + }, + { + "name": "connector", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ConnectorDefinition" + }, + "description": "Connector details" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ConnectorDefinition" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, "/providers/Microsoft.CostManagement/operations": { "get": { "tags": [ @@ -1180,18 +1400,49 @@ } }, "definitions": { + "ErrorBase": { + "description": "The details of the error.", + "properties": { + "code": { + "type": "string", + "description": "A machine readable error code.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "A human readable error message.", + "readOnly": true + }, + "target": { + "type": "string", + "description": "Indicates which property in the request is responsible for the error.", + "readOnly": true + } + } + }, "ErrorDetails": { "description": "The details of the error.", "properties": { "code": { - "description": "Error code.", + "description": "A machine readable error code.", "type": "string", "readOnly": true }, "message": { - "description": "Error message indicating why the operation failed.", + "description": "A human readable error message.", "type": "string", "readOnly": true + }, + "target": { + "description": "Indicates which property in the request is responsible for the error.", + "type": "string" + }, + "details": { + "description": "error details.", + "type": "array", + "items": { + "$ref": "#/definitions/ErrorBase" + } } } }, @@ -1626,6 +1877,244 @@ } } }, + "ConnectorDefinitionListResult": { + "description": "Result of listing connector definitions. It contains a list of available connector definitions in the scope provided.", + "properties": { + "value": { + "description": "The list of connector definitions.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ConnectorDefinition" + } + } + } + }, + "ConnectorDefinition": { + "type": "object", + "description": "The Connector model definition", + "properties": { + "kind": { + "type": "string", + "description": "Connector kind (eg aws)" + }, + "id": { + "type": "string", + "readOnly": true, + "description": "Connector id" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Connector name" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Connector type" + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Resource tags." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ConnectorProperties", + "description": "Connector properties" + } + }, + "x-ms-azure-resource": true + }, + "ConnectorProperties": { + "type": "object", + "description": "The properties of a Connector", + "properties": { + "displayName": { + "type": "string", + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Connector DisplayName (defaults to Name)" + }, + "providerAccountId": { + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Connector providerAccountId (determined from credentials)", + "readOnly": true + }, + "credentialsKey": { + "type": "string", + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Credentials authentication key (eg AWS ARN)" + }, + "credentialsSecret": { + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ], + "description": "Credentials secret (eg AWS ExternalId)" + }, + "reportId": { + "type": "string", + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Identifying source report. (For AWS this is a CUR report name, defined with Daily and with Resources)" + }, + "createdOn": { + "format": "date-time", + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Connector definition creation datetime", + "readOnly": true + }, + "modifiedOn": { + "format": "date-time", + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Connector last modified datetime", + "readOnly": true + }, + "status": { + "enum": [ + "active", + "error", + "suspended" + ], + "x-ms-enum": { + "name": "ConnectorStatus", + "modelAsString": true + }, + "type": "string", + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Connector status" + }, + "subscriptionId": { + "type": "string", + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Billing SubscriptionId" + }, + "billingModel": { + "enum": [ + "trial", + "autoUpgrade", + "premium", + "expired" + ], + "x-ms-enum": { + "name": "ConnectorBillingModel", + "modelAsString": true + }, + "type": "string", + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Connector billing model" + }, + "collectionInfo": { + "$ref": "#/definitions/ConnectorCollectionInfo", + "description": "Collection information", + "readOnly": true + } + } + }, + "ConnectorCollectionInfo": { + "type": "object", + "description": "Collection and ingestion information", + "properties": { + "lastChecked": { + "format": "date-time", + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Last time the data acquisition process initiated connecting to the external provider", + "readOnly": true + }, + "sourceLastUpdated": { + "format": "date-time", + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Source timestamp of external data currently available in Azure (eg AWS last processed CUR file timestamp)", + "readOnly": true + }, + "lastUpdated": { + "format": "date-time", + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Last time the external data was updated into Azure", + "readOnly": true + }, + "error": { + "$ref": "#/definitions/ConnectorCollectionErrorInfo", + "description": "Error information of last collection" + } + } + }, + "ConnectorCollectionErrorInfo": { + "type": "object", + "description": "Details of any error encountered on last collection attempt", + "properties": { + "errorMessage": { + "type": "string", + "description": "Detailed error message", + "readOnly": true + }, + "errorInnerMessage": { + "type": "string", + "description": "External Provider error message", + "readOnly": true + }, + "errorCode": { + "type": "string", + "description": "Short error code", + "readOnly": true + }, + "errorStartTime": { + "format": "date-time", + "type": "string", + "description": "Time the error started occurring (Last time error occurred in lastChecked)", + "readOnly": true + } + } + }, "OperationListResult": { "description": "Result of listing cost management operations. It contains a list of operations and a URL link to get the next set of results.", "properties": { @@ -1730,6 +2219,14 @@ "required": true, "type": "string", "x-ms-parameter-location": "method" + }, + "connectorNameParameter": { + "name": "connectorName", + "in": "path", + "description": "Connector Name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" } } } \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorDelete.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorDelete.json new file mode 100644 index 000000000000..6000c2609293 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorDelete.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "connectorName": "12345678-9012-3456-7890-111111111111" + }, + "responses": { + "200": { + } + } +} + diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGet.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGet.json new file mode 100644 index 000000000000..55e7bbe1c87a --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGet.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "connectorName": "12345678-9012-3456-7890-111111111111" + }, + "responses": { + "200": { + "body": { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/12345678-9012-3456-7890-111111111111", + "name": "12345678-9012-3456-7890-111111111111", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-1", + "providerAccountId": "123456789012", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "reportId": "HourlyWithResources", + "createdOn": "2018-05-15T13:25:48Z", + "modifiedOn": "2018-05-23T09:21:11Z", + "status": "active", + "subscriptionId": "22222222-3333-4444-1111-777777777777", + "billingModel": "autoUpgrade" + } + } + } + } +} + diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGetExpand.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGetExpand.json new file mode 100644 index 000000000000..65390710ea6d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGetExpand.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "connectorName": "12345678-9012-3456-7890-111111111111", + "$expand": "collectionInfo" + }, + "responses": { + "200": { + "body": { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/12345678-9012-3456-7890-111111111111", + "name": "12345678-9012-3456-7890-111111111111", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-1", + "providerAccountId": "123456789012", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "reportId": "HourlyWithResources", + "createdOn": "2018-05-15T13:25:48Z", + "modifiedOn": "2018-05-23T09:21:11Z", + "status": "active", + "subscriptionId": "22222222-3333-4444-1111-777777777777", + "billingModel": "autoUpgrade", + "collectionInfo": { + "lastChecked": "2018-06-15T03:21:08Z", + "sourceLastUpdated": "2018-06-12T16:41:28Z", + "lastUpdated": "2018-06-12T17:25:28Z", + "error": { + "errorCode": "FailedToAssumeRole", + "errorMessage": "Failed to assume role", + "errorInnerMessage": "Insufficient access to assume role arn:aws:iam::123456789012:role/AzureCostManagementRole", + "errorStartTime": "2018-06-12T21:41:03Z" + } + } + } + } + } + } +} + diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorList.json new file mode 100644 index 000000000000..a663dc7e24c1 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorList.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/12345678-9012-3456-7890-111111111111", + "name": "12345678-9012-3456-7890-111111111111", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-1", + "providerAccountId": "123456789012", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "reportId": "HourlyWithResources", + "createdOn": "2018-05-15T13:25:48Z", + "modifiedOn": "2018-05-23T09:21:11Z", + "status": "active", + "subscriptionId": "22222222-3333-4444-1111-777777777777", + "billingModel": "autoUpgrade" + } + }, + { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/11111111-2222-3333-4444-555555555555", + "name": "11111111-2222-3333-4444-555555555555", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-2", + "providerAccountId": "100000000007", + "credentialsKey": "arn:aws:iam::100000000007:role/AzureCostManagementRole", + "reportId": "CURHourlyWithResources", + "createdOn": "2018-06-16T11:23:44Z", + "modifiedOn": "2018-06-21T17:33:28Z", + "status": "suspended", + "subscriptionId": "22222222-3333-4444-1111-777777777777", + "billingModel": "premium" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPatch.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPatch.json new file mode 100644 index 000000000000..f86e333dfedb --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPatch.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "connectorName": "12345678-9012-3456-7890-111111111111", + "connector": { + "properties": { + "displayName": "AWS-Consolidated-3" + } + } + }, + "responses": { + "200": { + "body": { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/12345678-9012-3456-7890-111111111111", + "name": "12345678-9012-3456-7890-111111111111", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-3", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "reportId": "HourlyWithResources", + "createdOn": "2018-05-15T13:25:48Z", + "modifiedOn": "2018-05-23T09:21:11Z", + "status": "active" + } + } + } + } +} + diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPut.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPut.json new file mode 100644 index 000000000000..8615c3b7b586 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPut.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "connectorName": "12345678-9012-3456-7890-111111111111", + "connector": { + "properties": { + "displayName": "AWS-Consolidated-1", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "credentialsSecret": "external-id", + "reportId": "HourlyWithResources", + "status": "active" + } + } + }, + "responses": { + "200": { + "body": { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/12345678-9012-3456-7890-111111111111", + "name": "12345678-9012-3456-7890-111111111111", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-1", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "reportId": "HourlyWithResources", + "createdOn": "2018-05-15T13:25:48Z", + "modifiedOn": "2018-05-23T09:21:11Z", + "status": "active" + } + } + }, + "201": { + "body": { + "kind": "aws", + "id": "/providers/Microsoft.CostManagement/cloudConnectors/12345678-9012-3456-7890-111111111111", + "name": "12345678-9012-3456-7890-111111111111", + "type": "Microsoft.CostManagement/cloudConnectors", + "properties": { + "displayName": "AWS-Consolidated-1", + "credentialsKey": "arn:aws:iam::123456789012:role/AzureCostManagementRole", + "reportId": "HourlyWithResources", + "createdOn": "2018-05-15T13:25:48Z", + "modifiedOn": "2018-05-23T09:21:11Z", + "status": "active" + } + } + } + } +} + From 5a6c828154265c8b8bfb033a40f6634a65ca53a8 Mon Sep 17 00:00:00 2001 From: ariehf Date: Mon, 14 Jan 2019 19:04:02 +0200 Subject: [PATCH 05/17] Add Microsoft.CostManagement/AwsConsolidatedAccount and AwsLinkedAccount --- .../2019-03-01-preview/costmanagement.json | 327 +++++++++++++++++- .../examples/AwsConsolidatedAccountGet.json | 20 ++ .../AwsConsolidatedAccountGetExpand.json | 32 ++ .../examples/AwsConsolidatedAccountList.json | 31 ++ .../examples/AwsLinkedAccountGet.json | 19 + .../examples/AwsLinkedAccountList.json | 29 ++ 6 files changed, 457 insertions(+), 1 deletion(-) create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountGet.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountGetExpand.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsLinkedAccountGet.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsLinkedAccountList.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json index 39469d82174a..4dd512eb6766 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json @@ -1367,6 +1367,172 @@ } } }, + "/providers/Microsoft.CostManagement/awsConsolidatedAccounts": { + "get": { + "tags": [ + "AwsConsolidatedAccounts" + ], + "operationId": "AwsConsolidatedAccount_List", + "description": "List all AwsConsolidatedAccount definitions", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "AwsConsolidatedAccount_List": { + "$ref": "./examples/AwsConsolidatedAccountList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/AwsConsolidatedAccountDefinitionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.CostManagement/awsConsolidatedAccounts/{awsConsolidatedAccountName}": { + "get": { + "tags": [ + "AwsConsolidatedAccounts" + ], + "operationId": "AwsConsolidatedAccount_Get", + "description": "Get a AwsConsolidatedAccount definition", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "AwsConsolidatedAccount_Get": { + "$ref": "./examples/AwsConsolidatedAccountGet.json" + }, + "AwsConsolidatedAccount_Get_Expand": { + "$ref": "./examples/AwsConsolidatedAccountGetExpand.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/awsConsolidatedAccountNameParameter" + }, + { + "name": "$expand", + "description": "May be used to expand the collectionInfo property. By default, collectionInfo is not included.", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/AwsConsolidatedAccountDefinition" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/awsLinkedAccounts": { + "get": { + "tags": [ + "AwsLinkedAccounts" + ], + "operationId": "AwsLinkedAccount_List", + "description": "List all AwsLinkedAccount definitions", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "AwsLinkedAccount_List": { + "$ref": "./examples/AwsLinkedAccountList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/AwsLinkedAccountDefinitionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.CostManagement/awsLinkedAccounts/{awsLinkedAccountName}": { + "get": { + "tags": [ + "AwsLinkedAccounts" + ], + "operationId": "AwsLinkedAccount_Get", + "description": "Get a AwsLinkedAccount definition", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "AwsLinkedAccount_Get": { + "$ref": "./examples/AwsLinkedAccountGet.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/awsLinkedAccountNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/AwsLinkedAccountDefinition" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, "/providers/Microsoft.CostManagement/operations": { "get": { "tags": [ @@ -1944,7 +2110,7 @@ "create", "update" ], - "description": "Connector DisplayName (defaults to Name)" + "description": "Connector DisplayName" }, "providerAccountId": { "type": "string", @@ -2115,6 +2281,149 @@ } } }, + "AwsConsolidatedAccountDefinitionListResult": { + "description": "Result of listing AwsConsolidatedAccount definitions. It contains a list of available AwsConsolidatedAccount definitions in the scope provided.", + "properties": { + "value": { + "description": "The list of AwsConsolidatedAccount definitions.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/AwsConsolidatedAccountDefinition" + } + } + } + }, + "AwsConsolidatedAccountDefinition": { + "type": "object", + "description": "The AwsConsolidatedAccount model definition", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "AwsConsolidatedAccount id" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "AwsConsolidatedAccount name (Account number)" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "AwsConsolidatedAccount type" + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Resource tags." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/AwsConsolidatedAccountProperties", + "description": "AwsConsolidatedAccount properties" + } + }, + "x-ms-azure-resource": true + }, + "AwsConsolidatedAccountProperties": { + "type": "object", + "description": "The properties of a AwsConsolidatedAccount", + "properties": { + "displayName": { + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "AwsConsolidatedAccount DisplayName" + }, + "connectorId": { + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Underlying ConnectorId", + "readOnly": true + }, + "collectionInfo": { + "$ref": "#/definitions/ConnectorCollectionInfo", + "description": "Collection information", + "readOnly": true + } + } + }, + "AwsLinkedAccountDefinitionListResult": { + "description": "Result of listing AwsLinkedAccount definitions. It contains a list of available AwsLinkedAccount definitions in the scope provided.", + "properties": { + "value": { + "description": "The list of AwsLinkedAccount definitions.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/AwsLinkedAccountDefinition" + } + } + } + }, + "AwsLinkedAccountDefinition": { + "type": "object", + "description": "The AwsLinkedAccount model definition", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "AwsLinkedAccount id" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "AwsLinkedAccount name (Account number)" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "AwsLinkedAccount type" + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Resource tags." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/AwsLinkedAccountProperties", + "description": "AwsLinkedAccount properties" + } + }, + "x-ms-azure-resource": true + }, + "AwsLinkedAccountProperties": { + "type": "object", + "description": "The properties of a AwsLinkedAccount", + "properties": { + "displayName": { + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "AwsLinkedAccount DisplayName" + } + } + }, "OperationListResult": { "description": "Result of listing cost management operations. It contains a list of operations and a URL link to get the next set of results.", "properties": { @@ -2227,6 +2536,22 @@ "required": true, "type": "string", "x-ms-parameter-location": "method" + }, + "awsConsolidatedAccountNameParameter": { + "name": "awsConsolidatedAccountName", + "in": "path", + "description": "awsConsolidatedAccountName.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "awsLinkedAccountNameParameter": { + "name": "awsLinkedAccountName", + "in": "path", + "description": "awsLinkedAccountName.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" } } } \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountGet.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountGet.json new file mode 100644 index 000000000000..4b6d39c23f57 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountGet.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "awsConsolidatedAccountName": "123456789012" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.CostManagement/awsConsolidatedAccount/123456789012", + "name": "123456789012", + "type": "Microsoft.CostManagement/awsConsolidatedAccount", + "properties": { + "displayName": "Contoso Consolidated", + "connectorId": "/providers/Microsoft.CostManagement/cloudConnectors/12345678-9012-3456-7890-111111111111" + } + } + } + } +} + diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountGetExpand.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountGetExpand.json new file mode 100644 index 000000000000..ab375d40f3f6 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountGetExpand.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "awsConsolidatedAccountName": "123456789012", + "$expand": "collectionInfo" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.CostManagement/awsConsolidatedAccount/123456789012", + "name": "123456789012", + "type": "Microsoft.CostManagement/awsConsolidatedAccount", + "properties": { + "displayName": "Contoso Consolidated", + "connectorId": "/providers/Microsoft.CostManagement/cloudConnectors/12345678-9012-3456-7890-111111111111", + "collectionInfo": { + "lastChecked": "2018-06-15T03:21:08Z", + "sourceLastUpdated": "2018-06-12T16:41:28Z", + "lastUpdated": "2018-06-12T17:25:28Z", + "error": { + "errorCode": "FailedToAssumeRole", + "errorMessage": "Failed to assume role", + "errorInnerMessage": "Insufficient access to assume role arn:aws:iam::123456789012:role/AzureCostManagementRole", + "errorStartTime": "2018-06-12T21:41:03Z" + } + } + } + } + } + } +} + diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountList.json new file mode 100644 index 000000000000..e0d323711475 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountList.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.CostManagement/awsConsolidatedAccount/123456789012", + "name": "123456789012", + "type": "Microsoft.CostManagement/awsConsolidatedAccount", + "properties": { + "displayName": "Contoso Consolidated", + "connectorId": "/providers/Microsoft.CostManagement/cloudConnectors/12345678-9012-3456-7890-111111111111" + } + }, + { + "id": "/providers/Microsoft.CostManagement/awsConsolidatedAccount/112233445566", + "name": "112233445566", + "type": "Microsoft.CostManagement/awsConsolidatedAccount", + "properties": { + "displayName": "Contoso Consolidated2", + "connectorId": "/providers/Microsoft.CostManagement/cloudConnectors/11111111-2222-3333-4444-555555555555" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsLinkedAccountGet.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsLinkedAccountGet.json new file mode 100644 index 000000000000..76c24b1defc9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsLinkedAccountGet.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "awsLinkedAccountName": "654321654321" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.CostManagement/awsLinkedAccount/654321654321", + "name": "654321654321", + "type": "Microsoft.CostManagement/awsLinkedAccount", + "properties": { + "displayName": "Contoso Linked" + } + } + } + } +} + diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsLinkedAccountList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsLinkedAccountList.json new file mode 100644 index 000000000000..1bfa2878a8ce --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsLinkedAccountList.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.CostManagement/awsLinkedAccount/654321654321", + "name": "654321654321", + "type": "Microsoft.CostManagement/awsLinkedAccount", + "properties": { + "displayName": "Contoso Linked" + } + }, + { + "id": "/providers/Microsoft.CostManagement/awsLinkedAccount/110011001100", + "name": "110011001100", + "type": "Microsoft.CostManagement/awsLinkedAccount", + "properties": { + "displayName": "Contoso Linked2" + } + } + ] + } + } + } +} \ No newline at end of file From e58b67c577f6d00f3a4dc9d5df98e694d6f80503 Mon Sep 17 00:00:00 2001 From: ariehf Date: Mon, 14 Jan 2019 19:30:36 +0200 Subject: [PATCH 06/17] Fix readonly linter check errors --- .../preview/2019-03-01-preview/costmanagement.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json index 4dd512eb6766..c1200922e341 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json @@ -2342,7 +2342,8 @@ "x-ms-mutability": [ "read" ], - "description": "AwsConsolidatedAccount DisplayName" + "description": "AwsConsolidatedAccount DisplayName", + "readOnly": true }, "connectorId": { "type": "string", @@ -2420,7 +2421,8 @@ "x-ms-mutability": [ "read" ], - "description": "AwsLinkedAccount DisplayName" + "description": "AwsLinkedAccount DisplayName", + "readOnly": true } } }, From 23945e574663177f7f6c06b69495fc87404595ac Mon Sep 17 00:00:00 2001 From: ariehf Date: Mon, 14 Jan 2019 19:35:03 +0200 Subject: [PATCH 07/17] Improve new parameter descriptions --- .../preview/2019-03-01-preview/costmanagement.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json index c1200922e341..7bc826227ca0 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json @@ -2542,7 +2542,7 @@ "awsConsolidatedAccountNameParameter": { "name": "awsConsolidatedAccountName", "in": "path", - "description": "awsConsolidatedAccountName.", + "description": "Aws Consolidated Account Number.", "required": true, "type": "string", "x-ms-parameter-location": "method" @@ -2550,7 +2550,7 @@ "awsLinkedAccountNameParameter": { "name": "awsLinkedAccountName", "in": "path", - "description": "awsLinkedAccountName.", + "description": "Aws Linked Account Number.", "required": true, "type": "string", "x-ms-parameter-location": "method" From 7ee1d00ab093b8c598d1122fb307870b4ebc9015 Mon Sep 17 00:00:00 2001 From: ariehf Date: Wed, 16 Jan 2019 12:22:57 +0200 Subject: [PATCH 08/17] ExternalBillingAccounts,ExternalSubscriptions,getEntities --- .../2019-03-01-preview/costmanagement.json | 438 +++++++++++++++--- .../AwsConsolidatedAccountGetExpand.json | 32 -- .../examples/AwsLinkedAccountGet.json | 19 - .../examples/AwsLinkedAccountList.json | 29 -- .../examples/CloudConnectorGet.json | 3 +- .../examples/CloudConnectorGetExpand.json | 1 + .../examples/CloudConnectorList.json | 3 +- .../examples/CloudConnectorPatch.json | 5 +- .../examples/CloudConnectorPut.json | 10 +- ...et.json => ExternalBillingAccountGet.json} | 9 +- ...t.json => ExternalBillingAccountList.json} | 14 +- .../examples/ExternalSubscriptionGet.json | 21 + .../examples/ExternalSubscriptionList.json | 33 ++ ...nagementGroupExternalSubscriptionList.json | 32 ++ ...anagementGroupExternalSubscriptionPut.json | 20 + .../examples/ManagementGroupGetEntities.json | 95 ++++ 16 files changed, 596 insertions(+), 168 deletions(-) delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountGetExpand.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsLinkedAccountGet.json delete mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsLinkedAccountList.json rename specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/{AwsConsolidatedAccountGet.json => ExternalBillingAccountGet.json} (54%) rename specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/{AwsConsolidatedAccountList.json => ExternalBillingAccountList.json} (57%) create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionGet.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionPut.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupGetEntities.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json index 7bc826227ca0..0c92b70fe5ca 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json @@ -1367,19 +1367,19 @@ } } }, - "/providers/Microsoft.CostManagement/awsConsolidatedAccounts": { + "/providers/Microsoft.CostManagement/externalBillingAccounts": { "get": { "tags": [ - "AwsConsolidatedAccounts" + "ExternalBillingAccounts" ], - "operationId": "AwsConsolidatedAccount_List", - "description": "List all AwsConsolidatedAccount definitions", + "operationId": "ExternalBillingAccount_List", + "description": "List all ExternalBillingAccount definitions", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" }, "x-ms-examples": { - "AwsConsolidatedAccount_List": { - "$ref": "./examples/AwsConsolidatedAccountList.json" + "ExternalBillingAccount_List": { + "$ref": "./examples/ExternalBillingAccountList.json" } }, "parameters": [ @@ -1391,7 +1391,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/AwsConsolidatedAccountDefinitionListResult" + "$ref": "#/definitions/ExternalBillingAccountDefinitionListResult" } }, "default": { @@ -1406,44 +1406,112 @@ } } }, - "/providers/Microsoft.CostManagement/awsConsolidatedAccounts/{awsConsolidatedAccountName}": { + "/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}": { "get": { "tags": [ - "AwsConsolidatedAccounts" + "ExternalBillingAccounts" ], - "operationId": "AwsConsolidatedAccount_Get", - "description": "Get a AwsConsolidatedAccount definition", + "operationId": "ExternalBillingAccount_Get", + "description": "Get a ExternalBillingAccount definition", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" }, "x-ms-examples": { - "AwsConsolidatedAccount_Get": { - "$ref": "./examples/AwsConsolidatedAccountGet.json" + "ExternalBillingAccount_Get": { + "$ref": "./examples/ExternalBillingAccountGet.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/externalBillingAccountNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ExternalBillingAccountDefinition" + } }, - "AwsConsolidatedAccount_Get_Expand": { - "$ref": "./examples/AwsConsolidatedAccountGetExpand.json" + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/externalSubscriptions": { + "get": { + "tags": [ + "ExternalSubscriptions" + ], + "operationId": "ExternalSubscription_List", + "description": "List all ExternalSubscription definitions", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalSubscription_List": { + "$ref": "./examples/ExternalSubscriptionList.json" } }, "parameters": [ { "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ExternalSubscriptionDefinitionListResult" + } }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}": { + "get": { + "tags": [ + "ExternalSubscriptions" + ], + "operationId": "ExternalSubscription_Get", + "description": "Get an ExternalSubscription definition", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalSubscription_Get": { + "$ref": "./examples/ExternalSubscriptionGet.json" + } + }, + "parameters": [ { - "$ref": "#/parameters/awsConsolidatedAccountNameParameter" + "$ref": "#/parameters/apiVersionParameter" }, { - "name": "$expand", - "description": "May be used to expand the collectionInfo property. By default, collectionInfo is not included.", - "in": "query", - "required": false, - "type": "string" + "$ref": "#/parameters/externalSubscriptionNameParameter" } ], "responses": { "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/AwsConsolidatedAccountDefinition" + "$ref": "#/definitions/ExternalSubscriptionDefinition" } }, "default": { @@ -1455,31 +1523,34 @@ } } }, - "/providers/Microsoft.CostManagement/awsLinkedAccounts": { + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.CostManagement/externalSubscriptions": { "get": { "tags": [ - "AwsLinkedAccounts" + "ExternalSubscriptions" ], - "operationId": "AwsLinkedAccount_List", - "description": "List all AwsLinkedAccount definitions", + "operationId": "ExternalSubscription_ListByManagementGroup", + "description": "List all ExternalSubscription definitions for Management Group", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" }, "x-ms-examples": { - "AwsLinkedAccount_List": { - "$ref": "./examples/AwsLinkedAccountList.json" + "ExternalSubscription_List": { + "$ref": "./examples/ManagementGroupExternalSubscriptionList.json" } }, "parameters": [ { "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/managementGroupIdParameter" } ], "responses": { "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/AwsLinkedAccountDefinitionListResult" + "$ref": "#/definitions/ExternalSubscriptionDefinitionListResult" } }, "default": { @@ -1494,19 +1565,19 @@ } } }, - "/providers/Microsoft.CostManagement/awsLinkedAccounts/{awsLinkedAccountName}": { - "get": { + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}": { + "put": { "tags": [ - "AwsLinkedAccounts" + "ExternalSubscriptions" ], - "operationId": "AwsLinkedAccount_Get", - "description": "Get a AwsLinkedAccount definition", + "operationId": "ExternalSubscription_UpdateByManagementGroup", + "description": "Update ExternalSubscription definition Management Group", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" }, "x-ms-examples": { - "AwsLinkedAccount_Get": { - "$ref": "./examples/AwsLinkedAccountGet.json" + "ExternalSubscription_Get": { + "$ref": "./examples/ManagementGroupExternalSubscriptionPut.json" } }, "parameters": [ @@ -1514,14 +1585,17 @@ "$ref": "#/parameters/apiVersionParameter" }, { - "$ref": "#/parameters/awsLinkedAccountNameParameter" + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "$ref": "#/parameters/externalSubscriptionNameParameter" } ], "responses": { "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/AwsLinkedAccountDefinition" + "$ref": "#/definitions/ExternalSubscriptionDefinition" } }, "default": { @@ -1533,6 +1607,48 @@ } } }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.CostManagement/getEntities": { + "post": { + "tags": [ + "Entities" + ], + "operationId": "Entities_ListByManagementGroup", + "description": "List all entities (Management Groups, Subscriptions, ExternalSubscriptions, etc.) focusing on a particular group for the authenticated user.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "$ref": "#/parameters/EntityViewParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/EntityListResult" + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "GetEntities": { + "$ref": "./examples/ManagementGroupGetEntities.json" + } + } + } + }, "/providers/Microsoft.CostManagement/operations": { "get": { "tags": [ @@ -2210,9 +2326,19 @@ ], "description": "Connector billing model" }, + "daysTrialRemaining": { + "type": "integer", + "x-nullable": true, + "x-ms-mutability": [ + "read" + ], + "description": "Number of days remaining of trial", + "readOnly": true + }, "collectionInfo": { "$ref": "#/definitions/ConnectorCollectionInfo", "description": "Collection information", + "x-nullable": true, "readOnly": true } } @@ -2281,37 +2407,42 @@ } } }, - "AwsConsolidatedAccountDefinitionListResult": { - "description": "Result of listing AwsConsolidatedAccount definitions. It contains a list of available AwsConsolidatedAccount definitions in the scope provided.", + "ExternalBillingAccountDefinitionListResult": { + "description": "Result of listing ExternalBillingAccount definitions. It contains a list of available ExternalBillingAccount definitions in the scope provided.", "properties": { "value": { - "description": "The list of AwsConsolidatedAccount definitions.", + "description": "The list of ExternalBillingAccount definitions.", "type": "array", "readOnly": true, "items": { - "$ref": "#/definitions/AwsConsolidatedAccountDefinition" + "$ref": "#/definitions/ExternalBillingAccountDefinition" } } } }, - "AwsConsolidatedAccountDefinition": { + "ExternalBillingAccountDefinition": { "type": "object", - "description": "The AwsConsolidatedAccount model definition", + "description": "The ExternalBillingAccount model definition", "properties": { "id": { "type": "string", "readOnly": true, - "description": "AwsConsolidatedAccount id" + "description": "ExternalBillingAccount id" }, "name": { "type": "string", "readOnly": true, - "description": "AwsConsolidatedAccount name (Account number)" + "description": "ExternalBillingAccount name" }, "type": { "type": "string", "readOnly": true, - "description": "AwsConsolidatedAccount type" + "description": "ExternalBillingAccount type" + }, + "kind": { + "type": "string", + "readOnly": true, + "description": "ExternalBillingAccount kind (eg aws)" }, "tags": { "type": "object", @@ -2327,22 +2458,22 @@ }, "properties": { "x-ms-client-flatten": true, - "$ref": "#/definitions/AwsConsolidatedAccountProperties", - "description": "AwsConsolidatedAccount properties" + "$ref": "#/definitions/ExternalBillingAccountProperties", + "description": "ExternalBillingAccount properties" } }, "x-ms-azure-resource": true }, - "AwsConsolidatedAccountProperties": { + "ExternalBillingAccountProperties": { "type": "object", - "description": "The properties of a AwsConsolidatedAccount", + "description": "The properties of a ExternalBillingAccount", "properties": { "displayName": { "type": "string", "x-ms-mutability": [ "read" ], - "description": "AwsConsolidatedAccount DisplayName", + "description": "ExternalBillingAccount DisplayName", "readOnly": true }, "connectorId": { @@ -2360,37 +2491,42 @@ } } }, - "AwsLinkedAccountDefinitionListResult": { - "description": "Result of listing AwsLinkedAccount definitions. It contains a list of available AwsLinkedAccount definitions in the scope provided.", + "ExternalSubscriptionDefinitionListResult": { + "description": "Result of listing ExternalSubscription definitions. It contains a list of available ExternalSubscription definitions in the scope provided.", "properties": { "value": { - "description": "The list of AwsLinkedAccount definitions.", + "description": "The list of ExternalSubscription definitions.", "type": "array", "readOnly": true, "items": { - "$ref": "#/definitions/AwsLinkedAccountDefinition" + "$ref": "#/definitions/ExternalSubscriptionDefinition" } } } }, - "AwsLinkedAccountDefinition": { + "ExternalSubscriptionDefinition": { "type": "object", - "description": "The AwsLinkedAccount model definition", + "description": "The ExternalSubscription model definition", "properties": { "id": { "type": "string", "readOnly": true, - "description": "AwsLinkedAccount id" + "description": "ExternalSubscription id" }, "name": { "type": "string", "readOnly": true, - "description": "AwsLinkedAccount name (Account number)" + "description": "ExternalSubscription name" }, "type": { "type": "string", "readOnly": true, - "description": "AwsLinkedAccount type" + "description": "ExternalSubscription type" + }, + "kind": { + "type": "string", + "readOnly": true, + "description": "ExternalSubscription kind (eg aws)" }, "tags": { "type": "object", @@ -2406,26 +2542,167 @@ }, "properties": { "x-ms-client-flatten": true, - "$ref": "#/definitions/AwsLinkedAccountProperties", - "description": "AwsLinkedAccount properties" + "$ref": "#/definitions/ExternalSubscriptionProperties", + "description": "ExternalSubscription properties" } }, "x-ms-azure-resource": true }, - "AwsLinkedAccountProperties": { + "ExternalSubscriptionProperties": { "type": "object", - "description": "The properties of a AwsLinkedAccount", + "description": "The properties of a ExternalSubscription", "properties": { "displayName": { "type": "string", "x-ms-mutability": [ "read" ], - "description": "AwsLinkedAccount DisplayName", + "description": "ExternalSubscription DisplayName", + "readOnly": true + }, + "externalBillingAccountId": { + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Parent ExternalBillingAccountId", + "readOnly": true + } + } + }, + "EntityListResult": { + "description": "Describes the result of the request to view entities.", + "properties": { + "value": { + "description": "The list of entities.", + "type": "array", + "items": { + "$ref": "#/definitions/EntityInfo" + } + }, + "count": { + "description": "Total count of records that match the filter", + "type": "integer", + "readOnly": true + }, + "nextLink": { + "description": "The URL to use for getting the next set of results.", + "type": "string", + "readOnly": true + } + } + }, + "EntityInfo": { + "description": "The entity.", + "properties": { + "id": { + "type": "string", + "description": "The fully qualified ID for the entity. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000", + "readOnly": true, + "x-nullable": true + }, + "type": { + "type": "string", + "description": "The type of the resource. For example, /providers/Microsoft.Management/managementGroups", + "readOnly": true, + "x-nullable": true + }, + "name": { + "type": "string", + "description": "The name of the entity. For example, 00000000-0000-0000-0000-000000000000", "readOnly": true + }, + "properties": { + "title": "Properties", + "x-ms-client-flatten": true, + "x-nullable": true, + "$ref": "#/definitions/EntityInfoProperties" } } }, + "EntityInfoProperties": { + "description": "The generic properties of an entity.", + "type": "object", + "properties": { + "tenantId": { + "type": "string", + "description": "The AAD Tenant ID associated with the entity. For example, 00000000-0000-0000-0000-000000000000", + "x-nullable": true + }, + "displayName": { + "type": "string", + "description": "The friendly name of the management group.", + "x-nullable": true + }, + "parent": { + "title": "Parent", + "$ref": "#/definitions/EntityParentGroupInfo", + "x-nullable": true + }, + "permissions": { + "title": "Permissions", + "x-nullable": true, + "$ref": "#/definitions/Permissions" + }, + "inheritedPermissions": { + "title": "Inherited Permissions", + "x-nullable": true, + "$ref": "#/definitions/Permissions" + }, + "numberOfDescendants": { + "title": "Number of Descendants", + "type": "integer", + "x-nullable": true + }, + "numberOfChildren": { + "title": "Number of Children", + "description": "Number of children is the number of Groups and Subscriptions that are exactly one level underneath the current Group.", + "type": "integer", + "x-nullable": true + }, + "numberOfChildGroups": { + "title": "Number of Child Groups", + "description": "Number of child groups is the number of Groups that are exactly one level underneath the current Group.", + "type": "integer", + "x-nullable": true + }, + "parentDisplayNameChain": { + "type": "array", + "description": "The parent display name chain from the root group to the immediate parent", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "parentNameChain": { + "type": "array", + "description": "The parent name chain from the root group to the immediate parent", + "x-nullable": true, + "items": { + "type": "string" + } + } + } + }, + "EntityParentGroupInfo": { + "description": "(Optional) The ID of the parent management group.", + "properties": { + "id": { + "type": "string", + "description": "The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000" + } + } + }, + "Permissions": { + "type": "string", + "enum": [ + "noaccess", + "view", + "edit", + "delete" + ], + "description": "The users specific permissions to this item." + }, "OperationListResult": { "description": "Result of listing cost management operations. It contains a list of operations and a URL link to get the next set of results.", "properties": { @@ -2482,7 +2759,7 @@ "in": "query", "required": true, "type": "string", - "description": "Version of the API to be used with the client request. The current version is 2018-05-31." + "description": "Version of the API to be used with the client request. The current version is 2019-03-01-preview" }, "subscriptionIdParameter": { "name": "subscriptionId", @@ -2539,21 +2816,36 @@ "type": "string", "x-ms-parameter-location": "method" }, - "awsConsolidatedAccountNameParameter": { - "name": "awsConsolidatedAccountName", + "externalBillingAccountNameParameter": { + "name": "externalBillingAccountName", "in": "path", - "description": "Aws Consolidated Account Number.", + "description": "External Billing Account Name. (eg 'aws-{PayerAccountId}')", "required": true, "type": "string", "x-ms-parameter-location": "method" }, - "awsLinkedAccountNameParameter": { - "name": "awsLinkedAccountName", + "externalSubscriptionNameParameter": { + "name": "externalSubscriptionName", "in": "path", - "description": "Aws Linked Account Number.", + "description": "External Subscription Name. (eg 'aws-{UsageAccountId}')", "required": true, "type": "string", "x-ms-parameter-location": "method" + }, + "EntityViewParameter": { + "name": "$view", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "FullHierarchy", + "GroupsOnly", + "SubscriptionsOnly", + "ExternalSubscriptionsOnly", + "Audit" + ], + "x-ms-parameter-location": "method", + "description": "The view parameter allows clients to filter the type of data that is returned by the getEntities call." } } } \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountGetExpand.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountGetExpand.json deleted file mode 100644 index ab375d40f3f6..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountGetExpand.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "parameters": { - "api-version": "2019-03-01-preview", - "awsConsolidatedAccountName": "123456789012", - "$expand": "collectionInfo" - }, - "responses": { - "200": { - "body": { - "id": "/providers/Microsoft.CostManagement/awsConsolidatedAccount/123456789012", - "name": "123456789012", - "type": "Microsoft.CostManagement/awsConsolidatedAccount", - "properties": { - "displayName": "Contoso Consolidated", - "connectorId": "/providers/Microsoft.CostManagement/cloudConnectors/12345678-9012-3456-7890-111111111111", - "collectionInfo": { - "lastChecked": "2018-06-15T03:21:08Z", - "sourceLastUpdated": "2018-06-12T16:41:28Z", - "lastUpdated": "2018-06-12T17:25:28Z", - "error": { - "errorCode": "FailedToAssumeRole", - "errorMessage": "Failed to assume role", - "errorInnerMessage": "Insufficient access to assume role arn:aws:iam::123456789012:role/AzureCostManagementRole", - "errorStartTime": "2018-06-12T21:41:03Z" - } - } - } - } - } - } -} - diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsLinkedAccountGet.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsLinkedAccountGet.json deleted file mode 100644 index 76c24b1defc9..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsLinkedAccountGet.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "parameters": { - "api-version": "2019-03-01-preview", - "awsLinkedAccountName": "654321654321" - }, - "responses": { - "200": { - "body": { - "id": "/providers/Microsoft.CostManagement/awsLinkedAccount/654321654321", - "name": "654321654321", - "type": "Microsoft.CostManagement/awsLinkedAccount", - "properties": { - "displayName": "Contoso Linked" - } - } - } - } -} - diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsLinkedAccountList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsLinkedAccountList.json deleted file mode 100644 index 1bfa2878a8ce..000000000000 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsLinkedAccountList.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "parameters": { - "api-version": "2019-03-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/providers/Microsoft.CostManagement/awsLinkedAccount/654321654321", - "name": "654321654321", - "type": "Microsoft.CostManagement/awsLinkedAccount", - "properties": { - "displayName": "Contoso Linked" - } - }, - { - "id": "/providers/Microsoft.CostManagement/awsLinkedAccount/110011001100", - "name": "110011001100", - "type": "Microsoft.CostManagement/awsLinkedAccount", - "properties": { - "displayName": "Contoso Linked2" - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGet.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGet.json index 55e7bbe1c87a..648cf0a3e34e 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGet.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGet.json @@ -19,7 +19,8 @@ "modifiedOn": "2018-05-23T09:21:11Z", "status": "active", "subscriptionId": "22222222-3333-4444-1111-777777777777", - "billingModel": "autoUpgrade" + "billingModel": "autoUpgrade", + "daysTrialRemaining": "62" } } } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGetExpand.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGetExpand.json index 65390710ea6d..e8f3a156c9c5 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGetExpand.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGetExpand.json @@ -21,6 +21,7 @@ "status": "active", "subscriptionId": "22222222-3333-4444-1111-777777777777", "billingModel": "autoUpgrade", + "daysTrialRemaining": "62", "collectionInfo": { "lastChecked": "2018-06-15T03:21:08Z", "sourceLastUpdated": "2018-06-12T16:41:28Z", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorList.json index a663dc7e24c1..b6f4db65f574 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorList.json @@ -20,7 +20,8 @@ "modifiedOn": "2018-05-23T09:21:11Z", "status": "active", "subscriptionId": "22222222-3333-4444-1111-777777777777", - "billingModel": "autoUpgrade" + "billingModel": "autoUpgrade", + "daysTrialRemaining": "62" } }, { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPatch.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPatch.json index f86e333dfedb..c3305b7e196e 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPatch.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPatch.json @@ -21,7 +21,10 @@ "reportId": "HourlyWithResources", "createdOn": "2018-05-15T13:25:48Z", "modifiedOn": "2018-05-23T09:21:11Z", - "status": "active" + "status": "active", + "subscriptionId": "22222222-3333-4444-1111-777777777777", + "billingModel": "autoUpgrade", + "daysTrialRemaining": "62" } } } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPut.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPut.json index 8615c3b7b586..2efdc7f3d330 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPut.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPut.json @@ -25,7 +25,10 @@ "reportId": "HourlyWithResources", "createdOn": "2018-05-15T13:25:48Z", "modifiedOn": "2018-05-23T09:21:11Z", - "status": "active" + "status": "active", + "subscriptionId": "22222222-3333-4444-1111-777777777777", + "billingModel": "autoUpgrade", + "daysTrialRemaining": "62" } } }, @@ -41,7 +44,10 @@ "reportId": "HourlyWithResources", "createdOn": "2018-05-15T13:25:48Z", "modifiedOn": "2018-05-23T09:21:11Z", - "status": "active" + "status": "active", + "subscriptionId": "22222222-3333-4444-1111-777777777777", + "billingModel": "autoUpgrade", + "daysTrialRemaining": "62" } } } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountGet.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalBillingAccountGet.json similarity index 54% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountGet.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalBillingAccountGet.json index 4b6d39c23f57..bcd1c2b75eac 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountGet.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalBillingAccountGet.json @@ -1,14 +1,15 @@ { "parameters": { "api-version": "2019-03-01-preview", - "awsConsolidatedAccountName": "123456789012" + "externalBillingAccountName": "aws-123456789012" }, "responses": { "200": { "body": { - "id": "/providers/Microsoft.CostManagement/awsConsolidatedAccount/123456789012", - "name": "123456789012", - "type": "Microsoft.CostManagement/awsConsolidatedAccount", + "id": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "name": "aws-123456789012", + "type": "Microsoft.CostManagement/externalBillingAccounts", + "kind": "aws", "properties": { "displayName": "Contoso Consolidated", "connectorId": "/providers/Microsoft.CostManagement/cloudConnectors/12345678-9012-3456-7890-111111111111" diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalBillingAccountList.json similarity index 57% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountList.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalBillingAccountList.json index e0d323711475..f9570937df4b 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/AwsConsolidatedAccountList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalBillingAccountList.json @@ -7,18 +7,20 @@ "body": { "value": [ { - "id": "/providers/Microsoft.CostManagement/awsConsolidatedAccount/123456789012", - "name": "123456789012", - "type": "Microsoft.CostManagement/awsConsolidatedAccount", + "id": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "name": "aws-123456789012", + "type": "Microsoft.CostManagement/externalBillingAccounts", + "kind": "aws", "properties": { "displayName": "Contoso Consolidated", "connectorId": "/providers/Microsoft.CostManagement/cloudConnectors/12345678-9012-3456-7890-111111111111" } }, { - "id": "/providers/Microsoft.CostManagement/awsConsolidatedAccount/112233445566", - "name": "112233445566", - "type": "Microsoft.CostManagement/awsConsolidatedAccount", + "id": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-112233445566", + "name": "aws-112233445566", + "type": "Microsoft.CostManagement/externalBillingAccounts", + "kind": "aws", "properties": { "displayName": "Contoso Consolidated2", "connectorId": "/providers/Microsoft.CostManagement/cloudConnectors/11111111-2222-3333-4444-555555555555" diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionGet.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionGet.json new file mode 100644 index 000000000000..1a4bde5d1fac --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "externalSubscriptionName": "aws-654321654321" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321", + "name": "aws-654321654321", + "type": "Microsoft.CostManagement/externalSubscriptions", + "kind": "aws", + "properties": { + "displayName": "MyUsageAccount1", + "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012" + } + } + } + } +} + diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionList.json new file mode 100644 index 000000000000..bbe49123ef0c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionList.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321", + "name": "aws-654321654321", + "type": "Microsoft.CostManagement/externalSubscriptions", + "kind": "aws", + "properties": { + "displayName": "MyUsageAccount1", + "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012" + } + }, + { + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-110011001100", + "name": "aws-110011001100", + "type": "Microsoft.CostManagement/externalSubscriptions", + "kind": "aws", + "properties": { + "displayName": "MyUsageAccount2", + "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-112233445566" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionList.json new file mode 100644 index 000000000000..68a46da7b967 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionList.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "managementGroupId": "MyMgId" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.CostManagement/externalSubscription/654321654321", + "name": "654321654321", + "type": "Microsoft.CostManagement/externalSubscription", + "properties": { + "displayName": "MyUsageAccount1", + "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012" + } + }, + { + "id": "/providers/Microsoft.CostManagement/externalSubscription/110011001100", + "name": "110011001100", + "type": "Microsoft.CostManagement/externalSubscription", + "properties": { + "displayName": "MyUsageAccount2", + "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-112233445566" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionPut.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionPut.json new file mode 100644 index 000000000000..bf731dcbcda5 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionPut.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "managementGroupId": "MyMgId", + "externalSubscriptionName": "654321654321" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.CostManagement/externalSubscription/654321654321", + "name": "654321654321", + "type": "Microsoft.CostManagement/externalSubscription", + "properties": { + "displayName": "MyUsageAccount1", + "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012" + } + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupGetEntities.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupGetEntities.json new file mode 100644 index 000000000000..833ff97e59f2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupGetEntities.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "managementGroupId": "XYZ" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.Management/managementGroups/XYZ", + "type": "/providers/Microsoft.Management/managementGroups", + "name": "XYZ", + "properties": { + "tenantId": "20000000-0000-0000-0000-000000000000", + "displayName": "XYZ Department", + "parent": { + "id": "/providers/Microsoft.Management/managementGroups/Engineering" + }, + "permissions": "noaccess", + "inheritedPermissions": "view", + "numberOfDescendants": 0, + "numberOfChildren": 0, + "numberOfChildGroups": 0, + "parentDisplayNameChain": [ + "20000000-0000-0000-0000-000000000000", + "Engineering" + ], + "parentNameChain": [ + "20000000-0000-0000-0000-000000000000", + "Engineering" + ] + } + }, + { + "id": "/subscriptions/88888888-3333-6666-1111-444444444444", + "type": "/subscriptions", + "name": "88888888-3333-6666-1111-444444444444", + "properties": { + "tenantId": "20000000-0000-0000-0000-000000000000", + "displayName": "XYZ Subscription", + "parent": { + "id": "/providers/Microsoft.Management/managementGroups/XYZ" + }, + "permissions": "noaccess", + "inheritedPermissions": "view", + "numberOfDescendants": 0, + "numberOfChildren": 0, + "numberOfChildGroups": 0, + "parentDisplayNameChain": [ + "20000000-0000-0000-0000-000000000000", + "Engineering", + "XYZ Department" + ], + "parentNameChain": [ + "20000000-0000-0000-0000-000000000000", + "Engineering", + "XYZ" + ] + } + }, + { + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321", + "type": "Microsoft.CostManagement/externalSubscriptions", + "name": "aws-654321654321", + "kind": "aws", + "properties": { + "tenantId": "20000000-0000-0000-0000-000000000000", + "displayName": "XYZ UsageAccount", + "parent": { + "id": "/providers/Microsoft.Management/managementGroups/XYZ" + }, + "permissions": "noaccess", + "inheritedPermissions": "view", + "numberOfDescendants": 0, + "numberOfChildren": 0, + "numberOfChildGroups": 0, + "parentDisplayNameChain": [ + "20000000-0000-0000-0000-000000000000", + "Engineering", + "XYZ Department" + ], + "parentNameChain": [ + "20000000-0000-0000-0000-000000000000", + "Engineering", + "XYZ" + ] + } + } + ], + "nextLink": null + } + } + } +} From 23fb7f50b698d613dccf1e320a984e5a8ad7b000 Mon Sep 17 00:00:00 2001 From: ariehf Date: Wed, 16 Jan 2019 14:52:24 +0200 Subject: [PATCH 09/17] Fix apiVersion case --- .../preview/2019-03-01-preview/costmanagement.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json index 0c92b70fe5ca..f67ebac5d266 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json @@ -1616,7 +1616,7 @@ "description": "List all entities (Management Groups, Subscriptions, ExternalSubscriptions, etc.) focusing on a particular group for the authenticated user.", "parameters": [ { - "$ref": "#/parameters/ApiVersionParameter" + "$ref": "#/parameters/apiVersionParameter" }, { "$ref": "#/parameters/managementGroupIdParameter" From ee07238c9895c030b0f09a938185f848498a95d0 Mon Sep 17 00:00:00 2001 From: ariehf Date: Wed, 16 Jan 2019 14:58:00 +0200 Subject: [PATCH 10/17] daysTrialRemaining integer --- .../2019-03-01-preview/examples/CloudConnectorGet.json | 2 +- .../2019-03-01-preview/examples/CloudConnectorGetExpand.json | 2 +- .../2019-03-01-preview/examples/CloudConnectorList.json | 2 +- .../2019-03-01-preview/examples/CloudConnectorPatch.json | 2 +- .../2019-03-01-preview/examples/CloudConnectorPut.json | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGet.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGet.json index 648cf0a3e34e..5e0835c74f45 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGet.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGet.json @@ -20,7 +20,7 @@ "status": "active", "subscriptionId": "22222222-3333-4444-1111-777777777777", "billingModel": "autoUpgrade", - "daysTrialRemaining": "62" + "daysTrialRemaining": 62 } } } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGetExpand.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGetExpand.json index e8f3a156c9c5..4cba4a467215 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGetExpand.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGetExpand.json @@ -21,7 +21,7 @@ "status": "active", "subscriptionId": "22222222-3333-4444-1111-777777777777", "billingModel": "autoUpgrade", - "daysTrialRemaining": "62", + "daysTrialRemaining": 62, "collectionInfo": { "lastChecked": "2018-06-15T03:21:08Z", "sourceLastUpdated": "2018-06-12T16:41:28Z", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorList.json index b6f4db65f574..075ced632f9d 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorList.json @@ -21,7 +21,7 @@ "status": "active", "subscriptionId": "22222222-3333-4444-1111-777777777777", "billingModel": "autoUpgrade", - "daysTrialRemaining": "62" + "daysTrialRemaining": 62 } }, { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPatch.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPatch.json index c3305b7e196e..160418eefb4a 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPatch.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPatch.json @@ -24,7 +24,7 @@ "status": "active", "subscriptionId": "22222222-3333-4444-1111-777777777777", "billingModel": "autoUpgrade", - "daysTrialRemaining": "62" + "daysTrialRemaining": 62 } } } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPut.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPut.json index 2efdc7f3d330..08d40faad6d7 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPut.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPut.json @@ -28,7 +28,7 @@ "status": "active", "subscriptionId": "22222222-3333-4444-1111-777777777777", "billingModel": "autoUpgrade", - "daysTrialRemaining": "62" + "daysTrialRemaining": 62 } } }, @@ -47,7 +47,7 @@ "status": "active", "subscriptionId": "22222222-3333-4444-1111-777777777777", "billingModel": "autoUpgrade", - "daysTrialRemaining": "62" + "daysTrialRemaining": 62 } } } From 07404bf5da315e42916c1406574577bb328b5aa3 Mon Sep 17 00:00:00 2001 From: ariehf Date: Wed, 16 Jan 2019 15:03:23 +0200 Subject: [PATCH 11/17] Add EntityInfo/kind --- .../preview/2019-03-01-preview/costmanagement.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json index f67ebac5d266..0c2699b014ed 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json @@ -2612,6 +2612,12 @@ "description": "The name of the entity. For example, 00000000-0000-0000-0000-000000000000", "readOnly": true }, + "kind": { + "type": "string", + "readOnly": true, + "description": "The kind of the resource", + "x-nullable": true + }, "properties": { "title": "Properties", "x-ms-client-flatten": true, From 4d1d663537c02cc8896b219c5ab9c4da025a5c92 Mon Sep 17 00:00:00 2001 From: ariehf Date: Wed, 16 Jan 2019 17:52:16 +0200 Subject: [PATCH 12/17] es/managementGroupId,cloudConnectors/defaultManagementGroupId --- .../2019-03-01-preview/costmanagement.json | 59 +++++++++++++++++++ .../examples/CloudConnectorGet.json | 1 + .../examples/CloudConnectorGetExpand.json | 1 + .../examples/CloudConnectorList.json | 2 + .../examples/CloudConnectorPatch.json | 1 + .../examples/CloudConnectorPut.json | 1 + .../examples/ExternalSubscriptionGet.json | 3 +- .../examples/ExternalSubscriptionList.json | 6 +- ...nagementGroupExternalSubscriptionList.json | 16 ++--- ...anagementGroupExternalSubscriptionPut.json | 11 ++-- 10 files changed, 86 insertions(+), 15 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json index 0c2699b014ed..68aea6e1697b 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json @@ -1445,6 +1445,48 @@ } } }, + "/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}/externalSubscriptions": { + "get": { + "tags": [ + "ExternalSubscriptions" + ], + "operationId": "ExternalSubscription_ListByExternalBillingAccount", + "description": "List all ExternalSubscriptions by ExternalBillingAccount definitions", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ExternalSubscription_List": { + "$ref": "./examples/ExternalSubscriptionList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/externalBillingAccountNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ExternalSubscriptionDefinitionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, "/providers/Microsoft.CostManagement/externalSubscriptions": { "get": { "tags": [ @@ -2298,6 +2340,15 @@ ], "description": "Connector status" }, + "defaultManagementGroupId": { + "type": "string", + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Default ManagementGroupId" + }, "subscriptionId": { "type": "string", "x-ms-mutability": [ @@ -2560,6 +2611,14 @@ "description": "ExternalSubscription DisplayName", "readOnly": true }, + "managementGroupId": { + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "ManagementGroupId", + "readOnly": true + }, "externalBillingAccountId": { "type": "string", "x-ms-mutability": [ diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGet.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGet.json index 5e0835c74f45..8805252a8b85 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGet.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGet.json @@ -18,6 +18,7 @@ "createdOn": "2018-05-15T13:25:48Z", "modifiedOn": "2018-05-23T09:21:11Z", "status": "active", + "defaultManagementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ", "subscriptionId": "22222222-3333-4444-1111-777777777777", "billingModel": "autoUpgrade", "daysTrialRemaining": 62 diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGetExpand.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGetExpand.json index 4cba4a467215..9910c33da554 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGetExpand.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorGetExpand.json @@ -19,6 +19,7 @@ "createdOn": "2018-05-15T13:25:48Z", "modifiedOn": "2018-05-23T09:21:11Z", "status": "active", + "defaultManagementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ", "subscriptionId": "22222222-3333-4444-1111-777777777777", "billingModel": "autoUpgrade", "daysTrialRemaining": 62, diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorList.json index 075ced632f9d..fc078b4226fb 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorList.json @@ -19,6 +19,7 @@ "createdOn": "2018-05-15T13:25:48Z", "modifiedOn": "2018-05-23T09:21:11Z", "status": "active", + "defaultManagementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ", "subscriptionId": "22222222-3333-4444-1111-777777777777", "billingModel": "autoUpgrade", "daysTrialRemaining": 62 @@ -37,6 +38,7 @@ "createdOn": "2018-06-16T11:23:44Z", "modifiedOn": "2018-06-21T17:33:28Z", "status": "suspended", + "defaultManagementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ", "subscriptionId": "22222222-3333-4444-1111-777777777777", "billingModel": "premium" } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPatch.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPatch.json index 160418eefb4a..7b1194753c45 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPatch.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPatch.json @@ -22,6 +22,7 @@ "createdOn": "2018-05-15T13:25:48Z", "modifiedOn": "2018-05-23T09:21:11Z", "status": "active", + "defaultManagementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ", "subscriptionId": "22222222-3333-4444-1111-777777777777", "billingModel": "autoUpgrade", "daysTrialRemaining": 62 diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPut.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPut.json index 08d40faad6d7..29c4fd1a13a9 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPut.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/CloudConnectorPut.json @@ -45,6 +45,7 @@ "createdOn": "2018-05-15T13:25:48Z", "modifiedOn": "2018-05-23T09:21:11Z", "status": "active", + "defaultManagementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ", "subscriptionId": "22222222-3333-4444-1111-777777777777", "billingModel": "autoUpgrade", "daysTrialRemaining": 62 diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionGet.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionGet.json index 1a4bde5d1fac..04ce17b57bd5 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionGet.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionGet.json @@ -12,7 +12,8 @@ "kind": "aws", "properties": { "displayName": "MyUsageAccount1", - "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012" + "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "managementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ" } } } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionList.json index bbe49123ef0c..885cedfc4bf8 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalSubscriptionList.json @@ -13,7 +13,8 @@ "kind": "aws", "properties": { "displayName": "MyUsageAccount1", - "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012" + "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "managementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ" } }, { @@ -23,7 +24,8 @@ "kind": "aws", "properties": { "displayName": "MyUsageAccount2", - "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-112233445566" + "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-112233445566", + "managementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ" } } ] diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionList.json index 68a46da7b967..7460c8c280b3 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionList.json @@ -1,28 +1,30 @@ { "parameters": { "api-version": "2019-03-01-preview", - "managementGroupId": "MyMgId" + "managementGroupId": "XYZ" }, "responses": { "200": { "body": { "value": [ { - "id": "/providers/Microsoft.CostManagement/externalSubscription/654321654321", - "name": "654321654321", + "id": "/providers/Microsoft.CostManagement/externalSubscription/aws-654321654321", + "name": "aws-654321654321", "type": "Microsoft.CostManagement/externalSubscription", "properties": { "displayName": "MyUsageAccount1", - "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012" + "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "managementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ" } }, { - "id": "/providers/Microsoft.CostManagement/externalSubscription/110011001100", - "name": "110011001100", + "id": "/providers/Microsoft.CostManagement/externalSubscription/aws-110011001100", + "name": "aws-110011001100", "type": "Microsoft.CostManagement/externalSubscription", "properties": { "displayName": "MyUsageAccount2", - "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-112233445566" + "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-112233445566", + "managementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ" } } ] diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionPut.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionPut.json index bf731dcbcda5..1d7ea4b80434 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionPut.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionPut.json @@ -1,18 +1,19 @@ { "parameters": { "api-version": "2019-03-01-preview", - "managementGroupId": "MyMgId", - "externalSubscriptionName": "654321654321" + "managementGroupId": "XYZ", + "externalSubscriptionName": "aws-654321654321" }, "responses": { "200": { "body": { - "id": "/providers/Microsoft.CostManagement/externalSubscription/654321654321", - "name": "654321654321", + "id": "/providers/Microsoft.CostManagement/externalSubscription/aws-654321654321", + "name": "aws-654321654321", "type": "Microsoft.CostManagement/externalSubscription", "properties": { "displayName": "MyUsageAccount1", - "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012" + "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "managementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ" } } } From 1874fb6b1b97230b0411ecf33467cdf0d7a04c69 Mon Sep 17 00:00:00 2001 From: ariehf Date: Wed, 16 Jan 2019 18:29:39 +0200 Subject: [PATCH 13/17] managementGroupId description --- .../preview/2019-03-01-preview/costmanagement.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json index 68aea6e1697b..ee2e80c91a35 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json @@ -2616,7 +2616,7 @@ "x-ms-mutability": [ "read" ], - "description": "ManagementGroupId", + "description": "Assigned ManagementGroupId", "readOnly": true }, "externalBillingAccountId": { From ce2b0cea9aedf61b898cf8ca71aa19eb538bf441 Mon Sep 17 00:00:00 2001 From: ariehf Date: Wed, 16 Jan 2019 22:43:24 +0200 Subject: [PATCH 14/17] Remove tags:CloudConnectors,ExternalSubscriptions,ExternalBillingAccount --- .../2019-03-01-preview/costmanagement.json | 36 ------------------- 1 file changed, 36 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json index ee2e80c91a35..0f9d30d8863f 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json @@ -2237,18 +2237,6 @@ "readOnly": true, "description": "Connector type" }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-ms-mutability": [ - "read", - "create", - "update" - ], - "description": "Resource tags." - }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/ConnectorProperties", @@ -2495,18 +2483,6 @@ "readOnly": true, "description": "ExternalBillingAccount kind (eg aws)" }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-ms-mutability": [ - "read", - "create", - "update" - ], - "description": "Resource tags." - }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/ExternalBillingAccountProperties", @@ -2579,18 +2555,6 @@ "readOnly": true, "description": "ExternalSubscription kind (eg aws)" }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-ms-mutability": [ - "read", - "create", - "update" - ], - "description": "Resource tags." - }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/ExternalSubscriptionProperties", From 289e03255d3b574af43c3e462316f4078a8a3aaa Mon Sep 17 00:00:00 2001 From: ariehf Date: Wed, 16 Jan 2019 22:57:39 +0200 Subject: [PATCH 15/17] Put MG to ES - return 204 --- .../2019-03-01-preview/costmanagement.json | 16 ++++------------ .../ManagementGroupExternalSubscriptionPut.json | 10 +--------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json index 0f9d30d8863f..53b20c558cc8 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json @@ -1613,12 +1613,12 @@ "ExternalSubscriptions" ], "operationId": "ExternalSubscription_UpdateByManagementGroup", - "description": "Update ExternalSubscription definition Management Group", + "description": "Associates ExternalSubscription with the management group", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" }, "x-ms-examples": { - "ExternalSubscription_Get": { + "ManagementGroupExternalSubscription_Put": { "$ref": "./examples/ManagementGroupExternalSubscriptionPut.json" } }, @@ -1634,11 +1634,8 @@ } ], "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/ExternalSubscriptionDefinition" - } + "204": { + "description": "NoContent" }, "default": { "description": "Error response describing why the operation failed.", @@ -2510,11 +2507,6 @@ ], "description": "Underlying ConnectorId", "readOnly": true - }, - "collectionInfo": { - "$ref": "#/definitions/ConnectorCollectionInfo", - "description": "Collection information", - "readOnly": true } } }, diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionPut.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionPut.json index 1d7ea4b80434..8a6bcb94d958 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionPut.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionPut.json @@ -5,16 +5,8 @@ "externalSubscriptionName": "aws-654321654321" }, "responses": { - "200": { + "204": { "body": { - "id": "/providers/Microsoft.CostManagement/externalSubscription/aws-654321654321", - "name": "aws-654321654321", - "type": "Microsoft.CostManagement/externalSubscription", - "properties": { - "displayName": "MyUsageAccount1", - "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", - "managementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ" - } } } } From 7826b0576b7d1dd7a93f1d9463f8901c2732419b Mon Sep 17 00:00:00 2001 From: ariehf Date: Wed, 16 Jan 2019 23:27:52 +0200 Subject: [PATCH 16/17] Fix linter errors in examples --- .../2019-03-01-preview/costmanagement.json | 4 +-- ...illingAccountExternalSubscriptionList.json | 25 +++++++++++++++++++ ...anagementGroupExternalSubscriptionPut.json | 2 -- 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalBillingAccountExternalSubscriptionList.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json index 53b20c558cc8..2b7d3f57b3be 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/costmanagement.json @@ -1456,8 +1456,8 @@ "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" }, "x-ms-examples": { - "ExternalSubscription_List": { - "$ref": "./examples/ExternalSubscriptionList.json" + "ExternalBillingAccountExternalSubscription_List": { + "$ref": "./examples/ExternalBillingAccountExternalSubscriptionList.json" } }, "parameters": [ diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalBillingAccountExternalSubscriptionList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalBillingAccountExternalSubscriptionList.json new file mode 100644 index 000000000000..c937d61bed93 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ExternalBillingAccountExternalSubscriptionList.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview", + "externalBillingAccountName": "aws-123456789012" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/Microsoft.CostManagement/externalSubscriptions/aws-654321654321", + "name": "aws-654321654321", + "type": "Microsoft.CostManagement/externalSubscriptions", + "kind": "aws", + "properties": { + "displayName": "MyUsageAccount1", + "externalBillingAccountId": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-123456789012", + "managementGroupId" : "/providers/Microsoft.Management/managementGroups/XYZ" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionPut.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionPut.json index 8a6bcb94d958..3c1613933177 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionPut.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2019-03-01-preview/examples/ManagementGroupExternalSubscriptionPut.json @@ -6,8 +6,6 @@ }, "responses": { "204": { - "body": { - } } } } \ No newline at end of file From 855ab2ed573e2d8fe8a65f8a8e638e8a9b033759 Mon Sep 17 00:00:00 2001 From: ariehf Date: Thu, 17 Jan 2019 20:07:42 +0200 Subject: [PATCH 17/17] Suppress OperationsAPIImplementation error for Microsoft.Billing --- specification/cost-management/resource-manager/readme.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specification/cost-management/resource-manager/readme.md b/specification/cost-management/resource-manager/readme.md index 332f5246771c..e85f1a4a70e1 100644 --- a/specification/cost-management/resource-manager/readme.md +++ b/specification/cost-management/resource-manager/readme.md @@ -58,6 +58,10 @@ directive: from: costmanagement.json where: $.paths reason: We are extending Microsoft.Billing RP in some scenarios + - suppress: R3023 + from: costmanagement.json + where: $.paths + reason: operations API for Microsoft.Billing are defined in Microsoft.Billing ``` ### Tag: package-2018-08-preview