Skip to main content

region_storage_objects

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

Overview​

Nameregion_storage_objects
TypeResource
Idovh.cloud_storage.region_storage_objects

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
version_idstringThe version ID of the object. (wire: versionId)
etagstringThe entity tag is a hash of the object that reflects changes only to the contents. The etag is omitted when isDeleteMarker is true.
is_delete_markerbooleanTrue when the entry represents a delete marker. This field is included only when using withVersions set to true. (wire: isDeleteMarker)
is_latestbooleanTrue when the entry is the latest version of the object or delete marker. (wire: isLatest)
keystringThe name assigned to an object. Use the object key to retrieve the object.
last_modifiedstring (date-time)Last modification date. (wire: lastModified)
legal_holdstringObject legal hold status. (off, on) (wire: legalHold)
lockobjectObject lock retention configuration, if any.
replication_statusstringObject replication status. (COMPLETED, FAILED, NONE, PENDING, REPLICA) (wire: replicationStatus)
restore_statusobjectSpecifies the restoration status of an object, if any. Objects in certain storage classes must be restored before they can be retrieved. (wire: restoreStatus)
sizeintegerSize in bytes of the object.
storage_classstringThe storage class used to store the object. (DEEP_ARCHIVE, GLACIER_IR, HIGH_PERF, STANDARD, STANDARD_IA) (wire: storageClass)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectkey, name, region_name, service_name<sup>*</sup> S3 is a trademark filed by Amazon Technologies,Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies,Inc.
listselectname, region_name, service_namedelimiter, key_marker, limit, prefix, version_id_marker, with_versions<sup>*</sup> S3 is a trademark filed by Amazon Technologies,Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies,Inc.
updateupdatekey, name, region_name, service_name<sup>*</sup> S3 is a trademark filed by Amazon Technologies,Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies,Inc.
deletedeletekey, name, region_name, service_name<sup>*</sup> S3 is a trademark filed by Amazon Technologies,Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies,Inc.
copyexeckey, name, regionName, service_name<sup>*</sup> S3 is a trademark filed by Amazon Technologies,Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies,Inc.
restoreexeckey, name, regionName, service_name, days<sup>*</sup> S3 is a trademark filed by Amazon Technologies,Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies,Inc.

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"}})
keystringKey
namestringName
regionNamestringRegion name
region_namestringRegion name (wire: regionName)
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
delimiterstringA delimiter is a character that you use to group keys
key_markerstringKey to start with when listing objects (wire: keyMarker)
limitintegerLimit the number of objects returned (1000 maximum, defaults to 1000)
prefixstringList objects whose key begins with this prefix
version_id_markerstringVersion ID to start listing from (wire: versionIdMarker)
with_versionsbooleanList object versions (wire: withVersions)

SELECT examples​

<sup>*</sup> S3 is a trademark filed by Amazon Technologies,Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies,Inc.

SELECT
version_id,
etag,
is_delete_marker,
is_latest,
key,
last_modified,
legal_hold,
lock,
replication_status,
restore_status,
size,
storage_class
FROM ovh.cloud_storage.region_storage_objects
WHERE key = '{{ key }}' -- required
AND name = '{{ name }}' -- required
AND region_name = '{{ region_name }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

UPDATE examples​

<sup>*</sup> S3 is a trademark filed by Amazon Technologies,Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies,Inc.

UPDATE ovh.cloud_storage.region_storage_objects
SET
legal_hold = '{{ legal_hold }}',
lock = '{{ lock }}'
WHERE
key = '{{ key }}' --required
AND name = '{{ name }}' --required
AND region_name = '{{ region_name }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
RETURNING
version_id,
etag,
is_delete_marker,
is_latest,
key,
last_modified,
legal_hold,
lock,
replication_status,
restore_status,
size,
storage_class;

DELETE examples​

<sup>*</sup> S3 is a trademark filed by Amazon Technologies,Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies,Inc.

DELETE FROM ovh.cloud_storage.region_storage_objects
WHERE key = '{{ key }}' --required
AND name = '{{ name }}' --required
AND region_name = '{{ region_name }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;

Lifecycle Methods​

EXEC variables use wire (API) names.

<sup>*</sup> S3 is a trademark filed by Amazon Technologies,Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies,Inc.

EXEC ovh.cloud_storage.region_storage_objects.copy
@key='{{ key }}' --required,
@name='{{ name }}' --required,
@regionName='{{ regionName }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"storageClass": "{{ storageClass }}",
"targetBucket": "{{ targetBucket }}",
"targetKey": "{{ targetKey }}"
}'
;