Skip to main content

blob_containers_immutability_policies

Creates, updates, deletes, gets or lists a blob_containers_immutability_policies resource.

Overview

Nameblob_containers_immutability_policies
TypeResource
Idazure.storage.blob_containers_immutability_policies

Fields

NameDatatypeDescription
accountNametextfield from the properties object
allow_protected_append_writestextfield from the properties object
allow_protected_append_writes_alltextfield from the properties object
containerNametextfield from the properties object
etagtextResource Etag.
immutabilityPolicyNametextfield from the properties object
immutability_period_since_creation_in_daystextfield from the properties object
resourceGroupNametextfield from the properties object
statetextfield from the properties object
subscriptionIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTaccountName, containerName, immutabilityPolicyName, resourceGroupName, subscriptionIdGets the existing immutability policy along with the corresponding ETag in response headers and body.
create_or_updateINSERTaccountName, containerName, immutabilityPolicyName, resourceGroupName, subscriptionId, data__propertiesCreates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation.
deleteDELETEIf-Match, accountName, containerName, immutabilityPolicyName, resourceGroupName, subscriptionIdAborts 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.

SELECT examples

Gets the existing immutability policy along with the corresponding ETag in response headers and body.

SELECT
accountName,
allow_protected_append_writes,
allow_protected_append_writes_all,
containerName,
etag,
immutabilityPolicyName,
immutability_period_since_creation_in_days,
resourceGroupName,
state,
subscriptionId
FROM azure.storage.vw_blob_containers_immutability_policies
WHERE accountName = '{{ accountName }}'
AND containerName = '{{ containerName }}'
AND immutabilityPolicyName = '{{ immutabilityPolicyName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new blob_containers_immutability_policies resource.

/*+ create */
INSERT INTO azure.storage.blob_containers_immutability_policies (
accountName,
containerName,
immutabilityPolicyName,
resourceGroupName,
subscriptionId,
data__properties,
properties
)
SELECT
'{{ accountName }}',
'{{ containerName }}',
'{{ immutabilityPolicyName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}'
;

DELETE example

Deletes the specified blob_containers_immutability_policies resource.

/*+ delete */
DELETE FROM azure.storage.blob_containers_immutability_policies
WHERE If-Match = '{{ If-Match }}'
AND accountName = '{{ accountName }}'
AND containerName = '{{ containerName }}'
AND immutabilityPolicyName = '{{ immutabilityPolicyName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';