Skip to main content

rule_sets

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

Overview​

Namerule_sets
TypeResource
Idoci.load_balancer.rule_sets

Fields​

The following fields are returned by SELECT queries:

The rule set is being retrieved.

NameDatatypeDescription
namestringThe name for this set of rules. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_rule_set
itemsarrayAn array of rules that compose the rule set.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectloadBalancerId, ruleSetName, regionopc-request-idGets the specified set of rules.
listselectloadBalancerId, regionopc-request-idLists all rule sets associated with the specified load balancer.
createinsertloadBalancerId, region, name, itemsopc-request-id, opc-retry-tokenCreates a new rule set associated with the specified load balancer. For more information, see<br />[Managing Rule Sets](/Content/Balance/Tasks/managingrulesets.htm).<br />
updateupdateloadBalancerId, ruleSetName, region, itemsopc-request-id, opc-retry-tokenOverwrites an existing set of rules on the specified load balancer. Use this operation to add or alter<br />the rules in a rule set.<br /><br />To add a new rule to a set, the body must include both the new rule to add and the existing rules to retain.<br />
deletedeleteloadBalancerId, ruleSetName, regionopc-request-idDeletes a rule set from the specified load balancer.<br /><br />To delete a rule from a rule set, use the<br />[UpdateRuleSet](#/en/loadbalancer/20170115/RuleSet/UpdateRuleSet) 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 specified load balancer.
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)
ruleSetNamestringThe name of the rule set to delete. Example: example_rule_set
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).

SELECT examples​

Gets the specified set of rules.

SELECT
name,
items
FROM oci.load_balancer.rule_sets
WHERE loadBalancerId = '{{ loadBalancerId }}' -- required
AND ruleSetName = '{{ ruleSetName }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;

INSERT examples​

Creates a new rule set associated with the specified load balancer. For more information, see<br />[Managing Rule Sets](/Content/Balance/Tasks/managingrulesets.htm).<br />

INSERT INTO oci.load_balancer.rule_sets (
items,
name,
loadBalancerId,
region,
opc-request-id,
opc-retry-token
)
SELECT
'{{ items }}' /* required */,
'{{ name }}' /* required */,
'{{ loadBalancerId }}',
'{{ region }}',
'{{ opc-request-id }}',
'{{ opc-retry-token }}'
;

UPDATE examples​

Overwrites an existing set of rules on the specified load balancer. Use this operation to add or alter<br />the rules in a rule set.<br /><br />To add a new rule to a set, the body must include both the new rule to add and the existing rules to retain.<br />

UPDATE oci.load_balancer.rule_sets
SET
items = '{{ items }}'
WHERE
loadBalancerId = '{{ loadBalancerId }}' --required
AND ruleSetName = '{{ ruleSetName }}' --required
AND region = '{{ region }}' --required
AND items = '{{ items }}' --required
AND opc-request-id = '{{ opc-request-id}}'
AND opc-retry-token = '{{ opc-retry-token}}';

DELETE examples​

Deletes a rule set from the specified load balancer.<br /><br />To delete a rule from a rule set, use the<br />[UpdateRuleSet](#/en/loadbalancer/20170115/RuleSet/UpdateRuleSet) operation.<br />

DELETE FROM oci.load_balancer.rule_sets
WHERE loadBalancerId = '{{ loadBalancerId }}' --required
AND ruleSetName = '{{ ruleSetName }}' --required
AND region = '{{ region }}' --required
AND opc-request-id = '{{ opc-request-id }}'
;