Skip to main content

region_share_networks

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

Overview​

Nameregion_share_networks
TypeResource
Idovh.cloud_storage.region_share_networks

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Share network ID
namestringShare network name
network_idstring (uuid)Private network ID (wire: networkId)
subnet_idstring (uuid)Subnet ID (wire: subnetId)
availability_zonestringAvailability zone (wire: availabilityZone)
cidrstring (ip-block)Subnet CIDR (example: 192.0.2.0/24)
created_atstring (date-time)The date and timestamp when the resource was created (wire: createdAt)
descriptionstringShare network description
regionstringRegion
updated_atstring (date-time)The date and timestamp when the resource was last updated (wire: updatedAt)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectregion_name, share_network_id, service_nameGet share network
listselectregion_name, service_nameList share networks
createinsertregion_name, service_name, network_id, subnet_idCreate share network
deletedeleteregion_name, share_network_id, service_nameDelete share network

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"}})
region_namestringRegion name (wire: regionName)
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
share_network_idstring (uuid)Share network ID (wire: shareNetworkId)

SELECT examples​

Get share network

SELECT
id,
name,
network_id,
subnet_id,
availability_zone,
cidr,
created_at,
description,
region,
updated_at
FROM ovh.cloud_storage.region_share_networks
WHERE region_name = '{{ region_name }}' -- required
AND share_network_id = '{{ share_network_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Create share network

INSERT INTO ovh.cloud_storage.region_share_networks (
availability_zone,
description,
name,
network_id,
subnet_id,
region_name,
service_name
)
SELECT
'{{ availability_zone }}',
'{{ description }}',
'{{ name }}',
'{{ network_id }}' /* required */,
'{{ subnet_id }}' /* required */,
'{{ region_name }}',
'{{ service_name }}'
RETURNING
id,
name,
network_id,
subnet_id,
availability_zone,
cidr,
created_at,
description,
region,
updated_at
;

DELETE examples​

Delete share network

DELETE FROM ovh.cloud_storage.region_share_networks
WHERE region_name = '{{ region_name }}' --required
AND share_network_id = '{{ share_network_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;