Skip to content
Closed
Show file tree
Hide file tree
Changes from 5 commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "res9290",
"accountName": "sto1590",
"$expand": "deleted",
"api-version": "2019-06-01",
"monitor": "true"
},
"responses": {
"200": {
"body": {
"value": [
{
"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\"",
"properties": {
"lastModifiedTime": "2019-05-14T08:20:47Z",
"shareQuota": 1024,
"version": "1234567890",
"deleted": true,
"deletedTime": "2019-12-14T08:20:47Z",
"remainingRetentionDays": 30
}
},
{
"id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052",
"name": "share4052",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"etag": "\"0x8D589847DAB5AF9\"",
"properties": {
"lastModifiedTime": "2019-05-14T08:20:47Z",
"shareQuota": 1024
}
}
],
"nextLink": "https://sto1590endpoint/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares?api-version=2019-06-01&$maxpagesize=2&$skipToken=/sto1590/share5103"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "res3376",
"accountName": "sto328",
"shareName": "share6185",
"deletedShare": {
"deletedShareName": "share1249",
"deletedShareVersion": "1234567890"
},
"api-version": "2019-06-01",
"monitor": "true"
},
"responses": {
"200": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@
"x-ms-examples": {
"ListShares": {
"$ref": "./examples/FileSharesList.json"
},
"ListDeletedShares": {
"$ref": "./examples/DeletedFileSharesList.json"
}
},
"description": "Lists all shares.",
Expand Down Expand Up @@ -191,6 +194,20 @@
"in": "query",
"type": "string",
"description": "Optional. When specified, only share names starting with the filter will be listed."
},
{
"name": "$expand",
"description": "Optional, used to expand the properties within share's properties.",
"in": "query",
"required": false,
"type": "string",
"enum": [
"deleted"
],
"x-ms-enum": {
"name": "ListSharesExpand",
"modelAsString": false
}
}
],
"responses": {
Expand Down Expand Up @@ -410,6 +427,56 @@
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}/restore": {
"post": {
"tags": [
"FileShares"
],
"operationId": "FileShares_Restore",
"x-ms-examples": {
"PutShares": {
"$ref": "./examples/FileSharesRestore.json"
}
},
"description": "Restore a file share within a valid retention days if share soft delete is enabled",
"parameters": [
{
"$ref": "./storage.json#/parameters/ResourceGroupName"
},
{
"$ref": "./storage.json#/parameters/StorageAccountName"
},
{
"$ref": "#/parameters/ShareName"
},
{
"name": "deletedShare",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/DeletedShare"
}
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK -- The Share is successfully restored."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -471,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 Expand Up @@ -524,6 +604,26 @@
"minimum": 1,
"maximum": 102400,
"description": "The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400."
},
"version": {
"type": "string",
"description": "The version of the share."
},
"deleted": {
"type": "boolean",
"readOnly": true,
"description": "Indicates whether the share was deleted."
},
"deletedTime": {
"type": "string",
"format": "date-time",
"readOnly": true,
"description": "The deleted time if the share was deleted."
},
"remainingRetentionDays": {
"type": "integer",
"readOnly": true,
"description": "Remaining retention days for share that was soft deleted."
}
},
"description": "The properties of the file share."
Expand Down