Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mirror] [Do Not Merge][Private Repo PR# 974] Tag based object filter support for OLCM #1168

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
"rules": [
{
"enabled": true,
"name": "olcmtest",
"name": "olcmtest1",
"type": "Lifecycle",
"definition": {
"filters": {
"blobTypes": [
"blockBlob"
],
"prefixMatch": [
"olcmtestcontainer"
"olcmtestcontainer1"
]
},
"actions": {
Expand All @@ -42,6 +42,46 @@
}
}
}
},
{
"enabled": true,
"name": "olcmtest2",
"type": "Lifecycle",
"definition": {
"filters": {
"blobTypes": [
"blockBlob"
],
"prefixMatch": [
"olcmtestcontainer2"
],
"blobIndexMatch": [
{
"name": "t1",
"op": "==",
"value": "v1"
},
{
"name": "t2",
"op": "==",
"value": "v2"
}
]
},
"actions": {
"baseBlob": {
"tierToCool": {
"daysAfterModificationGreaterThan": 30
},
"tierToArchive": {
"daysAfterModificationGreaterThan": 90
},
"delete": {
"daysAfterModificationGreaterThan": 1000
}
}
}
}
}
]
}
Expand All @@ -59,15 +99,15 @@
"rules": [
{
"enabled": true,
"name": "olcmtest",
"name": "olcmtest1",
"type": "Lifecycle",
"definition": {
"filters": {
"blobTypes": [
"blockBlob"
],
"prefixMatch": [
"olcmtestcontainer"
"olcmtestcontainer1"
]
},
"actions": {
Expand All @@ -89,6 +129,46 @@
}
}
}
},
{
"enabled": true,
"name": "olcmtest2",
"type": "Lifecycle",
"definition": {
"filters": {
"blobTypes": [
"blockBlob"
],
"prefixMatch": [
"olcmtestcontainer2"
],
"blobIndexMatch": [
{
"name": "t1",
"op": "==",
"value": "v1"
},
{
"name": "t2",
"op": "==",
"value": "v2"
}
]
},
"actions": {
"baseBlob": {
"tierToCool": {
"daysAfterModificationGreaterThan": 30
},
"tierToArchive": {
"daysAfterModificationGreaterThan": 90
},
"delete": {
"daysAfterModificationGreaterThan": 1000
}
}
}
}
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3192,14 +3192,47 @@
"items": {
"type": "string"
},
"description": "An array of predefined enum values. Only blockBlob is supported."
"description": "An array of predefined enum values."
},
"blobIndexMatch": {
"type": "array",
"items": {
"$ref": "#/definitions/TagFilter"
},
"description": "An array of blob index tag based filters, there can be at most 10 tag filters"
}
},
"required": [
"blobTypes"
],
"description": "Filters limit rule actions to a subset of blobs within the storage account. If multiple filters are defined, a logical AND is performed on all filters. "
},
"TagFilter": {
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "This is the filter tag name, it can have 1 - 128 characters"
},
"op": {
"type": "string",
"description": "This is the comparison operator which is used for object comparison and filtering. Only == (equality operator) is currently supported"
},
"value": {
"type": "string",
"minLength": 0,
"maxLength": 256,
"description": "This is the filter tag value field used for tag based filtering, it can have 0 - 256 characters"
}
},
"required": [
"name",
"op",
"value"
],
"description": "Blob index tag based filtering for blob objects"
},
"ManagementPolicyAction": {
"properties": {
"baseBlob": {
Expand Down