Skip to main content

object_bucket_replication_triggers

Creates, updates, deletes, gets or lists an object_bucket_replication_triggers resource.

Overview​

Nameobject_bucket_replication_triggers
TypeResource
Idovh.public_cloud_storage.object_bucket_replication_triggers

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstringUnique identifier of the job
completedintegerNumber of successfully replicated objects
created_atstring (date-time)Job creation date (wire: createdAt)
failedintegerNumber of objects that failed to replicate
statusstringJob status (ACTIVE, COMPLETED, CREATED, FAILED, PREPARING)
stuckintegerNumber of stuck objects
totalintegerTotal number of objects to replicate

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectbucket_name, id, project_idReturns the progress of a batch replication job: total, completed, failed and stuck objects. (Alpha version)
listselectbucket_name, project_idx_pagination_cursor, x_pagination_sizeReturns the batch replication jobs of the bucket and their progress. (Alpha version)
createinsertbucket_name, project_idApplies the current replication rules to the objects already in the bucket. (Alpha version)

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
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
bucket_namestringBucket name (wire: bucketName)
idstringId
project_idstringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

Returns the progress of a batch replication job: total, completed, failed and stuck objects. (Alpha version)

SELECT
id,
completed,
created_at,
failed,
status,
stuck,
total
FROM ovh.public_cloud_storage.object_bucket_replication_triggers
WHERE bucket_name = '{{ bucket_name }}' -- required
AND id = '{{ id }}' -- required
AND project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Applies the current replication rules to the objects already in the bucket. (Alpha version)

INSERT INTO ovh.public_cloud_storage.object_bucket_replication_triggers (
bucket_name,
project_id
)
SELECT
'{{ bucket_name }}',
'{{ project_id }}'
RETURNING
id,
completed,
created_at,
failed,
status,
stuck,
total
;