Skip to main content

replication_policies

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

Overview​

Namereplication_policies
TypeResource
Idoci.object_storage.replication_policies

Fields​

The following fields are returned by SELECT queries:

The replication policy.

NameDatatypeDescription
idstringThe id of the replication policy.
namestringThe name of the policy.
destinationBucketNamestringThe 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.
destinationRegionNamestringThe destination region to replicate to, for example "us-ashburn-1".
statusstringThe 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)
statusMessagestringA human-readable description of the status.
timeCreatedstring (date-time)The date when the replication policy was created as per [RFC 3339](https:​//tools.ietf.org/html/rfc3339).
timeLastSyncstring (date-time)Changes made to the source bucket before this time has been replicated.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectnamespaceName, bucketName, replicationId, regionopc-client-request-idGet the replication policy.<br />
listselectnamespaceName, bucketName, regionopc-client-request-id, page, limitList the replication policies associated with a bucket.<br />
createinsertnamespaceName, bucketName, region, name, destinationRegionName, destinationBucketNameopc-client-request-idCreates a replication policy for the specified bucket.<br />
deletedeletenamespaceName, bucketName, replicationId, regionopc-client-request-idDeletes 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.

NameDatatypeDescription
bucketNamestringThe name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
namespaceNamestringThe Object Storage namespace used for the request.
regionstringOCI 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)
replicationIdstringThe ID of the replication policy.
limitintegerFor 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-idstringThe client request ID for tracing.
pagestringFor 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 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 }}'
;

INSERT examples​

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
;

DELETE examples​

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 }}'
;