Reservation Order - Purchase

Purchase ReservationOrder
Purchase ReservationOrder and create resource under the specified URI.

PUT https://management.azure.com/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}?api-version=2019-04-01

URI Parameters

Name In Required Type Description
reservationOrderId
path True
  • string

Order Id of the reservation

api-version
query True
  • string

Supported version for this document is 2019-04-01

Request Body

Name Type Description
location
  • string

The Azure Region where the reserved resource lives.

properties.appliedScopeType

Type of the Applied Scope.

properties.appliedScopes
  • string[]

List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared.

properties.billingScopeId
  • string

Subscription that will be charged for purchasing Reservation

properties.displayName
  • string

Friendly name of the Reservation

properties.quantity
  • integer

Quantity of the SKUs that are part of the Reservation. Must be greater than zero.

properties.renew
  • boolean

Setting this to true will automatically purchase a new reservation on the expiration date time.

properties.reservedResourceProperties

Properties specific to each reserved resource type. Not required if not applicable.

properties.reservedResourceType

The type of the resource that is being reserved.

properties.term

Represent the term of Reservation.

sku

Responses

Name Type Description
200 OK

The resource has been created

202 Accepted

The request is accepted and is being processed. Operation result link is in location header.

Other Status Codes

Unexpected error

Examples

Purchase

Sample Request

PUT https://management.azure.com/providers/Microsoft.Capacity/reservationOrders/a075419f-44cc-497f-b68a-14ee811d48b9?api-version=2019-04-01
{
  "sku": {
    "name": "standard_D1"
  },
  "location": "westus",
  "properties": {
    "reservedResourceType": "VirtualMachines",
    "billingScopeId": "/subscriptions/ed3a1871-612d-abcd-a849-c2542a68be83",
    "term": "P1Y",
    "quantity": "1",
    "displayName": "TestReservationOrder",
    "appliedScopes": null,
    "appliedScopeType": "Shared",
    "reservedResourceProperties": {
      "instanceFlexibility": "On"
    },
    "renew": false
  }
}

Sample Response

{
  "id": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa",
  "type": "Microsoft.Capacity/reservationOrders",
  "name": "1f14354c-dc12-4c8d-8090-6f295a3a34aa",
  "etag": 7,
  "properties": {
    "displayName": "cabri",
    "requestDateTime": "2017-08-30T03:49:19.0252126Z",
    "createdDateTime": "2017-08-30T03:51:49.8083758Z",
    "expiryDate": "2018-08-30",
    "term": "P1Y",
    "provisioningState": "Succeeded",
    "reservations": [
      {
        "id": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa/reservations/c8c926bd-fc5d-4e29-9d43-b68340ac23a6"
      }
    ],
    "originalQuantity": 7
  }
}
{
  "id": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa",
  "type": "Microsoft.Capacity/reservationOrders",
  "name": "1f14354c-dc12-4c8d-8090-6f295a3a34aa",
  "etag": 7,
  "properties": {
    "displayName": "cabri",
    "requestDateTime": "2017-08-30T03:49:19.0252126Z",
    "createdDateTime": "2017-08-30T03:51:49.8083758Z",
    "expiryDate": "2018-08-30",
    "term": "P1Y",
    "provisioningState": "Succeeded",
    "reservations": [
      {
        "id": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa/reservations/c8c926bd-fc5d-4e29-9d43-b68340ac23a6"
      }
    ],
    "originalQuantity": 7
  }
}

Definitions

AppliedScopeType

Type of the Applied Scope.

BillingCurrencyTotal

Currency and amount that customer will be charged in customer's local currency for renewal purchase. Tax is not included.

Error
ErrorResponseCode
ExtendedErrorInfo
ExtendedStatusInfo
InstanceFlexibility

Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.

PricingCurrencyTotal

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.

PurchaseRequest
RenewPropertiesResponse
ReservationMergeProperties
ReservationOrderResponse
ReservationProperties
ReservationResponse
ReservationSplitProperties
ReservationStatusCode
ReservationTerm

Represent the term of Reservation.

ReservedResourceProperties

Properties specific to each reserved resource type. Not required if not applicable.

ReservedResourceType

The type of the resource that is being reserved.

SkuName

AppliedScopeType

Type of the Applied Scope.

Name Type Description
Shared
  • string
Single
  • string

BillingCurrencyTotal

Currency and amount that customer will be charged in customer's local currency for renewal purchase. Tax is not included.

Name Type Description
amount
  • number
currencyCode
  • string

Error

Name Type Description
error

ErrorResponseCode

Name Type Description
ActivateQuoteFailed
  • string
AppliedScopesNotAssociatedWithCommerceAccount
  • string
AuthorizationFailed
  • string
BadRequest
  • string
BillingCustomerInputError
  • string
BillingError
  • string
BillingPaymentInstrumentHardError
  • string
BillingPaymentInstrumentSoftError
  • string
BillingScopeIdCannotBeChanged
  • string
BillingTransientError
  • string
CalculatePriceFailed
  • string
CapacityUpdateScopesFailed
  • string
ClientCertificateThumbprintNotSet
  • string
CreateQuoteFailed
  • string
Forbidden
  • string
FulfillmentConfigurationError
  • string
FulfillmentError
  • string
FulfillmentOutOfStockError
  • string
FulfillmentTransientError
  • string
HttpMethodNotSupported
  • string
InternalServerError
  • string
InvalidAccessToken
  • string
InvalidFulfillmentRequestParameters
  • string
InvalidHealthCheckType
  • string
InvalidLocationId
  • string
InvalidRefundQuantity
  • string
InvalidRequestContent
  • string
InvalidRequestUri
  • string
InvalidReservationId
  • string
InvalidReservationOrderId
  • string
InvalidSingleAppliedScopesCount
  • string
InvalidSubscriptionId
  • string
InvalidTenantId
  • string
MissingAppliedScopesForSingle
  • string
MissingTenantId
  • string
NoValidReservationsToReRate
  • string
NonsupportedAccountId
  • string
NotSpecified
  • string
NotSupportedCountry
  • string
OperationCannotBePerformedInCurrentState
  • string
OperationFailed
  • string
PatchValuesSameAsExisting
  • string
PaymentInstrumentNotFound
  • string
PurchaseError
  • string
ReRateOnlyAllowedForEA
  • string
ReservationIdNotInReservationOrder
  • string
ReservationOrderCreationFailed
  • string
ReservationOrderIdAlreadyExists
  • string
ReservationOrderNotEnabled
  • string
ReservationOrderNotFound
  • string
RiskCheckFailed
  • string
RoleAssignmentCreationFailed
  • string
ServerTimeout
  • string
UnauthenticatedRequestsThrottled
  • string
UnsupportedReservationTerm
  • string

ExtendedErrorInfo

Name Type Description
code
message
  • string

ExtendedStatusInfo

Name Type Description
message
  • string

The message giving detailed information about the status code.

statusCode

InstanceFlexibility

Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.

Name Type Description
Off
  • string
On
  • string

PricingCurrencyTotal

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.

Name Type Description
amount
  • number
currencyCode
  • string

PurchaseRequest

Name Type Description
location
  • string

The Azure Region where the reserved resource lives.

properties.appliedScopeType

Type of the Applied Scope.

properties.appliedScopes
  • string[]

List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared.

properties.billingScopeId
  • string

Subscription that will be charged for purchasing Reservation

properties.displayName
  • string

Friendly name of the Reservation

properties.quantity
  • integer

Quantity of the SKUs that are part of the Reservation. Must be greater than zero.

properties.renew
  • boolean

Setting this to true will automatically purchase a new reservation on the expiration date time.

properties.reservedResourceProperties

Properties specific to each reserved resource type. Not required if not applicable.

properties.reservedResourceType

The type of the resource that is being reserved.

properties.term

Represent the term of Reservation.

sku

RenewPropertiesResponse

Name Type Description
billingCurrencyTotal

Currency and amount that customer will be charged in customer's local currency for renewal purchase. Tax is not included.

pricingCurrencyTotal

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.

purchaseProperties

ReservationMergeProperties

Name Type Description
mergeDestination
  • string

Reservation Resource Id Created due to the merge. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}

mergeSources
  • string[]

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}

ReservationOrderResponse

Name Type Description
etag
  • integer
id
  • string

Identifier of the reservation

name
  • string

Name of the reservation

properties.createdDateTime
  • string

This is the DateTime when the reservation was created.

properties.displayName
  • string

Friendly name for user to easily identified the reservation.

properties.expiryDate
  • string

This is the date when the Reservation will expire.

properties.originalQuantity
  • integer

Quantity of the SKUs that are part of the Reservation. Must be greater than zero.

properties.provisioningState
  • string

Current state of the reservation.

properties.requestDateTime
  • string

This is the DateTime when the reservation was initially requested for purchase.

properties.reservations
properties.term

Represent the term of Reservation.

type
  • string

Type of resource. "Microsoft.Capacity/reservations"

ReservationProperties

Name Type Description
appliedScopeType

Type of the Applied Scope.

appliedScopes
  • string[]

List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared.

billingScopeId
  • string

Subscription that will be charged for purchasing Reservation

displayName
  • string

Friendly name for user to easily identify the reservation

effectiveDateTime
  • string

DateTime of the Reservation starting when this version is effective from.

expiryDate
  • string

This is the date when the Reservation will expire.

extendedStatusInfo
instanceFlexibility

Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.

lastUpdatedDateTime
  • string

DateTime of the last time the Reservation was updated.

mergeProperties
provisioningState
  • string

Current state of the reservation.

quantity
  • integer

Quantity of the SKUs that are part of the Reservation. Must be greater than zero.

renew
  • boolean

Setting this to true will automatically purchase a new reservation on the expiration date time.

renewDestination
  • string

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
renewSource
  • string

Reservation Id of the reservation from which this reservation is renewed. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.

reservedResourceType

The type of the resource that is being reserved.

skuDescription
  • string

Description of the SKU in english.

splitProperties
term

Represent the term of Reservation.

ReservationResponse

Name Type Description
etag
  • integer
id
  • string

Identifier of the reservation

location
  • string

The Azure Region where the reserved resource lives.

name
  • string

Name of the reservation

properties
sku
type
  • string

Type of resource. "Microsoft.Capacity/reservationOrders/reservations"

ReservationSplitProperties

Name Type Description
splitDestinations
  • string[]

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
  • string

Resource Id of the Reservation from which this is split. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}

ReservationStatusCode

Name Type Description
Active
  • string
Expired
  • string
Merged
  • string
None
  • string
PaymentInstrumentError
  • string
Pending
  • string
PurchaseError
  • string
Split
  • string
Succeeded
  • string

ReservationTerm

Represent the term of Reservation.

Name Type Description
P1Y
  • string
P3Y
  • string

ReservedResourceProperties

Properties specific to each reserved resource type. Not required if not applicable.

Name Type Description
instanceFlexibility

Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.

ReservedResourceType

The type of the resource that is being reserved.

Name Type Description
CosmosDb
  • string
RedHat
  • string
RedHatOsa
  • string
SqlDataWarehouse
  • string
SqlDatabases
  • string
SuseLinux
  • string
VMwareCloudSimple
  • string
VirtualMachines
  • string

SkuName

Name Type Description
name
  • string