Skip to main content

region_cold_archives

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

Overview​

Nameregion_cold_archives
TypeResource
Idovh.cloud_storage.region_cold_archives

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
namestringContainer name
owner_idintegerContainer owner user ID (wire: ownerId)
automatic_deletion_atstring (date-time)After restoring your archive, date when the restored files will be deleted (wire: automaticDeletionAt)
created_atstring (date-time)The date when the resource was created (wire: createdAt)
locked_untilstring (date-time)Archive is locked (cannot be deleted) until this date (wire: lockedUntil)
objectsarrayContainer objects (deprecated)
objects_countintegerContainer total objects count (wire: objectsCount)
objects_sizeintegerContainer total objects size (bytes) (wire: objectsSize)
statusstringColdArchive status (archived, archiving, deleting, flushed, none, restored, restoring)
virtual_hoststringContainer virtual host (wire: virtualHost)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectname, region_name, service_namelimit, marker, prefix<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.
listselectregion_name, service_nameGet cold archive containers
createinsertregion_name, service_name, 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.
deletedeletename, 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.
archiveexecname, regionName, service_nameStart archiving of container
destroyexecname, regionName, service_nameStart cleaning tape date of archived container
delete_objectexecname, objectKey, 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.
policyexecname, regionName, userId, service_name, roleName<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.
presignexecname, regionName, service_nameGenerate presigned URLs to download or upload objects
restoreexecname, regionName, service_nameStart restoring of container

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"}})
namestringName
objectKeystringObject key
regionNamestringRegion name
region_namestringRegion name (wire: regionName)
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
userIdstringUser ID
limitintegerLimits the number of objects in the result
markerstringConstrains the list to objects whose names are greater than the marker
prefixstringFilter objects by name prefix

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
name,
owner_id,
automatic_deletion_at,
created_at,
locked_until,
objects,
objects_count,
objects_size,
status,
virtual_host
FROM ovh.cloud_storage.region_cold_archives
WHERE 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 marker = '{{ marker }}'
AND prefix = '{{ prefix }}'
;

INSERT 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.

INSERT INTO ovh.cloud_storage.region_cold_archives (
encryption,
lifecycle,
name,
object_lock,
owner_id,
replication,
tags,
versioning,
region_name,
service_name
)
SELECT
'{{ encryption }}',
'{{ lifecycle }}',
'{{ name }}' /* required */,
'{{ object_lock }}',
{{ owner_id }},
'{{ replication }}',
'{{ tags }}',
'{{ versioning }}',
'{{ region_name }}',
'{{ service_name }}'
RETURNING
name,
owner_id,
automatic_deletion_at,
created_at,
locked_until,
objects,
objects_count,
objects_size,
status,
virtual_host
;

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_cold_archives
WHERE 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.

Start archiving of container

EXEC ovh.cloud_storage.region_cold_archives.archive
@name='{{ name }}' --required,
@regionName='{{ regionName }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"lockedUntilDays": {{ lockedUntilDays }}
}'
;