import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * This resource provides the Steering Policy resource in Oracle Cloud Infrastructure DNS service. * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/dns/latest/SteeringPolicy * * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/dns * * Creates a new steering policy in the specified compartment. For more information on * creating policies with templates, see [Traffic Management API Guide](https://docs.cloud.oracle.com/iaas/Content/TrafficManagement/Concepts/trafficmanagementapi.htm). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as oci from "@pulumi/oci"; * * const testSteeringPolicy = new oci.dns.SteeringPolicy("test_steering_policy", { * compartmentId: compartmentId, * displayName: steeringPolicyDisplayName, * template: steeringPolicyTemplate, * answers: [{ * name: steeringPolicyAnswersName, * rdata: steeringPolicyAnswersRdata, * rtype: steeringPolicyAnswersRtype, * isDisabled: steeringPolicyAnswersIsDisabled === "true", * pool: steeringPolicyAnswersPool, * }], * definedTags: steeringPolicyDefinedTags, * freeformTags: steeringPolicyFreeformTags, * healthCheckMonitorId: testHttpMonitor.id, * rules: [{ * ruleType: steeringPolicyRulesRuleType, * cases: [{ * answerDatas: [{ * answerCondition: steeringPolicyRulesCasesAnswerDataAnswerCondition, * shouldKeep: steeringPolicyRulesCasesAnswerDataShouldKeep === "true", * value: Number(steeringPolicyRulesCasesAnswerDataValue), * }], * caseCondition: steeringPolicyRulesCasesCaseCondition, * count: Number(steeringPolicyRulesCasesCount), * }], * defaultAnswerDatas: [{ * answerCondition: steeringPolicyRulesDefaultAnswerDataAnswerCondition, * shouldKeep: steeringPolicyRulesDefaultAnswerDataShouldKeep === "true", * value: Number(steeringPolicyRulesDefaultAnswerDataValue), * }], * defaultCount: Number(steeringPolicyRulesDefaultCount), * description: steeringPolicyRulesDescription, * }], * ttl: Number(steeringPolicyTtl), * }); * ``` * * ## Import * * SteeringPolicies can be imported using the `id`, e.g. * * ```sh * $ pulumi import oci:Dns/steeringPolicy:SteeringPolicy test_steering_policy "id" * ``` */ export declare class SteeringPolicy extends pulumi.CustomResource { /** * Get an existing SteeringPolicy resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: SteeringPolicyState, opts?: pulumi.CustomResourceOptions): SteeringPolicy; /** * Returns true if the given object is an instance of SteeringPolicy. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is SteeringPolicy; /** * The set of all answers that can potentially issue from the steering policy. */ readonly answers: pulumi.Output; /** * (Updatable) The OCID of the compartment containing the steering policy. */ readonly compartmentId: pulumi.Output; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). */ readonly definedTags: pulumi.Output<{ [key: string]: string; }>; /** * (Updatable) A user-friendly name for the steering policy. Does not have to be unique and can be changed. Avoid entering confidential information. */ readonly displayName: pulumi.Output; /** * (Updatable) 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). */ readonly freeformTags: pulumi.Output<{ [key: string]: string; }>; /** * (Updatable) 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.cloud.oracle.com/iaas/Content/HealthChecks/Tasks/managinghealthchecks.htm). */ readonly healthCheckMonitorId: pulumi.Output; /** * 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. */ readonly rules: pulumi.Output; /** * The canonical absolute URL of the resource. */ readonly self: pulumi.Output; /** * The current state of the resource. */ readonly state: pulumi.Output; /** * (Updatable) 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.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 [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. */ readonly template: pulumi.Output; /** * The date and time the resource was created, expressed in RFC 3339 timestamp format. */ readonly timeCreated: pulumi.Output; /** * (Updatable) 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. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ readonly ttl: pulumi.Output; /** * Create a SteeringPolicy resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: SteeringPolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering SteeringPolicy resources. */ export interface SteeringPolicyState { /** * The set of all answers that can potentially issue from the steering policy. */ answers?: pulumi.Input[] | undefined>; /** * (Updatable) The OCID of the compartment containing the steering policy. */ compartmentId?: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) A user-friendly name for the steering policy. Does not have to be unique and can be changed. Avoid entering confidential information. */ displayName?: pulumi.Input; /** * (Updatable) 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) 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.cloud.oracle.com/iaas/Content/HealthChecks/Tasks/managinghealthchecks.htm). */ healthCheckMonitorId?: pulumi.Input; /** * 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. */ rules?: pulumi.Input[] | undefined>; /** * The canonical absolute URL of the resource. */ self?: pulumi.Input; /** * The current state of the resource. */ state?: pulumi.Input; /** * (Updatable) 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.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 [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. */ template?: pulumi.Input; /** * The date and time the resource was created, expressed in RFC 3339 timestamp format. */ timeCreated?: pulumi.Input; /** * (Updatable) 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. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ ttl?: pulumi.Input; } /** * The set of arguments for constructing a SteeringPolicy resource. */ export interface SteeringPolicyArgs { /** * The set of all answers that can potentially issue from the steering policy. */ answers?: pulumi.Input[] | undefined>; /** * (Updatable) The OCID of the compartment containing the steering policy. */ compartmentId: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) A user-friendly name for the steering policy. Does not have to be unique and can be changed. Avoid entering confidential information. */ displayName: pulumi.Input; /** * (Updatable) 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) 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.cloud.oracle.com/iaas/Content/HealthChecks/Tasks/managinghealthchecks.htm). */ healthCheckMonitorId?: pulumi.Input; /** * 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. */ rules?: pulumi.Input[] | undefined>; /** * (Updatable) 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.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 [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. */ template: pulumi.Input; /** * (Updatable) 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. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ ttl?: pulumi.Input; } //# sourceMappingURL=steeringPolicy.d.ts.map