diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/deleteTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/deleteTargetDirectory.json new file mode 100644 index 000000000000..756a538732a1 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/deleteTargetDirectory.json @@ -0,0 +1,9 @@ +{ + "parameters": { + "subscriptionId": "ebe4f8fd-d8b3-4867-bcf4-b2407edd196d", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/listTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/listTargetDirectory.json new file mode 100644 index 000000000000..cc573ffadbf6 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/listTargetDirectory.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "ebe4f8fd-d8b3-4867-bcf4-b2407edd196d", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/ebe4f8fd-d8b3-4867-bcf4-b2407edd196d/providers/Microsoft.Subscription/changeTenantRequest/default", + "name": "default", + "type": "Microsoft.Subscription/changeTenantRequest", + "properties": { + "destinationTenantId": "45ffe2da-b7a4-460f-9e4c-51afd47b94cb", + "destinationOwnerId": "45ffe2da-b7a4-460f-9e4c-51afd47b94cc", + "status": "Initiated", + "expiresOn": "2024-07-19T17:57:40.0278346Z" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json index f5a54e5dfd76..3ec0bdf5889d 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json @@ -625,6 +625,70 @@ } } } + }, + "delete": { + "operationId": "Subscriptions_DeleteTargetDirectory", + "x-ms-examples": { + "deleteTargetDirectory": { + "$ref": "./examples/deleteTargetDirectory.json" + } + }, + "description": "The operation to delete Initiator Subscription Changed Request", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Deleted the Target Directory" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/changeTenantRequest": { + "get": { + "operationId": "Subscriptions_ListTargetDirectory", + "x-ms-examples": { + "listTargetDirectory": { + "$ref": "./examples/listTargetDirectory.json" + } + }, + "description": "The operation to list Initiator Subscription Changed Request", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/TargetDirectoryListResult" + } + }, + "default": { + "description": "Describes the error if the operation is not successful.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } } }, "/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/acceptChangeTenant": { @@ -1235,6 +1299,28 @@ } } }, + "TargetDirectoryListResult": { + "type": "object", + "description": "Subscription Response to list out Changed Target Directory.", + "properties": { + "value": { + "description": "The list of subscription response to changed target directory.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/TargetDirectoryResult" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, "TargetDirectoryResult": { "type": "object", "x-ms-azure-resource": true, diff --git a/specification/subscription/resource-manager/readme.md b/specification/subscription/resource-manager/readme.md index 87bb8863fa8a..3a3c3ffa9d73 100644 --- a/specification/subscription/resource-manager/readme.md +++ b/specification/subscription/resource-manager/readme.md @@ -38,6 +38,12 @@ directive: from: subscriptions.json where: $.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"].get.responses["202"] reason: This api will return 200 and 202 response. + - suppress: DeleteResponseCodes + from: subscriptions.json + reason: The delete subscription changed directory expected to return 200 on every user's request, once it's deleted it will return 404, since it's a change on the existing api with new version, but creating workitem - "https://msazure.visualstudio.com/One/_workitems/edit/29188912", to refactor the call on delete request and will return 204 as no content in such cases to take this item in future ref. + - suppress: DeleteOperationResponses + from: subscriptions.json + reason: The delete operation response for subscription changed directory expected to return 200 on every user's request, once it's deleted it will return 404, since it's a change on the existing api with new version, but creating workitem - "https://msazure.visualstudio.com/One/_workitems/edit/29188912", to refactor the call on delete request and will return 204 as no content in such cases to take this item in future ref. ```