config_pop_datacenters
Creates, updates, deletes, gets or lists a config_pop_datacenters resource.
Overview​
| Name | config_pop_datacenters |
| Type | Resource |
| Id | ovh.ovh_cloud_connect.config_pop_datacenters |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | ID of the Datacenter configuration |
datacenter_id | integer | ID of the datacenter linked (wire: datacenterId) |
ovh_bgp_area | integer | OVH Private AS (wire: ovhBgpArea) |
status | string | Status of the pop configuration (active, init, toDelete) |
subnet | string (ipv4-block) | Subnet should be a /28 min (example: 192.0.2.0/24) |
OVHcloud Connect Service Datacenter Configuration
| Name | Datatype | Description |
|---|---|---|
id | integer | ID of the Datacenter configuration |
datacenter_id | integer | ID of the datacenter linked (wire: datacenterId) |
ovh_bgp_area | integer | OVH Private AS (wire: ovhBgpArea) |
status | string | Status of the pop configuration (active, init, toDelete) |
subnet | string (ipv4-block) | Subnet should be a /28 min (example: 192.0.2.0/24) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | datacenter_id, pop_id, service_name | Returns the linked availability zone, subnet, OVHcloud AS and status. | |
list | select | pop_id, service_name | x_pagination_mode | Returns the IDs of the availability zones connected through this PoP configuration. |
create | insert | pop_id, service_name, datacenter_id | Connects an availability zone to this PoP configuration; L3 also needs a /28 subnet and the OVHcloud AS (async task). | |
delete | delete | datacenter_id, pop_id, service_name | Disconnects 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.
| 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"}}) |
datacenter_id | integer | Datacenter ID (wire: datacenterId) |
pop_id | integer | Pop ID (wire: popId) |
service_name | string (uuid) | Service name (wire: serviceName) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
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
;
Returns the IDs of the availability zones connected through this PoP configuration.
SELECT
id,
datacenter_id,
ovh_bgp_area,
status,
subnet
FROM ovh.ovh_cloud_connect.config_pop_datacenters
WHERE pop_id = '{{ pop_id }}' -- required
AND service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: config_pop_datacenters
props:
- name: pop_id
value: {{ pop_id }}
description: Required parameter for the config_pop_datacenters resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the config_pop_datacenters resource.
- name: datacenter_id
value: {{ datacenter_id }}
description: |
ID of the datacenter linked
- name: ovh_bgp_area
value: {{ ovh_bgp_area }}
description: |
OVH Private AS
- name: subnet
value: "{{ subnet }}"
description: |
Subnet should be a /28 min
DELETE examples​
- delete
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
;