Skip to main content

listener_rules

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

Overview​

Namelistener_rules
TypeResource
Idoci.load_balancer.listener_rules

Fields​

The following fields are returned by SELECT queries:

The attributes of a rule associated with the specified listener, and the name of the rule set that the rule<br />belongs to.<br />

NameDatatypeDescription
ruleobjectAn object that represents an action to apply to a listener. (x-example: {<br /> "action": "ADD_HTTP_REQUEST_HEADER",<br /> "header": "example_header_name",<br /> "value": "example_value"<br />}<br />)
ruleSetNamestringThe name of the rule set that the rule belongs to. (example: example_rule_set)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectloadBalancerId, listenerName, regionopc-request-idLists all of the rules from all of the rule sets associated with the specified listener. The response organizes<br />the rules in the following order:<br /><br />* Access control rules<br />* Allow method rules<br />* Request header rules<br />* Response header rules<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
listenerNamestringThe name of the listener the rules are associated with. Example: example_listener
loadBalancerIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the load balancer associated with the listener.
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)
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.

SELECT examples​

Lists all of the rules from all of the rule sets associated with the specified listener. The response organizes<br />the rules in the following order:<br /><br />* Access control rules<br />* Allow method rules<br />* Request header rules<br />* Response header rules<br />

SELECT
rule,
ruleSetName
FROM oci.load_balancer.listener_rules
WHERE loadBalancerId = '{{ loadBalancerId }}' -- required
AND listenerName = '{{ listenerName }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;