Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
List deleted shares with version, and support rename restored share
  • Loading branch information
zfchen95 committed Jan 21, 2020
commit 50033139e87a7490ebabd03894c4e525f1b5f552
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"subscriptionId": "{subscription-id}",
"resourceGroupName": "res9290",
"accountName": "sto1590",
"$expand": "deleted",
"api-version": "2019-06-01",
"monitor": "true"
},
Expand All @@ -11,7 +12,7 @@
"body": {
"value": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share1644",
"id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share1644_1234567890",
"name": "share1644",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"etag": "\"0x8D589847D51C7DE\"",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
"resourceGroupName": "res3376",
"accountName": "sto328",
"shareName": "share6185",
"deletedShare": {
"deletedShareName": "share1249",
"deletedShareVersion": "1234567890"
},
"api-version": "2019-06-01",
"monitor": "true",
"fileShare": {
"properties": {
"version": "1234567890"
}
}
"monitor": "true"
},
"responses": {
"200": {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,13 +451,12 @@
"$ref": "#/parameters/ShareName"
},
{
"name": "fileShare",
"name": "deletedShare",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/FileShare"
},
"description": "Must contain the version of the file share to restore."
"$ref": "#/definitions/DeletedShare"
}
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -539,6 +538,19 @@
],
"description": "Properties of the file share, including Id, resource name, resource type, Etag."
},
"DeletedShare":{
"properties": {
"deletedShareName": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to set deletedShareName and deletedShareVersion as required in "DeletedShare", or the current generated SDK from swagger will have the 2 parameters as optional when restore share, but they are actually required on server.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with Wei. Currently the generated SDK doesn't make deletedShareName and deletedShareVersion required, which are not as expected.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done~

"type": "string",
"description": "Required. Identify the name of the deleted share that will be restored."
},
"deletedShareVersion": {
"type": "string",
"description": "Required. Identify the version of the deleted share that will be restored."
}
},
"description": "The deleted share to be restored."
},
"FileShareItem": {
"properties": {
"properties": {
Expand Down