From 15684354c018757e8f0fa12afc7a3864a3671145 Mon Sep 17 00:00:00 2001 From: Zhenfeng Date: Wed, 14 Oct 2020 12:04:35 -0700 Subject: [PATCH] Add last access time and smb multichannel feature into Aug2020 preview (#10993) * Add last access time and smb multichannel feature into Aug2020 preview * Fix CI issue * Update blob.json --- .../preview/2020-08-01-preview/blob.json | 42 ++++++++ ...ervicesPutLastAccessTimeBasedTracking.json | 41 +++++++ ...FileServicesPut_EnableSMBMultichannel.json | 43 ++++++++ ...Policy_LastAccessTimeBasedBlobActions.json | 102 ++++++++++++++++++ .../preview/2020-08-01-preview/file.json | 34 ++++++ .../preview/2020-08-01-preview/storage.json | 16 ++- 6 files changed, 275 insertions(+), 3 deletions(-) create mode 100644 specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/examples/BlobServicesPutLastAccessTimeBasedTracking.json create mode 100644 specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/examples/FileServicesPut_EnableSMBMultichannel.json create mode 100644 specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/examples/StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions.json diff --git a/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/blob.json b/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/blob.json index b07b7afda9ad..bfb8cb862ec7 100644 --- a/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/blob.json +++ b/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/blob.json @@ -64,6 +64,9 @@ "x-ms-examples": { "PutBlobServices": { "$ref": "./examples/BlobServicesPut.json" + }, + "BlobServicesPutLastAccessTimeBasedTracking": { + "$ref": "./examples/BlobServicesPutLastAccessTimeBasedTracking.json" } }, "description": "Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. ", @@ -1204,6 +1207,10 @@ "containerDeleteRetentionPolicy": { "$ref": "./common.json#/definitions/DeleteRetentionPolicy", "description": "The blob service properties for container soft delete." + }, + "lastAccessTimeTrackingPolicy": { + "$ref": "#/definitions/LastAccessTimeTrackingPolicy", + "description": "The blob service property to configure last access time based tracking policy." } }, "x-ms-client-flatten": true, @@ -1274,6 +1281,41 @@ ], "description": "The blob service properties for blob restore policy" }, + "LastAccessTimeTrackingPolicy": { + "properties": { + "enable": { + "type": "boolean", + "description": "When set to true last access time based tracking is enabled." + }, + "name": { + "type": "string", + "description": "Name of the policy. The valid value is AccessTimeTracking. This field is currently read only", + "enum": [ + "AccessTimeTracking" + ], + "x-ms-enum": { + "name": "name", + "modelAsString": true + } + }, + "trackingGranularityInDays": { + "type": "integer", + "format": "int32", + "description": "The field specifies blob object tracking granularity in days, typically how often the blob object should be tracked.This field is currently read only with value as 1" + }, + "blobType": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of predefined supported blob types. Only blockBlob is the supported value. This field is currently read only" + } + }, + "required": [ + "enable" + ], + "description": "The blob service properties for Last access time based tracking policy." + }, "LeaseContainerRequest": { "properties": { "action": { diff --git a/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/examples/BlobServicesPutLastAccessTimeBasedTracking.json b/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/examples/BlobServicesPutLastAccessTimeBasedTracking.json new file mode 100644 index 000000000000..a412fc28b489 --- /dev/null +++ b/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/examples/BlobServicesPutLastAccessTimeBasedTracking.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "res4410", + "accountName": "sto8607", + "BlobServicesName": "default", + "api-version": "2020-08-01-preview", + "monitor": "true", + "parameters": { + "properties": { + "lastAccessTimeTrackingPolicy": { + "enable": true, + "name": "AccessTimeTracking", + "trackingGranularityInDays": 1, + "blobType": [ + "blockBlob" + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default", + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices", + "properties": { + "lastAccessTimeTrackingPolicy": { + "enable": true, + "name": "AccessTimeTracking", + "trackingGranularityInDays": 1, + "blobType": [ + "blockBlob" + ] + } + } + } + } + } +} diff --git a/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/examples/FileServicesPut_EnableSMBMultichannel.json b/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/examples/FileServicesPut_EnableSMBMultichannel.json new file mode 100644 index 000000000000..4368652b23e3 --- /dev/null +++ b/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/examples/FileServicesPut_EnableSMBMultichannel.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "res4410", + "accountName": "sto8607", + "FileServicesName": "default", + "api-version": "2020-08-01-preview", + "monitor": "true", + "parameters": { + "properties": { + "protocolSettings": { + "smb": { + "multichannel": { + "enabled": true + } + } + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default", + "name": "default", + "type": "Microsoft.Storage/storageAccounts/fileServices", + "properties": { + "protocolSettings": { + "smb": { + "multichannel": { + "enabled": true + } + } + } + }, + "sku": { + "name": "Premium_LRS", + "tier": "Premium" + } + } + } + } +} diff --git a/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/examples/StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions.json b/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/examples/StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions.json new file mode 100644 index 000000000000..52c40ceacc81 --- /dev/null +++ b/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/examples/StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions.json @@ -0,0 +1,102 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "res7687", + "accountName": "sto9699", + "managementPolicyName": "default", + "api-version": "2020-08-01-preview", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "enabled": true, + "name": "olcmtest", + "type": "Lifecycle", + "definition": { + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer" + ] + }, + "actions": { + "baseBlob": { + "tierToCool": { + "daysAfterLastAccessTimeGreaterThan": 30 + }, + "tierToArchive": { + "daysAfterLastAccessTimeGreaterThan": 90 + }, + "delete": { + "daysAfterLastAccessTimeGreaterThan": 1000 + }, + "enableAutoTierToHotFromCool": true + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + } + } + } + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "properties": { + "policy": { + "rules": [ + { + "enabled": true, + "name": "olcmtest", + "type": "Lifecycle", + "definition": { + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer" + ] + }, + "actions": { + "baseBlob": { + "tierToCool": { + "daysAfterLastAccessTimeGreaterThan": 30 + }, + "tierToArchive": { + "daysAfterLastAccessTimeGreaterThan": 90 + }, + "delete": { + "daysAfterLastAccessTimeGreaterThan": 1000 + }, + "enableAutoTierToHotFromCool": true + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + } + } + } + } + } + ] + }, + "lastModifiedTime": "2018-06-08T02:53:39.0932539Z" + } + } + } + } +} 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 2035390ef5ef..1f4729ed5ef9 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 @@ -67,6 +67,9 @@ "x-ms-examples": { "PutFileServices": { "$ref": "./examples/FileServicesPut.json" + }, + "PutFileServices_EnableSMBMultichannel": { + "$ref": "./examples/FileServicesPut_EnableSMBMultichannel.json" } }, "description": "Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. ", @@ -526,6 +529,10 @@ "shareDeleteRetentionPolicy": { "$ref": "./common.json#/definitions/DeleteRetentionPolicy", "description": "The file service properties for share soft delete." + }, + "protocolSettings": { + "$ref": "#/definitions/ProtocolSettings", + "description": "Protocol settings for file service" } }, "x-ms-client-flatten": true, @@ -545,6 +552,33 @@ ], "description": "The properties of File services in storage account." }, + "ProtocolSettings": { + "properties": { + "smb": { + "$ref": "#/definitions/SmbSetting", + "description": "Setting for SMB protocol" + } + }, + "description": "Protocol settings for file service" + }, + "SmbSetting": { + "properties": { + "multichannel": { + "$ref": "#/definitions/Multichannel", + "description": "Multichannel setting. Applies to Premium FileStorage only." + } + }, + "description": "Setting for SMB protocol" + }, + "Multichannel": { + "properties": { + "enabled": { + "type": "boolean", + "description": "Indicates whether multichannel is enabled" + } + }, + "description": "Multichannel setting. Applies to Premium FileStorage only." + }, "FileShare": { "properties": { "properties": { diff --git a/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/storage.json b/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/storage.json index d8a18901b502..82cb21fda43a 100644 --- a/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/storage.json +++ b/specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/storage.json @@ -825,6 +825,9 @@ "x-ms-examples": { "StorageAccountSetManagementPolicies": { "$ref": "./examples/StorageAccountSetManagementPolicy.json" + }, + "StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions": { + "$ref": "./examples/StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions.json" } }, "parameters": [ @@ -3556,6 +3559,10 @@ "delete": { "$ref": "#/definitions/DateAfterModification", "description": "The function to delete the blob" + }, + "enableAutoTierToHotFromCool": { + "type": "boolean", + "description": "This property enables auto tiering of a blob from cool to hot on a blob access. This property requires tierToCool.daysAfterLastAccessTimeGreaterThan." } }, "description": "Management policy action for base blob." @@ -3576,11 +3583,14 @@ "multipleOf": 1.0, "minimum": 0, "description": "Value indicating the age in days after last modification" + }, + "daysAfterLastAccessTimeGreaterThan": { + "type": "number", + "multipleOf": 1.0, + "minimum": 0, + "description": "Value indicating the age in days after last blob access. This property can only be used in conjunction with last access time tracking policy" } }, - "required": [ - "daysAfterModificationGreaterThan" - ], "description": "Object to define the number of days after last modification." }, "DateAfterCreation": {