Skip to content

Commit d1d0982

Browse files
Add LCM Snapshot and Version Actions to June19 and Aug20-preview. Add 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
1 parent c5d37a4 commit d1d0982

9 files changed

+740
-7
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscription-id}",
4+
"resourceGroupName": "res7687",
5+
"accountName": "sto9699",
6+
"managementPolicyName": "default",
7+
"api-version": "2020-08-01-preview",
8+
"monitor": "true",
9+
"properties": {
10+
"properties": {
11+
"policy": {
12+
"rules": [
13+
{
14+
"enabled": true,
15+
"name": "olcmtest1",
16+
"type": "Lifecycle",
17+
"definition": {
18+
"filters": {
19+
"blobTypes": [
20+
"blockBlob",
21+
"appendBlob"
22+
],
23+
"prefixMatch": [
24+
"olcmtestcontainer1"
25+
]
26+
},
27+
"actions": {
28+
"baseBlob": {
29+
"delete": {
30+
"daysAfterModificationGreaterThan": 90
31+
}
32+
},
33+
"snapshot": {
34+
"delete": {
35+
"daysAfterCreationGreaterThan": 90
36+
}
37+
},
38+
"version": {
39+
"delete": {
40+
"daysAfterCreationGreaterThan": 90
41+
}
42+
}
43+
}
44+
}
45+
}
46+
]
47+
}
48+
}
49+
}
50+
},
51+
"responses": {
52+
"200": {
53+
"body": {
54+
"id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default",
55+
"name": "DefaultManagementPolicy",
56+
"type": "Microsoft.Storage/storageAccounts/managementPolicies",
57+
"properties": {
58+
"policy": {
59+
"rules": [
60+
{
61+
"enabled": true,
62+
"name": "olcmtest1",
63+
"type": "Lifecycle",
64+
"definition": {
65+
"filters": {
66+
"blobTypes": [
67+
"blockBlob",
68+
"appendBlob"
69+
],
70+
"prefixMatch": [
71+
"olcmtestcontainer1"
72+
]
73+
},
74+
"actions": {
75+
"baseBlob": {
76+
"delete": {
77+
"daysAfterModificationGreaterThan": 90
78+
}
79+
},
80+
"snapshot": {
81+
"delete": {
82+
"daysAfterCreationGreaterThan": 90
83+
}
84+
},
85+
"version": {
86+
"delete": {
87+
"daysAfterCreationGreaterThan": 90
88+
}
89+
}
90+
}
91+
}
92+
}
93+
]
94+
},
95+
"lastModifiedTime": "2018-06-08T02:53:39.0932539Z"
96+
}
97+
}
98+
}
99+
}
100+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscription-id}",
4+
"resourceGroupName": "res7687",
5+
"accountName": "sto9699",
6+
"managementPolicyName": "default",
7+
"api-version": "2020-08-01-preview",
8+
"monitor": "true",
9+
"properties": {
10+
"properties": {
11+
"policy": {
12+
"rules": [
13+
{
14+
"enabled": true,
15+
"name": "olcmtest1",
16+
"type": "Lifecycle",
17+
"definition": {
18+
"filters": {
19+
"blobTypes": [
20+
"blockBlob"
21+
],
22+
"prefixMatch": [
23+
"olcmtestcontainer1"
24+
]
25+
},
26+
"actions": {
27+
"baseBlob": {
28+
"tierToCool": {
29+
"daysAfterModificationGreaterThan": 30
30+
},
31+
"tierToArchive": {
32+
"daysAfterModificationGreaterThan": 90
33+
},
34+
"delete": {
35+
"daysAfterModificationGreaterThan": 1000
36+
}
37+
},
38+
"snapshot": {
39+
"tierToCool": {
40+
"daysAfterCreationGreaterThan": 30
41+
},
42+
"tierToArchive": {
43+
"daysAfterCreationGreaterThan": 90
44+
},
45+
"delete": {
46+
"daysAfterCreationGreaterThan": 1000
47+
}
48+
},
49+
"version": {
50+
"tierToCool": {
51+
"daysAfterCreationGreaterThan": 30
52+
},
53+
"tierToArchive": {
54+
"daysAfterCreationGreaterThan": 90
55+
},
56+
"delete": {
57+
"daysAfterCreationGreaterThan": 1000
58+
}
59+
}
60+
}
61+
}
62+
}
63+
]
64+
}
65+
}
66+
}
67+
},
68+
"responses": {
69+
"200": {
70+
"body": {
71+
"id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default",
72+
"name": "DefaultManagementPolicy",
73+
"type": "Microsoft.Storage/storageAccounts/managementPolicies",
74+
"properties": {
75+
"policy": {
76+
"rules": [
77+
{
78+
"enabled": true,
79+
"name": "olcmtest1",
80+
"type": "Lifecycle",
81+
"definition": {
82+
"filters": {
83+
"blobTypes": [
84+
"blockBlob"
85+
],
86+
"prefixMatch": [
87+
"olcmtestcontainer1"
88+
]
89+
},
90+
"actions": {
91+
"baseBlob": {
92+
"tierToCool": {
93+
"daysAfterModificationGreaterThan": 30
94+
},
95+
"tierToArchive": {
96+
"daysAfterModificationGreaterThan": 90
97+
},
98+
"delete": {
99+
"daysAfterModificationGreaterThan": 1000
100+
}
101+
},
102+
"snapshot": {
103+
"tierToCool": {
104+
"daysAfterCreationGreaterThan": 30
105+
},
106+
"tierToArchive": {
107+
"daysAfterCreationGreaterThan": 90
108+
},
109+
"delete": {
110+
"daysAfterCreationGreaterThan": 1000
111+
}
112+
},
113+
"version": {
114+
"tierToCool": {
115+
"daysAfterCreationGreaterThan": 30
116+
},
117+
"tierToArchive": {
118+
"daysAfterCreationGreaterThan": 90
119+
},
120+
"delete": {
121+
"daysAfterCreationGreaterThan": 1000
122+
}
123+
}
124+
}
125+
}
126+
}
127+
]
128+
},
129+
"lastModifiedTime": "2018-06-08T02:53:39.0932539Z"
130+
}
131+
}
132+
}
133+
}
134+
}

specification/storage/resource-manager/Microsoft.Storage/preview/2020-08-01-preview/storage.json

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,12 @@
828828
},
829829
"StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions": {
830830
"$ref": "./examples/StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions.json"
831+
},
832+
"StorageAccountSetManagementPolicyWithSnapshotAndVersion": {
833+
"$ref": "./examples/StorageAccountSetManagementPolicyWithSnapshotAndVersion.json"
834+
},
835+
"StorageAccountSetManagementPolicyForBlockAndAppendBlobs": {
836+
"$ref": "./examples/StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json"
831837
}
832838
},
833839
"parameters": [
@@ -3689,7 +3695,7 @@
36893695
"items": {
36903696
"type": "string"
36913697
},
3692-
"description": "An array of predefined enum values. Only blockBlob is supported."
3698+
"description": "An array of predefined enum values. Currently blockBlob supports all tiering and delete actions. Only delete actions are supported for appendBlob."
36933699
},
36943700
"blobIndexMatch": {
36953701
"type": "array",
@@ -3739,6 +3745,10 @@
37393745
"snapshot": {
37403746
"$ref": "#/definitions/ManagementPolicySnapShot",
37413747
"description": "The management policy action for snapshot"
3748+
},
3749+
"version": {
3750+
"$ref": "#/definitions/ManagementPolicyVersion",
3751+
"description": "The management policy action for version"
37423752
}
37433753
},
37443754
"description": "Actions are applied to the filtered blobs when the execution condition is met."
@@ -3766,13 +3776,38 @@
37663776
},
37673777
"ManagementPolicySnapShot": {
37683778
"properties": {
3779+
"tierToCool": {
3780+
"$ref": "#/definitions/DateAfterCreation",
3781+
"description": "The function to tier blob snapshot to cool storage. Support blob snapshot currently at Hot tier"
3782+
},
3783+
"tierToArchive": {
3784+
"$ref": "#/definitions/DateAfterCreation",
3785+
"description": "The function to tier blob snapshot to archive storage. Support blob snapshot currently at Hot or Cool tier"
3786+
},
37693787
"delete": {
37703788
"$ref": "#/definitions/DateAfterCreation",
37713789
"description": "The function to delete the blob snapshot"
37723790
}
37733791
},
37743792
"description": "Management policy action for snapshot."
37753793
},
3794+
"ManagementPolicyVersion": {
3795+
"properties": {
3796+
"tierToCool": {
3797+
"$ref": "#/definitions/DateAfterCreation",
3798+
"description": "The function to tier blob version to cool storage. Support blob version currently at Hot tier"
3799+
},
3800+
"tierToArchive": {
3801+
"$ref": "#/definitions/DateAfterCreation",
3802+
"description": "The function to tier blob version to archive storage. Support blob version currently at Hot or Cool tier"
3803+
},
3804+
"delete": {
3805+
"$ref": "#/definitions/DateAfterCreation",
3806+
"description": "The function to delete the blob version"
3807+
}
3808+
},
3809+
"description": "Management policy action for blob version."
3810+
},
37763811
"DateAfterModification": {
37773812
"properties": {
37783813
"daysAfterModificationGreaterThan": {
@@ -3788,7 +3823,7 @@
37883823
"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"
37893824
}
37903825
},
3791-
"description": "Object to define the number of days after last modification."
3826+
"description": "Object to define the number of days after object last modification Or last access. Properties daysAfterModificationGreaterThan and daysAfterLastAccessTimeGreaterThan are mutually exclusive."
37923827
},
37933828
"DateAfterCreation": {
37943829
"properties": {

specification/storage/resource-manager/Microsoft.Storage/stable/2019-06-01/blob.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@
6464
"x-ms-examples": {
6565
"PutBlobServices": {
6666
"$ref": "./examples/BlobServicesPut.json"
67+
},
68+
"BlobServicesPutLastAccessTimeBasedTracking": {
69+
"$ref": "./examples/BlobServicesPutLastAccessTimeBasedTracking.json"
6770
}
6871
},
6972
"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 @@
12041207
"containerDeleteRetentionPolicy": {
12051208
"$ref": "./common.json#/definitions/DeleteRetentionPolicy",
12061209
"description": "The blob service properties for container soft delete."
1210+
},
1211+
"lastAccessTimeTrackingPolicy": {
1212+
"$ref": "#/definitions/LastAccessTimeTrackingPolicy",
1213+
"description": "The blob service property to configure last access time based tracking policy."
12071214
}
12081215
},
12091216
"x-ms-client-flatten": true,
@@ -1281,6 +1288,41 @@
12811288
],
12821289
"description": "The blob service properties for blob restore policy"
12831290
},
1291+
"LastAccessTimeTrackingPolicy": {
1292+
"properties": {
1293+
"enable": {
1294+
"type": "boolean",
1295+
"description": "When set to true last access time based tracking is enabled."
1296+
},
1297+
"name": {
1298+
"type": "string",
1299+
"description": "Name of the policy. The valid value is AccessTimeTracking. This field is currently read only",
1300+
"enum": [
1301+
"AccessTimeTracking"
1302+
],
1303+
"x-ms-enum": {
1304+
"name": "name",
1305+
"modelAsString": true
1306+
}
1307+
},
1308+
"trackingGranularityInDays": {
1309+
"type": "integer",
1310+
"format": "int32",
1311+
"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"
1312+
},
1313+
"blobType": {
1314+
"type": "array",
1315+
"items": {
1316+
"type": "string"
1317+
},
1318+
"description": "An array of predefined supported blob types. Only blockBlob is the supported value. This field is currently read only"
1319+
}
1320+
},
1321+
"required": [
1322+
"enable"
1323+
],
1324+
"description": "The blob service properties for Last access time based tracking policy."
1325+
},
12841326
"LeaseContainerRequest": {
12851327
"properties": {
12861328
"action": {

0 commit comments

Comments
 (0)