region_storage_objects
Creates, updates, deletes, gets or lists a region_storage_objects resource.
Overview​
| Name | region_storage_objects |
| Type | Resource |
| Id | ovh.cloud_storage.region_storage_objects |
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. |
replication_status | string | Object replication status. (COMPLETED, FAILED, NONE, PENDING, REPLICA) (wire: replicationStatus) |
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 or isCommonPrefix is true. |
is_common_prefix | boolean | True when the entry represents a common prefix. This field is included only when specifying a delimiter. (wire: isCommonPrefix) |
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. This field is omitted when isCommonPrefix is true. (wire: lastModified) |
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, 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 | name, region_name, service_name | delimiter, 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. |
update | update | key, 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. | |
delete | delete | key, 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. | |
copy | exec | key, 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. | |
restore | exec | key, 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.
| 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. |
delimiter | string | A delimiter is a character that you use to group keys |
key_marker | string | Key to start with when listing objects (wire: keyMarker) |
limit | integer | Limit the number of objects returned (1000 maximum, defaults to 1000) |
prefix | string | List objects whose key begins with this prefix |
version_id_marker | string | Version ID to start listing from (wire: versionIdMarker) |
with_versions | boolean | List object versions (wire: withVersions) |
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,
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
;
<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_common_prefix,
is_delete_marker,
is_latest,
key,
last_modified,
restore_status,
size,
storage_class
FROM ovh.cloud_storage.region_storage_objects
WHERE name = '{{ name }}' -- required
AND region_name = '{{ region_name }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
AND delimiter = '{{ delimiter }}'
AND key_marker = '{{ key_marker }}'
AND limit = '{{ limit }}'
AND prefix = '{{ prefix }}'
AND version_id_marker = '{{ version_id_marker }}'
AND with_versions = '{{ with_versions }}'
;
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_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​
- 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_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.
- 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_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 }}"
}'
;
<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.restore
@key='{{ key }}' --required,
@name='{{ name }}' --required,
@regionName='{{ regionName }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"days": {{ days }}
}'
;