Skip to content

Commit

Permalink
Add LCM Snapshot and Version Actions to June19 and Aug20-preview. Add…
Browse files Browse the repository at this point in the history
… LAT support to June19 (#12684)

* Add LCM Snapshot and Version Actions to June19 and Aug20-preview version. Add The Last Access Time support to June19, it already exists in Aug20-preview

* Update Blob support description

* Add example for blockBlob and appendBlob to work together
  • Loading branch information
HimanshuChhabra authored Jan 29, 2021
1 parent c5d37a4 commit d1d0982
Show file tree
Hide file tree
Showing 9 changed files with 740 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"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": "olcmtest1",
"type": "Lifecycle",
"definition": {
"filters": {
"blobTypes": [
"blockBlob",
"appendBlob"
],
"prefixMatch": [
"olcmtestcontainer1"
]
},
"actions": {
"baseBlob": {
"delete": {
"daysAfterModificationGreaterThan": 90
}
},
"snapshot": {
"delete": {
"daysAfterCreationGreaterThan": 90
}
},
"version": {
"delete": {
"daysAfterCreationGreaterThan": 90
}
}
}
}
}
]
}
}
}
},
"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": "olcmtest1",
"type": "Lifecycle",
"definition": {
"filters": {
"blobTypes": [
"blockBlob",
"appendBlob"
],
"prefixMatch": [
"olcmtestcontainer1"
]
},
"actions": {
"baseBlob": {
"delete": {
"daysAfterModificationGreaterThan": 90
}
},
"snapshot": {
"delete": {
"daysAfterCreationGreaterThan": 90
}
},
"version": {
"delete": {
"daysAfterCreationGreaterThan": 90
}
}
}
}
}
]
},
"lastModifiedTime": "2018-06-08T02:53:39.0932539Z"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"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": "olcmtest1",
"type": "Lifecycle",
"definition": {
"filters": {
"blobTypes": [
"blockBlob"
],
"prefixMatch": [
"olcmtestcontainer1"
]
},
"actions": {
"baseBlob": {
"tierToCool": {
"daysAfterModificationGreaterThan": 30
},
"tierToArchive": {
"daysAfterModificationGreaterThan": 90
},
"delete": {
"daysAfterModificationGreaterThan": 1000
}
},
"snapshot": {
"tierToCool": {
"daysAfterCreationGreaterThan": 30
},
"tierToArchive": {
"daysAfterCreationGreaterThan": 90
},
"delete": {
"daysAfterCreationGreaterThan": 1000
}
},
"version": {
"tierToCool": {
"daysAfterCreationGreaterThan": 30
},
"tierToArchive": {
"daysAfterCreationGreaterThan": 90
},
"delete": {
"daysAfterCreationGreaterThan": 1000
}
}
}
}
}
]
}
}
}
},
"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": "olcmtest1",
"type": "Lifecycle",
"definition": {
"filters": {
"blobTypes": [
"blockBlob"
],
"prefixMatch": [
"olcmtestcontainer1"
]
},
"actions": {
"baseBlob": {
"tierToCool": {
"daysAfterModificationGreaterThan": 30
},
"tierToArchive": {
"daysAfterModificationGreaterThan": 90
},
"delete": {
"daysAfterModificationGreaterThan": 1000
}
},
"snapshot": {
"tierToCool": {
"daysAfterCreationGreaterThan": 30
},
"tierToArchive": {
"daysAfterCreationGreaterThan": 90
},
"delete": {
"daysAfterCreationGreaterThan": 1000
}
},
"version": {
"tierToCool": {
"daysAfterCreationGreaterThan": 30
},
"tierToArchive": {
"daysAfterCreationGreaterThan": 90
},
"delete": {
"daysAfterCreationGreaterThan": 1000
}
}
}
}
}
]
},
"lastModifiedTime": "2018-06-08T02:53:39.0932539Z"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,12 @@
},
"StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions": {
"$ref": "./examples/StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions.json"
},
"StorageAccountSetManagementPolicyWithSnapshotAndVersion": {
"$ref": "./examples/StorageAccountSetManagementPolicyWithSnapshotAndVersion.json"
},
"StorageAccountSetManagementPolicyForBlockAndAppendBlobs": {
"$ref": "./examples/StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json"
}
},
"parameters": [
Expand Down Expand Up @@ -3689,7 +3695,7 @@
"items": {
"type": "string"
},
"description": "An array of predefined enum values. Only blockBlob is supported."
"description": "An array of predefined enum values. Currently blockBlob supports all tiering and delete actions. Only delete actions are supported for appendBlob."
},
"blobIndexMatch": {
"type": "array",
Expand Down Expand Up @@ -3739,6 +3745,10 @@
"snapshot": {
"$ref": "#/definitions/ManagementPolicySnapShot",
"description": "The management policy action for snapshot"
},
"version": {
"$ref": "#/definitions/ManagementPolicyVersion",
"description": "The management policy action for version"
}
},
"description": "Actions are applied to the filtered blobs when the execution condition is met."
Expand Down Expand Up @@ -3766,13 +3776,38 @@
},
"ManagementPolicySnapShot": {
"properties": {
"tierToCool": {
"$ref": "#/definitions/DateAfterCreation",
"description": "The function to tier blob snapshot to cool storage. Support blob snapshot currently at Hot tier"
},
"tierToArchive": {
"$ref": "#/definitions/DateAfterCreation",
"description": "The function to tier blob snapshot to archive storage. Support blob snapshot currently at Hot or Cool tier"
},
"delete": {
"$ref": "#/definitions/DateAfterCreation",
"description": "The function to delete the blob snapshot"
}
},
"description": "Management policy action for snapshot."
},
"ManagementPolicyVersion": {
"properties": {
"tierToCool": {
"$ref": "#/definitions/DateAfterCreation",
"description": "The function to tier blob version to cool storage. Support blob version currently at Hot tier"
},
"tierToArchive": {
"$ref": "#/definitions/DateAfterCreation",
"description": "The function to tier blob version to archive storage. Support blob version currently at Hot or Cool tier"
},
"delete": {
"$ref": "#/definitions/DateAfterCreation",
"description": "The function to delete the blob version"
}
},
"description": "Management policy action for blob version."
},
"DateAfterModification": {
"properties": {
"daysAfterModificationGreaterThan": {
Expand All @@ -3788,7 +3823,7 @@
"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"
}
},
"description": "Object to define the number of days after last modification."
"description": "Object to define the number of days after object last modification Or last access. Properties daysAfterModificationGreaterThan and daysAfterLastAccessTimeGreaterThan are mutually exclusive."
},
"DateAfterCreation": {
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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. ",
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -1281,6 +1288,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": {
Expand Down
Loading

0 comments on commit d1d0982

Please sign in to comment.