diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/examples/ReservationByBillingAccount.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/examples/ReservationByBillingAccount.json new file mode 100644 index 000000000000..34d130f5f0bf --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/examples/ReservationByBillingAccount.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2020-11-01-preview", + "billingAccountName": "{billingAccountName}", + "reservationOrderId": "{reservationOrderId}", + "reservationId": "{reservationId}" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/reservationOrders/{reservationOrderId}/reservations/{reservationId}", + "type": "microsoft.billing/reservationOrders", + "name": "Reservation Name", + "location": "global", + "sku": { + "name": "sql_enterprise_licenses" + }, + "properties": { + "appliedScopes": null, + "appliedScopeType": "Shared", + "reservedResourceType": "SqlAzureHybridBenefit", + "quantity": 1, + "provisioningState": "Succeeded", + "expiryDate": null, + "reviewDate": null, + "provisioningSubState": null, + "displayName": "SQL_Server_Enterprise_Edition", + "userFriendlyRenewState": "NotApplicable", + "userFriendlyAppliedScopeType": "Shared", + "effectiveDateTime": "2020-07-30T18:36:50.7939106Z", + "skuDescription": null, + "term": null, + "renew": false, + "renewSource": null, + "utilization": { + "trend": null, + "aggregates": [ + { + "grain": 1.0, + "grainUnit": "days", + "value": null, + "valueUnit": "percentage" + }, + { + "grain": 7.0, + "grainUnit": "days", + "value": null, + "valueUnit": "percentage" + }, + { + "grain": 30.0, + "grainUnit": "days", + "value": null, + "valueUnit": "percentage" + } + ] + } + } + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/examples/ReservationByBillingProfile.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/examples/ReservationByBillingProfile.json new file mode 100644 index 000000000000..2dc3aa7a0773 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/examples/ReservationByBillingProfile.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "api-version": "2020-11-01-preview", + "billingAccountName": "{billingAccountName}", + "billingProfileName": "{billingProfileName}", + "reservationOrderId": "{reservationOrderId}", + "reservationId": "{reservationId}" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/reservationOrders/{reservationOrderId}/reservations/{reservationId}", + "type": "microsoft.billing/reservationOrders", + "name": "Reservation Name", + "location": "global", + "sku": { + "name": "sql_enterprise_licenses" + }, + "properties": { + "appliedScopes": null, + "appliedScopeType": "Shared", + "reservedResourceType": "SqlAzureHybridBenefit", + "quantity": 1, + "provisioningState": "Succeeded", + "expiryDate": null, + "reviewDate": null, + "provisioningSubState": null, + "displayName": "SQL_Server_Enterprise_Edition", + "userFriendlyRenewState": "NotApplicable", + "userFriendlyAppliedScopeType": "Shared", + "effectiveDateTime": "2020-07-30T18:36:50.7939106Z", + "skuDescription": null, + "term": null, + "renew": false, + "renewSource": null, + "utilization": { + "trend": null, + "aggregates": [ + { + "grain": 1.0, + "grainUnit": "days", + "value": null, + "valueUnit": "percentage" + }, + { + "grain": 7.0, + "grainUnit": "days", + "value": null, + "valueUnit": "percentage" + }, + { + "grain": 30.0, + "grainUnit": "days", + "value": null, + "valueUnit": "percentage" + } + ] + } + } + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/examples/ReservationOrderByBillingAccount.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/examples/ReservationOrderByBillingAccount.json new file mode 100644 index 000000000000..b50bc5bd2528 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/examples/ReservationOrderByBillingAccount.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2020-11-01-preview", + "billingAccountName": "{billingAccountName}", + "reservationOrderId": "{reservationOrderId}" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/reservationOrders/{reservationOrderId}", + "type": "microsoft.billing/reservationOrders", + "name": "Reservation Name", + "properties": { + "productType": "AzureHybridBenefit", + "tenantId": "00000000-0000-0000-0000-000000000000", + "effectiveDate": "2020-07-30T18:36:50.7939106Z", + "requestPurchaseTime": "0001-01-01T00:00:00", + "expiryDate": null, + "reviewDate": null, + "endDate": null, + "term": "None", + "reservationName": "SQL_Server_Enterprise_Edition", + "billingScope": "", + "billingPlanDetails": null, + "state": "Created", + "subState": "Active", + "reservations": [ + "00000000-0000-0000-0000-000000000000" + ], + "enrollmentId": null, + "originalQuantity": 1, + "extendedErrorInformation": null, + "benefitScopeBillingAliasId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/AB12-AB12-123-ABC" + } + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/examples/ReservationOrderByBillingProfile.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/examples/ReservationOrderByBillingProfile.json new file mode 100644 index 000000000000..df421daa22d4 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/examples/ReservationOrderByBillingProfile.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2020-11-01-preview", + "billingAccountName": "{billingAccountName}", + "billingProfileName": "{billingProfileName}", + "reservationOrderId": "{reservationOrderId}" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/reservationOrders/{reservationOrderId}", + "type": "microsoft.billing/reservationOrders", + "name": "Reservation Name", + "properties": { + "productType": "AzureHybridBenefit", + "tenantId": "00000000-0000-0000-0000-000000000000", + "effectiveDate": "2020-07-30T18:36:50.7939106Z", + "requestPurchaseTime": "0001-01-01T00:00:00", + "expiryDate": null, + "reviewDate": null, + "endDate": null, + "term": "None", + "reservationName": "SQL_Server_Enterprise_Edition", + "billingScope": "", + "billingPlanDetails": null, + "state": "Created", + "subState": "Active", + "reservations": [ + "00000000-0000-0000-0000-000000000000" + ], + "enrollmentId": null, + "originalQuantity": 1, + "extendedErrorInformation": null, + "benefitScopeBillingAliasId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/AB12-AB12-123-ABC" + } + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/reservations.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/reservations.json new file mode 100644 index 000000000000..3e560de52e59 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2020-11-01-preview/reservations.json @@ -0,0 +1,863 @@ +{ + "swagger": "2.0", + "info": { + "version": "2020-11-01-preview", + "title": "BillingManagementClient", + "description": "Billing client provides access to billing resources for Azure subscriptions." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/providers/Microsoft.Billing/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists the available billing 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" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/reservationOrders/{reservationOrderId}": { + "get": { + "tags": [ + "Reservations" + ], + "x-ms-examples": { + "ReservationOrderByBillingAccount": { + "$ref": "./examples/ReservationOrderByBillingAccount.json" + } + }, + "operationId": "Reservations_GetReservationOrderByBillingAccount", + "description": "Gets a reservation order for a billing account.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/reservationOrderIdParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReservationOrder" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/reservationOrders/{reservationOrderId}": { + "get": { + "tags": [ + "Reservations" + ], + "x-ms-examples": { + "ReservationOrderByBillingProfile": { + "$ref": "./examples/ReservationOrderByBillingProfile.json" + } + }, + "operationId": "Reservations_GetReservationOrderByBillingProfile", + "description": "Gets a reservation order for a billing profile.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/billingProfileNameParameter" + }, + { + "$ref": "#/parameters/reservationOrderIdParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReservationOrder" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/reservationOrders/{reservationOrderId}/reservations/{reservationId}": { + "get": { + "tags": [ + "Reservations" + ], + "x-ms-examples": { + "ReservationByBillingAccount": { + "$ref": "./examples/ReservationByBillingAccount.json" + } + }, + "operationId": "Reservations_GetReservationByBillingAccount", + "description": "Gets a reservation for a billing account and reservation order.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/reservationOrderIdParameter" + }, + { + "$ref": "#/parameters/reservationIdParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReservationResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/reservationOrders/{reservationOrderId}/reservations/{reservationId}": { + "get": { + "tags": [ + "Reservations" + ], + "x-ms-examples": { + "ReservationByBillingProfile": { + "$ref": "./examples/ReservationByBillingProfile.json" + } + }, + "operationId": "Reservations_GetReservationByBillingProfile", + "description": "Gets a reservation order for a billing profile.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/billingProfileNameParameter" + }, + { + "$ref": "#/parameters/reservationOrderIdParameter" + }, + { + "$ref": "#/parameters/reservationIdParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReservationResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + } + }, + "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 + }, + "target": { + "description": "The target of the particular error.", + "type": "string", + "readOnly": true + }, + "details": { + "description": "The sub details of the error.", + "readOnly": true, + "$ref": "#/definitions/ErrorSubDetails" + } + } + }, + "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" + } + } + }, + "ErrorSubDetails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "description": "Error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "The target of the particular error.", + "type": "string", + "readOnly": true + } + } + } + }, + "Operation": { + "description": "A Billing 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.Billing.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "Resource on which the operation is performed such as invoice and billing subscription.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type such as read, write and delete.", + "type": "string", + "readOnly": true + } + } + } + } + }, + "OperationListResult": { + "description": "The list of billing operations and a URL link to get the next set of results.", + "properties": { + "value": { + "description": "The list of billing operations supported by the Microsoft.Billing 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 + } + } + }, + "DisplayProvisioningState": { + "type": "string", + "description": "Provisioning state shown in UI.", + "enum": [ + "Succeeded", + "Expiring", + "Expired", + "Pending", + "Cancelled", + "Failed" + ], + "x-ms-enum": { + "name": "DisplayProvisioningState", + "modelAsString": true + } + }, + "UserFriendlyRenewState": { + "type": "string", + "description": "User friendly renew state.", + "enum": [ + "On", + "Off", + "Renewed", + "NotRenewed", + "NotApplicable" + ], + "x-ms-enum": { + "name": "UserFriendlyRenewState", + "modelAsString": true + } + }, + "UserFriendlyAppliedScopeType": { + "type": "string", + "description": "User friendly applied scope type.", + "enum": [ + "None", + "Shared", + "Single", + "ResourceGroup" + ], + "x-ms-enum": { + "name": "UserFriendlyAppliedScopeType", + "modelAsString": true + } + }, + "ReservationTerm": { + "type": "string", + "description": "Represent the term of Reservation.", + "enum": [ + "None", + "P1Y", + "P3Y", + "P5Y" + ], + "x-ms-enum": { + "name": "ReservationTerm", + "modelAsString": true + } + }, + "ReservationOrder": { + "type": "object", + "x-ms-azure-resource": true, + "properties": { + "etag": { + "type": "integer", + "format": "int32" + }, + "id": { + "type": "string", + "readOnly": true, + "description": "Identifier of the reservation order" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Name of the reservation order" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ReservationOrderProperties" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Type of resource. \"Microsoft.Capacity/reservations\"" + } + } + }, + "ReservationOrderProperties": { + "description": "Reservation order properties.", + "properties": { + "productType": { + "description": "The product type.", + "type": "string", + "readOnly": true + }, + "tenantId": { + "description": "The id of the tenant in which the product is used.", + "type": "string", + "readOnly": true + }, + "effectiveDate": { + "description": "The date from which the reservation is effective.", + "type": "string", + "readOnly": true + }, + "requestPurchaseTime": { + "description": "The date and time of the purchase.", + "type": "string", + "readOnly": true + }, + "expiryDate": { + "description": "The date when the reservation will expire.", + "type": "string", + "readOnly": true + }, + "reviewDate": { + "description": "The review date.", + "type": "string", + "readOnly": true + }, + "endDate": { + "description": "The date when the reservation will end.", + "type": "string", + "readOnly": true + }, + "term": { + "description": "The term length of the reservation.", + "type": "string", + "enum": [ + "None", + "P1Y", + "P3Y", + "P5Y" + ], + "readOnly": true, + "x-ms-enum": { + "name": "ReservationTerm", + "modelAsString": true + } + }, + "reservationName": { + "description": "The name of the reservation.", + "type": "string", + "readOnly": true + }, + "billingScope": { + "description": "The billing scope.", + "type": "string", + "readOnly": true + }, + "billingPlanDetails": { + "description": "The details of the billing plan.", + "type": "string", + "readOnly": true + }, + "state": { + "description": "The state of the reservation order.", + "type": "string", + "readOnly": true + }, + "subState": { + "description": "The substate of the reservation order.", + "type": "string", + "readOnly": true + }, + "reservations": { + "description": "The list of reservations in the order.", + "type": "array", + "readOnly": true, + "items": { + "type": "string" + } + }, + "enrollmentId": { + "description": "The enrollment ID.", + "type": "string", + "readOnly": true + }, + "originalQuantity": { + "description": "The original quantity of reservations.", + "type": "integer", + "format": "int32", + "readOnly": true + }, + "extendedErrorInformation": { + "description": "The extended error information.", + "type": "object", + "readOnly": true + }, + "benefitScopeBillingAliasId": { + "description": "The benefit scope billing alias ID.", + "type": "string", + "readOnly": true + } + } + }, + "Reseller": { + "description": "Details of the reseller.", + "properties": { + "resellerId": { + "description": "The MPN ID of the reseller.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The name of the reseller.", + "type": "string", + "readOnly": true + } + } + }, + "SkuName": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "AppliedScopes": { + "type": "array", + "description": "List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared.", + "items": { + "type": "string", + "minItems": 1, + "maxItems": 1 + } + }, + "AppliedScopeType": { + "type": "string", + "description": "Type of the Applied Scope.", + "enum": [ + "Single", + "Shared" + ], + "x-ms-enum": { + "name": "AppliedScopeType", + "modelAsString": true + } + }, + "ReservationResponse": { + "type": "object", + "x-ms-azure-resource": true, + "properties": { + "location": { + "type": "string", + "readOnly": true, + "description": "The Azure Region where the reserved resource lives." + }, + "etag": { + "type": "integer", + "format": "int32" + }, + "id": { + "type": "string", + "readOnly": true, + "description": "Identifier of the reservation" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Name of the reservation" + }, + "sku": { + "$ref": "#/definitions/SkuName" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ReservationProperties" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Type of resource. \"Microsoft.Capacity/reservationOrders/reservations\"" + } + } + }, + "ReservedResourceType": { + "type": "string", + "description": "The type of the resource that is being reserved.", + "enum": [ + "VirtualMachines", + "SqlDatabases", + "SuseLinux", + "CosmosDb", + "RedHat", + "SqlDataWarehouse", + "VMwareCloudSimple", + "RedHatOsa", + "Databricks", + "AppService", + "ManagedDisk", + "BlockBlob", + "RedisCache", + "AzureDataExplorer", + "MySql", + "MariaDb", + "PostgreSql", + "DedicatedHost", + "SapHana", + "SqlAzureHybridBenefit", + "AVS" + ], + "x-ms-enum": { + "name": "ReservedResourceType", + "modelAsString": true + } + }, + "ReservationProperties": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "description": "Friendly name for user to easily identify the reservation" + }, + "appliedScopes": { + "$ref": "#/definitions/AppliedScopes" + }, + "appliedScopeType": { + "$ref": "#/definitions/AppliedScopeType" + }, + "reservedResourceType": { + "$ref": "#/definitions/ReservedResourceType" + }, + "quantity": { + "type": "integer", + "format": "int32", + "description": "Quantity of the SKUs that are part of the Reservation." + }, + "provisioningState": { + "type": "string", + "description": "Current state of the reservation." + }, + "expiryDate": { + "type": "string", + "format": "date", + "description": "This is the date when the Reservation will expire." + }, + "reviewDate": { + "description": "The review date.", + "type": "string", + "readOnly": true + }, + "provisioningSubState": { + "type": "string", + "description": "Current sub state of the reservation." + }, + "displayProvisioningState": { + "type": "string", + "description": "Provisioning state shown in UI.", + "enum": [ + "Succeeded", + "Expiring", + "Expired", + "Pending", + "Cancelled", + "Failed" + ], + "readOnly": true, + "x-ms-enum": { + "name": "DisplayProvisioningState", + "modelAsString": true + } + }, + "userFriendlyRenewState": { + "type": "string", + "description": "User friendly renew state.", + "enum": [ + "On", + "Off", + "Renewed", + "NotRenewed", + "NotApplicable" + ], + "readOnly": true, + "x-ms-enum": { + "name": "UserFriendlyRenewState", + "modelAsString": true + } + }, + "userFriendlyAppliedScopeType": { + "type": "string", + "description": "User friendly applied scope type.", + "enum": [ + "None", + "Shared", + "Single", + "ResourceGroup" + ], + "readOnly": true, + "x-ms-enum": { + "name": "UserFriendlyAppliedScopeType", + "modelAsString": true + } + }, + "effectiveDateTime": { + "type": "string", + "format": "date-time", + "description": "DateTime of the Reservation starting when this version is effective from." + }, + "skuDescription": { + "type": "string", + "description": "SKU description." + }, + "term": { + "description": "The term length of the reservation.", + "type": "string", + "enum": [ + "None", + "P1Y", + "P3Y", + "P5Y" + ], + "readOnly": true, + "x-ms-enum": { + "name": "ReservationTerm", + "modelAsString": true + } + }, + "renew": { + "type": "boolean", + "description": "Is reservation set to auto-renew." + }, + "renewSource": { + "type": "string", + "description": "Reservation Id of the reservation from which this reservation is renewed." + }, + "utilization": { + "$ref": "#/definitions/Utilization" + } + } + }, + "UtilizationAggregate": { + "description": "Aggregate utilization data.", + "properties": { + "grain": { + "readOnly": true, + "type": "number", + "description": "Grain value of the aggregate data." + }, + "grainUnit": { + "readOnly": true, + "type": "string", + "description": "Unit of the grain value." + }, + "value": { + "readOnly": true, + "type": "number", + "description": "Utilization value." + }, + "valueUnit": { + "readOnly": true, + "type": "string", + "description": "Unit of the utilization value." + } + } + }, + "Utilization": { + "description": "Utilization data for the reservation.", + "properties": { + "trend": { + "readOnly": true, + "type": "string", + "description": "Represents the 7-day trend for a reservation" + }, + "aggregates": { + "description": "The list of utilization aggregates.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/UtilizationAggregate" + } + } + } + } + }, + "parameters": { + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The version of the API to be used with the client request. The current version is 2020-11-01-preview." + }, + "billingAccountNameParameter": { + "name": "billingAccountName", + "in": "path", + "description": "The ID that uniquely identifies a billing account.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "billingProfileNameParameter": { + "name": "billingProfileName", + "in": "path", + "description": "The ID that uniquely identifies a billing profile.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "reservationOrderIdParameter": { + "name": "reservationOrderId", + "x-ms-parameter-location": "method", + "in": "path", + "required": true, + "type": "string", + "description": "Order Id of the reservation" + }, + "reservationIdParameter": { + "name": "reservationId", + "x-ms-parameter-location": "method", + "in": "path", + "required": true, + "type": "string", + "description": "Reservation Id of the reservation" + } + }, + "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" + } + } + } +} diff --git a/specification/billing/resource-manager/readme.azureresourceschema.md b/specification/billing/resource-manager/readme.azureresourceschema.md index e7e163b7b60e..65ca37559915 100644 --- a/specification/billing/resource-manager/readme.azureresourceschema.md +++ b/specification/billing/resource-manager/readme.azureresourceschema.md @@ -7,6 +7,7 @@ These settings apply only when `--azureresourceschema` is specified on the comma ``` yaml $(azureresourceschema) && $(multiapi) batch: - tag: schema-billing-2020-05-01 + - tag: schema-billing-2020-11-01-preview - tag: schema-billing-2019-10-01-preview - tag: schema-billing-2018-11-01-preview - tag: schema-billing-2018-03-01-preview @@ -28,6 +29,17 @@ input-file: ``` +### Tag: schema-billing-2020-11-01-preview and azureresourceschema + +``` yaml $(tag) == 'schema-billing-2020-11-01-preview' && $(azureresourceschema) +output-folder: $(azureresourceschema-folder)/schemas + +# all the input files in this apiVersion +input-file: + - Microsoft.Billing/preview/2020-11-01-preview/reservations.json + +``` + ### Tag: schema-billing-2019-10-01-preview and azureresourceschema ``` yaml $(tag) == 'schema-billing-2019-10-01-preview' && $(azureresourceschema) diff --git a/specification/billing/resource-manager/readme.md b/specification/billing/resource-manager/readme.md index 133322e3dbd8..3b75cbcf80e2 100644 --- a/specification/billing/resource-manager/readme.md +++ b/specification/billing/resource-manager/readme.md @@ -39,6 +39,15 @@ input-file: - Microsoft.Billing/preview/2018-03-01-preview/billingV2.json ``` +### Tag: package-2020-11-preview + +These settings apply only when `--tag=package-2020-11-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2020-11-preview' +input-file: +- Microsoft.Billing/preview/2020-11-01-preview/reservations.json +``` + ### Tag: package-2019-10-preview These settings apply only when `--tag=package-2019-10-preview` is specified on the command line.