Skip to main content

routing_policies

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

Overview​

Namerouting_policies
TypeResource
Idoci.load_balancer.routing_policies

Fields​

The following fields are returned by SELECT queries:

The routing policy requested.

NameDatatypeDescription
namestringThe 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>)
conditionLanguageVersionstringThe version of the language in which condition of rules are composed. (V1)
rulesarrayThe ordered list of routing rules.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectloadBalancerId, routingPolicyName, regionopc-request-idGets the specified routing policy.
listselectloadBalancerId, regionopc-request-id, limit, pageLists all routing policies associated with the specified load balancer.
createinsertloadBalancerId, region, name, conditionLanguageVersion, rulesopc-request-id, opc-retry-tokenAdds a routing policy to a load balancer. For more information, see<br />[Managing Request Routing](/Content/Balance/Tasks/managingrequest.htm).<br />
updateupdateloadBalancerId, routingPolicyName, region, rulesopc-request-id, opc-retry-tokenOverwrites 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 />
deletedeleteloadBalancerId, routingPolicyName, regionopc-request-idDeletes 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.

NameDatatypeDescription
loadBalancerIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the load balancer associated with the routing policy to delete.
regionstringOCI 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)
routingPolicyNamestringThe name of the routing policy to delete. Example: example_routing_policy
limitinteger (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-idstringThe unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
opc-retry-tokenstringA 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).
pagestringFor 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​

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 }}'
;

INSERT examples​

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 }}'
;

UPDATE examples​

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​

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 }}'
;