-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Add DeletedWorkspaces API #9401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -272,6 +272,75 @@ | |
| } | ||
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/deletedWorkspaces": { | ||
| "get": { | ||
| "tags": [ | ||
| "DeletedWorkspaces" | ||
| ], | ||
| "x-ms-examples": { | ||
| "WorkspacesSubscriptionList": { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know the payload might be same. Could we change the name of examples?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's the same payload for this version. |
||
| "$ref": "./examples/WorkspacesSubscriptionList.json" | ||
| } | ||
| }, | ||
| "operationId": "DeletedWorkspaces_List", | ||
| "description": "Gets recently deleted workspaces in a subscription, available for recovery.", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK response definition.", | ||
| "schema": { | ||
| "$ref": "#/definitions/WorkspaceListResult" | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-pageable": { | ||
| "nextLinkName": null | ||
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/deletedWorkspaces": { | ||
| "get": { | ||
| "tags": [ | ||
| "DeletedWorkspaces" | ||
| ], | ||
| "x-ms-examples": { | ||
| "WorkspacesGet": { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's the same payload for this version. |
||
| "$ref": "./examples/WorkspacesListByResourceGroup.json" | ||
| } | ||
| }, | ||
| "operationId": "DeletedWorkspaces_ListByResourceGroup", | ||
| "description": "Gets recently deleted workspaces in a resource group, available for recovery.", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK response definition.", | ||
| "schema": { | ||
| "$ref": "#/definitions/WorkspaceListResult" | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-pageable": { | ||
| "nextLinkName": null | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
You should consider declaring paging in the swagger even if the service doesn't support it. This way you can just add it in the service when needed and clients will just work the same. (Same for the above API as well.)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We consider adding such support in the future for Workspaces, we will add it then for DeletedWorkspaces as well, since it is the same code in the service. We prefer to keep it this way for now.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm only suggesting a swagger change. If your backend doesn't support paging it's as if it always returns 1 page, but it's not required at this point. In reply to: 422477036 [](ancestors = 422477036) |
||
| } | ||
| } | ||
| } | ||
| }, | ||
| "definitions": { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this going to be a proxy or tracked resource?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a proxy resource that references a recently deleted tracked resource. When a user takes such resource and do a PUT on it, it will be recovered.