oracle.oci.oci_dns_steering_policy (5.0.0) — module

Manage a SteeringPolicy resource in Oracle Cloud Infrastructure

| "added in version" 2.9.0 of oracle.oci"

Authors: Oracle (@oracle)

preview | supported by community

Install collection

Install with ansible-galaxy collection install oracle.oci:==5.0.0


Add to requirements.yml

  collections:
    - name: oracle.oci
      version: 5.0.0

Description

This module allows the user to create, update and delete a SteeringPolicy resource in Oracle Cloud Infrastructure

For I(state=present), creates a new steering policy in the specified compartment. For more information on creating policies with templates, see L(Traffic Management API Guide,https://docs.cloud.oracle.com/iaas/Content/TrafficManagement/Concepts/trafficmanagementapi.htm).

This resource has the following action operations in the M(oracle.oci.oci_dns_steering_policy_actions) module: change_compartment.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create steering_policy
  oci_dns_steering_policy:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    display_name: display_name_example
    template: FAILOVER

    # optional
    ttl: 56
    health_check_monitor_id: "ocid1.healthcheckmonitor.oc1..xxxxxxEXAMPLExxxxxx"
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    answers:
    - # required
      name: name_example
      rtype: rtype_example
      rdata: rdata_example

      # optional
      pool: pool_example
      is_disabled: true
    rules:
    - # required
      rule_type: FILTER

      # optional
      description: description_example
      cases:
      - # optional
        count: 56
        case_condition: case_condition_example
        answer_data:
        - # optional
          should_keep: true
          answer_condition: answer_condition_example
          value: 56
      default_answer_data:
      - # optional
        should_keep: true
        answer_condition: answer_condition_example
        value: 56
    scope: GLOBAL
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Update steering_policy
  oci_dns_steering_policy:
    # required
    steering_policy_id: "ocid1.steeringpolicy.oc1..xxxxxxEXAMPLExxxxxx"

    # optional
    display_name: display_name_example
    ttl: 56
    health_check_monitor_id: "ocid1.healthcheckmonitor.oc1..xxxxxxEXAMPLExxxxxx"
    template: FAILOVER
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    answers:
    - # required
      name: name_example
      rtype: rtype_example
      rdata: rdata_example

      # optional
      pool: pool_example
      is_disabled: true
    rules:
    - # required
      rule_type: FILTER

      # optional
      description: description_example
      cases:
      - # optional
        count: 56
        case_condition: case_condition_example
        answer_data:
        - # optional
          should_keep: true
          answer_condition: answer_condition_example
          value: 56
      default_answer_data:
      - # optional
        should_keep: true
        answer_condition: answer_condition_example
        value: 56
    if_unmodified_since: if_unmodified_since_example
    scope: GLOBAL
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Update steering_policy using name (when environment variable OCI_USE_NAME_AS_IDENTIFIER is set)
  oci_dns_steering_policy:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    display_name: display_name_example

    # optional
    ttl: 56
    health_check_monitor_id: "ocid1.healthcheckmonitor.oc1..xxxxxxEXAMPLExxxxxx"
    template: FAILOVER
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    answers:
    - # required
      name: name_example
      rtype: rtype_example
      rdata: rdata_example

      # optional
      pool: pool_example
      is_disabled: true
    rules:
    - # required
      rule_type: FILTER

      # optional
      description: description_example
      cases:
      - # optional
        count: 56
        case_condition: case_condition_example
        answer_data:
        - # optional
          should_keep: true
          answer_condition: answer_condition_example
          value: 56
      default_answer_data:
      - # optional
        should_keep: true
        answer_condition: answer_condition_example
        value: 56
    if_unmodified_since: if_unmodified_since_example
    scope: GLOBAL
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete steering_policy
  oci_dns_steering_policy:
    # required
    steering_policy_id: "ocid1.steeringpolicy.oc1..xxxxxxEXAMPLExxxxxx"
    state: absent

    # optional
    if_unmodified_since: if_unmodified_since_example
    scope: GLOBAL
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete steering_policy using name (when environment variable OCI_USE_NAME_AS_IDENTIFIER is set)
  oci_dns_steering_policy:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    display_name: display_name_example
    state: absent

Inputs

    
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.
    - This parameter is updatable.
    type: int

wait:
    default: true
    description: Whether to wait for create or delete operation to complete.
    type: bool

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.
    - This parameter is updatable.
    elements: dict
    suboptions:
      cases:
        description:
        - An array of `caseConditions`. A rule may optionally include a sequence of cases
          defining alternate configurations for how it should behave during processing
          for any given DNS query. When a rule has no sequence of `cases`, it is always
          evaluated with the same configuration during processing. When a rule has an
          empty sequence of `cases`, it is always ignored during processing. When a rule
          has a non-empty sequence of `cases`, its behavior during processing is configured
          by the first matching `case` in the sequence. When a rule has no matching cases
          the rule is ignored. A rule case with no `caseCondition` always matches. A rule
          case with a `caseCondition` matches only when that expression evaluates to true
          for the given query.
        elements: dict
        suboptions:
          answer_data:
            description:
            - An array of `SteeringPolicyFilterAnswerData` objects.
            - Applicable when rule_type is one of ['FILTER', 'WEIGHTED', 'PRIORITY']
            elements: dict
            suboptions:
              answer_condition:
                description:
                - An expression that is used to select a set of answers that match a condition.
                  For example, answers with matching pool properties.
                - Applicable when rule_type is one of ['FILTER', 'WEIGHTED', 'PRIORITY']
                type: str
              should_keep:
                description:
                - Keeps the answer only if the value is `true`.
                - Applicable when rule_type is 'FILTER'
                type: bool
              value:
                description:
                - The weight assigned to the set of selected answers. Answers with a higher
                  weight will be served more frequently. Answers can be given a value
                  between `0` and `255`.
                - Required when rule_type is one of ['WEIGHTED', 'PRIORITY']
                type: int
            type: list
          case_condition:
            description:
            - An expression that uses conditions at the time of a DNS query to indicate
              whether a case matches. Conditions may include the geographical location,
              IP subnet, or ASN the DNS query originated. **Example:** If you have an
              office that uses the subnet `192.0.2.0/24` you could use a `caseCondition`
              expression `query.client.address in ('192.0.2.0/24')` to define a case that
              matches queries from that office.
            type: str
          count:
            description:
            - 'The number of answers allowed to remain after the limit rule has been processed,
              keeping only the first of the remaining answers in the list. Example: If
              the `count` property is set to `2` and four answers remain before the limit
              rule is processed, only the first two answers in the list will remain after
              the limit rule has been processed.'
            - Required when rule_type is 'LIMIT'
            type: int
        type: list
      default_answer_data:
        description:
        - Defines a default set of answer conditions and values that are applied to an
          answer when `cases` is not defined for the rule, or a matching case does not
          have any matching `answerCondition`s in its `answerData`. `defaultAnswerData`
          is not applied if `cases` is defined and there are no matching cases. In this
          scenario, the next rule will be processed.
        - Applicable when rule_type is one of ['FILTER', 'WEIGHTED', 'PRIORITY']
        elements: dict
        suboptions:
          answer_condition:
            description:
            - An expression that is used to select a set of answers that match a condition.
              For example, answers with matching pool properties.
            - Applicable when rule_type is one of ['FILTER', 'WEIGHTED', 'PRIORITY']
            type: str
          should_keep:
            description:
            - Keeps the answer only if the value is `true`.
            - Applicable when rule_type is 'FILTER'
            type: bool
          value:
            description:
            - The weight assigned to the set of selected answers. Answers with a higher
              weight will be served more frequently. Answers can be given a value between
              `0` and `255`.
            - Required when rule_type is one of ['WEIGHTED', 'PRIORITY']
            type: int
        type: list
      default_count:
        description:
        - Defines a default count if `cases` is not defined for the rule or a matching
          case does not define `count`. `defaultCount` is **not** applied if `cases` is
          defined and there are no matching cases. In this scenario, the next rule will
          be processed. If no rules remain to be processed, the answer will be chosen
          from the remaining list of answers.
        - Applicable when rule_type is 'LIMIT'
        type: int
      description:
        description:
        - A user-defined description of the rule's purpose or behavior.
        type: str
      rule_type:
        choices:
        - FILTER
        - WEIGHTED
        - LIMIT
        - HEALTH
        - PRIORITY
        description:
        - The type of a rule determines its sorting/filtering behavior. * `FILTER` - Filters
          the list of answers based on their defined boolean data. Answers remain only
          if their `shouldKeep` value is `true`.
        - '* `HEALTH` - Removes answers from the list if their `rdata` matches a target
          in the health check monitor referenced by the steering policy and the target
          is reported down.'
        - '* `WEIGHTED` - Uses a number between 0 and 255 to determine how often an answer
          will be served in relation to other answers. Anwers with a higher weight will
          be served more frequently.'
        - '* `PRIORITY` - Uses a defined rank value of answers to determine which answer
          to serve, moving those with the lowest values to the beginning of the list without
          changing the relative order of those with the same value. Answers can be given
          a value between `0` and `255`.'
        - '* `LIMIT` - Filters answers that are too far down the list. Parameter `defaultCount`
          specifies how many answers to keep. **Example:** If `defaultCount` has a value
          of `2` and there are five answers left, when the `LIMIT` rule is processed,
          only the first two answers will remain in the list.'
        required: true
        type: str
    type: list

scope:
    choices:
    - GLOBAL
    - PRIVATE
    description:
    - Specifies to operate only on resources that have a matching DNS scope.
    - This parameter is updatable.
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - The state of the SteeringPolicy.
    - Use I(state=present) to create or update a SteeringPolicy.
    - Use I(state=absent) to delete a SteeringPolicy.
    required: false
    type: str

key_by:
    description: The list of attributes of this resource which should be used to uniquely
      identify an instance of the resource. By default, all the attributes of a resource
      are used to uniquely identify a resource.
    elements: str
    type: list

region:
    description:
    - The Oracle Cloud Infrastructure region to use for all OCI API requests. If not set,
      then the value of the OCI_REGION variable, if any, is used. This option is required
      if the region is not specified through a configuration file (See C(config_file_location)).
      Please refer to U(https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm)
      for more information on OCI regions.
    type: str

answers:
    description:
    - The set of all answers that can potentially issue from the steering policy.
    - This parameter is updatable.
    elements: dict
    suboptions:
      is_disabled:
        description:
        - Set this property to `true` to indicate that the answer is administratively
          disabled, such as when the corresponding server is down for maintenance. An
          answer's `isDisabled` property can be referenced in `answerCondition` properties
          in rules using `answer.isDisabled`.
        - "\"**Example:**\n  \\\"rules\\\": [\n    {\n      \\\"ruleType\\\": \\\"FILTER\\\
          \",\n      \\\"defaultAnswerData\\\": [\n        {\n          \\\"answerCondition\\\
          \": \\\"answer.isDisabled != true\\\",\n          \\\"shouldKeep\\\": true\n\
          \        }\n      ]\n    },\"\n"
        type: bool
      name:
        description:
        - A user-friendly name for the answer, unique within the steering policy. An answer's
          `name` property can be referenced in `answerCondition` properties of rules using
          `answer.name`.
        - '**Example:**'
        - "\" \\\"rules\\\": [\n    {\n      \\\"ruleType\\\": \\\"FILTER\\\",\n     \
          \ \\\"defaultAnswerData\\\":  [\n        {\n          \\\"answerCondition\\\"\
          : \\\"answer.name == 'server 1'\\\",\n          \\\"shouldKeep\\\": true\n \
          \       }\n      ]\n    }\n  ]\"\n"
        required: true
        type: str
      pool:
        description:
        - The freeform name of a group of one or more records in which this record is
          included, such as "LAX data center". An answer's `pool` property can be referenced
          in `answerCondition` properties of rules using `answer.pool`.
        - '**Example:**'
        - "\" \\\"rules\\\": [\n    {\n      \\\"ruleType\\\": \\\"FILTER\\\",\n     \
          \ \\\"defaultAnswerData\\\":  [\n        {\n          \\\"answerCondition\\\"\
          : \\\"answer.pool == 'US East Servers'\\\",\n          \\\"shouldKeep\\\": true\n\
          \        }\n      ]\n    }\n  ]\"\n"
        type: str
      rdata:
        description:
        - The record's data, as whitespace-delimited tokens in type-specific presentation
          format. All RDATA is normalized and the returned presentation of your RDATA
          may differ from its initial input. For more information about RDATA, see L(Supported
          DNS Resource Record Types,https://docs.cloud.oracle.com/iaas/Content/DNS/Reference/supporteddnsresource.htm).
        required: true
        type: str
      rtype:
        description:
        - The type of DNS record, such as A or CNAME. Only A, AAAA, and CNAME are supported.
          For more information, see L(Supported DNS Resource Record Types,https://docs.cloud.oracle.com/iaas/Content/DNS/Reference/supporteddnsresource.htm).
        required: true
        type: str
    type: list

tenancy:
    description:
    - OCID of your tenancy. If not set, then the value of the OCI_TENANCY variable, if
      any, is used. This option is required if the tenancy OCID is not specified through
      a configuration file (See C(config_file_location)). To get the tenancy OCID, please
      refer U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm)
    type: str

api_user:
    description:
    - The OCID of the user, on whose behalf, OCI APIs are invoked. If not set, then the
      value of the OCI_USER_ID environment variable, if any, is used. This option is required
      if the user is not specified through a configuration file (See C(config_file_location)).
      To get the user's OCID, please refer U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm).
    type: str

template:
    choices:
    - FAILOVER
    - LOAD_BALANCE
    - ROUTE_BY_GEO
    - ROUTE_BY_ASN
    - ROUTE_BY_IP
    - CUSTOM
    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 L(Traffic Management
      API Guide,https://docs.cloud.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 L(Traffic Management Geographic
      Locations,https://docs.cloud.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.'
    - Required for create using I(state=present).
    - This parameter is updatable.
    type: str

auth_type:
    choices:
    - api_key
    - instance_principal
    - instance_obo_user
    - resource_principal
    - security_token
    default: api_key
    description:
    - The type of authentication to use for making API requests. By default C(auth_type="api_key")
      based authentication is performed and the API key (see I(api_user_key_file)) in
      your config file will be used. If this 'auth_type' module option is not specified,
      the value of the OCI_ANSIBLE_AUTH_TYPE, if any, is used. Use C(auth_type="instance_principal")
      to use instance principal based authentication when running ansible playbooks within
      an OCI compute instance.
    type: str

cert_bundle:
    description:
    - The full path to a CA certificate bundle to be used for SSL verification. This will
      override the default CA certificate bundle. If not set, then the value of the OCI_ANSIBLE_CERT_BUNDLE
      variable, if any, is used.
    type: str

auth_purpose:
    choices:
    - service_principal
    description:
    - The auth purpose which can be used in conjunction with 'auth_type=instance_principal'.
      The default auth_purpose for instance_principal is None.
    type: str

defined_tags:
    description:
    - Defined tags for this resource. Each key is predefined and scoped to a namespace.
      For more information, see L(Resource Tags,https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
    - '**Example:** `{"Operations": {"CostCenter": "42"}}`'
    - This parameter is updatable.
    type: dict

display_name:
    aliases:
    - name
    description:
    - A user-friendly name for the steering policy. Does not have to be unique and can
      be changed. Avoid entering confidential information.
    - Required for create using I(state=present).
    - Required for update, delete when environment variable C(OCI_USE_NAME_AS_IDENTIFIER)
      is set.
    - This parameter is updatable when C(OCI_USE_NAME_AS_IDENTIFIER) is not set.
    type: str

force_create:
    default: false
    description: Whether to attempt non-idempotent creation of a resource. By default,
      create resource is an idempotent operation, and doesn't create the resource if it
      already exists. Setting this option to true, forcefully creates a copy of the resource,
      even if it already exists.This option is mutually exclusive with I(key_by).
    type: bool

wait_timeout:
    description: Time, in seconds, to wait when I(wait=yes). Defaults to 1200 for most
      of the services but some services might have a longer wait timeout.
    type: int

freeform_tags:
    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 L(Resource Tags,https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
    - '**Example:** `{"Department": "Finance"}`'
    - This parameter is updatable.
    type: dict

compartment_id:
    description:
    - The OCID of the compartment containing the steering policy.
    - Required for create using I(state=present).
    - Required for update when environment variable C(OCI_USE_NAME_AS_IDENTIFIER) is set.
    - Required for delete when environment variable C(OCI_USE_NAME_AS_IDENTIFIER) is set.
    type: str

api_user_key_file:
    description:
    - Full path and filename of the private key (in PEM format). If not set, then the
      value of the OCI_USER_KEY_FILE variable, if any, is used. This option is required
      if the private key is not specified through a configuration file (See C(config_file_location)).
      If the key is encrypted with a pass-phrase, the C(api_user_key_pass_phrase) option
      must also be provided.
    type: str

steering_policy_id:
    aliases:
    - id
    description:
    - The OCID of the target steering policy.
    - Required for update using I(state=present) when environment variable C(OCI_USE_NAME_AS_IDENTIFIER)
      is not set.
    - Required for delete using I(state=absent) when environment variable C(OCI_USE_NAME_AS_IDENTIFIER)
      is not set.
    type: str

config_profile_name:
    description:
    - The profile to load from the config file referenced by C(config_file_location).
      If not set, then the value of the OCI_CONFIG_PROFILE environment variable, if any,
      is used. Otherwise, defaults to the "DEFAULT" profile in C(config_file_location).
    type: str

if_unmodified_since:
    description:
    - 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.
    - This parameter is updatable.
    type: str

api_user_fingerprint:
    description:
    - Fingerprint for the key pair being used. If not set, then the value of the OCI_USER_FINGERPRINT
      environment variable, if any, is used. This option is required if the key fingerprint
      is not specified through a configuration file (See C(config_file_location)). To
      get the key pair's fingerprint value please refer U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm).
    type: str

config_file_location:
    description:
    - Path to configuration file. If not set then the value of the OCI_CONFIG_FILE environment
      variable, if any, is used. Otherwise, defaults to ~/.oci/config.
    type: str

health_check_monitor_id:
    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 L(Managing Health Checks,https://docs.cloud.oracle.com/iaas/Content/HealthChecks/Tasks/managinghealthchecks.htm).'
    - This parameter is updatable.
    type: str

api_user_key_pass_phrase:
    description:
    - Passphrase used by the key referenced in C(api_user_key_file), if it is encrypted.
      If not set, then the value of the OCI_USER_KEY_PASS_PHRASE variable, if any, is
      used. This option is required if the key passphrase is not specified through a configuration
      file (See C(config_file_location)).
    type: str

realm_specific_endpoint_template_enabled:
    description:
    - Enable/Disable realm specific endpoint template for service client. By Default,
      realm specific endpoint template is disabled. If not set, then the value of the
      OCI_REALM_SPECIFIC_SERVICE_ENDPOINT_TEMPLATE_ENABLED variable, if any, is used.
    type: bool

Outputs

steering_policy:
  contains:
    _self:
      description:
      - The canonical absolute URL of the resource.
      returned: on success
      sample: _self_example
      type: str
    answers:
      contains:
        is_disabled:
          description:
          - Set this property to `true` to indicate that the answer is administratively
            disabled, such as when the corresponding server is down for maintenance.
            An answer's `isDisabled` property can be referenced in `answerCondition`
            properties in rules using `answer.isDisabled`.
          - "\"**Example:**\n  \\\"rules\\\": [\n    {\n      \\\"ruleType\\\": \\\
            \"FILTER\\\",\n      \\\"defaultAnswerData\\\": [\n        {\n       \
            \   \\\"answerCondition\\\": \\\"answer.isDisabled != true\\\",\n    \
            \      \\\"shouldKeep\\\": true\n        }\n      ]\n    },\"\n"
          returned: on success
          sample: true
          type: bool
        name:
          description:
          - A user-friendly name for the answer, unique within the steering policy.
            An answer's `name` property can be referenced in `answerCondition` properties
            of rules using `answer.name`.
          - '**Example:**'
          - "\" \\\"rules\\\": [\n    {\n      \\\"ruleType\\\": \\\"FILTER\\\",\n\
            \      \\\"defaultAnswerData\\\":  [\n        {\n          \\\"answerCondition\\\
            \": \\\"answer.name == 'server 1'\\\",\n          \\\"shouldKeep\\\":\
            \ true\n        }\n      ]\n    }\n  ]\"\n"
          returned: on success
          sample: name_example
          type: str
        pool:
          description:
          - The freeform name of a group of one or more records in which this record
            is included, such as "LAX data center". An answer's `pool` property can
            be referenced in `answerCondition` properties of rules using `answer.pool`.
          - '**Example:**'
          - "\" \\\"rules\\\": [\n    {\n      \\\"ruleType\\\": \\\"FILTER\\\",\n\
            \      \\\"defaultAnswerData\\\":  [\n        {\n          \\\"answerCondition\\\
            \": \\\"answer.pool == 'US East Servers'\\\",\n          \\\"shouldKeep\\\
            \": true\n        }\n      ]\n    }\n  ]\"\n"
          returned: on success
          sample: pool_example
          type: str
        rdata:
          description:
          - The record's data, as whitespace-delimited tokens in type-specific presentation
            format. All RDATA is normalized and the returned presentation of your
            RDATA may differ from its initial input. For more information about RDATA,
            see L(Supported DNS Resource Record Types,https://docs.cloud.oracle.com/iaas/Content/DNS/Reference/supporteddnsresource.htm).
          returned: on success
          sample: rdata_example
          type: str
        rtype:
          description:
          - The type of DNS record, such as A or CNAME. Only A, AAAA, and CNAME are
            supported. For more information, see L(Supported DNS Resource Record Types,https://docs.cloud.oracle.com/iaas/Content/DNS/Reference/supporteddnsresource.htm).
          returned: on success
          sample: rtype_example
          type: str
      description:
      - The set of all answers that can potentially issue from the steering policy.
      returned: on success
      type: complex
    compartment_id:
      description:
      - The OCID of the compartment containing the steering policy.
      returned: on success
      sample: ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
      type: str
    defined_tags:
      description:
      - Defined tags for this resource. Each key is predefined and scoped to a namespace.
        For more information, see L(Resource Tags,https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
      - '**Example:** `{"Operations": {"CostCenter": "42"}}`'
      returned: on success
      sample:
        Operations:
          CostCenter: US
      type: dict
    display_name:
      description:
      - A user-friendly name for the steering policy. Does not have to be unique and
        can be changed. Avoid entering confidential information.
      returned: on success
      sample: display_name_example
      type: str
    freeform_tags:
      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 L(Resource
        Tags,https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
      - '**Example:** `{"Department": "Finance"}`'
      returned: on success
      sample:
        Department: Finance
      type: dict
    health_check_monitor_id:
      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 L(Managing Health Checks,https://docs.cloud.oracle.com/iaas/Content/HealthChecks/Tasks/managinghealthchecks.htm).'
      returned: on success
      sample: ocid1.healthcheckmonitor.oc1..xxxxxxEXAMPLExxxxxx
      type: str
    id:
      description:
      - The OCID of the resource.
      returned: on success
      sample: ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
      type: str
    lifecycle_state:
      description:
      - The current state of the resource.
      returned: on success
      sample: ACTIVE
      type: str
    rules:
      contains:
        cases:
          contains:
            answer_data:
              contains:
                answer_condition:
                  description:
                  - An expression that is used to select a set of answers that match
                    a condition. For example, answers with matching pool properties.
                  returned: on success
                  sample: answer_condition_example
                  type: str
                should_keep:
                  description:
                  - Keeps the answer only if the value is `true`.
                  returned: on success
                  sample: true
                  type: bool
                value:
                  description:
                  - The rank assigned to the set of answers that match the expression
                    in `answerCondition`. Answers with the lowest values move to the
                    beginning of the list without changing the relative order of those
                    with the same value. Answers can be given a value between `0`
                    and `255`.
                  returned: on success
                  sample: 56
                  type: int
              description:
              - An array of `SteeringPolicyFilterAnswerData` objects.
              returned: on success
              type: complex
            case_condition:
              description:
              - An expression that uses conditions at the time of a DNS query to indicate
                whether a case matches. Conditions may include the geographical location,
                IP subnet, or ASN the DNS query originated. **Example:** If you have
                an office that uses the subnet `192.0.2.0/24` you could use a `caseCondition`
                expression `query.client.address in ('192.0.2.0/24')` to define a
                case that matches queries from that office.
              returned: on success
              sample: case_condition_example
              type: str
            count:
              description:
              - 'The number of answers allowed to remain after the limit rule has
                been processed, keeping only the first of the remaining answers in
                the list. Example: If the `count` property is set to `2` and four
                answers remain before the limit rule is processed, only the first
                two answers in the list will remain after the limit rule has been
                processed.'
              returned: on success
              sample: 56
              type: int
          description:
          - An array of `caseConditions`. A rule may optionally include a sequence
            of cases defining alternate configurations for how it should behave during
            processing for any given DNS query. When a rule has no sequence of `cases`,
            it is always evaluated with the same configuration during processing.
            When a rule has an empty sequence of `cases`, it is always ignored during
            processing. When a rule has a non-empty sequence of `cases`, its behavior
            during processing is configured by the first matching `case` in the sequence.
            When a rule has no matching cases the rule is ignored. A rule case with
            no `caseCondition` always matches. A rule case with a `caseCondition`
            matches only when that expression evaluates to true for the given query.
          returned: on success
          type: complex
        default_answer_data:
          contains:
            answer_condition:
              description:
              - An expression that is used to select a set of answers that match a
                condition. For example, answers with matching pool properties.
              returned: on success
              sample: answer_condition_example
              type: str
            should_keep:
              description:
              - Keeps the answer only if the value is `true`.
              returned: on success
              sample: true
              type: bool
            value:
              description:
              - The rank assigned to the set of answers that match the expression
                in `answerCondition`. Answers with the lowest values move to the beginning
                of the list without changing the relative order of those with the
                same value. Answers can be given a value between `0` and `255`.
              returned: on success
              sample: 56
              type: int
          description:
          - Defines a default set of answer conditions and values that are applied
            to an answer when `cases` is not defined for the rule, or a matching case
            does not have any matching `answerCondition`s in its `answerData`. `defaultAnswerData`
            is not applied if `cases` is defined and there are no matching cases.
            In this scenario, the next rule will be processed.
          returned: on success
          type: complex
        default_count:
          description:
          - Defines a default count if `cases` is not defined for the rule or a matching
            case does not define `count`. `defaultCount` is **not** applied if `cases`
            is defined and there are no matching cases. In this scenario, the next
            rule will be processed. If no rules remain to be processed, the answer
            will be chosen from the remaining list of answers.
          returned: on success
          sample: 56
          type: int
        description:
          description:
          - A user-defined description of the rule's purpose or behavior.
          returned: on success
          sample: description_example
          type: str
        rule_type:
          description:
          - The type of a rule determines its sorting/filtering behavior. * `FILTER`
            - Filters the list of answers based on their defined boolean data. Answers
            remain only if their `shouldKeep` value is `true`.
          - '* `HEALTH` - Removes answers from the list if their `rdata` matches a
            target in the health check monitor referenced by the steering policy and
            the target is reported down.'
          - '* `WEIGHTED` - Uses a number between 0 and 255 to determine how often
            an answer will be served in relation to other answers. Anwers with a higher
            weight will be served more frequently.'
          - '* `PRIORITY` - Uses a defined rank value of answers to determine which
            answer to serve, moving those with the lowest values to the beginning
            of the list without changing the relative order of those with the same
            value. Answers can be given a value between `0` and `255`.'
          - '* `LIMIT` - Filters answers that are too far down the list. Parameter
            `defaultCount` specifies how many answers to keep. **Example:** If `defaultCount`
            has a value of `2` and there are five answers left, when the `LIMIT` rule
            is processed, only the first two answers will remain in the list.'
          returned: on success
          sample: FILTER
          type: str
      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.
      returned: on success
      type: complex
    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 L(Traffic Management API Guide,https://docs.cloud.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 L(Traffic Management Geographic
        Locations,https://docs.cloud.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.'
      returned: on success
      sample: FAILOVER
      type: str
    time_created:
      description:
      - The date and time the resource was created, expressed in RFC 3339 timestamp
        format.
      - '**Example:** `2016-07-22T17:23:59:60Z`'
      returned: on success
      sample: '2013-10-20T19:20:30+01:00'
      type: str
    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.
      returned: on success
      sample: 56
      type: int
  description:
  - Details of the SteeringPolicy resource acted upon by the current operation
  returned: on success
  sample:
    _self: _self_example
    answers:
    - is_disabled: true
      name: name_example
      pool: pool_example
      rdata: rdata_example
      rtype: rtype_example
    compartment_id: ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
    defined_tags:
      Operations:
        CostCenter: US
    display_name: display_name_example
    freeform_tags:
      Department: Finance
    health_check_monitor_id: ocid1.healthcheckmonitor.oc1..xxxxxxEXAMPLExxxxxx
    id: ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
    lifecycle_state: ACTIVE
    rules:
    - cases:
      - answer_data:
        - answer_condition: answer_condition_example
          should_keep: true
          value: 56
        case_condition: case_condition_example
        count: 56
      default_answer_data:
      - answer_condition: answer_condition_example
        should_keep: true
        value: 56
      default_count: 56
      description: description_example
      rule_type: FILTER
    template: FAILOVER
    time_created: '2013-10-20T19:20:30+01:00'
    ttl: 56
  type: complex