datacenter_private_gateways
Creates, updates, deletes, gets or lists a datacenter_private_gateways resource.
Overview​
| Name | datacenter_private_gateways |
| Type | Resource |
| Id | ovh.dedicated_cloud.datacenter_private_gateways |
Fields​
The following fields are returned by SELECT queries:
- get
successful operation
| Name | Datatype | Description |
|---|---|---|
customer_ip | string (ipv4) | Ip set on your private gateway in your network (example: 192.0.2.0) (wire: customerIp) |
customer_netmask | string (ipv4) | Your netmask set on the private gateway (example: 192.0.2.0) (wire: customerNetmask) |
customer_port_group | string | Portgroup in your VMware on OVHcloud used to deploy the private gateway (wire: customerPortGroup) |
state | string | State of the option (disabled, disabling, enabled, enabling, error, migrating, unknown) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | datacenter_id, service_name | Get the private gateway. Returns the private management gateway: IP address, netmask, portgroup and state. | |
disable | exec | datacenterId, serviceName | Remove the private gateway. Removes the private management gateway. Returns a task to track progress. | |
enable | exec | datacenterId, serviceName, ip, netmask, portgroup | Deploy 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. | |
reconfigure | exec | datacenterId, serviceName | Reconfigure 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.
| 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"}}) |
datacenterId | integer | Id of the Datacenter |
datacenter_id | integer | Id of the Datacenter (wire: datacenterId) |
serviceName | string | Domain of the service |
service_name | string | Domain of the service (wire: serviceName) |
SELECT examples​
- get
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.
- disable
- enable
- reconfigure
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
;
Deploy 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.
EXEC ovh.dedicated_cloud.datacenter_private_gateways.enable
@datacenterId='{{ datacenterId }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"ip": "{{ ip }}",
"netmask": "{{ netmask }}",
"portgroup": "{{ portgroup }}"
}'
;
Reconfigure 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.
EXEC ovh.dedicated_cloud.datacenter_private_gateways.reconfigure
@datacenterId='{{ datacenterId }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"ip": "{{ ip }}",
"netmask": "{{ netmask }}",
"newDatacenterId": {{ newDatacenterId }},
"portgroup": "{{ portgroup }}"
}'
;