Skip to main content

region_storages

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

Overview​

Nameregion_storages
TypeResource
Idovh.cloud_storage.region_storages

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
namestringContainer name.
owner_idintegerContainer owner user ID. (wire: ownerId)
arnstringContainer ARN (Amazon Resource Name).
created_atstring (date-time)The date and timestamp when the container was created. (wire: createdAt)
encryptionobjectEncryption configuration.
lifecycleobjectLifecycle configuration
object_lockobjectObject lock configuration. (wire: objectLock)
objectsarrayContainer objects (deprecated).
objects_countintegerContainer total objects count. (wire: objectsCount)
objects_sizeintegerContainer total objects size in bytes. (wire: objectsSize)
regionstringContainer region.
replicationobjectReplication configuration.
tagsobjectContainer tags.
versioningobjectVersioning configuration.
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, 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.
listselectregion_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.
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.
updateupdatename, 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.
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.
bulk_delete_objectsexecname, regionName, service_name, objectsBulk delete container objects
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_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.

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
regionNamestringRegion name
region_namestringRegion name (wire: regionName)
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
userIdstringUser ID
limitintegerLimit the number of objects returned (1000 maximum, defaults to 1000)
markerstringKey to start with when listing objects
no_objectsbooleanDo not return container objects (wire: noObjects)
prefixstringList objects whose key begins with this 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,
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 }}'
;

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_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
;

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

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​

<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 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 }}"
}'
;