forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add change directory to reservations spec 2020-10-01-preview (Azure#1…
…1555) * Add change directory to reservations spec 2020-10-01-preview * refactoring and updating description * prettier and spellcheck * Revert "prettier and spellcheck" This reverts commit b2a9735. * Revert "refactoring and updating description" This reverts commit 9dfdd78. * Revert "Add change directory to reservations spec 2020-10-01-preview" This reverts commit 064f7a9. * moving change directory to new api version * fixing lint error * update default tag Co-authored-by: Sean Oh <hyo@microsoft.com>
- Loading branch information
1 parent
844fc5f
commit 499f9b6
Showing
3 changed files
with
270 additions
and
1 deletion.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
...crosoft.Capacity/preview/2020-11-15-preview/examples/ChangeDirectoryReservationOrder.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2020-10-01-preview", | ||
"reservationOrderId": "a075419f-44cc-497f-b68a-14ee811d48b9", | ||
"body": { | ||
"destinationTenantId": "906655ea-30be-4587-9d12-b50e077b0f32" | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"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" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
229 changes: 229 additions & 0 deletions
229
...ce-manager/Microsoft.Capacity/preview/2020-11-15-preview/reservationsChangeDirectory.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,229 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Azure Reservation API", | ||
"description": "This API describe Azure Reservation", | ||
"version": "2020-11-15-preview" | ||
}, | ||
"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}/changeDirectory": { | ||
"post": { | ||
"summary": "Change directory of `ReservationOrder`.", | ||
"description": "Change directory (tenant) of `ReservationOrder` and all `Reservation` under it to specified tenant id", | ||
"operationId": "ReservationOrder_ChangeDirectory", | ||
"x-ms-examples": { | ||
"ChangeDirectory": { | ||
"$ref": "./examples/ChangeDirectoryReservationOrder.json" | ||
} | ||
}, | ||
"parameters": [ | ||
{ | ||
"$ref": "#/parameters/ReservationOrderIdParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/ApiVersionParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/ChangeDirectoryParameter" | ||
} | ||
], | ||
"tags": [ | ||
"ReservationOrder, ChangeDirectory" | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "List of `Reservation`s created after the change directory operation.", | ||
"schema": { | ||
"$ref": "#/definitions/ChangeDirectoryResponse" | ||
} | ||
}, | ||
"default": { | ||
"description": "Unexpected error", | ||
"schema": { | ||
"$ref": "#/definitions/Error" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"ChangeDirectoryRequest": { | ||
"type": "object", | ||
"properties": { | ||
"destinationTenantId": { | ||
"description": "Tenant id GUID that reservation order is to be transferred to", | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"ChangeDirectoryResponse": { | ||
"type": "object", | ||
"description": "Change directory response", | ||
"properties": { | ||
"reservationOrder": { | ||
"$ref": "#/definitions/ChangeDirectoryResult" | ||
}, | ||
"reservations": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/ChangeDirectoryResult" | ||
} | ||
} | ||
} | ||
}, | ||
"ChangeDirectoryResult": { | ||
"type": "object", | ||
"description": "Change directory result for reservation order or reservation", | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"description": "Identifier of the reservation order or reservation" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description": "Name of the reservation order or reservation" | ||
}, | ||
"isSucceeded": { | ||
"description": "True if change directory operation succeeded on this reservation order or reservation", | ||
"type": "boolean" | ||
}, | ||
"error": { | ||
"type": "string", | ||
"description": "Error reason if operation failed. Null otherwise" | ||
} | ||
} | ||
}, | ||
"Error": { | ||
"type": "object", | ||
"properties": { | ||
"error": { | ||
"$ref": "#/definitions/ExtendedErrorInfo" | ||
} | ||
} | ||
}, | ||
"ExtendedErrorInfo": { | ||
"type": "object", | ||
"properties": { | ||
"code": { | ||
"$ref": "#/definitions/ErrorResponseCode" | ||
}, | ||
"message": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"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 | ||
} | ||
} | ||
}, | ||
"parameters": { | ||
"ReservationOrderIdParameter": { | ||
"name": "reservationOrderId", | ||
"x-ms-parameter-location": "method", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "Order Id of the reservation" | ||
}, | ||
"ApiVersionParameter": { | ||
"name": "api-version", | ||
"in": "query", | ||
"description": "Supported version for this document is 2020-10-01-preview", | ||
"required": true, | ||
"type": "string" | ||
}, | ||
"ChangeDirectoryParameter": { | ||
"name": "body", | ||
"x-ms-parameter-location": "method", | ||
"in": "body", | ||
"required": true, | ||
"description": "Information needed to change directory of reservation order", | ||
"schema": { | ||
"$ref": "#/definitions/ChangeDirectoryRequest" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters