blob_containers_immutability_policies
Creates, updates, deletes, gets or lists a blob_containers_immutability_policies
resource.
Overview
Name | blob_containers_immutability_policies |
Type | Resource |
Id | azure.storage.blob_containers_immutability_policies |
Fields
The following fields are returned by SELECT
queries:
- get
OK -- Gets container ImmutabilityPolicy operation completed successfully.
Name | Datatype | Description |
---|---|---|
etag | string | Resource Etag. |
properties | object | The properties of an ImmutabilityPolicy of a blob container. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , accountName , containerName , immutabilityPolicyName , subscriptionId | If-Match | Gets the existing immutability policy along with the corresponding ETag in response headers and body. |
create_or_update | insert | resourceGroupName , accountName , containerName , immutabilityPolicyName , subscriptionId , data__properties | If-Match | Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. |
delete | delete | resourceGroupName , accountName , containerName , immutabilityPolicyName , subscriptionId , If-Match | Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
If-Match | string | The entity state (ETag) version of the immutability policy to update must be returned to the server for all update operations. The ETag value must include the leading and trailing double quotes as returned by the service. |
accountName | string | The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. |
containerName | string | The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. |
immutabilityPolicyName | string | The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default' |
resourceGroupName | string | The name of the resource group within the user's subscription. The name is case insensitive. |
subscriptionId | string (uuid) | The ID of the target subscription. The value must be an UUID. |
If-Match | string | The entity state (ETag) version of the immutability policy to update must be returned to the server for all update operations. The ETag value must include the leading and trailing double quotes as returned by the service. |
SELECT
examples
- get
Gets the existing immutability policy along with the corresponding ETag in response headers and body.
SELECT
etag,
properties
FROM azure.storage.blob_containers_immutability_policies
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND accountName = '{{ accountName }}' -- required
AND containerName = '{{ containerName }}' -- required
AND immutabilityPolicyName = '{{ immutabilityPolicyName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND If-Match = '{{ If-Match }}'
;
INSERT
examples
- create_or_update
- Manifest
Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation.
INSERT INTO azure.storage.blob_containers_immutability_policies (
data__properties,
resourceGroupName,
accountName,
containerName,
immutabilityPolicyName,
subscriptionId,
If-Match
)
SELECT
'{{ properties }}' /* required */,
'{{ resourceGroupName }}',
'{{ accountName }}',
'{{ containerName }}',
'{{ immutabilityPolicyName }}',
'{{ subscriptionId }}',
'{{ If-Match }}'
RETURNING
etag,
properties
;
# Description fields are for documentation purposes
- name: blob_containers_immutability_policies
props:
- name: resourceGroupName
value: string
description: Required parameter for the blob_containers_immutability_policies resource.
- name: accountName
value: string
description: Required parameter for the blob_containers_immutability_policies resource.
- name: containerName
value: string
description: Required parameter for the blob_containers_immutability_policies resource.
- name: immutabilityPolicyName
value: string
description: Required parameter for the blob_containers_immutability_policies resource.
- name: subscriptionId
value: string (uuid)
description: Required parameter for the blob_containers_immutability_policies resource.
- name: properties
value: object
description: |
The properties of an ImmutabilityPolicy of a blob container.
- name: If-Match
value: string
description: The entity state (ETag) version of the immutability policy to update must be returned to the server for all update operations. The ETag value must include the leading and trailing double quotes as returned by the service.
DELETE
examples
- delete
Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container.
DELETE FROM azure.storage.blob_containers_immutability_policies
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND accountName = '{{ accountName }}' --required
AND containerName = '{{ containerName }}' --required
AND immutabilityPolicyName = '{{ immutabilityPolicyName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND If-Match = '{{ If-Match }}' --required
;