From a2c2ec4ccf9230ea90df0be98c3800cf141f7306 Mon Sep 17 00:00:00 2001 From: Zhenfeng Date: Tue, 10 Nov 2020 01:09:22 -0800 Subject: [PATCH] [Storage] File share snapshots CRUD (#11372) --- .../examples/FileShareSnapshotsList.json | 39 ++++++++++++++++++ .../preview/2020-08-01-preview/file.json | 40 ++++++++++++++++++- 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/examples/FileShareSnapshotsList.json diff --git a/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/examples/FileShareSnapshotsList.json b/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/examples/FileShareSnapshotsList.json new file mode 100644 index 000000000000..9410c953b651 --- /dev/null +++ b/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/examples/FileShareSnapshotsList.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "res9290", + "accountName": "sto1590", + "$expand": "snapshots", + "api-version": "2020-08-01-preview", + "monitor": "true" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "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": "2020-10-26T05:47:05.0000000Z", + "shareQuota": 1024 + } + }, + { + "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": "2020-10-26T05:47:05.0000000Z", + "shareQuota": 1024, + "snapshotTime": "2020-10-26T05:48:07.0000000Z" + } + } + ] + } + } + } +} diff --git a/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/file.json b/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/file.json index 1f4729ed5ef9..ad9109b8a593 100644 --- a/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/file.json +++ b/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/file.json @@ -170,6 +170,9 @@ }, "ListDeletedShares": { "$ref": "./examples/DeletedFileSharesList.json" + }, + "ListShareSnapshots": { + "$ref": "./examples/FileShareSnapshotsList.json" } }, "description": "Lists all shares.", @@ -204,7 +207,8 @@ "required": false, "type": "string", "enum": [ - "deleted" + "deleted", + "snapshots" ], "x-ms-enum": { "name": "ListSharesExpand", @@ -269,6 +273,20 @@ }, "description": "Properties of the file share to create." }, + { + "name": "$expand", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "snapshots" + ], + "x-ms-enum": { + "name": "PutSharesExpand", + "modelAsString": false + }, + "description": "Optional, used to create a snapshot." + }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, @@ -393,6 +411,13 @@ "modelAsString": false }, "description": "Optional, used to expand the properties within share's properties." + }, + { + "name": "x-ms-snapshot", + "in": "header", + "required": false, + "type": "string", + "description": "Optional, used to retrieve properties of a snapshot." } ], "responses": { @@ -436,6 +461,13 @@ }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "x-ms-snapshot", + "in": "header", + "required": false, + "type": "string", + "description": "Optional, used to delete a snapshot." } ], "responses": { @@ -746,6 +778,12 @@ "format": "int64", "readOnly": true, "description": "The approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files." + }, + "snapshotTime": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Creation time of share snapshot returned in the response of list shares with expand param \"snapshots\"." } }, "description": "The properties of the file share."