diff --git a/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/examples/DeletedFileSharesList.json b/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/examples/DeletedFileSharesList.json new file mode 100644 index 000000000000..34318d8a0870 --- /dev/null +++ b/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/examples/DeletedFileSharesList.json @@ -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" + } + } + } +} diff --git a/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/examples/FileSharesRestore.json b/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/examples/FileSharesRestore.json new file mode 100644 index 000000000000..d357bc3270a9 --- /dev/null +++ b/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/examples/FileSharesRestore.json @@ -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": {} + } +} diff --git a/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/file.json b/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/file.json index 10cc15aa9a7e..68c8fea8b2d5 100644 --- a/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/file.json +++ b/specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/file.json @@ -164,6 +164,9 @@ "x-ms-examples": { "ListShares": { "$ref": "./examples/FileSharesList.json" + }, + "ListDeletedShares": { + "$ref": "./examples/DeletedFileSharesList.json" } }, "description": "Lists all shares.", @@ -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": { @@ -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": { @@ -471,6 +538,21 @@ ], "description": "Properties of the file share, including Id, resource name, resource type, Etag." }, + "DeletedShare":{ + "properties": { + "deletedShareName": { + "type": "string", + "required": true, + "description": "Required. Identify the name of the deleted share that will be restored." + }, + "deletedShareVersion": { + "type": "string", + "required": true, + "description": "Required. Identify the version of the deleted share that will be restored." + } + }, + "description": "The deleted share to be restored." + }, "FileShareItem": { "properties": { "properties": { @@ -524,6 +606,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."