Skip to main content

config_pop_datacenters

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

Overview​

Nameconfig_pop_datacenters
TypeResource
Idovh.ovh_cloud_connect.config_pop_datacenters

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerID of the Datacenter configuration
datacenter_idintegerID of the datacenter linked (wire: datacenterId)
ovh_bgp_areaintegerOVH Private AS (wire: ovhBgpArea)
statusstringStatus of the pop configuration (active, init, toDelete)
subnetstring (ipv4-block)Subnet should be a /28 min (example: 192.0.2.0/24)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdatacenter_id, pop_id, service_nameReturns the linked availability zone, subnet, OVHcloud AS and status.
listselectpop_id, service_namex_pagination_modeReturns the IDs of the availability zones connected through this PoP configuration.
createinsertpop_id, service_name, datacenter_idConnects an availability zone to this PoP configuration; L3 also needs a /28 subnet and the OVHcloud AS (async task).
deletedeletedatacenter_id, pop_id, service_nameDisconnects the availability zone from this PoP configuration (async task).

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"}})
datacenter_idintegerDatacenter ID (wire: datacenterId)
pop_idintegerPop ID (wire: popId)
service_namestring (uuid)Service name (wire: serviceName)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Returns the linked availability zone, subnet, OVHcloud AS and status.

SELECT
id,
datacenter_id,
ovh_bgp_area,
status,
subnet
FROM ovh.ovh_cloud_connect.config_pop_datacenters
WHERE datacenter_id = '{{ datacenter_id }}' -- required
AND pop_id = '{{ pop_id }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Connects an availability zone to this PoP configuration; L3 also needs a /28 subnet and the OVHcloud AS (async task).

INSERT INTO ovh.ovh_cloud_connect.config_pop_datacenters (
datacenter_id,
ovh_bgp_area,
subnet,
pop_id,
service_name
)
SELECT
{{ datacenter_id }} /* required */,
{{ ovh_bgp_area }},
'{{ subnet }}',
'{{ pop_id }}',
'{{ service_name }}'
RETURNING
id,
resource_id,
function,
status
;

DELETE examples​

Disconnects the availability zone from this PoP configuration (async task).

DELETE FROM ovh.ovh_cloud_connect.config_pop_datacenters
WHERE datacenter_id = '{{ datacenter_id }}' --required
AND pop_id = '{{ pop_id }}' --required
AND service_name = '{{ service_name }}' --required
;