{ "swagger": "2.0", "info": { "title": "Azure Reservation API", "description": "This API describe Azure Reservation", "version": "2019-04-01" }, "host": "management.azure.com", "schemes": [ "https" ], "produces": [ "application/json" ], "consumes": [ "application/json" ], "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.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/availableScopes": { "post": { "summary": "Get Available Scopes for `Reservation`.", "description": "Get Available Scopes for `Reservation`.\n", "operationId": "Reservation_AvailableScopes", "x-ms-examples": { "AvailableScopes": { "$ref": "./examples/GetAvailableScope.json" } }, "x-ms-long-running-operation": true, "parameters": [ { "$ref": "#/parameters/ReservationOrderIdParameter" }, { "$ref": "#/parameters/ReservationIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/ScopeParameter" } ], "tags": [ "Reservation, AvailableScopes" ], "responses": { "200": { "description": "List of `Subscription`s created after the filter.", "schema": { "$ref": "#/definitions/Properties" } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/catalogs": { "get": { "summary": "Get the regions and skus that are available for RI purchase for the specified Azure subscription.", "operationId": "GetCatalog", "x-ms-examples": { "Catalog": { "$ref": "./examples/GetCatalog.json" } }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ReservedResourceTypeIdParameter" }, { "$ref": "#/parameters/LocationIdParameter" } ], "tags": [ "Catalog" ], "responses": { "200": { "description": "List of available resources", "schema": { "type": "array", "items": { "$ref": "#/definitions/Catalog" } } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/appliedReservations": { "get": { "summary": "Get list of applicable `Reservation`s.", "description": "Get applicable `Reservation`s that are applied to this subscription or a resource group under this subscription.", "operationId": "GetAppliedReservationList", "x-ms-examples": { "AppliedReservationList": { "$ref": "./examples/GetAppliedReservations.json" } }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "tags": [ "AppliedReservation" ], "responses": { "200": { "description": "Applicable `Reservation`s.", "schema": { "$ref": "#/definitions/AppliedReservations" } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/providers/Microsoft.Capacity/calculatePrice": { "post": { "summary": "Calculate price for a `ReservationOrder`.", "description": "Calculate price for placing a `ReservationOrder`.", "operationId": "ReservationOrder_Calculate", "x-ms-examples": { "Purchase": { "$ref": "./examples/CalculateReservationOrder.json" } }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/PurchaseParameter" } ], "tags": [ "Reservation, Calculate" ], "responses": { "200": { "description": "Detailed price info for purchasing `ReservationOrder`", "schema": { "$ref": "#/definitions/CalculatePriceResponse" } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/providers/Microsoft.Capacity/reservationOrders": { "get": { "summary": "Get all `ReservationOrder`s.", "description": "List of all the `ReservationOrder`s that the user has access to in the current tenant.", "operationId": "ReservationOrder_List", "x-ms-examples": { "ReservationOrderList": { "$ref": "./examples/GetReservationOrders.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" } ], "tags": [ "Reservation" ], "responses": { "200": { "description": "List of `ReservationOrder`s", "schema": { "$ref": "#/definitions/ReservationOrderList" } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}": { "put": { "summary": "Purchase `ReservationOrder`", "description": "Purchase `ReservationOrder` and create resource under the specified URI.", "operationId": "ReservationOrder_Purchase", "x-ms-examples": { "Purchase": { "$ref": "./examples/PurchaseReservationOrder.json" } }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "location" }, "parameters": [ { "$ref": "#/parameters/ReservationOrderIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/PurchaseParameter" } ], "tags": [ "Reservation, Purchase" ], "responses": { "200": { "description": "The resource has been created", "schema": { "$ref": "#/definitions/ReservationOrderResponse" } }, "202": { "description": "The request is accepted and is being processed. Operation result link is in location header.", "schema": { "$ref": "#/definitions/ReservationOrderResponse" } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } }, "get": { "summary": "Get a specific `ReservationOrder`.", "description": "Get the details of the `ReservationOrder`.", "operationId": "ReservationOrder_Get", "x-ms-examples": { "GetReservation": { "$ref": "./examples/GetReservationOrderDetails.json" }, "GetReservationWithExpandPayments": { "$ref": "./examples/GetReservationOrderDetailsWithExpandPlanInformation.json" } }, "parameters": [ { "$ref": "#/parameters/ReservationOrderIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "name": "$expand", "description": "May be used to expand the planInformation.", "in": "query", "required": false, "type": "string" } ], "tags": [ "Reservation" ], "responses": { "200": { "description": "Get the details of the `ReservationOrder`.", "schema": { "$ref": "#/definitions/ReservationOrderResponse" } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/split": { "post": { "summary": "Split the `Reservation`.", "description": "Split a `Reservation` into two `Reservation`s with specified quantity distribution.", "operationId": "Reservation_Split", "x-ms-examples": { "Split": { "$ref": "./examples/SplitReservation.json" } }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "location" }, "parameters": [ { "$ref": "#/parameters/ReservationOrderIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SplitParameter" } ], "tags": [ "Reservation, Split" ], "responses": { "200": { "description": "List of `Reservation`s created after the split operation.", "schema": { "type": "array", "items": { "$ref": "#/definitions/ReservationResponse" } } }, "202": { "description": "The request is accepted and is being processed" }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/merge": { "post": { "summary": "Merges two `Reservation`s.", "description": "Merge the specified `Reservation`s into a new `Reservation`. The two `Reservation`s being merged must have same properties.", "operationId": "Reservation_Merge", "x-ms-examples": { "Merge": { "$ref": "./examples/MergeReservations.json" } }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "location" }, "parameters": [ { "$ref": "#/parameters/ReservationOrderIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/MergeParameter" } ], "tags": [ "Reservation, Merge" ], "responses": { "200": { "description": "Returns the `Reservation` created after the merge.", "schema": { "type": "array", "items": { "$ref": "#/definitions/ReservationResponse" } } }, "202": { "description": "The request is accepted and is being processed" }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations": { "get": { "summary": "Get `Reservation`s in a given reservation Order", "description": "List `Reservation`s within a single `ReservationOrder`.", "operationId": "Reservation_List", "x-ms-examples": { "ReservationList": { "$ref": "./examples/GetReservations.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "parameters": [ { "$ref": "#/parameters/ReservationOrderIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "tags": [ "Reservation" ], "responses": { "200": { "description": "List `Reservation`s within a single `ReservationOrder`.", "schema": { "$ref": "#/definitions/ReservationList" } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}": { "get": { "summary": "Get `Reservation` details.", "description": "Get specific `Reservation` details.", "operationId": "Reservation_Get", "x-ms-examples": { "GetReservation": { "$ref": "./examples/GetReservationDetails.json" } }, "parameters": [ { "$ref": "#/parameters/ReservationIdParameter" }, { "$ref": "#/parameters/ReservationOrderIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/ExpandRenewPropertiesParameter" } ], "tags": [ "Reservation" ], "responses": { "200": { "description": "Get `Reservation` details.", "schema": { "$ref": "#/definitions/ReservationResponse" } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } }, "patch": { "summary": "Updates a `Reservation`.", "description": "Updates the applied scopes of the `Reservation`.", "operationId": "Reservation_Update", "x-ms-examples": { "PatchReservation": { "$ref": "./examples/UpdateReservation.json" } }, "x-ms-long-running-operation": true, "parameters": [ { "$ref": "#/parameters/ReservationOrderIdParameter" }, { "$ref": "#/parameters/ReservationIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/PatchParameter" } ], "tags": [ "Reservation", "ApplyScope" ], "responses": { "200": { "description": "Returns the updated `Reservation`.", "schema": { "$ref": "#/definitions/ReservationResponse" } }, "202": { "description": "The request is accepted and is being processed" }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/revisions": { "get": { "summary": "Get `Reservation` revisions.", "description": "List of all the revisions for the `Reservation`.", "operationId": "Reservation_ListRevisions", "x-ms-examples": { "ReservationRevisions": { "$ref": "./examples/GetReservationRevisions.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "parameters": [ { "$ref": "#/parameters/ReservationIdParameter" }, { "$ref": "#/parameters/ReservationOrderIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "tags": [ "Reservation" ], "responses": { "200": { "description": "List of all the revisions for the `Reservation`.", "schema": { "$ref": "#/definitions/ReservationList" } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/archive": { "post": { "summary": "Archive a `Reservation`.", "description": "Archiving a `Reservation` moves it to `Archived` state.", "operationId": "Reservation_Archive", "x-ms-examples": { "Archive": { "$ref": "./examples/Archive.json" } }, "parameters": [ { "$ref": "#/parameters/ReservationOrderIdParameter" }, { "$ref": "#/parameters/ReservationIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "tags": [ "Reservation, Archive" ], "responses": { "200": { "description": "Archived a reservation." }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/unarchive": { "post": { "summary": "Unarchive a `Reservation`.", "description": "Unarchiving a `Reservation` moves it to the state it was before archiving.\n", "operationId": "Reservation_Unarchive", "x-ms-examples": { "Unarchive": { "$ref": "./examples/Unarchive.json" } }, "parameters": [ { "$ref": "#/parameters/ReservationOrderIdParameter" }, { "$ref": "#/parameters/ReservationIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "tags": [ "Reservation, Unarchive" ], "responses": { "200": { "description": "Unarchive complete for the reservation." }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/providers/Microsoft.Capacity/operations": { "get": { "summary": "Get operations.", "description": "List all the operations.", "operationId": "Operation_List", "x-ms-examples": { "GetOperations": { "$ref": "./examples/GetOperations.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" } ], "tags": [ "Operation" ], "responses": { "200": { "description": "List all the operations.", "schema": { "$ref": "#/definitions/OperationList" } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } } }, "definitions": { "ReservationStatusCode": { "type": "string", "enum": [ "None", "Pending", "Active", "PurchaseError", "PaymentInstrumentError", "Split", "Merged", "Expired", "Succeeded" ], "x-ms-enum": { "name": "ReservationStatusCode", "modelAsString": true } }, "ErrorResponseCode": { "type": "string", "enum": [ "NotSpecified", "InternalServerError", "ServerTimeout", "AuthorizationFailed", "BadRequest", "ClientCertificateThumbprintNotSet", "InvalidRequestContent", "OperationFailed", "HttpMethodNotSupported", "InvalidRequestUri", "MissingTenantId", "InvalidTenantId", "InvalidReservationOrderId", "InvalidReservationId", "ReservationIdNotInReservationOrder", "ReservationOrderNotFound", "InvalidSubscriptionId", "InvalidAccessToken", "InvalidLocationId", "UnauthenticatedRequestsThrottled", "InvalidHealthCheckType", "Forbidden", "BillingScopeIdCannotBeChanged", "AppliedScopesNotAssociatedWithCommerceAccount", "PatchValuesSameAsExisting", "RoleAssignmentCreationFailed", "ReservationOrderCreationFailed", "ReservationOrderNotEnabled", "CapacityUpdateScopesFailed", "UnsupportedReservationTerm", "ReservationOrderIdAlreadyExists", "RiskCheckFailed", "CreateQuoteFailed", "ActivateQuoteFailed", "NonsupportedAccountId", "PaymentInstrumentNotFound", "MissingAppliedScopesForSingle", "NoValidReservationsToReRate", "ReRateOnlyAllowedForEA", "OperationCannotBePerformedInCurrentState", "InvalidSingleAppliedScopesCount", "InvalidFulfillmentRequestParameters", "NotSupportedCountry", "InvalidRefundQuantity", "PurchaseError", "BillingCustomerInputError", "BillingPaymentInstrumentSoftError", "BillingPaymentInstrumentHardError", "BillingTransientError", "BillingError", "FulfillmentConfigurationError", "FulfillmentOutOfStockError", "FulfillmentTransientError", "FulfillmentError", "CalculatePriceFailed" ], "x-ms-enum": { "name": "ErrorResponseCode", "modelAsString": true } }, "SkuName": { "type": "object", "properties": { "name": { "type": "string" } } }, "Catalog": { "type": "object", "properties": { "resourceType": { "type": "string", "description": "The type of resource the SKU applies to.", "readOnly": true }, "name": { "type": "string", "description": "The name of SKU", "readOnly": true }, "billingPlans": { "type": "object", "description": "The billing plan options available for this SKU.", "additionalProperties": { "type": "array", "items": { "$ref": "#/definitions/ReservationBillingPlan" } } }, "msrp": { "type": "object", "description": "The sku's MSRP values for each term", "additionalProperties": { "type": "object", "items": { "$ref": "#/definitions/MsrpProperty" } } }, "terms": { "type": "array", "readOnly": true, "description": "Available reservation terms for this resource", "items": { "$ref": "#/definitions/ReservationTerm" } }, "locations": { "type": "array", "readOnly": true, "items": { "type": "string", "description": "The set of locations that the SKU is available. If not specified, the SKU is available in all locations." } }, "skuProperties": { "type": "array", "readOnly": true, "items": { "$ref": "#/definitions/SkuProperty" } }, "restrictions": { "type": "array", "readOnly": true, "items": { "$ref": "#/definitions/SkuRestriction" } } } }, "MsrpProperty": { "type": "object", "properties": { "currencyCode": { "type": "string", "description": "Represents the currency code - 3 character ISO." }, "amount": { "type": "number", "description": "Represents the amount of money in the currency." } } }, "SkuProperty": { "type": "object", "properties": { "name": { "type": "string", "description": "An invariant to describe the feature." }, "value": { "type": "string", "description": "An invariant if the feature is measured by quantity." } } }, "SkuRestriction": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of restrictions." }, "values": { "type": "array", "items": { "type": "string" }, "description": "The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted." }, "reasonCode": { "type": "string", "description": "The reason for restriction." } } }, "ReservationOrderResponse": { "type": "object", "x-ms-azure-resource": true, "properties": { "etag": { "type": "integer" }, "id": { "type": "string", "readOnly": true, "description": "Identifier of the reservation" }, "name": { "type": "string", "readOnly": true, "description": "Name of the reservation" }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/ReservationOrderProperties" }, "type": { "type": "string", "readOnly": true, "description": "Type of resource. \"Microsoft.Capacity/reservations\"" } } }, "ReservationBillingPlan": { "type": "string", "description": "Represent the billing plans.", "enum": [ "Upfront", "Monthly" ], "x-ms-enum": { "name": "ReservationBillingPlan", "modelAsString": true } }, "ReservationTerm": { "type": "string", "description": "Represent the term of Reservation.", "enum": [ "P1Y", "P3Y" ], "x-ms-enum": { "name": "ReservationTerm", "modelAsString": true } }, "PaymentStatus": { "type": "string", "description": "Describes whether the payment is completed, failed, cancelled or scheduled in the future.", "enum": [ "Succeeded", "Failed", "Scheduled", "Cancelled" ], "x-ms-enum": { "name": "PaymentStatus", "modelAsString": true } }, "PaymentDetail": { "type": "object", "description": "Information about payment related to a reservation order.", "properties": { "dueDate": { "type": "string", "format": "date", "description": "Date when the payment needs to be done." }, "paymentDate": { "type": "string", "format": "date", "description": "Date when the transaction is completed. Is null when it is scheduled." }, "pricingCurrencyTotal": { "$ref": "#/definitions/Price", "description": "Amount in pricing currency. Tax not included." }, "billingCurrencyTotal": { "$ref": "#/definitions/Price", "description": "Amount charged in Billing currency. Tax not included. Is null for future payments" }, "billingAccount": { "type": "string", "description": "Shows the Account that is charged for this payment." }, "status": { "$ref": "#/definitions/PaymentStatus" }, "extendedStatusInfo": { "$ref": "#/definitions/ExtendedStatusInfo" } } }, "ReservationOrderBillingPlanInformation": { "type": "object", "description": "Information describing the type of billing plan for this reservation.", "properties": { "pricingCurrencyTotal": { "$ref": "#/definitions/Price", "description": "Amount of money to be paid for the Order. Tax is not included." }, "startDate": { "type": "string", "format": "date", "description": "Date when the billing plan has started." }, "nextPaymentDueDate": { "type": "string", "format": "date", "description": "For recurring billing plans, indicates the date when next payment will be processed. Null when total is paid off." }, "transactions": { "type": "array", "items": { "$ref": "#/definitions/PaymentDetail" } } } }, "ReservationOrderProperties": { "type": "object", "properties": { "displayName": { "type": "string", "description": "Friendly name for user to easily identified the reservation." }, "requestDateTime": { "type": "string", "format": "date-time", "description": "This is the DateTime when the reservation was initially requested for purchase." }, "createdDateTime": { "type": "string", "format": "date-time", "description": "This is the DateTime when the reservation was created." }, "expiryDate": { "type": "string", "format": "date", "description": "This is the date when the Reservation will expire." }, "benefitStartTime": { "type": "string", "format": "date-time", "description": "This is the DateTime when the reservation benefit started." }, "originalQuantity": { "$ref": "#/definitions/ReservationQuantity" }, "term": { "$ref": "#/definitions/ReservationTerm" }, "provisioningState": { "type": "string", "description": "Current state of the reservation." }, "billingPlan": { "$ref": "#/definitions/ReservationBillingPlan" }, "planInformation": { "$ref": "#/definitions/ReservationOrderBillingPlanInformation" }, "reservations": { "type": "array", "items": { "$ref": "#/definitions/ReservationResponse" } } } }, "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" }, "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": { "$ref": "#/definitions/ReservationProperties" }, "type": { "type": "string", "readOnly": true, "description": "Type of resource. \"Microsoft.Capacity/reservationOrders/reservations\"" } } }, "RenewPropertiesResponse": { "type": "object", "properties": { "purchaseProperties": { "$ref": "#/definitions/PurchaseRequest" }, "pricingCurrencyTotal": { "type": "object", "description": "Amount that Microsoft uses for record. Used during refund for calculating refund limit. Tax is not included. This is locked price 30 days before expiry.", "properties": { "currencyCode": { "type": "string" }, "amount": { "type": "number" } } }, "billingCurrencyTotal": { "type": "object", "description": "Currency and amount that customer will be charged in customer's local currency for renewal purchase. Tax is not included.", "properties": { "currencyCode": { "type": "string" }, "amount": { "type": "number" } } } } }, "CalculatePriceResponse": { "type": "object", "properties": { "properties": { "$ref": "#/definitions/CalculatePriceResponseProperties" } } }, "CalculatePriceResponseProperties": { "type": "object", "properties": { "billingCurrencyTotal": { "type": "object", "description": "Currency and amount that customer will be charged in customer's local currency. Tax is not included.", "properties": { "currencyCode": { "type": "string" }, "amount": { "type": "number" } } }, "netTotal": { "description": "Net total", "type": "number" }, "taxTotal": { "description": "Tax total", "type": "number" }, "grandTotal": { "description": "Grand Total", "type": "number" }, "isBillingPartnerManaged": { "description": "True if billing is managed by Microsoft Partner. Used only for CSP accounts.", "type": "boolean" }, "reservationOrderId": { "description": "GUID that represents reservation order that can be placed after calculating price.", "type": "string" }, "skuTitle": { "description": "Title of SKU that is being purchased.", "type": "string" }, "skuDescription": { "description": "Description of SKU that is being purchased.", "type": "string" }, "pricingCurrencyTotal": { "type": "object", "description": "Amount that Microsoft uses for record. Used during refund for calculating refund limit. Tax is not included.", "properties": { "currencyCode": { "type": "string" }, "amount": { "type": "number" } } }, "paymentSchedule": { "type": "array", "items": { "$ref": "#/definitions/PaymentDetail" } } } }, "ReservationProperties": { "type": "object", "properties": { "reservedResourceType": { "$ref": "#/definitions/ReservedResourceType" }, "instanceFlexibility": { "$ref": "#/definitions/InstanceFlexibility" }, "displayName": { "type": "string", "description": "Friendly name for user to easily identify the reservation" }, "appliedScopes": { "$ref": "#/definitions/AppliedScopes" }, "appliedScopeType": { "$ref": "#/definitions/AppliedScopeType" }, "quantity": { "$ref": "#/definitions/ReservationQuantity" }, "provisioningState": { "type": "string", "description": "Current state of the reservation." }, "effectiveDateTime": { "type": "string", "format": "date-time", "description": "DateTime of the Reservation starting when this version is effective from." }, "benefitStartTime": { "type": "string", "format": "date-time", "description": "This is the DateTime when the reservation benefit started." }, "lastUpdatedDateTime": { "type": "string", "format": "date-time", "description": "DateTime of the last time the Reservation was updated.", "readOnly": true }, "expiryDate": { "type": "string", "format": "date", "description": "This is the date when the Reservation will expire." }, "skuDescription": { "type": "string", "description": "Description of the SKU in english." }, "extendedStatusInfo": { "$ref": "#/definitions/ExtendedStatusInfo" }, "billingPlan": { "$ref": "#/definitions/ReservationBillingPlan" }, "splitProperties": { "$ref": "#/definitions/ReservationSplitProperties" }, "mergeProperties": { "$ref": "#/definitions/ReservationMergeProperties" }, "swapProperties": { "$ref": "#/definitions/ReservationSwapProperties" }, "appliedScopeProperties": { "$ref": "#/definitions/AppliedScopeProperties" }, "billingScopeId": { "$ref": "#/definitions/BillingScopeId" }, "renew": { "$ref": "#/definitions/Renew" }, "renewSource": { "type": "string", "description": "Reservation Id of the reservation from which this reservation is renewed. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}." }, "renewDestination": { "type": "string", "description": "Reservation Id of the reservation which is purchased because of renew. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}." }, "renewProperties": { "$ref": "#/definitions/RenewPropertiesResponse" }, "term": { "$ref": "#/definitions/ReservationTerm" }, "archived": { "type": "boolean", "description": "Property to determine if a reservation is archived or not" }, "capabilities": { "type": "string", "description": "List the Capabilities of a reservation" } } }, "AppliedScopeProperties": { "type": "object", "properties": { "tenantId": { "type": "string", "description": "Tenant ID of the applied scope type" }, "managementGroupId": { "type": "string", "description": "Management group ID of the format /providers/Microsoft.Management/managementGroups/{managementGroupId}" }, "displayName": { "type": "string", "description": "Management group display name" } } }, "ReservationSplitProperties": { "type": "object", "properties": { "splitDestinations": { "type": "array", "items": { "type": "string" }, "description": "List of destination Resource Id that are created due to split. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" }, "splitSource": { "type": "string", "description": "Resource Id of the Reservation from which this is split. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" } } }, "ReservationMergeProperties": { "type": "object", "properties": { "mergeDestination": { "type": "string", "description": "Reservation Resource Id Created due to the merge. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" }, "mergeSources": { "type": "array", "items": { "type": "string" }, "description": "Resource Ids of the Source Reservation's merged to form this Reservation. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" } } }, "ReservationSwapProperties": { "type": "object", "properties": { "swapSource": { "type": "string", "description": "Resource Id of the Source Reservation that gets swapped. Format of the resource Id is /providers/microsoft.capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" }, "swapDestination": { "type": "string", "description": "Reservation Resource Id that the original resource gets swapped to. Format of the resource Id is /providers/microsoft.capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" } } }, "PurchaseRequestProperties": { "type": "object", "properties": { "reservedResourceType": { "$ref": "#/definitions/ReservedResourceType" }, "instanceFlexibility": { "$ref": "#/definitions/InstanceFlexibility" }, "billingScopeId": { "$ref": "#/definitions/BillingScopeId" }, "term": { "$ref": "#/definitions/ReservationTerm" }, "billingPlan": { "$ref": "#/definitions/ReservationBillingPlan" }, "quantity": { "$ref": "#/definitions/ReservationQuantity" }, "displayName": { "type": "string", "description": "Friendly name of the Reservation" }, "appliedScopeType": { "$ref": "#/definitions/AppliedScopeType" }, "appliedScopes": { "$ref": "#/definitions/AppliedScopes" }, "renew": { "$ref": "#/definitions/Renew" }, "reservedResourceProperties": { "type": "object", "description": "Properties specific to each reserved resource type. Not required if not applicable.", "properties": { "instanceFlexibility": { "$ref": "#/definitions/InstanceFlexibility" } } } } }, "PatchProperties": { "type": "object", "properties": { "appliedScopeType": { "$ref": "#/definitions/AppliedScopeType" }, "appliedScopes": { "$ref": "#/definitions/AppliedScopes" }, "instanceFlexibility": { "$ref": "#/definitions/InstanceFlexibility" }, "name": { "type": "string", "description": "Name of the Reservation" }, "renew": { "$ref": "#/definitions/Renew" }, "renewProperties": { "type": "object", "properties": { "purchaseProperties": { "$ref": "#/definitions/PurchaseRequest" } } } } }, "SplitProperties": { "type": "object", "properties": { "quantities": { "type": "array", "description": "List of the quantities in the new reservations to create.", "items": { "type": "integer", "minItems": 2, "maxItems": 2 } }, "reservationId": { "type": "string", "description": "Resource id of the reservation to be split. Format of the resource id should be /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" } } }, "MergeProperties": { "type": "object", "properties": { "sources": { "type": "array", "description": "Format of the resource id should be /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}", "items": { "type": "string" } } } }, "MergeRequest": { "type": "object", "properties": { "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/MergeProperties" } } }, "PurchaseRequest": { "type": "object", "properties": { "sku": { "$ref": "#/definitions/SkuName" }, "location": { "type": "string", "description": "The Azure Region where the reserved resource lives." }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/PurchaseRequestProperties" } } }, "Patch": { "type": "object", "properties": { "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/PatchProperties" } } }, "SplitRequest": { "type": "object", "properties": { "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/SplitProperties" } } }, "Error": { "type": "object", "properties": { "error": { "$ref": "#/definitions/ExtendedErrorInfo" } } }, "ExtendedErrorInfo": { "type": "object", "properties": { "code": { "$ref": "#/definitions/ErrorResponseCode" }, "message": { "type": "string" } } }, "ExtendedStatusInfo": { "type": "object", "properties": { "statusCode": { "$ref": "#/definitions/ReservationStatusCode" }, "message": { "type": "string", "description": "The message giving detailed information about the status code." } } }, "ReservationOrderList": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/ReservationOrderResponse" } }, "nextLink": { "type": "string", "description": "Url to get the next page of reservationOrders." } } }, "ReservationList": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/ReservationResponse" } }, "nextLink": { "type": "string", "description": "Url to get the next page of reservations." } } }, "AppliedReservations": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier of the applied reservations", "readOnly": true }, "name": { "type": "string", "description": "Name of resource", "readOnly": true }, "type": { "type": "string", "description": "Type of resource. \"Microsoft.Capacity/AppliedReservations\"", "readOnly": true }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/AppliedReservationsProperties" } } }, "AppliedReservationsProperties": { "type": "object", "properties": { "reservationOrderIds": { "$ref": "#/definitions/AppliedReservationList" } } }, "AppliedReservationList": { "type": "object", "properties": { "value": { "type": "array", "items": { "type": "string", "description": "Reservation resource Id. \"/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}\"" } }, "nextLink": { "type": "string", "description": "Url to get the next page of reservations" } } }, "OperationList": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/OperationResponse" } }, "nextLink": { "type": "string", "description": "Url to get the next page of items." } } }, "OperationResponse": { "type": "object", "properties": { "name": { "type": "string" }, "display": { "$ref": "#/definitions/OperationDisplay" }, "origin": { "type": "string" } } }, "OperationDisplay": { "type": "object", "properties": { "provider": { "type": "string" }, "resource": { "type": "string" }, "operation": { "type": "string" }, "description": { "type": "string" } } }, "InstanceFlexibility": { "type": "string", "description": "Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.", "enum": [ "On", "Off" ], "x-ms-enum": { "name": "InstanceFlexibility", "modelAsString": true } }, "AppliedScopeType": { "type": "string", "description": "Type of the Applied Scope.", "enum": [ "Single", "Shared" ], "x-ms-enum": { "name": "AppliedScopeType", "modelAsString": true } }, "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 } }, "BillingScopeId": { "type": "string", "description": "Subscription that will be charged for purchasing Reservation" }, "Renew": { "type": "boolean", "default": false, "description": "Setting this to true will automatically purchase a new reservation on the expiration date time." }, "ReservationQuantity": { "type": "integer", "format": "int32", "description": "Quantity of the SKUs that are part of the Reservation. Must be greater than zero." }, "Properties": { "type": "object", "properties": { "properties": { "$ref": "#/definitions/SubscriptionScopeProperties" } } }, "SubscriptionScopeProperties": { "type": "object", "properties": { "scopes": { "type": "array", "items": { "$ref": "#/definitions/ScopeProperties" } } } }, "ScopeProperties": { "type": "object", "properties": { "scope": { "type": "string" }, "valid": { "type": "boolean" }, "reason": { "type": "string" } } }, "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" ], "x-ms-enum": { "name": "ReservedResourceType", "modelAsString": true } }, "Price": { "type": "object", "properties": { "currencyCode": { "type": "string", "description": "The ISO 4217 3-letter currency code for the currency used by this purchase record." }, "amount": { "type": "number", "format": "double" } } }, "AvailableScopeRequest": { "type": "object", "properties": { "properties": { "$ref": "#/definitions/AvailableScopeRequestProperties" } } }, "AvailableScopeRequestProperties": { "description": "List of scopes for which availability should be checked", "type": "object", "properties": { "scopes": { "description": "Scopes to be checked for availability", "type": "array", "items": { "type": "string" } } } } }, "parameters": { "ScopeParameter": { "name": "body", "x-ms-parameter-location": "method", "in": "body", "required": true, "description": "Parameter for listing the available scopes", "schema": { "$ref": "#/definitions/AvailableScopeRequest" } }, "PurchaseParameter": { "name": "body", "x-ms-parameter-location": "method", "in": "body", "required": true, "description": "Information needed for calculate or purchase reservation", "schema": { "$ref": "#/definitions/PurchaseRequest" } }, "ReservationIdParameter": { "name": "reservationId", "x-ms-parameter-location": "method", "in": "path", "required": true, "type": "string", "description": "Id of the Reservation Item" }, "MergeParameter": { "name": "body", "x-ms-parameter-location": "method", "in": "body", "required": true, "description": "Information needed for commercial request for a reservation", "schema": { "$ref": "#/definitions/MergeRequest" } }, "PatchParameter": { "name": "parameters", "x-ms-parameter-location": "method", "in": "body", "required": true, "description": "Information needed to patch a reservation item", "schema": { "$ref": "#/definitions/Patch" } }, "SplitParameter": { "name": "body", "x-ms-parameter-location": "method", "in": "body", "required": true, "description": "Information needed to Split a reservation item", "schema": { "$ref": "#/definitions/SplitRequest" } }, "ApiVersionParameter": { "name": "api-version", "in": "query", "description": "Supported version for this document is 2019-04-01", "required": true, "type": "string" }, "ExpandRenewPropertiesParameter": { "name": "expand", "x-ms-parameter-location": "method", "in": "query", "description": "Supported value of this query is renewProperties", "required": false, "type": "string" }, "SubscriptionIdParameter": { "name": "subscriptionId", "x-ms-parameter-location": "method", "in": "path", "required": true, "type": "string", "description": "Id of the subscription" }, "ReservedResourceTypeIdParameter": { "name": "reservedResourceType", "x-ms-parameter-location": "method", "in": "query", "required": true, "type": "string", "description": "The type of the resource for which the skus should be provided." }, "LocationIdParameter": { "name": "location", "x-ms-parameter-location": "method", "in": "query", "required": false, "type": "string", "description": "Filters the skus based on the location specified in this parameter. This can be an azure region or global" }, "ReservationOrderIdParameter": { "name": "reservationOrderId", "x-ms-parameter-location": "method", "in": "path", "required": true, "type": "string", "description": "Order Id of the reservation" } } }