Skip to main content

datacenter_private_gateways

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

Overview​

Namedatacenter_private_gateways
TypeResource
Idovh.dedicated_cloud.datacenter_private_gateways

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
customer_ipstring (ipv4)Ip set on your private gateway in your network (example: 192.0.2.0) (wire: customerIp)
customer_netmaskstring (ipv4)Your netmask set on the private gateway (example: 192.0.2.0) (wire: customerNetmask)
customer_port_groupstringPortgroup in your VMware on OVHcloud used to deploy the private gateway (wire: customerPortGroup)
statestringState of the option (disabled, disabling, enabled, enabling, error, migrating, unknown)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdatacenter_id, service_nameGet the private gateway. Returns the private management gateway: IP address, netmask, portgroup and state.
disableexecdatacenterId, serviceNameRemove the private gateway. Removes the private management gateway. Returns a task to track progress.
enableexecdatacenterId, serviceName, ip, netmask, portgroupDeploy the private gateway. Deploys the private management gateway on a portgroup of the service, with the given IP address and netmask. Returns a task to track progress.
reconfigureexecdatacenterId, serviceNameReconfigure the private gateway. Changes the IP address, netmask or portgroup of the private management gateway, or moves it to another datacenter. Returns a task to track progress.

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"}})
datacenterIdintegerId of the Datacenter
datacenter_idintegerId of the Datacenter (wire: datacenterId)
serviceNamestringDomain of the service
service_namestringDomain of the service (wire: serviceName)

SELECT examples​

Get the private gateway. Returns the private management gateway: IP address, netmask, portgroup and state.

SELECT
customer_ip,
customer_netmask,
customer_port_group,
state
FROM ovh.dedicated_cloud.datacenter_private_gateways
WHERE datacenter_id = '{{ datacenter_id }}' -- required
AND service_name = '{{ service_name }}' -- required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Remove the private gateway. Removes the private management gateway. Returns a task to track progress.

EXEC ovh.dedicated_cloud.datacenter_private_gateways.disable
@datacenterId='{{ datacenterId }}' --required,
@serviceName='{{ serviceName }}' --required
;