SteeringPolicy¶
- class oci.dns.models.SteeringPolicy(**kwargs)¶
Bases:
objectA DNS steering policy.
Warning: Oracle recommends that you avoid using any confidential information when you supply string values using the API.
Attributes:
A constant which can be used with the lifecycle_state property of a SteeringPolicy.
A constant which can be used with the lifecycle_state property of a SteeringPolicy.
A constant which can be used with the lifecycle_state property of a SteeringPolicy.
A constant which can be used with the lifecycle_state property of a SteeringPolicy.
A constant which can be used with the lifecycle_state property of a SteeringPolicy.
A constant which can be used with the template property of a SteeringPolicy.
A constant which can be used with the template property of a SteeringPolicy.
A constant which can be used with the template property of a SteeringPolicy.
A constant which can be used with the template property of a SteeringPolicy.
A constant which can be used with the template property of a SteeringPolicy.
A constant which can be used with the template property of a SteeringPolicy.
[Required] Gets the answers of this SteeringPolicy.
[Required] Gets the compartment_id of this SteeringPolicy.
[Required] Gets the defined_tags of this SteeringPolicy.
[Required] Gets the display_name of this SteeringPolicy.
[Required] Gets the freeform_tags of this SteeringPolicy.
Gets the health_check_monitor_id of this SteeringPolicy.
[Required] Gets the id of this SteeringPolicy.
[Required] Gets the lifecycle_state of this SteeringPolicy.
[Required] Gets the rules of this SteeringPolicy.
[Required] Gets the template of this SteeringPolicy.
[Required] Gets the time_created of this SteeringPolicy.
[Required] Gets the ttl of this SteeringPolicy.
Methods:
__init__(**kwargs)Initializes a new SteeringPolicy object with values from keyword arguments.
- LIFECYCLE_STATE_ACTIVE = 'ACTIVE'¶
A constant which can be used with the lifecycle_state property of a SteeringPolicy. This constant has a value of “ACTIVE”
- LIFECYCLE_STATE_CREATING = 'CREATING'¶
A constant which can be used with the lifecycle_state property of a SteeringPolicy. This constant has a value of “CREATING”
- LIFECYCLE_STATE_DELETED = 'DELETED'¶
A constant which can be used with the lifecycle_state property of a SteeringPolicy. This constant has a value of “DELETED”
- LIFECYCLE_STATE_DELETING = 'DELETING'¶
A constant which can be used with the lifecycle_state property of a SteeringPolicy. This constant has a value of “DELETING”
- LIFECYCLE_STATE_UPDATING = 'UPDATING'¶
A constant which can be used with the lifecycle_state property of a SteeringPolicy. This constant has a value of “UPDATING”
- TEMPLATE_CUSTOM = 'CUSTOM'¶
A constant which can be used with the template property of a SteeringPolicy. This constant has a value of “CUSTOM”
- TEMPLATE_FAILOVER = 'FAILOVER'¶
A constant which can be used with the template property of a SteeringPolicy. This constant has a value of “FAILOVER”
- TEMPLATE_LOAD_BALANCE = 'LOAD_BALANCE'¶
A constant which can be used with the template property of a SteeringPolicy. This constant has a value of “LOAD_BALANCE”
- TEMPLATE_ROUTE_BY_ASN = 'ROUTE_BY_ASN'¶
A constant which can be used with the template property of a SteeringPolicy. This constant has a value of “ROUTE_BY_ASN”
- TEMPLATE_ROUTE_BY_GEO = 'ROUTE_BY_GEO'¶
A constant which can be used with the template property of a SteeringPolicy. This constant has a value of “ROUTE_BY_GEO”
- TEMPLATE_ROUTE_BY_IP = 'ROUTE_BY_IP'¶
A constant which can be used with the template property of a SteeringPolicy. This constant has a value of “ROUTE_BY_IP”
- __init__(**kwargs)¶
Initializes a new SteeringPolicy object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):
- Parameters
compartment_id (str) – The value to assign to the compartment_id property of this SteeringPolicy.
display_name (str) – The value to assign to the display_name property of this SteeringPolicy.
ttl (int) – The value to assign to the ttl property of this SteeringPolicy.
health_check_monitor_id (str) – The value to assign to the health_check_monitor_id property of this SteeringPolicy.
template (str) – The value to assign to the template property of this SteeringPolicy. Allowed values for this property are: “FAILOVER”, “LOAD_BALANCE”, “ROUTE_BY_GEO”, “ROUTE_BY_ASN”, “ROUTE_BY_IP”, “CUSTOM”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this SteeringPolicy.
defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this SteeringPolicy.
answers (list[oci.dns.models.SteeringPolicyAnswer]) – The value to assign to the answers property of this SteeringPolicy.
rules (list[oci.dns.models.SteeringPolicyRule]) – The value to assign to the rules property of this SteeringPolicy.
_self (str) – The value to assign to the _self property of this SteeringPolicy.
id (str) – The value to assign to the id property of this SteeringPolicy.
time_created (datetime) – The value to assign to the time_created property of this SteeringPolicy.
lifecycle_state (str) – The value to assign to the lifecycle_state property of this SteeringPolicy. Allowed values for this property are: “ACTIVE”, “CREATING”, “UPDATING”, “DELETED”, “DELETING”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- property answers¶
[Required] Gets the answers of this SteeringPolicy. The set of all answers that can potentially issue from the steering policy.
- Returns
The answers of this SteeringPolicy.
- Return type
- property compartment_id¶
[Required] Gets the compartment_id of this SteeringPolicy. The OCID of the compartment containing the steering policy.
- Returns
The compartment_id of this SteeringPolicy.
- Return type
str
- property defined_tags¶
[Required] Gets the defined_tags of this SteeringPolicy. Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {“Operations”: {“CostCenter”: “42”}}
- Returns
The defined_tags of this SteeringPolicy.
- Return type
dict(str, dict(str, object))
- property display_name¶
[Required] Gets the display_name of this SteeringPolicy. A user-friendly name for the steering policy. Does not have to be unique and can be changed. Avoid entering confidential information.
- Returns
The display_name of this SteeringPolicy.
- Return type
str
- property freeform_tags¶
[Required] Gets the freeform_tags of this SteeringPolicy. Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example: {“Department”: “Finance”}
- Returns
The freeform_tags of this SteeringPolicy.
- Return type
dict(str, str)
- property health_check_monitor_id¶
Gets the health_check_monitor_id of this SteeringPolicy. The OCID of the health check monitor providing health data about the answers of the steering policy. A steering policy answer with rdata matching a monitored endpoint will use the health data of that endpoint. A steering policy answer with rdata not matching any monitored endpoint will be assumed healthy.
Note: To use the Health Check monitoring feature in a steering policy, a monitor must be created using the Health Checks service first. For more information on how to create a monitor, please see Managing Health Checks.
- Returns
The health_check_monitor_id of this SteeringPolicy.
- Return type
str
- property id¶
[Required] Gets the id of this SteeringPolicy. The OCID of the resource.
- Returns
The id of this SteeringPolicy.
- Return type
str
- property lifecycle_state¶
[Required] Gets the lifecycle_state of this SteeringPolicy. The current state of the resource.
Allowed values for this property are: “ACTIVE”, “CREATING”, “UPDATING”, “DELETED”, “DELETING”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The lifecycle_state of this SteeringPolicy.
- Return type
str
- property rules¶
[Required] Gets the rules of this SteeringPolicy. The series of rules that will be processed in sequence to reduce the pool of answers to a response for any given request.
The first rule receives a shuffled list of all answers, and every other rule receives the list of answers emitted by the one preceding it. The last rule populates the response.
- Returns
The rules of this SteeringPolicy.
- Return type
- property template¶
[Required] Gets the template of this SteeringPolicy. A set of predefined rules based on the desired purpose of the steering policy. Each template utilizes Traffic Management’s rules in a different order to produce the desired results when answering DNS queries.
Example: The FAILOVER template determines answers by filtering the policy’s answers using the FILTER rule first, then the following rules in succession: HEALTH, PRIORITY, and LIMIT. This gives the domain dynamic failover capability.
It is strongly recommended to use a template other than CUSTOM when creating a steering policy.
All templates require the rule order to begin with an unconditional FILTER rule that keeps answers contingent upon answer.isDisabled != true, except for CUSTOM. A defined HEALTH rule must follow the FILTER rule if the policy references a healthCheckMonitorId. The last rule of a template must must be a LIMIT rule. For more information about templates and code examples, see Traffic Management API Guide.
Template Types
FAILOVER - Uses health check information on your endpoints to determine which DNS answers
to serve. If an endpoint fails a health check, the answer for that endpoint will be removed from the list of available answers until the endpoint is detected as healthy.
LOAD_BALANCE - Distributes web traffic to specified endpoints based on defined weights.
ROUTE_BY_GEO - Answers DNS queries based on the query’s geographic location. For a list of geographic
locations to route by, see Traffic Management Geographic Locations.
ROUTE_BY_ASN - Answers DNS queries based on the query’s originating ASN.
ROUTE_BY_IP - Answers DNS queries based on the query’s IP address.
CUSTOM - Allows a customized configuration of rules.
Allowed values for this property are: “FAILOVER”, “LOAD_BALANCE”, “ROUTE_BY_GEO”, “ROUTE_BY_ASN”, “ROUTE_BY_IP”, “CUSTOM”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The template of this SteeringPolicy.
- Return type
str
- property time_created¶
[Required] Gets the time_created of this SteeringPolicy. The date and time the resource was created, expressed in RFC 3339 timestamp format.
Example: 2016-07-22T17:23:59:60Z
- Returns
The time_created of this SteeringPolicy.
- Return type
datetime
- property ttl¶
[Required] Gets the ttl of this SteeringPolicy. The Time To Live (TTL) for responses from the steering policy, in seconds. If not specified during creation, a value of 30 seconds will be used.
- Returns
The ttl of this SteeringPolicy.
- Return type
int