import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "../types";
/**
 * Manages an ELB L7 Rule resource within HuaweiCloud.
 *
 * ## Example Usage
 * ### Create by value
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as pulumi from "@huaweicloudos/pulumi";
 *
 * const config = new pulumi.Config();
 * const l7policyId = config.requireObject("l7policyId");
 * const l7rule1 = new huaweicloud.dedicatedelb.L7rule("l7rule1", {
 *     l7policyId: l7policyId,
 *     type: "PATH",
 *     compareType: "EQUAL_TO",
 *     value: "/api",
 * });
 * ```
 * ### Create by conditions and type is HOST_NAME
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as pulumi from "@huaweicloudos/pulumi";
 *
 * const config = new pulumi.Config();
 * const l7policyId = config.requireObject("l7policyId");
 * const l7rule1 = new huaweicloud.dedicatedelb.L7rule("l7rule1", {
 *     l7policyId: l7policyId,
 *     type: "HOST_NAME",
 *     compareType: "EQUAL_TO",
 *     conditions: [{
 *         value: "test.com",
 *     }],
 * });
 * ```
 * ### Create by conditions and type is HEADER
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as pulumi from "@huaweicloudos/pulumi";
 *
 * const config = new pulumi.Config();
 * const l7policyId = config.requireObject("l7policyId");
 * const l7rule1 = new huaweicloud.dedicatedelb.L7rule("l7rule1", {
 *     l7policyId: l7policyId,
 *     type: "HEADER",
 *     compareType: "EQUAL_TO",
 *     conditions: [{
 *         key: "testKey",
 *         value: "testValue",
 *     }],
 * });
 * ```
 * ### Create by conditions and type is SOURCE_IP
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as pulumi from "@huaweicloudos/pulumi";
 *
 * const config = new pulumi.Config();
 * const l7policyId = config.requireObject("l7policyId");
 * const l7rule1 = new huaweicloud.dedicatedelb.L7rule("l7rule1", {
 *     l7policyId: l7policyId,
 *     type: "SOURCE_IP",
 *     compareType: "EQUAL_TO",
 *     conditions: [{
 *         value: "192.168.0.2/32",
 *     }],
 * });
 * ```
 *
 * ## Import
 *
 * ELB L7 rule can be imported using the `l7policy_id` and `id` separated by a slash, e.g. bash
 *
 * ```sh
 *  $ pulumi import huaweicloud:DedicatedElb/l7rule:L7rule rule_1 <l7policy_id>/<id>
 * ```
 */
export declare class L7rule extends pulumi.CustomResource {
    /**
     * Get an existing L7rule 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<pulumi.ID>, state?: L7ruleState, opts?: pulumi.CustomResourceOptions): L7rule;
    /**
     * Returns true if the given object is an instance of L7rule.  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 L7rule;
    /**
     * Specifies how requests are matched with the forwarding rule. Value options:
     * + **EQUAL_TO**: Exact match.
     * + **REGEX**: Regular expression match.
     * + **STARTS_WITH**: Prefix match.
     */
    readonly compareType: pulumi.Output<string>;
    /**
     * Specifies the matching conditions of the forwarding rule. This parameter is available
     * only when `enhanceL7policyEnable` of the listener is set to **true**. If it is specified, parameter `value` will
     * not take effect, and the value will contain all conditions configured for the forwarding rule. The keys in the list
     * must be the same, whereas each value must be unique.
     * The condition structure is documented below.
     */
    readonly conditions: pulumi.Output<outputs.DedicatedElb.L7ruleCondition[]>;
    /**
     * The create time of the L7 Rule.
     */
    readonly createdAt: pulumi.Output<string>;
    /**
     * Specifies the ID of the L7 Policy. Changing this creates a new L7 Rule.
     */
    readonly l7policyId: pulumi.Output<string>;
    /**
     * The region in which to create the L7 Rule resource. If omitted, the
     * provider-level region will be used. Changing this creates a new L7 Rule.
     */
    readonly region: pulumi.Output<string>;
    /**
     * Specifies the L7 Rule type. Value options:
     * + **HOST_NAME**: A domain name will be used for matching.
     * + **PATH**: A URL will be used for matching.
     * + **METHOD**: An HTTP request method will be used for matching.
     * + **HEADER**: The request header will be used for matching.
     * + **QUERY_STRING**: A query string will be used for matching.
     * + **SOURCE_IP**: The source IP address will be used for matching.
     * + **COOKIE**: The cookie will be used for matching.
     */
    readonly type: pulumi.Output<string>;
    /**
     * The update time of the L7 Rule.
     */
    readonly updatedAt: pulumi.Output<string>;
    /**
     * Specifies the value of the match item.
     * + If `type` is set to **HOST_NAME**, it indicates the domain name, which can contain 1 to 128 characters, including
     * letters, digits, hyphens (-), periods (.), and asterisks (), and must start with a letter, digit, or asterisk ().
     * If you want to use a wildcard domain name, enter an asterisk (*) as the leftmost label of the domain name.
     * + If `type` is set to **PATH**, it indicates the request path, which can contain 1 to 128 characters. If
     * `compareType` is set to **STARTS_WITH** or **EQUAL_TO** for the forwarding rule, the value must start with a
     * slash (/) and can contain only letters, digits, and special characters _~';@^-%#&$.*+?,=!:|/()[]{}.
     * + If `type` is set to **HEADER**, it indicates the value of the HTTP header parameter. The value can contain 1 to 128
     * characters. Asterisks (*) and question marks (?)are allowed, but spaces and double quotation marks are not allowed.
     * An asterisk can match zero or more characters, and a question mark can match 1 character.
     * + If `type` is set to **QUERY_STRING**, it indicates the value of the query parameter. The value is case-sensitive
     * and can contain 1 to 128 characters. Spaces, square brackets ([]), curly brackets ({}), angle brackets (<>),
     * backslashes (), double quotation marks (""), pound signs (#), ampersands (&), vertical bars (|), percent signs (%),
     * and tildes (~) are not supported. Asterisks (*)and question marks (?) are allowed. An asterisk can match zero or
     * more characters, and a question mark can match 1 character.
     * + If `type` is set to **METHOD**, it indicates the HTTP method. The value can be **GET**, **PUT**, **POST**,
     * **DELETE**, **PATCH**, **HEAD**, or **OPTIONS**.
     * + If `type` is set to **SOURCE_IP**, it indicates the source IP address of the request. The value is an **IPv4** or
     * **IPv6** CIDR block, for example, 192.168.0.2/32 or 2049::49/64.
     */
    readonly value: pulumi.Output<string>;
    /**
     * Create a L7rule 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: L7ruleArgs, opts?: pulumi.CustomResourceOptions);
}
/**
 * Input properties used for looking up and filtering L7rule resources.
 */
export interface L7ruleState {
    /**
     * Specifies how requests are matched with the forwarding rule. Value options:
     * + **EQUAL_TO**: Exact match.
     * + **REGEX**: Regular expression match.
     * + **STARTS_WITH**: Prefix match.
     */
    compareType?: pulumi.Input<string>;
    /**
     * Specifies the matching conditions of the forwarding rule. This parameter is available
     * only when `enhanceL7policyEnable` of the listener is set to **true**. If it is specified, parameter `value` will
     * not take effect, and the value will contain all conditions configured for the forwarding rule. The keys in the list
     * must be the same, whereas each value must be unique.
     * The condition structure is documented below.
     */
    conditions?: pulumi.Input<pulumi.Input<inputs.DedicatedElb.L7ruleCondition>[]>;
    /**
     * The create time of the L7 Rule.
     */
    createdAt?: pulumi.Input<string>;
    /**
     * Specifies the ID of the L7 Policy. Changing this creates a new L7 Rule.
     */
    l7policyId?: pulumi.Input<string>;
    /**
     * The region in which to create the L7 Rule resource. If omitted, the
     * provider-level region will be used. Changing this creates a new L7 Rule.
     */
    region?: pulumi.Input<string>;
    /**
     * Specifies the L7 Rule type. Value options:
     * + **HOST_NAME**: A domain name will be used for matching.
     * + **PATH**: A URL will be used for matching.
     * + **METHOD**: An HTTP request method will be used for matching.
     * + **HEADER**: The request header will be used for matching.
     * + **QUERY_STRING**: A query string will be used for matching.
     * + **SOURCE_IP**: The source IP address will be used for matching.
     * + **COOKIE**: The cookie will be used for matching.
     */
    type?: pulumi.Input<string>;
    /**
     * The update time of the L7 Rule.
     */
    updatedAt?: pulumi.Input<string>;
    /**
     * Specifies the value of the match item.
     * + If `type` is set to **HOST_NAME**, it indicates the domain name, which can contain 1 to 128 characters, including
     * letters, digits, hyphens (-), periods (.), and asterisks (), and must start with a letter, digit, or asterisk ().
     * If you want to use a wildcard domain name, enter an asterisk (*) as the leftmost label of the domain name.
     * + If `type` is set to **PATH**, it indicates the request path, which can contain 1 to 128 characters. If
     * `compareType` is set to **STARTS_WITH** or **EQUAL_TO** for the forwarding rule, the value must start with a
     * slash (/) and can contain only letters, digits, and special characters _~';@^-%#&$.*+?,=!:|/()[]{}.
     * + If `type` is set to **HEADER**, it indicates the value of the HTTP header parameter. The value can contain 1 to 128
     * characters. Asterisks (*) and question marks (?)are allowed, but spaces and double quotation marks are not allowed.
     * An asterisk can match zero or more characters, and a question mark can match 1 character.
     * + If `type` is set to **QUERY_STRING**, it indicates the value of the query parameter. The value is case-sensitive
     * and can contain 1 to 128 characters. Spaces, square brackets ([]), curly brackets ({}), angle brackets (<>),
     * backslashes (), double quotation marks (""), pound signs (#), ampersands (&), vertical bars (|), percent signs (%),
     * and tildes (~) are not supported. Asterisks (*)and question marks (?) are allowed. An asterisk can match zero or
     * more characters, and a question mark can match 1 character.
     * + If `type` is set to **METHOD**, it indicates the HTTP method. The value can be **GET**, **PUT**, **POST**,
     * **DELETE**, **PATCH**, **HEAD**, or **OPTIONS**.
     * + If `type` is set to **SOURCE_IP**, it indicates the source IP address of the request. The value is an **IPv4** or
     * **IPv6** CIDR block, for example, 192.168.0.2/32 or 2049::49/64.
     */
    value?: pulumi.Input<string>;
}
/**
 * The set of arguments for constructing a L7rule resource.
 */
export interface L7ruleArgs {
    /**
     * Specifies how requests are matched with the forwarding rule. Value options:
     * + **EQUAL_TO**: Exact match.
     * + **REGEX**: Regular expression match.
     * + **STARTS_WITH**: Prefix match.
     */
    compareType: pulumi.Input<string>;
    /**
     * Specifies the matching conditions of the forwarding rule. This parameter is available
     * only when `enhanceL7policyEnable` of the listener is set to **true**. If it is specified, parameter `value` will
     * not take effect, and the value will contain all conditions configured for the forwarding rule. The keys in the list
     * must be the same, whereas each value must be unique.
     * The condition structure is documented below.
     */
    conditions?: pulumi.Input<pulumi.Input<inputs.DedicatedElb.L7ruleCondition>[]>;
    /**
     * Specifies the ID of the L7 Policy. Changing this creates a new L7 Rule.
     */
    l7policyId: pulumi.Input<string>;
    /**
     * The region in which to create the L7 Rule resource. If omitted, the
     * provider-level region will be used. Changing this creates a new L7 Rule.
     */
    region?: pulumi.Input<string>;
    /**
     * Specifies the L7 Rule type. Value options:
     * + **HOST_NAME**: A domain name will be used for matching.
     * + **PATH**: A URL will be used for matching.
     * + **METHOD**: An HTTP request method will be used for matching.
     * + **HEADER**: The request header will be used for matching.
     * + **QUERY_STRING**: A query string will be used for matching.
     * + **SOURCE_IP**: The source IP address will be used for matching.
     * + **COOKIE**: The cookie will be used for matching.
     */
    type: pulumi.Input<string>;
    /**
     * Specifies the value of the match item.
     * + If `type` is set to **HOST_NAME**, it indicates the domain name, which can contain 1 to 128 characters, including
     * letters, digits, hyphens (-), periods (.), and asterisks (), and must start with a letter, digit, or asterisk ().
     * If you want to use a wildcard domain name, enter an asterisk (*) as the leftmost label of the domain name.
     * + If `type` is set to **PATH**, it indicates the request path, which can contain 1 to 128 characters. If
     * `compareType` is set to **STARTS_WITH** or **EQUAL_TO** for the forwarding rule, the value must start with a
     * slash (/) and can contain only letters, digits, and special characters _~';@^-%#&$.*+?,=!:|/()[]{}.
     * + If `type` is set to **HEADER**, it indicates the value of the HTTP header parameter. The value can contain 1 to 128
     * characters. Asterisks (*) and question marks (?)are allowed, but spaces and double quotation marks are not allowed.
     * An asterisk can match zero or more characters, and a question mark can match 1 character.
     * + If `type` is set to **QUERY_STRING**, it indicates the value of the query parameter. The value is case-sensitive
     * and can contain 1 to 128 characters. Spaces, square brackets ([]), curly brackets ({}), angle brackets (<>),
     * backslashes (), double quotation marks (""), pound signs (#), ampersands (&), vertical bars (|), percent signs (%),
     * and tildes (~) are not supported. Asterisks (*)and question marks (?) are allowed. An asterisk can match zero or
     * more characters, and a question mark can match 1 character.
     * + If `type` is set to **METHOD**, it indicates the HTTP method. The value can be **GET**, **PUT**, **POST**,
     * **DELETE**, **PATCH**, **HEAD**, or **OPTIONS**.
     * + If `type` is set to **SOURCE_IP**, it indicates the source IP address of the request. The value is an **IPv4** or
     * **IPv6** CIDR block, for example, 192.168.0.2/32 or 2049::49/64.
     */
    value?: pulumi.Input<string>;
}
