Class SteeringPolicy.Builder
- java.lang.Object
-
- com.oracle.bmc.dns.model.SteeringPolicy.Builder
-
- Enclosing class:
- SteeringPolicy
public static class SteeringPolicy.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SteeringPolicy.Builder
answers(List<SteeringPolicyAnswer> answers)
The set of all answers that can potentially issue from the steering policy.SteeringPolicy
build()
SteeringPolicy.Builder
compartmentId(String compartmentId)
The OCID of the compartment containing the steering policy.SteeringPolicy.Builder
copy(SteeringPolicy model)
SteeringPolicy.Builder
definedTags(Map<String,Map<String,Object>> definedTags)
Defined tags for this resource.SteeringPolicy.Builder
displayName(String displayName)
A user-friendly name for the steering policy.SteeringPolicy.Builder
freeformTags(Map<String,String> freeformTags)
Free-form tags for this resource.SteeringPolicy.Builder
healthCheckMonitorId(String healthCheckMonitorId)
The OCID of the health check monitor providing health data about the answers of the steering policy.SteeringPolicy.Builder
id(String id)
The OCID of the resource.SteeringPolicy.Builder
lifecycleState(SteeringPolicy.LifecycleState lifecycleState)
The current state of the resource.SteeringPolicy.Builder
rules(List<SteeringPolicyRule> rules)
The series of rules that will be processed in sequence to reduce the pool of answers to a response for any given request.SteeringPolicy.Builder
self(String self)
The canonical absolute URL of the resource.SteeringPolicy.Builder
template(SteeringPolicy.Template template)
A set of predefined rules based on the desired purpose of the steering policy.SteeringPolicy.Builder
timeCreated(Date timeCreated)
The date and time the resource was created, expressed in RFC 3339 timestamp format.SteeringPolicy.Builder
ttl(Integer ttl)
The Time To Live (TTL) for responses from the steering policy, in seconds.
-
-
-
Method Detail
-
compartmentId
public SteeringPolicy.Builder compartmentId(String compartmentId)
The OCID of the compartment containing the steering policy.- Parameters:
compartmentId
- the value to set- Returns:
- this builder
-
displayName
public SteeringPolicy.Builder displayName(String displayName)
A user-friendly name for the steering policy.Does not have to be unique and can be changed. Avoid entering confidential information.
- Parameters:
displayName
- the value to set- Returns:
- this builder
-
ttl
public SteeringPolicy.Builder ttl(Integer ttl)
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.
- Parameters:
ttl
- the value to set- Returns:
- this builder
-
healthCheckMonitorId
public SteeringPolicy.Builder healthCheckMonitorId(String healthCheckMonitorId)
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](https://docs.oracle.com/iaas/Content/HealthChecks/Tasks/managinghealthchecks.htm).
- Parameters:
healthCheckMonitorId
- the value to set- Returns:
- this builder
-
template
public SteeringPolicy.Builder template(SteeringPolicy.Template template)
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](https://docs.oracle.com/iaas/Content/TrafficManagement/Concepts/trafficmanagementapi.htm).
*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](https://docs.oracle.com/iaas/Content/TrafficManagement/Reference/trafficmanagementgeo.htm).
* 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.
- Parameters:
template
- the value to set- Returns:
- this builder
-
freeformTags
public SteeringPolicy.Builder freeformTags(Map<String,String> freeformTags)
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"}
- Parameters:
freeformTags
- the value to set- Returns:
- this builder
-
definedTags
public SteeringPolicy.Builder definedTags(Map<String,Map<String,Object>> definedTags)
Defined tags for this resource.Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
**Example:** {"Operations": {"CostCenter": "42"}}
- Parameters:
definedTags
- the value to set- Returns:
- this builder
-
answers
public SteeringPolicy.Builder answers(List<SteeringPolicyAnswer> answers)
The set of all answers that can potentially issue from the steering policy.- Parameters:
answers
- the value to set- Returns:
- this builder
-
rules
public SteeringPolicy.Builder rules(List<SteeringPolicyRule> rules)
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.
- Parameters:
rules
- the value to set- Returns:
- this builder
-
self
public SteeringPolicy.Builder self(String self)
The canonical absolute URL of the resource.- Parameters:
self
- the value to set- Returns:
- this builder
-
id
public SteeringPolicy.Builder id(String id)
The OCID of the resource.- Parameters:
id
- the value to set- Returns:
- this builder
-
timeCreated
public SteeringPolicy.Builder timeCreated(Date timeCreated)
The date and time the resource was created, expressed in RFC 3339 timestamp format.*Example:** 2016-07-22T17:23:59:60Z
- Parameters:
timeCreated
- the value to set- Returns:
- this builder
-
lifecycleState
public SteeringPolicy.Builder lifecycleState(SteeringPolicy.LifecycleState lifecycleState)
The current state of the resource.- Parameters:
lifecycleState
- the value to set- Returns:
- this builder
-
build
public SteeringPolicy build()
-
copy
public SteeringPolicy.Builder copy(SteeringPolicy model)
-
-