Skip to main content

object_replication_policies

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

Overview

Nameobject_replication_policies
TypeResource
Idazure.storage.object_replication_policies

Fields

NameDatatypeDescription
idtextFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
nametextThe name of the resource
accountNametextfield from the properties object
destination_accounttextfield from the properties object
enabled_timetextfield from the properties object
objectReplicationPolicyIdtextfield from the properties object
policy_idtextfield from the properties object
resourceGroupNametextfield from the properties object
rulestextfield from the properties object
source_accounttextfield from the properties object
subscriptionIdtextfield from the properties object
typetextThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

NameAccessible byRequired ParamsDescription
getSELECTaccountName, objectReplicationPolicyId, resourceGroupName, subscriptionIdGet the object replication policy of the storage account by policy ID.
listSELECTaccountName, resourceGroupName, subscriptionIdList the object replication policies associated with the storage account.
create_or_updateINSERTaccountName, objectReplicationPolicyId, resourceGroupName, subscriptionIdCreate or update the object replication policy of the storage account.
deleteDELETEaccountName, objectReplicationPolicyId, resourceGroupName, subscriptionIdDeletes the object replication policy associated with the specified storage account.

SELECT examples

List the object replication policies associated with the storage account.

SELECT
id,
name,
accountName,
destination_account,
enabled_time,
objectReplicationPolicyId,
policy_id,
resourceGroupName,
rules,
source_account,
subscriptionId,
type
FROM azure.storage.vw_object_replication_policies
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.storage.object_replication_policies (
accountName,
objectReplicationPolicyId,
resourceGroupName,
subscriptionId,
properties
)
SELECT
'{{ accountName }}',
'{{ objectReplicationPolicyId }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

DELETE example

Deletes the specified object_replication_policies resource.

/*+ delete */
DELETE FROM azure.storage.object_replication_policies
WHERE accountName = '{{ accountName }}'
AND objectReplicationPolicyId = '{{ objectReplicationPolicyId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';