object_replication_policies
Creates, updates, deletes, gets or lists an object_replication_policies
resource.
Overview
Name | object_replication_policies |
Type | Resource |
Id | azure.storage.object_replication_policies |
Fields
The following fields are returned by SELECT
queries:
- get
- list
OK -- Get the object replication policy successfully.
Name | Datatype | Description |
---|---|---|
id | string (arm-id) | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name | string | The name of the resource |
properties | object | Returns the Storage Account Object Replication Policy. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
OK -- List object replication policies successfully.
Name | Datatype | Description |
---|---|---|
id | string (arm-id) | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name | string | The name of the resource |
properties | object | Returns the Storage Account Object Replication Policy. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , accountName , subscriptionId , objectReplicationPolicyId | Get the object replication policy of the storage account by policy ID. | |
list | select | resourceGroupName , accountName , subscriptionId | List the object replication policies associated with the storage account. | |
create_or_update | insert | resourceGroupName , accountName , subscriptionId , objectReplicationPolicyId | Create or update the object replication policy of the storage account. | |
delete | delete | resourceGroupName , accountName , subscriptionId , objectReplicationPolicyId | Deletes the object replication policy associated with the specified storage account. |
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 |
---|---|---|
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. |
objectReplicationPolicyId | string | For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file. |
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. |
SELECT
examples
- get
- list
Get the object replication policy of the storage account by policy ID.
SELECT
id,
name,
properties,
systemData,
type
FROM azure.storage.object_replication_policies
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND accountName = '{{ accountName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND objectReplicationPolicyId = '{{ objectReplicationPolicyId }}' -- required
;
List the object replication policies associated with the storage account.
SELECT
id,
name,
properties,
systemData,
type
FROM azure.storage.object_replication_policies
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND accountName = '{{ accountName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
INSERT
examples
- create_or_update
- Manifest
Create or update the object replication policy of the storage account.
INSERT INTO azure.storage.object_replication_policies (
data__properties,
resourceGroupName,
accountName,
subscriptionId,
objectReplicationPolicyId
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ accountName }}',
'{{ subscriptionId }}',
'{{ objectReplicationPolicyId }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: object_replication_policies
props:
- name: resourceGroupName
value: string
description: Required parameter for the object_replication_policies resource.
- name: accountName
value: string
description: Required parameter for the object_replication_policies resource.
- name: subscriptionId
value: string (uuid)
description: Required parameter for the object_replication_policies resource.
- name: objectReplicationPolicyId
value: string
description: Required parameter for the object_replication_policies resource.
- name: properties
value: object
description: |
Returns the Storage Account Object Replication Policy.
DELETE
examples
- delete
Deletes the object replication policy associated with the specified storage account.
DELETE FROM azure.storage.object_replication_policies
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND accountName = '{{ accountName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND objectReplicationPolicyId = '{{ objectReplicationPolicyId }}' --required
;