region_loadbalancing_l7_policies
Creates, updates, deletes, gets or lists a region_loadbalancing_l7_policies resource.
Overview​
| Name | region_loadbalancing_l7_policies |
| Type | Resource |
| Id | ovh.cloud_network.region_loadbalancing_l7_policies |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | |
name | string | Human-readable name of the resource |
listener_id | string (uuid) | The ID of the listener. (wire: listenerId) |
redirect_pool_id | string (uuid) | Requests matching this policy will be redirected to the pool with this ID. Only valid if action is "redirect_to_pool" (wire: redirectPoolId) |
action | string | The L7 policy action (redirectPrefix, redirectToPool, redirectToURL, reject) |
description | string | A human-readable description for the resource |
operating_status | string | Operating status of the resource (degraded, draining, error, noMonitor, offline, online) (wire: operatingStatus) |
position | integer | The position of this policy on the listener. Positions start at 1 |
provisioning_status | string | provisioning status of the resource (active, creating, deleted, deleting, error, updating) (wire: provisioningStatus) |
redirect_http_code | integer | Requests matching this policy will be redirected to the specified URL or Prefix URL with the HTTP response code. Valid if action is "redirect_to" or "redirect_prefix" (301, 302, 303, 307, 308) (wire: redirectHttpCode) |
redirect_prefix | string | Requests matching this policy will be redirected to this Prefix URL. Only valid if action is "redirect_prefix" (wire: redirectPrefix) |
redirect_url | string | Requests matching this policy will be redirected to this URL. Only valid if action is "redirect_to_url" (wire: redirectUrl) |
L7 policy
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | |
name | string | Human-readable name of the resource |
listener_id | string (uuid) | The ID of the listener. (wire: listenerId) |
redirect_pool_id | string (uuid) | Requests matching this policy will be redirected to the pool with this ID. Only valid if action is "redirect_to_pool" (wire: redirectPoolId) |
action | string | The L7 policy action (redirectPrefix, redirectToPool, redirectToURL, reject) |
description | string | A human-readable description for the resource |
operating_status | string | Operating status of the resource (degraded, draining, error, noMonitor, offline, online) (wire: operatingStatus) |
position | integer | The position of this policy on the listener. Positions start at 1 |
provisioning_status | string | provisioning status of the resource (active, creating, deleted, deleting, error, updating) (wire: provisioningStatus) |
redirect_http_code | integer | Requests matching this policy will be redirected to the specified URL or Prefix URL with the HTTP response code. Valid if action is "redirect_to" or "redirect_prefix" (301, 302, 303, 307, 308) (wire: redirectHttpCode) |
redirect_prefix | string | Requests matching this policy will be redirected to this Prefix URL. Only valid if action is "redirect_prefix" (wire: redirectPrefix) |
redirect_url | string | Requests matching this policy will be redirected to this URL. Only valid if action is "redirect_to_url" (wire: redirectUrl) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | l_7_policy_id, region_name, service_name | ||
list | select | region_name, service_name | listener_id | |
create | insert | region_name, service_name, action, listener_id | ||
update | update | l_7_policy_id, region_name, service_name, action | ||
delete | delete | l_7_policy_id, region_name, service_name |
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"}}) |
l_7_policy_id | string (uuid) | L7 policy ID (wire: l7PolicyId) |
region_name | string | Region name (wire: regionName) |
service_name | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
listener_id | string | Linked listener id (wire: listenerId) |
SELECT examples​
- get
- list
successful operation
SELECT
id,
name,
listener_id,
redirect_pool_id,
action,
description,
operating_status,
position,
provisioning_status,
redirect_http_code,
redirect_prefix,
redirect_url
FROM ovh.cloud_network.region_loadbalancing_l7_policies
WHERE l_7_policy_id = '{{ l_7_policy_id }}' -- required
AND region_name = '{{ region_name }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
L7 policy
SELECT
id,
name,
listener_id,
redirect_pool_id,
action,
description,
operating_status,
position,
provisioning_status,
redirect_http_code,
redirect_prefix,
redirect_url
FROM ovh.cloud_network.region_loadbalancing_l7_policies
WHERE region_name = '{{ region_name }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
AND listener_id = '{{ listener_id }}'
;
INSERT examples​
- create
- Manifest
No description available.
INSERT INTO ovh.cloud_network.region_loadbalancing_l7_policies (
action,
description,
listener_id,
name,
position,
redirect_http_code,
redirect_pool_id,
redirect_prefix,
redirect_url,
region_name,
service_name
)
SELECT
'{{ action }}' /* required */,
'{{ description }}',
'{{ listener_id }}' /* required */,
'{{ name }}',
{{ position }},
{{ redirect_http_code }},
'{{ redirect_pool_id }}',
'{{ redirect_prefix }}',
'{{ redirect_url }}',
'{{ region_name }}',
'{{ service_name }}'
RETURNING
id,
name,
listener_id,
redirect_pool_id,
action,
description,
operating_status,
position,
provisioning_status,
redirect_http_code,
redirect_prefix,
redirect_url
;
# Description fields are for documentation purposes
- name: region_loadbalancing_l7_policies
props:
- name: region_name
value: "{{ region_name }}"
description: Required parameter for the region_loadbalancing_l7_policies resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the region_loadbalancing_l7_policies resource.
- name: action
value: "{{ action }}"
description: |
The L7 policy action
valid_values: ['redirectPrefix', 'redirectToPool', 'redirectToURL', 'reject']
- name: description
value: "{{ description }}"
description: |
A human-readable description for the resource
- name: listener_id
value: "{{ listener_id }}"
description: |
The ID of the listener.
- name: name
value: "{{ name }}"
description: |
Human-readable name of the resource
- name: position
value: {{ position }}
description: |
The position of this policy on the listener. Positions start at 1
- name: redirect_http_code
value: {{ redirect_http_code }}
description: |
Requests matching this policy will be redirected to the specified URL or Prefix URL with the HTTP response code. Valid if action is "redirect_to" or "redirect_prefix"
valid_values: ['301', '302', '303', '307', '308']
- name: redirect_pool_id
value: "{{ redirect_pool_id }}"
description: |
Requests matching this policy will be redirected to the pool with this ID. Only valid if action is "redirect_to_pool"
- name: redirect_prefix
value: "{{ redirect_prefix }}"
description: |
Requests matching this policy will be redirected to this Prefix URL. Only valid if action is "redirect_prefix"
- name: redirect_url
value: "{{ redirect_url }}"
description: |
Requests matching this policy will be redirected to this URL. Only valid if action is "redirect_to_url"
UPDATE examples​
- update
No description available.
UPDATE ovh.cloud_network.region_loadbalancing_l7_policies
SET
action = '{{ action }}',
description = '{{ description }}',
listener_id = '{{ listener_id }}',
name = '{{ name }}',
position = {{ position }},
redirect_http_code = {{ redirect_http_code }},
redirect_pool_id = '{{ redirect_pool_id }}',
redirect_prefix = '{{ redirect_prefix }}',
redirect_url = '{{ redirect_url }}'
WHERE
l_7_policy_id = '{{ l_7_policy_id }}' --required
AND region_name = '{{ region_name }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
AND action = '{{ action }}' --required
RETURNING
id,
name,
listener_id,
redirect_pool_id,
action,
description,
operating_status,
position,
provisioning_status,
redirect_http_code,
redirect_prefix,
redirect_url;
DELETE examples​
- delete
No description available.
DELETE FROM ovh.cloud_network.region_loadbalancing_l7_policies
WHERE l_7_policy_id = '{{ l_7_policy_id }}' --required
AND region_name = '{{ region_name }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;