region_storages
Creates, updates, deletes, gets or lists a region_storages resource.
Overview​
| Name | region_storages |
| Type | Resource |
| Id | ovh.cloud_storage.region_storages |
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) |
arn | string | Container ARN (Amazon Resource Name). |
created_at | string (date-time) | The date and timestamp when the container was created. (wire: createdAt) |
encryption | object | Encryption configuration. |
lifecycle | object | Lifecycle configuration |
object_lock | object | Object lock configuration. (wire: objectLock) |
objects | array | Container objects (deprecated). |
objects_count | integer | Container total objects count. (wire: objectsCount) |
objects_size | integer | Container total objects size in bytes. (wire: objectsSize) |
region | string | Container region. |
replication | object | Replication configuration. |
tags | object | Container tags. |
versioning | object | Versioning configuration. |
virtual_host | string | Container virtual host. (wire: virtualHost) |
Object storage container.
| Name | Datatype | Description |
|---|---|---|
name | string | Container name. |
owner_id | integer | Container owner user ID. (wire: ownerId) |
arn | string | Container ARN (Amazon Resource Name). |
created_at | string (date-time) | The date and timestamp when the container was created. (wire: createdAt) |
objects | array | Container objects (deprecated). |
objects_count | integer | Container total objects count. (wire: objectsCount) |
objects_size | integer | Container total objects size in bytes. (wire: objectsSize) |
region | string | Container region. |
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, no_objects, 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 | <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. | |
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. | |
update | update | 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 | 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. | |
bulk_delete_objects | exec | name, regionName, service_name, objects | Bulk delete container objects | |
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 | <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"}}) |
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. |
userId | string | User ID |
limit | integer | Limit the number of objects returned (1000 maximum, defaults to 1000) |
marker | string | Key to start with when listing objects |
no_objects | boolean | Do not return container objects (wire: noObjects) |
prefix | string | List objects whose key begins with this 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,
arn,
created_at,
encryption,
lifecycle,
object_lock,
objects,
objects_count,
objects_size,
region,
replication,
tags,
versioning,
virtual_host
FROM ovh.cloud_storage.region_storages
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 no_objects = '{{ no_objects }}'
AND prefix = '{{ 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.
SELECT
name,
owner_id,
arn,
created_at,
objects,
objects_count,
objects_size,
region,
virtual_host
FROM ovh.cloud_storage.region_storages
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_storages (
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,
arn,
created_at,
encryption,
lifecycle,
object_lock,
objects,
objects_count,
objects_size,
region,
replication,
tags,
versioning,
virtual_host
;
# Description fields are for documentation purposes
- name: region_storages
props:
- name: region_name
value: "{{ region_name }}"
description: Required parameter for the region_storages resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the region_storages 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 }}"
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_storages
SET
encryption = '{{ encryption }}',
lifecycle = '{{ lifecycle }}',
object_lock = '{{ object_lock }}',
replication = '{{ replication }}',
tags = '{{ tags }}',
versioning = '{{ versioning }}'
WHERE
name = '{{ name }}' --required
AND region_name = '{{ region_name }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
RETURNING
name,
owner_id,
arn,
created_at,
encryption,
lifecycle,
object_lock,
objects,
objects_count,
objects_size,
region,
replication,
tags,
versioning,
virtual_host;
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_storages
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.
- bulk_delete_objects
- policy
- presign
Bulk delete container objects
EXEC ovh.cloud_storage.region_storages.bulk_delete_objects
@name='{{ name }}' --required,
@regionName='{{ regionName }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"objects": "{{ objects }}"
}'
;
<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_storages.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 }}"
}'
;
<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_storages.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 }}"
}'
;