|
| 1 | +{ |
| 2 | + "swagger": "2.0", |
| 3 | + "info": { |
| 4 | + "title": "Azure Reservation API", |
| 5 | + "description": "This API describe Azure Reservation", |
| 6 | + "version": "2020-11-15-preview" |
| 7 | + }, |
| 8 | + "host": "management.azure.com", |
| 9 | + "schemes": [ |
| 10 | + "https" |
| 11 | + ], |
| 12 | + "produces": [ |
| 13 | + "application/json" |
| 14 | + ], |
| 15 | + "consumes": [ |
| 16 | + "application/json" |
| 17 | + ], |
| 18 | + "securityDefinitions": { |
| 19 | + "azure_auth": { |
| 20 | + "type": "oauth2", |
| 21 | + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", |
| 22 | + "flow": "implicit", |
| 23 | + "description": "Azure Active Directory OAuth2 Flow", |
| 24 | + "scopes": { |
| 25 | + "user_impersonation": "impersonate your user account" |
| 26 | + } |
| 27 | + } |
| 28 | + }, |
| 29 | + "paths": { |
| 30 | + "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/changeDirectory": { |
| 31 | + "post": { |
| 32 | + "summary": "Change directory of `ReservationOrder`.", |
| 33 | + "description": "Change directory (tenant) of `ReservationOrder` and all `Reservation` under it to specified tenant id", |
| 34 | + "operationId": "ReservationOrder_ChangeDirectory", |
| 35 | + "x-ms-examples": { |
| 36 | + "ChangeDirectory": { |
| 37 | + "$ref": "./examples/ChangeDirectoryReservationOrder.json" |
| 38 | + } |
| 39 | + }, |
| 40 | + "parameters": [ |
| 41 | + { |
| 42 | + "$ref": "#/parameters/ReservationOrderIdParameter" |
| 43 | + }, |
| 44 | + { |
| 45 | + "$ref": "#/parameters/ApiVersionParameter" |
| 46 | + }, |
| 47 | + { |
| 48 | + "$ref": "#/parameters/ChangeDirectoryParameter" |
| 49 | + } |
| 50 | + ], |
| 51 | + "tags": [ |
| 52 | + "ReservationOrder, ChangeDirectory" |
| 53 | + ], |
| 54 | + "responses": { |
| 55 | + "200": { |
| 56 | + "description": "List of `Reservation`s created after the change directory operation.", |
| 57 | + "schema": { |
| 58 | + "$ref": "#/definitions/ChangeDirectoryResponse" |
| 59 | + } |
| 60 | + }, |
| 61 | + "default": { |
| 62 | + "description": "Unexpected error", |
| 63 | + "schema": { |
| 64 | + "$ref": "#/definitions/Error" |
| 65 | + } |
| 66 | + } |
| 67 | + } |
| 68 | + } |
| 69 | + } |
| 70 | + }, |
| 71 | + "definitions": { |
| 72 | + "ChangeDirectoryRequest": { |
| 73 | + "type": "object", |
| 74 | + "properties": { |
| 75 | + "destinationTenantId": { |
| 76 | + "description": "Tenant id GUID that reservation order is to be transferred to", |
| 77 | + "type": "string" |
| 78 | + } |
| 79 | + } |
| 80 | + }, |
| 81 | + "ChangeDirectoryResponse": { |
| 82 | + "type": "object", |
| 83 | + "description": "Change directory response", |
| 84 | + "properties": { |
| 85 | + "reservationOrder": { |
| 86 | + "$ref": "#/definitions/ChangeDirectoryResult" |
| 87 | + }, |
| 88 | + "reservations": { |
| 89 | + "type": "array", |
| 90 | + "items": { |
| 91 | + "$ref": "#/definitions/ChangeDirectoryResult" |
| 92 | + } |
| 93 | + } |
| 94 | + } |
| 95 | + }, |
| 96 | + "ChangeDirectoryResult": { |
| 97 | + "type": "object", |
| 98 | + "description": "Change directory result for reservation order or reservation", |
| 99 | + "properties": { |
| 100 | + "id": { |
| 101 | + "type": "string", |
| 102 | + "description": "Identifier of the reservation order or reservation" |
| 103 | + }, |
| 104 | + "name": { |
| 105 | + "type": "string", |
| 106 | + "description": "Name of the reservation order or reservation" |
| 107 | + }, |
| 108 | + "isSucceeded": { |
| 109 | + "description": "True if change directory operation succeeded on this reservation order or reservation", |
| 110 | + "type": "boolean" |
| 111 | + }, |
| 112 | + "error": { |
| 113 | + "type": "string", |
| 114 | + "description": "Error reason if operation failed. Null otherwise" |
| 115 | + } |
| 116 | + } |
| 117 | + }, |
| 118 | + "Error": { |
| 119 | + "type": "object", |
| 120 | + "properties": { |
| 121 | + "error": { |
| 122 | + "$ref": "#/definitions/ExtendedErrorInfo" |
| 123 | + } |
| 124 | + } |
| 125 | + }, |
| 126 | + "ExtendedErrorInfo": { |
| 127 | + "type": "object", |
| 128 | + "properties": { |
| 129 | + "code": { |
| 130 | + "$ref": "#/definitions/ErrorResponseCode" |
| 131 | + }, |
| 132 | + "message": { |
| 133 | + "type": "string" |
| 134 | + } |
| 135 | + } |
| 136 | + }, |
| 137 | + "ErrorResponseCode": { |
| 138 | + "type": "string", |
| 139 | + "enum": [ |
| 140 | + "NotSpecified", |
| 141 | + "InternalServerError", |
| 142 | + "ServerTimeout", |
| 143 | + "AuthorizationFailed", |
| 144 | + "BadRequest", |
| 145 | + "ClientCertificateThumbprintNotSet", |
| 146 | + "InvalidRequestContent", |
| 147 | + "OperationFailed", |
| 148 | + "HttpMethodNotSupported", |
| 149 | + "InvalidRequestUri", |
| 150 | + "MissingTenantId", |
| 151 | + "InvalidTenantId", |
| 152 | + "InvalidReservationOrderId", |
| 153 | + "InvalidReservationId", |
| 154 | + "ReservationIdNotInReservationOrder", |
| 155 | + "ReservationOrderNotFound", |
| 156 | + "InvalidSubscriptionId", |
| 157 | + "InvalidAccessToken", |
| 158 | + "InvalidLocationId", |
| 159 | + "UnauthenticatedRequestsThrottled", |
| 160 | + "InvalidHealthCheckType", |
| 161 | + "Forbidden", |
| 162 | + "BillingScopeIdCannotBeChanged", |
| 163 | + "AppliedScopesNotAssociatedWithCommerceAccount", |
| 164 | + "PatchValuesSameAsExisting", |
| 165 | + "RoleAssignmentCreationFailed", |
| 166 | + "ReservationOrderCreationFailed", |
| 167 | + "ReservationOrderNotEnabled", |
| 168 | + "CapacityUpdateScopesFailed", |
| 169 | + "UnsupportedReservationTerm", |
| 170 | + "ReservationOrderIdAlreadyExists", |
| 171 | + "RiskCheckFailed", |
| 172 | + "CreateQuoteFailed", |
| 173 | + "ActivateQuoteFailed", |
| 174 | + "NonsupportedAccountId", |
| 175 | + "PaymentInstrumentNotFound", |
| 176 | + "MissingAppliedScopesForSingle", |
| 177 | + "NoValidReservationsToReRate", |
| 178 | + "ReRateOnlyAllowedForEA", |
| 179 | + "OperationCannotBePerformedInCurrentState", |
| 180 | + "InvalidSingleAppliedScopesCount", |
| 181 | + "InvalidFulfillmentRequestParameters", |
| 182 | + "NotSupportedCountry", |
| 183 | + "InvalidRefundQuantity", |
| 184 | + "PurchaseError", |
| 185 | + "BillingCustomerInputError", |
| 186 | + "BillingPaymentInstrumentSoftError", |
| 187 | + "BillingPaymentInstrumentHardError", |
| 188 | + "BillingTransientError", |
| 189 | + "BillingError", |
| 190 | + "FulfillmentConfigurationError", |
| 191 | + "FulfillmentOutOfStockError", |
| 192 | + "FulfillmentTransientError", |
| 193 | + "FulfillmentError", |
| 194 | + "CalculatePriceFailed" |
| 195 | + ], |
| 196 | + "x-ms-enum": { |
| 197 | + "name": "ErrorResponseCode", |
| 198 | + "modelAsString": true |
| 199 | + } |
| 200 | + } |
| 201 | + }, |
| 202 | + "parameters": { |
| 203 | + "ReservationOrderIdParameter": { |
| 204 | + "name": "reservationOrderId", |
| 205 | + "x-ms-parameter-location": "method", |
| 206 | + "in": "path", |
| 207 | + "required": true, |
| 208 | + "type": "string", |
| 209 | + "description": "Order Id of the reservation" |
| 210 | + }, |
| 211 | + "ApiVersionParameter": { |
| 212 | + "name": "api-version", |
| 213 | + "in": "query", |
| 214 | + "description": "Supported version for this document is 2020-10-01-preview", |
| 215 | + "required": true, |
| 216 | + "type": "string" |
| 217 | + }, |
| 218 | + "ChangeDirectoryParameter": { |
| 219 | + "name": "body", |
| 220 | + "x-ms-parameter-location": "method", |
| 221 | + "in": "body", |
| 222 | + "required": true, |
| 223 | + "description": "Information needed to change directory of reservation order", |
| 224 | + "schema": { |
| 225 | + "$ref": "#/definitions/ChangeDirectoryRequest" |
| 226 | + } |
| 227 | + } |
| 228 | + } |
| 229 | +} |
0 commit comments