public static enum SteeringPolicy.Template extends Enum<SteeringPolicy.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.
*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.Enum Constant and Description |
---|
Custom |
Failover |
LoadBalance |
RouteByAsn |
RouteByGeo |
RouteByIp |
UnknownEnumValue
This value is used if a service returns a value for this enum that is not recognized by this
version of the SDK.
|
Modifier and Type | Method and Description |
---|---|
static SteeringPolicy.Template |
create(String key) |
String |
getValue() |
static SteeringPolicy.Template |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SteeringPolicy.Template[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SteeringPolicy.Template Failover
public static final SteeringPolicy.Template LoadBalance
public static final SteeringPolicy.Template RouteByGeo
public static final SteeringPolicy.Template RouteByAsn
public static final SteeringPolicy.Template RouteByIp
public static final SteeringPolicy.Template Custom
public static final SteeringPolicy.Template UnknownEnumValue
public static SteeringPolicy.Template[] values()
for (SteeringPolicy.Template c : SteeringPolicy.Template.values()) System.out.println(c);
public static SteeringPolicy.Template valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getValue()
public static SteeringPolicy.Template create(String key)
Copyright © 2016–2021. All rights reserved.