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
- vw_blob_containers_immutability_policies
- blob_containers_immutability_policies
Name | Datatype | Description |
---|---|---|
accountName | text | field from the properties object |
allow_protected_append_writes | text | field from the properties object |
allow_protected_append_writes_all | text | field from the properties object |
containerName | text | field from the properties object |
etag | text | Resource Etag. |
immutabilityPolicyName | text | field from the properties object |
immutability_period_since_creation_in_days | text | field from the properties object |
resourceGroupName | text | field from the properties object |
state | text | field from the properties object |
subscriptionId | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
etag | string | Resource Etag. |
properties | object | The properties of an ImmutabilityPolicy of a blob container. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | accountName, containerName, immutabilityPolicyName, resourceGroupName, subscriptionId | Gets the existing immutability policy along with the corresponding ETag in response headers and body. |
create_or_update | INSERT | accountName, containerName, immutabilityPolicyName, resourceGroupName, subscriptionId, data__properties | Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. |
delete | DELETE | If-Match, accountName, containerName, immutabilityPolicyName, resourceGroupName, subscriptionId | 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. |
SELECT
examples
Gets the existing immutability policy along with the corresponding ETag in response headers and body.
- vw_blob_containers_immutability_policies
- blob_containers_immutability_policies
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 }}';
SELECT
etag,
properties
FROM azure.storage.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.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: immutabilityPeriodSinceCreationInDays
value: integer
- name: state
value: string
- name: allowProtectedAppendWrites
value: boolean
- name: allowProtectedAppendWritesAll
value: boolean
- name: etag
value: string
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 }}';