Share via


Reservation Order - Change Directory

Change directory of ReservationOrder.
Change directory (tenant) of ReservationOrder and all Reservation under it to specified tenant id

POST https://management.azure.com/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/changeDirectory?api-version=2022-11-01

URI Parameters

Name In Required Type Description
reservationOrderId
path True

string

Order Id of the reservation

api-version
query True

string

Supported version.

Request Body

Name Type Description
destinationTenantId

string

Tenant id GUID that reservation order is to be transferred to

Responses

Name Type Description
200 OK

ChangeDirectoryResponse

List of Reservations created after the change directory operation.

Other Status Codes

Error

Unexpected error

Examples

ChangeDirectory

Sample request

POST https://management.azure.com/providers/Microsoft.Capacity/reservationOrders/a075419f-44cc-497f-b68a-14ee811d48b9/changeDirectory?api-version=2022-11-01

{
  "destinationTenantId": "906655ea-30be-4587-9d12-b50e077b0f32"
}

Sample response

{
  "reservationOrder": {
    "id": "a075419f-44cc-497f-b68a-14ee811d48b9",
    "name": "VM_RI_10-02-2020_15-21",
    "isSucceeded": true,
    "error": "error string"
  },
  "reservations": [
    {
      "id": "1f14354c-dc12-4c8d-8090-6f295a3a34aa",
      "name": "VM_RI_10-02-2020_15-21",
      "isSucceeded": true,
      "error": "error string"
    }
  ]
}

Definitions

Name Description
ChangeDirectoryRequest

Request body for change directory of a reservation.

ChangeDirectoryResponse

Change directory response

ChangeDirectoryResult

Change directory result for reservation order or reservation

Error

Error information

ErrorResponseCode

Error code describing the reason that service is not able to process the incoming request

ExtendedErrorInfo

Extended error information including error code and error message

ChangeDirectoryRequest

Request body for change directory of a reservation.

Name Type Description
destinationTenantId

string

Tenant id GUID that reservation order is to be transferred to

ChangeDirectoryResponse

Change directory response

Name Type Description
reservationOrder

ChangeDirectoryResult

Change directory result for reservation order or reservation

reservations

ChangeDirectoryResult[]

Change directory result for reservation order or reservation

ChangeDirectoryResult

Change directory result for reservation order or reservation

Name Type Description
error

string

Error reason if operation failed. Null otherwise

id

string

Identifier of the reservation order or reservation

isSucceeded

boolean

True if change directory operation succeeded on this reservation order or reservation

name

string

Name of the reservation order or reservation

Error

Error information

Name Type Description
error

ExtendedErrorInfo

Extended error information including error code and error message

ErrorResponseCode

Error code describing the reason that service is not able to process the incoming request

Value Description
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
AppliedScopesSameAsExisting
SelfServiceRefundNotSupported
RefundLimitExceeded

ExtendedErrorInfo

Extended error information including error code and error message

Name Type Description
code

ErrorResponseCode

Error code describing the reason that service is not able to process the incoming request

message

string