SteeringPolicyRule

class oci.dns.models.SteeringPolicyRule(**kwargs)

Bases: object

The configuration of the sorting and filtering behaviors in a steering policy. Rules can filter and sort answers based on weight, priority, endpoint health, and other data.

A rule may optionally include a sequence of cases, each with an optional caseCondition expression. Cases allow a sequence of conditions to be defined that will apply different parameters to the rule when the conditions are met. For more information about cases, see Traffic Management API Guide.

Warning: Oracle recommends that you avoid using any confidential information when you supply string values using the API.

RULE_TYPE_FILTER = 'FILTER'

A constant which can be used with the rule_type property of a SteeringPolicyRule. This constant has a value of "FILTER"

RULE_TYPE_HEALTH = 'HEALTH'

A constant which can be used with the rule_type property of a SteeringPolicyRule. This constant has a value of "HEALTH"

RULE_TYPE_LIMIT = 'LIMIT'

A constant which can be used with the rule_type property of a SteeringPolicyRule. This constant has a value of "LIMIT"

RULE_TYPE_PRIORITY = 'PRIORITY'

A constant which can be used with the rule_type property of a SteeringPolicyRule. This constant has a value of "PRIORITY"

RULE_TYPE_WEIGHTED = 'WEIGHTED'

A constant which can be used with the rule_type property of a SteeringPolicyRule. This constant has a value of "WEIGHTED"

__init__(**kwargs)

Initializes a new SteeringPolicyRule object with values from keyword arguments. This class has the following subclasses and if you are using this class as input to a service operations then you should favor using a subclass over the base class:

The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • description (str) -- The value to assign to the description property of this SteeringPolicyRule.
  • rule_type (str) -- The value to assign to the rule_type property of this SteeringPolicyRule. Allowed values for this property are: "FILTER", "HEALTH", "WEIGHTED", "PRIORITY", "LIMIT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
description

Gets the description of this SteeringPolicyRule. A user-defined description of the rule's purpose or behavior.

Returns:The description of this SteeringPolicyRule.
Return type:str
static get_subtype(object_dictionary)

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.

rule_type

[Required] Gets the rule_type of this SteeringPolicyRule. The type of a rule determines its sorting/filtering behavior. * FILTER - Filters the list of answers based on their defined boolean data. Answers remain

only if their shouldKeep value is true.
  • HEALTH - Removes answers from the list if their rdata matches a target in the health check monitor referenced by the steering policy and the target is reported down.
  • WEIGHTED - Uses a number between 0 and 255 to determine how often an answer will be served in relation to other answers. Anwers with a higher weight will be served more frequently.
  • PRIORITY - Uses a defined rank value of answers to determine which answer to serve, moving those with the lowest values to the beginning of the list without changing the relative order of those with the same value. Answers can be given a value between 0 and 255.
  • LIMIT - Filters answers that are too far down the list. Parameter defaultCount specifies how many answers to keep. Example: If defaultCount has a value of 2 and there are five answers left, when the LIMIT rule is processed, only the first two answers will remain in the list.

Allowed values for this property are: "FILTER", "HEALTH", "WEIGHTED", "PRIORITY", "LIMIT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.

Returns:The rule_type of this SteeringPolicyRule.
Return type:str