two_fa_whitelists
Creates, updates, deletes, gets or lists a two_fa_whitelists resource.
Overview​
| Name | two_fa_whitelists |
| Type | Resource |
| Id | ovh.dedicated_cloud.two_fa_whitelists |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | Id of the trusted IP |
cidr_netmask | integer | IP netmask (CIDR notation) of the remote service (wire: cidrNetmask) |
description | string | Description of the trusted IP |
ip | string (ipv4) | IP address of the remote service (example: 192.0.2.0) |
state | string | State of the whitelist (enabled, enabling, error, migrating, removed, removing) |
Two factor authentication whitelisted network
| Name | Datatype | Description |
|---|---|---|
id | integer | Id of the trusted IP |
cidr_netmask | integer | IP netmask (CIDR notation) of the remote service (wire: cidrNetmask) |
description | string | Description of the trusted IP |
ip | string (ipv4) | IP address of the remote service (example: 192.0.2.0) |
state | string | State of the whitelist (enabled, enabling, error, migrating, removed, removing) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, service_name | Get a 2FA whitelisted network. Returns the IP address, netmask, description and state of the exempted network. | |
list | select | service_name | x_pagination_mode | List 2FA whitelisted networks. Returns the IDs of the networks exempted from two-factor authentication. |
create | insert | service_name, description, ip | Create a 2FA whitelisted network. Exempts an IP address or network from two-factor authentication. Returns a task to track progress. | |
delete | delete | id, service_name | Delete a 2FA whitelisted network | |
change_properties | exec | id, serviceName | Update a 2FA whitelisted 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.
| 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"}}) |
id | integer | Id of the trusted IP |
serviceName | string | Domain of the service |
service_name | string | Domain of the service (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
Get a 2FA whitelisted network. Returns the IP address, netmask, description and state of the exempted network.
SELECT
id,
cidr_netmask,
description,
ip,
state
FROM ovh.dedicated_cloud.two_fa_whitelists
WHERE id = '{{ id }}' -- required
AND service_name = '{{ service_name }}' -- required
;
List 2FA whitelisted networks. Returns the IDs of the networks exempted from two-factor authentication.
SELECT
id,
cidr_netmask,
description,
ip,
state
FROM ovh.dedicated_cloud.two_fa_whitelists
WHERE service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create a 2FA whitelisted network. Exempts an IP address or network from two-factor authentication. Returns a task to track progress.
INSERT INTO ovh.dedicated_cloud.two_fa_whitelists (
description,
ip,
service_name
)
SELECT
'{{ description }}' /* required */,
'{{ ip }}' /* required */,
'{{ service_name }}'
RETURNING
name,
datacenter_id,
filer_id,
host_id,
network_access_id,
order_id,
parent_task_id,
task_id,
user_id,
vlan_id,
created_by,
created_from,
description,
end_date,
execution_date,
last_modification_date,
maintenance_date_from,
maintenance_date_to,
network,
progress,
state,
type
;
# Description fields are for documentation purposes
- name: two_fa_whitelists
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the two_fa_whitelists resource.
- name: description
value: "{{ description }}"
description: |
Description of the exception
- name: ip
value: "{{ ip }}"
description: |
IP address or network of the remote service, e.g. 123.100.200.0
DELETE examples​
- delete
Delete a 2FA whitelisted network
DELETE FROM ovh.dedicated_cloud.two_fa_whitelists
WHERE id = '{{ id }}' --required
AND service_name = '{{ service_name }}' --required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- change_properties
Update a 2FA whitelisted network
EXEC ovh.dedicated_cloud.two_fa_whitelists.change_properties
@id='{{ id }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"description": "{{ description }}"
}'
;