replication_policies
Creates, updates, deletes, gets or lists a replication_policies resource.
Overview​
| Name | replication_policies |
| Type | Resource |
| Id | oci.object_storage.replication_policies |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The replication policy.
| Name | Datatype | Description |
|---|---|---|
id | string | The id of the replication policy. |
name | string | The name of the policy. |
destinationBucketName | string | The bucket to replicate to in the destination region. Replication policy creation does not automatically create a destination bucket. Create the destination bucket before creating the policy. |
destinationRegionName | string | The destination region to replicate to, for example "us-ashburn-1". |
status | string | The replication status of the policy. If the status is CLIENT_ERROR, once the user fixes the issue described in the status message, the status will become ACTIVE. (ACTIVE, CLIENT_ERROR) |
statusMessage | string | A human-readable description of the status. |
timeCreated | string (date-time) | The date when the replication policy was created as per [RFC 3339](https:​//tools.ietf.org/html/rfc3339). |
timeLastSync | string (date-time) | Changes made to the source bucket before this time has been replicated. |
The summary of a replication policy.
| Name | Datatype | Description |
|---|---|---|
id | string | The id of the replication policy. |
name | string | The name of the policy. |
destinationBucketName | string | The bucket to replicate to in the destination region. Replication policy creation does not automatically create a destination bucket. Create the destination bucket before creating the policy. |
destinationRegionName | string | The destination region to replicate to, for example "us-ashburn-1". |
status | string | The replication status of the policy. If the status is CLIENT_ERROR, once the user fixes the issue described in the status message, the status will become ACTIVE. (ACTIVE, CLIENT_ERROR) |
statusMessage | string | A human-readable description of the status. |
timeCreated | string (date-time) | The date when the replication policy was created as per [RFC 3339](https:​//tools.ietf.org/html/rfc3339). |
timeLastSync | string (date-time) | Changes made to the source bucket before this time has been replicated. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | namespaceName, bucketName, replicationId, region | opc-client-request-id | Get the replication policy.<br /> |
list | select | namespaceName, bucketName, region | opc-client-request-id, page, limit | List the replication policies associated with a bucket.<br /> |
create | insert | namespaceName, bucketName, region, name, destinationRegionName, destinationBucketName | opc-client-request-id | Creates a replication policy for the specified bucket.<br /> |
delete | delete | namespaceName, bucketName, replicationId, region | opc-client-request-id | Deletes the replication policy associated with the source bucket.<br /> |
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 |
|---|---|---|
bucketName | string | The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1 |
namespaceName | string | The Object Storage namespace used for the request. |
region | string | OCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION) |
replicationId | string | The ID of the replication policy. |
limit | integer | For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). |
opc-client-request-id | string | The client request ID for tracing. |
page | string | For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). |
SELECT examples​
- get
- list
Get the replication policy.<br />
SELECT
id,
name,
destinationBucketName,
destinationRegionName,
status,
statusMessage,
timeCreated,
timeLastSync
FROM oci.object_storage.replication_policies
WHERE namespaceName = '{{ namespaceName }}' -- required
AND bucketName = '{{ bucketName }}' -- required
AND replicationId = '{{ replicationId }}' -- required
AND region = '{{ region }}' -- required
AND opc-client-request-id = '{{ opc-client-request-id }}'
;
List the replication policies associated with a bucket.<br />
SELECT
id,
name,
destinationBucketName,
destinationRegionName,
status,
statusMessage,
timeCreated,
timeLastSync
FROM oci.object_storage.replication_policies
WHERE namespaceName = '{{ namespaceName }}' -- required
AND bucketName = '{{ bucketName }}' -- required
AND region = '{{ region }}' -- required
AND opc-client-request-id = '{{ opc-client-request-id }}'
AND page = '{{ page }}'
AND limit = '{{ limit }}'
;
INSERT examples​
- create
- Manifest
Creates a replication policy for the specified bucket.<br />
INSERT INTO oci.object_storage.replication_policies (
destinationBucketName,
destinationRegionName,
name,
namespaceName,
bucketName,
region,
opc-client-request-id
)
SELECT
'{{ destinationBucketName }}' /* required */,
'{{ destinationRegionName }}' /* required */,
'{{ name }}' /* required */,
'{{ namespaceName }}',
'{{ bucketName }}',
'{{ region }}',
'{{ opc-client-request-id }}'
RETURNING
id,
name,
destinationBucketName,
destinationRegionName,
status,
statusMessage,
timeCreated,
timeLastSync
;
# Description fields are for documentation purposes
- name: replication_policies
props:
- name: namespaceName
value: "{{ namespaceName }}"
description: Required parameter for the replication_policies resource.
- name: bucketName
value: "{{ bucketName }}"
description: Required parameter for the replication_policies resource.
- name: region
value: "{{ region }}"
description: Required parameter for the replication_policies resource.
- name: destinationBucketName
value: "{{ destinationBucketName }}"
description: |
The bucket to replicate to in the destination region. Replication policy creation does not automatically
create a destination bucket. Create the destination bucket before creating the policy.
- name: destinationRegionName
value: "{{ destinationRegionName }}"
description: |
The destination region to replicate to, for example "us-ashburn-1".
- name: name
value: "{{ name }}"
description: |
The name of the policy. Avoid entering confidential information.
- name: opc-client-request-id
value: "{{ opc-client-request-id }}"
description: The client request ID for tracing.
description: The client request ID for tracing.
DELETE examples​
- delete
Deletes the replication policy associated with the source bucket.<br />
DELETE FROM oci.object_storage.replication_policies
WHERE namespaceName = '{{ namespaceName }}' --required
AND bucketName = '{{ bucketName }}' --required
AND replicationId = '{{ replicationId }}' --required
AND region = '{{ region }}' --required
AND opc-client-request-id = '{{ opc-client-request-id }}'
;