region_storage_object_versions
Creates, updates, deletes, gets or lists a region_storage_object_versions resource.
Overview​
| Name | region_storage_object_versions |
| Type | Resource |
| Id | ovh.cloud_storage.region_storage_object_versions |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
version_id | string | The version ID of the object. (wire: versionId) |
etag | string | The 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_marker | boolean | True when the entry represents a delete marker. This field is included only when using withVersions set to true. (wire: isDeleteMarker) |
is_latest | boolean | True when the entry is the latest version of the object or delete marker. (wire: isLatest) |
key | string | The name assigned to an object. Use the object key to retrieve the object. |
last_modified | string (date-time) | Last modification date. (wire: lastModified) |
legal_hold | string | Object legal hold status. (off, on) (wire: legalHold) |
lock | object | Object lock retention configuration, if any. |
restore_status | object | Specifies the restoration status of an object, if any. Objects in certain storage classes must be restored before they can be retrieved. (wire: restoreStatus) |
size | integer | Size in bytes of the object. |
storage_class | string | The storage class used to store the object. (DEEP_ARCHIVE, GLACIER_IR, HIGH_PERF, STANDARD, STANDARD_IA) (wire: storageClass) |
Object
| Name | Datatype | Description |
|---|---|---|
version_id | string | The version ID of the object. (wire: versionId) |
etag | string | The 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_marker | boolean | True when the entry represents a delete marker. This field is included only when using withVersions set to true. (wire: isDeleteMarker) |
is_latest | boolean | True when the entry is the latest version of the object or delete marker. (wire: isLatest) |
key | string | The name assigned to an object. Use the object key to retrieve the object. |
last_modified | string (date-time) | Last modification date. (wire: lastModified) |
legal_hold | string | Object legal hold status. (off, on) (wire: legalHold) |
lock | object | Object lock retention configuration, if any. |
restore_status | object | Specifies the restoration status of an object, if any. Objects in certain storage classes must be restored before they can be retrieved. (wire: restoreStatus) |
size | integer | Size in bytes of the object. |
storage_class | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | key, name, region_name, version_id, 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. | |
list | select | key, name, region_name, service_name | limit, version_id_marker | <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 | update | key, name, region_name, version_id, 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. | |
delete | delete | key, name, region_name, version_id, 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. | |
copy | exec | key, name, regionName, versionId, 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. | |
restore | exec | key, name, regionName, versionId, 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.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The 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"}}) |
key | string | Key |
name | string | Name |
regionName | string | Region name |
region_name | string | Region name (wire: regionName) |
service_name | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
versionId | string | Version ID |
version_id | string | Version ID (wire: versionId) |
limit | integer | Limit the number of object versions returned (1000 maximum, defaults to 1000) |
version_id_marker | string | List object versions starting after this version ID (wire: versionIdMarker) |
SELECT examples​
- get
- list
<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,
restore_status,
size,
storage_class
FROM ovh.cloud_storage.region_storage_object_versions
WHERE key = '{{ key }}' -- required
AND name = '{{ name }}' -- required
AND region_name = '{{ region_name }}' -- required
AND version_id = '{{ version_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
<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,
restore_status,
size,
storage_class
FROM ovh.cloud_storage.region_storage_object_versions
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
AND limit = '{{ limit }}'
AND version_id_marker = '{{ version_id_marker }}'
;
UPDATE examples​
- update
<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_object_versions
SET
legal_hold = '{{ legal_hold }}',
lock = '{{ lock }}'
WHERE
key = '{{ key }}' --required
AND name = '{{ name }}' --required
AND region_name = '{{ region_name }}' --required
AND version_id = '{{ version_id }}' --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​
- delete
<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_object_versions
WHERE key = '{{ key }}' --required
AND name = '{{ name }}' --required
AND region_name = '{{ region_name }}' --required
AND version_id = '{{ version_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- copy
- restore
<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_object_versions.copy
@key='{{ key }}' --required,
@name='{{ name }}' --required,
@regionName='{{ regionName }}' --required,
@versionId='{{ versionId }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"storageClass": "{{ storageClass }}",
"targetBucket": "{{ targetBucket }}",
"targetKey": "{{ targetKey }}"
}'
;
<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_object_versions.restore
@key='{{ key }}' --required,
@name='{{ name }}' --required,
@regionName='{{ regionName }}' --required,
@versionId='{{ versionId }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"days": {{ days }}
}'
;