routing_policies
Creates, updates, deletes, gets or lists a routing_policies resource.
Overview​
| Name | routing_policies |
| Type | Resource |
| Id | oci.load_balancer.routing_policies |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The routing policy requested.
| Name | Datatype | Description |
|---|---|---|
name | string | The unique name for this list of routing rules. Avoid entering confidential information. Example: example_routing_policy (pattern: <code>^[a-zA-Z_][a-zA-Z_0-9]*$</code>) |
conditionLanguageVersion | string | The version of the language in which condition of rules are composed. (V1) |
rules | array | The ordered list of routing rules. |
A named ordered list of routing rules that is applied to a listener.<br /><br />Warning: Oracle recommends that you avoid using any confidential information when you supply string values using the API.<br />
| Name | Datatype | Description |
|---|---|---|
name | string | The unique name for this list of routing rules. Avoid entering confidential information. Example: example_routing_policy (pattern: <code>^[a-zA-Z_][a-zA-Z_0-9]*$</code>) |
conditionLanguageVersion | string | The version of the language in which condition of rules are composed. (V1) |
rules | array | The ordered list of routing rules. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | loadBalancerId, routingPolicyName, region | opc-request-id | Gets the specified routing policy. |
list | select | loadBalancerId, region | opc-request-id, limit, page | Lists all routing policies associated with the specified load balancer. |
create | insert | loadBalancerId, region, name, conditionLanguageVersion, rules | opc-request-id, opc-retry-token | Adds a routing policy to a load balancer. For more information, see<br />[Managing Request Routing](/Content/Balance/Tasks/managingrequest.htm).<br /> |
update | update | loadBalancerId, routingPolicyName, region, rules | opc-request-id, opc-retry-token | Overwrites an existing routing policy on the specified load balancer. Use this operation to add, delete, or alter<br />routing policy rules in a routing policy.<br /><br />To add a new routing rule to a routing policy, the body must include both the new routing rule to add and the existing rules to retain.<br /> |
delete | delete | loadBalancerId, routingPolicyName, region | opc-request-id | Deletes a routing policy from the specified load balancer.<br /><br />To delete a routing rule from a routing policy, use the<br />[UpdateRoutingPolicy](#/en/loadbalancer/20170115/RoutingPolicies/UpdateRoutingPolicy) operation.<br /> |
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 |
|---|---|---|
loadBalancerId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the load balancer associated with the routing policy to delete. |
region | string | OCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION) |
routingPolicyName | string | The name of the routing policy to delete. Example: example_routing_policy |
limit | integer (int64) | For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). Example: 50 |
opc-request-id | string | The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. |
opc-retry-token | string | A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected). |
page | string | For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). Example: 3 |
SELECT examples​
- get
- list
Gets the specified routing policy.
SELECT
name,
conditionLanguageVersion,
rules
FROM oci.load_balancer.routing_policies
WHERE loadBalancerId = '{{ loadBalancerId }}' -- required
AND routingPolicyName = '{{ routingPolicyName }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;
Lists all routing policies associated with the specified load balancer.
SELECT
name,
conditionLanguageVersion,
rules
FROM oci.load_balancer.routing_policies
WHERE loadBalancerId = '{{ loadBalancerId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
AND limit = '{{ limit }}'
AND page = '{{ page }}'
;
INSERT examples​
- create
- Manifest
Adds a routing policy to a load balancer. For more information, see<br />[Managing Request Routing](/Content/Balance/Tasks/managingrequest.htm).<br />
INSERT INTO oci.load_balancer.routing_policies (
conditionLanguageVersion,
name,
rules,
loadBalancerId,
region,
opc-request-id,
opc-retry-token
)
SELECT
'{{ conditionLanguageVersion }}' /* required */,
'{{ name }}' /* required */,
'{{ rules }}' /* required */,
'{{ loadBalancerId }}',
'{{ region }}',
'{{ opc-request-id }}',
'{{ opc-retry-token }}'
;
# Description fields are for documentation purposes
- name: routing_policies
props:
- name: loadBalancerId
value: "{{ loadBalancerId }}"
description: Required parameter for the routing_policies resource.
- name: region
value: "{{ region }}"
description: Required parameter for the routing_policies resource.
- name: conditionLanguageVersion
value: "{{ conditionLanguageVersion }}"
description: |
The version of the language in which `condition` of `rules` are composed.
valid_values: ['V1']
- name: name
value: "{{ name }}"
description: |
The name for this list of routing rules. It must be unique and it cannot be changed. Avoid entering
confidential information.
Example: `example_routing_rules`
- name: rules
description: |
The list of routing rules.
value:
- actions: "{{ actions }}"
condition: "{{ condition }}"
name: "{{ name }}"
- name: opc-request-id
value: "{{ opc-request-id }}"
description: The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
description: The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
- name: opc-retry-token
value: "{{ opc-retry-token }}"
description: A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
description: A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
UPDATE examples​
- update
Overwrites an existing routing policy on the specified load balancer. Use this operation to add, delete, or alter<br />routing policy rules in a routing policy.<br /><br />To add a new routing rule to a routing policy, the body must include both the new routing rule to add and the existing rules to retain.<br />
UPDATE oci.load_balancer.routing_policies
SET
conditionLanguageVersion = '{{ conditionLanguageVersion }}',
rules = '{{ rules }}'
WHERE
loadBalancerId = '{{ loadBalancerId }}' --required
AND routingPolicyName = '{{ routingPolicyName }}' --required
AND region = '{{ region }}' --required
AND rules = '{{ rules }}' --required
AND opc-request-id = '{{ opc-request-id}}'
AND opc-retry-token = '{{ opc-retry-token}}';
DELETE examples​
- delete
Deletes a routing policy from the specified load balancer.<br /><br />To delete a routing rule from a routing policy, use the<br />[UpdateRoutingPolicy](#/en/loadbalancer/20170115/RoutingPolicies/UpdateRoutingPolicy) operation.<br />
DELETE FROM oci.load_balancer.routing_policies
WHERE loadBalancerId = '{{ loadBalancerId }}' --required
AND routingPolicyName = '{{ routingPolicyName }}' --required
AND region = '{{ region }}' --required
AND opc-request-id = '{{ opc-request-id }}'
;