Configures a scheduled removal of objects after a defined time period by taking in a list of objects, each representing an Azure Lifecycle Management Policy. For more information on Azure's Lifecycle Management feature, see Azure Blob Storage lifecycle management overview.
The autoExpiration parameter isn't supported in a create call. When updating this parameter, provide the entire new policy. By default, this parameter sets an expiration rule where all noncurrent versions of objects are deleted after 14 days.
name<azure_lifecycle_management_policy_name>
(Mandatory) A String name for the new policy configured for the instance. Consists of at most 256 alphanumeric characters. This parameter is case-sensitive and must be unique.
disabled
(Optional) A Boolean that indicates whether the rule is disabled or not.
definitions<azure_version_and_date_configuration>
(Mandatory) Configures which objects to apply the policy to.
(Mandatory) The version of the blob that contains objects that the policy will apply to. Enter baseBlob for the current version or version for previous versions.
operator
(Mandatory) To remove an object after a certain number of days have passed since it was modified, enter daysAfterModificationGreaterThan. To remove an object after a certain number of days have passed since it was created, enter daysAfterCreationGreaterThan.
value<azure_days_before_expiration>
(Mandatory) A Number used with the operator parameter to specify, in days, which objects to apply the policy to.
If <azure_filter_type> is set to prefixMatch, this parameter accepts a list of up to 10 strings. A prefix string must start with a container name. For example, to match all blobs under https://myaccount.blob.core.windows.net/sample-container/blob1/..., input "values": ["sample-container/blob1"].
"values": ["<azure_prefixes>"]
If <azure_filter_type> is set to blobIndexMatch, this parameter accepts a list of up to 10 objects. You can use blobIndexMatch only with an <azure_version_type> of baseBlob. This object has the following structure:
(Mandatory) The String value being matched against the target tag value.
For example, to match all tags with the Status tag as In Progress, input "values": [{"name": "Status", "op": "=", "value": "In Progress"}].
toBeDeleted (deprecated)
(Optional) Update an existing policy with an <azure_lifecycle_management_policy_name> while setting this Boolean to true to delete the policy. If you use this parameter, you can't use the <azure_version_and_date_configuration> parameter.
This parameter is deprecated. Use deleteAutoExpiration instead.
Deletes a list of Lifecycle Management Policies using their String<azure_lifecycle_management_policy_name> parameters.
This parameter is supported only in an update call. This parameter is not supported in a call with any other parameters.
preventDeletion
"preventDeletion": true | false
Prevents an instance from being deleted when objects are present in Azure Blob Storage. To delete a service instance with preventDeletion enabled, delete all objects in Azure Blob Storage first.
The default value is false.
versioning
"versioning": true
Enables storing multiple versions of the same object in Azure Blob Storage. This can be used to keep previous versions of data. Versioning is supported only with instances created with Zone-Redundant Storage (ZRS). If your instance is created on Locally Redundant Storage (LRS), see Migrating Service Instances Created with LRS to ZRS. For more information on adding, retrieving, and deleting versioned objects using Azure, see Object Versioning.
Examples
Below is a sample update call for using Object Store with Azure. It enables the following features:
Object versioning
An Azure Lifecycle Management policy that performs the following instructions:
Applies auto expiration to objects in blob1 and blob2 under sample-container
Removes current versions of objects after not being modified for 100 days
Removes previous versions of objects that have been created for more than 100 days
Preventing the user from deleting a container with objects