Skip to main content

steering_policies

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

Overview​

Namesteering_policies
TypeResource
Idoci.dns.steering_policies

Fields​

The following fields are returned by SELECT queries:

A response containing a single steering policy object.

NameDatatypeDescription
idstringThe OCID of the resource.
answersarrayThe set of all answers that can potentially issue from the steering policy.
compartmentIdstringThe OCID of the compartment containing the steering policy.
definedTagsobjectDefined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). Example: {"Operations": {"CostCenter": "42"}}
displayNamestringA user-friendly name for the steering policy. Does not have to be unique and can be changed. Avoid entering confidential information.
freeformTagsobjectFree-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](/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"}
healthCheckMonitorIdstringThe 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](/iaas/Content/HealthChecks/Tasks/managinghealthchecks.htm).
lifecycleStatestringThe current state of the resource. (ACTIVE, CREATING, DELETED, DELETING)
rulesarrayThe 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.
selfstring (url)The canonical absolute URL of the resource.
templatestringA 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](/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](/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. (FAILOVER, LOAD_BALANCE, ROUTE_BY_GEO, ROUTE_BY_ASN, ROUTE_BY_IP, CUSTOM)
timeCreatedstring (date-time)The date and time the resource was created, expressed in RFC 3339 timestamp format. Example: 2016-07-22T17:23:59:60Z
ttlinteger (int32)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.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsteeringPolicyId, regionIf-None-Match, If-Modified-Since, opc-request-id, scopeGets information about the specified steering policy.<br />
listselectcompartmentId, regionopc-request-id, limit, page, id, displayName, displayNameContains, healthCheckMonitorId, timeCreatedGreaterThanOrEqualTo, timeCreatedLessThan, template, lifecycleState, sortBy, sortOrder, scopeGets a list of all steering policies in the specified compartment.<br />
createinsertregion, compartmentId, displayName, templateopc-retry-token, opc-request-id, scopeCreates a new steering policy in the specified compartment. For more information on<br />creating policies with templates, see [Traffic Management API Guide](/iaas/Content/TrafficManagement/Concepts/trafficmanagementapi.htm).<br />
updateupdatesteeringPolicyId, regionIf-Match, If-Unmodified-Since, opc-request-id, scopeUpdates the configuration of the specified steering policy.<br />
deletedeletesteeringPolicyId, regionIf-Match, If-Unmodified-Since, opc-request-id, scopeDeletes the specified steering policy.<br /><br />A 204 response indicates that the delete has been successful.<br />Deletion will fail if the policy is attached to any zones. To detach a<br />policy from a zone, see DeleteSteeringPolicyAttachment.<br />
change_compartmentexecsteeringPolicyId, region, compartmentIdIf-Match, opc-retry-token, opc-request-id, scopeMoves a steering policy into a different compartment.<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
compartmentIdstringThe OCID of the compartment the resource belongs to.
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)
steeringPolicyIdstringThe OCID of the target steering policy.
If-MatchstringThe If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value.
If-Modified-SincestringThe If-Modified-Since header field makes a GET or HEAD request method conditional on the selected representation's modification date being more recent than the date provided in the field-value. Transfer of the selected representation's data is avoided if that data has not changed.
If-None-MatchstringThe If-None-Match header field makes the request method conditional on the absence of any current representation of the target resource, when the field-value is *, or having a selected representation with an entity-tag that does not match any of those listed in the field-value.
If-Unmodified-SincestringThe If-Unmodified-Since header field makes the request method conditional on the selected representation's last modification date being earlier than or equal to the date provided in the field-value. This field accomplishes the same purpose as If-Match for cases where the user agent does not have an entity-tag for the representation.
displayNamestringThe displayName of a resource.
displayNameContainsstringThe partial displayName of a resource. Will match any resource whose name (case-insensitive) contains the provided value.
healthCheckMonitorIdstringSearch by health check monitor OCID. Will match any resource whose health check monitor ID matches the provided value.
idstringThe OCID of a resource.
lifecycleStatestringThe state of a resource.
limitinteger (int64)The maximum number of items to return in a page of the collection.
opc-request-idstringUnique 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 (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
pagestringThe value of the opc-next-page response header from the previous "List" call.
scopestringSpecifies to operate only on resources that have a matching DNS scope.
sortBystringThe field by which to sort steering policies. If unspecified, defaults to timeCreated.
sortOrderstringThe order to sort the resources.
templatestringSearch by steering template type. Will match any resource whose template type matches the provided value.
timeCreatedGreaterThanOrEqualTostring (date-time)An [RFC 3339](https:​//www.ietf.org/rfc/rfc3339.txt) timestamp that states all returned resources were created on or after the indicated time.
timeCreatedLessThanstring (date-time)An [RFC 3339](https:​//www.ietf.org/rfc/rfc3339.txt) timestamp that states all returned resources were created before the indicated time.

SELECT examples​

Gets information about the specified steering policy.<br />

SELECT
id,
answers,
compartmentId,
definedTags,
displayName,
freeformTags,
healthCheckMonitorId,
lifecycleState,
rules,
self,
template,
timeCreated,
ttl
FROM oci.dns.steering_policies
WHERE steeringPolicyId = '{{ steeringPolicyId }}' -- required
AND region = '{{ region }}' -- required
AND If-None-Match = '{{ If-None-Match }}'
AND If-Modified-Since = '{{ If-Modified-Since }}'
AND opc-request-id = '{{ opc-request-id }}'
AND scope = '{{ scope }}'
;

INSERT examples​

Creates a new steering policy in the specified compartment. For more information on<br />creating policies with templates, see [Traffic Management API Guide](/iaas/Content/TrafficManagement/Concepts/trafficmanagementapi.htm).<br />

INSERT INTO oci.dns.steering_policies (
answers,
compartmentId,
definedTags,
displayName,
freeformTags,
healthCheckMonitorId,
rules,
template,
ttl,
region,
opc-retry-token,
opc-request-id,
scope
)
SELECT
'{{ answers }}',
'{{ compartmentId }}' /* required */,
'{{ definedTags }}',
'{{ displayName }}' /* required */,
'{{ freeformTags }}',
'{{ healthCheckMonitorId }}',
'{{ rules }}',
'{{ template }}' /* required */,
{{ ttl }},
'{{ region }}',
'{{ opc-retry-token }}',
'{{ opc-request-id }}',
'{{ scope }}'
RETURNING
id,
answers,
compartmentId,
definedTags,
displayName,
freeformTags,
healthCheckMonitorId,
lifecycleState,
rules,
self,
template,
timeCreated,
ttl
;

UPDATE examples​

Updates the configuration of the specified steering policy.<br />

UPDATE oci.dns.steering_policies
SET
answers = '{{ answers }}',
definedTags = '{{ definedTags }}',
displayName = '{{ displayName }}',
freeformTags = '{{ freeformTags }}',
healthCheckMonitorId = '{{ healthCheckMonitorId }}',
rules = '{{ rules }}',
template = '{{ template }}',
ttl = {{ ttl }}
WHERE
steeringPolicyId = '{{ steeringPolicyId }}' --required
AND region = '{{ region }}' --required
AND If-Match = '{{ If-Match}}'
AND If-Unmodified-Since = '{{ If-Unmodified-Since}}'
AND opc-request-id = '{{ opc-request-id}}'
AND scope = '{{ scope}}'
RETURNING
id,
answers,
compartmentId,
definedTags,
displayName,
freeformTags,
healthCheckMonitorId,
lifecycleState,
rules,
self,
template,
timeCreated,
ttl;

DELETE examples​

Deletes the specified steering policy.<br /><br />A 204 response indicates that the delete has been successful.<br />Deletion will fail if the policy is attached to any zones. To detach a<br />policy from a zone, see DeleteSteeringPolicyAttachment.<br />

DELETE FROM oci.dns.steering_policies
WHERE steeringPolicyId = '{{ steeringPolicyId }}' --required
AND region = '{{ region }}' --required
AND If-Match = '{{ If-Match }}'
AND If-Unmodified-Since = '{{ If-Unmodified-Since }}'
AND opc-request-id = '{{ opc-request-id }}'
AND scope = '{{ scope }}'
;

Lifecycle Methods​

Moves a steering policy into a different compartment.<br />

EXEC oci.dns.steering_policies.change_compartment
@steeringPolicyId='{{ steeringPolicyId }}' --required,
@region='{{ region }}' --required,
@If-Match='{{ If-Match }}',
@opc-retry-token='{{ opc-retry-token }}',
@opc-request-id='{{ opc-request-id }}',
@scope='{{ scope }}'
@@json=
'{
"compartmentId": "{{ compartmentId }}"
}'
;