region_cold_archives
Creates, updates, deletes, gets or lists a region_cold_archives resource.
Overview​
| Name | region_cold_archives |
| Type | Resource |
| Id | ovh.cloud_storage.region_cold_archives |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | Container name |
owner_id | integer | Container owner user ID (wire: ownerId) |
automatic_deletion_at | string (date-time) | After restoring your archive, date when the restored files will be deleted (wire: automaticDeletionAt) |
created_at | string (date-time) | The date when the resource was created (wire: createdAt) |
locked_until | string (date-time) | Archive is locked (cannot be deleted) until this date (wire: lockedUntil) |
objects | array | Container objects (deprecated) |
objects_count | integer | Container total objects count (wire: objectsCount) |
objects_size | integer | Container total objects size (bytes) (wire: objectsSize) |
status | string | ColdArchive status (archived, archiving, deleting, flushed, none, restored, restoring) |
virtual_host | string | Container virtual host (wire: virtualHost) |
Container
| Name | Datatype | Description |
|---|---|---|
name | string | Container name |
owner_id | integer | Container owner user ID (wire: ownerId) |
automatic_deletion_at | string (date-time) | After restoring your archive, date when the restored files will be deleted (wire: automaticDeletionAt) |
created_at | string (date-time) | The date when the resource was created (wire: createdAt) |
locked_until | string (date-time) | Archive is locked (cannot be deleted) until this date (wire: lockedUntil) |
objects | array | Container objects (deprecated) |
objects_count | integer | Container total objects count (wire: objectsCount) |
objects_size | integer | Container total objects size (bytes) (wire: objectsSize) |
status | string | ColdArchive status (archived, archiving, deleting, flushed, none, restored, restoring) |
virtual_host | string | Container virtual host (wire: virtualHost) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | name, region_name, service_name | limit, 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. |
list | select | region_name, service_name | Get cold archive containers | |
create | insert | region_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. | |
delete | delete | 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. | |
archive | exec | name, regionName, service_name | Start archiving of container | |
destroy | exec | name, regionName, service_name | Start cleaning tape date of archived container | |
delete_object | exec | name, 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. | |
policy | exec | name, 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. | |
presign | exec | name, regionName, service_name | Generate presigned URLs to download or upload objects | |
restore | exec | name, regionName, service_name | Start 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.
| 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"}}) |
name | string | Name |
objectKey | string | Object key |
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. |
userId | string | User ID |
limit | integer | Limits the number of objects in the result |
marker | string | Constrains the list to objects whose names are greater than the marker |
prefix | string | Filter objects by name prefix |
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
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 }}'
;
Get cold archive containers
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 region_name = '{{ region_name }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
INSERT examples​
- create
- Manifest
<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
;
# Description fields are for documentation purposes
- name: region_cold_archives
props:
- name: region_name
value: "{{ region_name }}"
description: Required parameter for the region_cold_archives resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the region_cold_archives resource.
- name: encryption
description: |
Encryption configuration.
value:
sseAlgorithm: "{{ sseAlgorithm }}"
- name: lifecycle
description: |
Lifecycle configuration
value:
rules:
- abortIncompleteMultipartUpload:
daysAfterInitiation: {{ daysAfterInitiation }}
expiration:
date: "{{ date }}"
days: {{ days }}
expiredObjectDeleteMarker: {{ expiredObjectDeleteMarker }}
filter:
objectSizeGreaterThan: {{ objectSizeGreaterThan }}
objectSizeLessThan: {{ objectSizeLessThan }}
prefix: "{{ prefix }}"
tags: "{{ tags }}"
id: "{{ id }}"
noncurrentVersionExpiration:
newerNoncurrentVersions: {{ newerNoncurrentVersions }}
noncurrentDays: {{ noncurrentDays }}
noncurrentVersionTransitions: "{{ noncurrentVersionTransitions }}"
status: "{{ status }}"
transitions: "{{ transitions }}"
- name: name
value: "{{ name }}"
description: |
Container name.
- name: object_lock
description: |
Object lock configuration.
value:
rule:
mode: "{{ mode }}"
period: "{{ period }}"
status: "{{ status }}"
- name: owner_id
value: {{ owner_id }}
description: |
Container owner user ID.
- name: replication
description: |
Replication configuration.
value:
rules:
- deleteMarkerReplication: "{{ deleteMarkerReplication }}"
destination:
name: "{{ name }}"
region: "{{ region }}"
storageClass: "{{ storageClass }}"
filter:
prefix: "{{ prefix }}"
tags: "{{ tags }}"
id: "{{ id }}"
priority: {{ priority }}
status: "{{ status }}"
- name: tags
value: "{{ tags }}"
description: |
Container tags.
- name: versioning
description: |
Versioning configuration.
value:
status: "{{ status }}"
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_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.
- archive
- destroy
- delete_object
- policy
- presign
- restore
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 }}
}'
;
Start cleaning tape date of archived container
EXEC ovh.cloud_storage.region_cold_archives.destroy
@name='{{ name }}' --required,
@regionName='{{ regionName }}' --required,
@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.
EXEC ovh.cloud_storage.region_cold_archives.delete_object
@name='{{ name }}' --required,
@objectKey='{{ objectKey }}' --required,
@regionName='{{ regionName }}' --required,
@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.
EXEC ovh.cloud_storage.region_cold_archives.policy
@name='{{ name }}' --required,
@regionName='{{ regionName }}' --required,
@userId='{{ userId }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"objectKey": "{{ objectKey }}",
"roleName": "{{ roleName }}"
}'
;
Generate presigned URLs to download or upload objects
EXEC ovh.cloud_storage.region_cold_archives.presign
@name='{{ name }}' --required,
@regionName='{{ regionName }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"expire": {{ expire }},
"method": "{{ method }}",
"object": "{{ object }}",
"storageClass": "{{ storageClass }}",
"versionId": "{{ versionId }}"
}'
;
Start restoring of container
EXEC ovh.cloud_storage.region_cold_archives.restore
@name='{{ name }}' --required,
@regionName='{{ regionName }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;