object_replication_policies
Creates, updates, deletes, gets or lists a object_replication_policies
resource.
Overview
Name | object_replication_policies |
Type | Resource |
Id | azure.storage.object_replication_policies |
Fields
- vw_object_replication_policies
- object_replication_policies
Name | Datatype | Description |
---|---|---|
id | text | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | text | The name of the resource |
accountName | text | field from the properties object |
destination_account | text | field from the properties object |
enabled_time | text | field from the properties object |
objectReplicationPolicyId | text | field from the properties object |
policy_id | text | field from the properties object |
resourceGroupName | text | field from the properties object |
rules | text | field from the properties object |
source_account | text | field from the properties object |
subscriptionId | text | field from the properties object |
type | text | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | string | The name of the resource |
properties | object | The Storage Account ObjectReplicationPolicy properties. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | accountName, objectReplicationPolicyId, resourceGroupName, subscriptionId | Get the object replication policy of the storage account by policy ID. |
list | SELECT | accountName, resourceGroupName, subscriptionId | List the object replication policies associated with the storage account. |
create_or_update | INSERT | accountName, objectReplicationPolicyId, resourceGroupName, subscriptionId | Create or update the object replication policy of the storage account. |
delete | DELETE | accountName, objectReplicationPolicyId, resourceGroupName, subscriptionId | Deletes the object replication policy associated with the specified storage account. |
SELECT
examples
List the object replication policies associated with the storage account.
- vw_object_replication_policies
- object_replication_policies
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 }}';
SELECT
id,
name,
properties,
type
FROM azure.storage.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.storage.object_replication_policies (
accountName,
objectReplicationPolicyId,
resourceGroupName,
subscriptionId,
properties
)
SELECT
'{{ accountName }}',
'{{ objectReplicationPolicyId }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: policyId
value: string
- name: enabledTime
value: string
- name: sourceAccount
value: string
- name: destinationAccount
value: string
- name: rules
value:
- - name: ruleId
value: string
- name: sourceContainer
value: string
- name: destinationContainer
value: string
- name: filters
value:
- name: prefixMatch
value:
- string
- name: minCreationTime
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
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 }}';