steering_policies
Creates, updates, deletes, gets or lists a steering_policies resource.
Overview​
| Name | steering_policies |
| Type | Resource |
| Id | oci.dns.steering_policies |
Fields​
The following fields are returned by SELECT queries:
- get
- list
A response containing a single steering policy object.
| Name | Datatype | Description |
|---|---|---|
id | string | The OCID of the resource. |
answers | array | The set of all answers that can potentially issue from the steering policy. |
compartmentId | string | The OCID of the compartment containing the steering policy. |
definedTags | object | Defined 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"}} |
displayName | string | A user-friendly name for the steering policy. Does not have to be unique and can be changed. Avoid entering confidential information. |
freeformTags | object | 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](/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"} |
healthCheckMonitorId | string | 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](/iaas/Content/HealthChecks/Tasks/managinghealthchecks.htm). |
lifecycleState | string | The current state of the resource. (ACTIVE, CREATING, DELETED, DELETING) |
rules | array | 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. |
self | string (url) | The canonical absolute URL of the resource. |
template | string | 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](/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) |
timeCreated | string (date-time) | The date and time the resource was created, expressed in RFC 3339 timestamp format. Example: 2016-07-22T17:23:59:60Z |
ttl | integer (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. |
A DNS steering policy.<br /><br />Warning: Oracle recommends that you avoid using any confidential information when you supply string values using the API.<br />
| Name | Datatype | Description |
|---|---|---|
id | string | The OCID of the resource. |
compartmentId | string | The OCID of the compartment containing the steering policy. |
definedTags | object | Defined 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"}} |
displayName | string | A user-friendly name for the steering policy. Does not have to be unique and can be changed. Avoid entering confidential information. |
freeformTags | object | 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](/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"} |
healthCheckMonitorId | string | 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](/iaas/Content/HealthChecks/Tasks/managinghealthchecks.htm). |
lifecycleState | string | The current state of the resource. (ACTIVE, CREATING, DELETED, DELETING) |
self | string (url) | The canonical absolute URL of the resource. |
template | string | 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](/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) |
timeCreated | string (date-time) | The date and time the resource was created, expressed in RFC 3339 timestamp format. Example: 2016-07-22T17:23:59:60Z |
ttl | integer (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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | steeringPolicyId, region | If-None-Match, If-Modified-Since, opc-request-id, scope | Gets information about the specified steering policy.<br /> |
list | select | compartmentId, region | opc-request-id, limit, page, id, displayName, displayNameContains, healthCheckMonitorId, timeCreatedGreaterThanOrEqualTo, timeCreatedLessThan, template, lifecycleState, sortBy, sortOrder, scope | Gets a list of all steering policies in the specified compartment.<br /> |
create | insert | region, compartmentId, displayName, template | opc-retry-token, opc-request-id, scope | 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 /> |
update | update | steeringPolicyId, region | If-Match, If-Unmodified-Since, opc-request-id, scope | Updates the configuration of the specified steering policy.<br /> |
delete | delete | steeringPolicyId, region | If-Match, If-Unmodified-Since, opc-request-id, scope | 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 /> |
change_compartment | exec | steeringPolicyId, region, compartmentId | If-Match, opc-retry-token, opc-request-id, scope | Moves 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.
| Name | Datatype | Description |
|---|---|---|
compartmentId | string | The OCID of the compartment the resource belongs to. |
region | string | OCI 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) |
steeringPolicyId | string | The OCID of the target steering policy. |
If-Match | string | The 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-Since | string | The 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-Match | string | The 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-Since | string | The 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. |
displayName | string | The displayName of a resource. |
displayNameContains | string | The partial displayName of a resource. Will match any resource whose name (case-insensitive) contains the provided value. |
healthCheckMonitorId | string | Search by health check monitor OCID. Will match any resource whose health check monitor ID matches the provided value. |
id | string | The OCID of a resource. |
lifecycleState | string | The state of a resource. |
limit | integer (int64) | The maximum number of items to return in a page of the collection. |
opc-request-id | string | Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. |
opc-retry-token | string | A 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). |
page | string | The value of the opc-next-page response header from the previous "List" call. |
scope | string | Specifies to operate only on resources that have a matching DNS scope. |
sortBy | string | The field by which to sort steering policies. If unspecified, defaults to timeCreated. |
sortOrder | string | The order to sort the resources. |
template | string | Search by steering template type. Will match any resource whose template type matches the provided value. |
timeCreatedGreaterThanOrEqualTo | string (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. |
timeCreatedLessThan | string (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​
- get
- list
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 }}'
;
Gets a list of all steering policies in the specified compartment.<br />
SELECT
id,
compartmentId,
definedTags,
displayName,
freeformTags,
healthCheckMonitorId,
lifecycleState,
self,
template,
timeCreated,
ttl
FROM oci.dns.steering_policies
WHERE compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND id = '{{ id }}'
AND displayName = '{{ displayName }}'
AND displayNameContains = '{{ displayNameContains }}'
AND healthCheckMonitorId = '{{ healthCheckMonitorId }}'
AND timeCreatedGreaterThanOrEqualTo = '{{ timeCreatedGreaterThanOrEqualTo }}'
AND timeCreatedLessThan = '{{ timeCreatedLessThan }}'
AND template = '{{ template }}'
AND lifecycleState = '{{ lifecycleState }}'
AND sortBy = '{{ sortBy }}'
AND sortOrder = '{{ sortOrder }}'
AND scope = '{{ scope }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: steering_policies
props:
- name: region
value: "{{ region }}"
description: Required parameter for the steering_policies resource.
- name: answers
description: |
The set of all answers that can potentially issue from the steering policy.
value:
- isDisabled: {{ isDisabled }}
name: "{{ name }}"
pool: "{{ pool }}"
rdata: "{{ rdata }}"
rtype: "{{ rtype }}"
- name: compartmentId
value: "{{ compartmentId }}"
description: |
The OCID of the compartment containing the steering policy.
- name: definedTags
value: "{{ definedTags }}"
description: |
Defined 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"}}`
- name: displayName
value: "{{ displayName }}"
description: |
A user-friendly name for the steering policy. Does not have to be unique and can be changed.
Avoid entering confidential information.
- name: freeformTags
value: "{{ freeformTags }}"
description: |
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](/Content/General/Concepts/resourcetags.htm).
**Example:** `{"Department": "Finance"}`
- name: healthCheckMonitorId
value: "{{ healthCheckMonitorId }}"
description: |
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](/iaas/Content/HealthChecks/Tasks/managinghealthchecks.htm).
- name: rules
description: |
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.
value:
- description: "{{ description }}"
ruleType: "{{ ruleType }}"
- name: template
value: "{{ template }}"
description: |
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](/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.
valid_values: ['FAILOVER', 'LOAD_BALANCE', 'ROUTE_BY_GEO', 'ROUTE_BY_ASN', 'ROUTE_BY_IP', 'CUSTOM']
- name: ttl
value: {{ ttl }}
description: |
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.
default: 30
- name: opc-retry-token
value: "{{ opc-retry-token }}"
description: A 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).
description: A 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).
- name: opc-request-id
value: "{{ opc-request-id }}"
description: Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
description: Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
- name: scope
value: "{{ scope }}"
description: Specifies to operate only on resources that have a matching DNS scope.
description: Specifies to operate only on resources that have a matching DNS scope.
UPDATE examples​
- update
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​
- delete
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​
- change_compartment
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 }}"
}'
;