import * as pulumi from "@pulumi/pulumi";
/**
 * Manages a Load Balancer Rule.
 *
 * > **Note:** When using this resource, the Load Balancer needs to have a FrontEnd IP Configuration Attached
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "LoadBalancerRG",
 *     location: "West Europe",
 * });
 * const examplePublicIp = new azure.network.PublicIp("example", {
 *     name: "PublicIPForLB",
 *     location: "West US",
 *     resourceGroupName: example.name,
 *     allocationMethod: "Static",
 * });
 * const exampleLoadBalancer = new azure.lb.LoadBalancer("example", {
 *     name: "TestLoadBalancer",
 *     location: "West US",
 *     resourceGroupName: example.name,
 *     frontendIpConfigurations: [{
 *         name: "PublicIPAddress",
 *         publicIpAddressId: examplePublicIp.id,
 *     }],
 * });
 * const exampleRule = new azure.lb.Rule("example", {
 *     loadbalancerId: exampleLoadBalancer.id,
 *     name: "LBRule",
 *     protocol: "Tcp",
 *     frontendPort: 3389,
 *     backendPort: 3389,
 *     frontendIpConfigurationName: "PublicIPAddress",
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.Network` - 2023-09-01
 *
 * ## Import
 *
 * Load Balancer Rules can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:lb/rule:Rule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/lb1/loadBalancingRules/rule1
 * ```
 */
export declare class Rule extends pulumi.CustomResource {
    /**
     * Get an existing Rule 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?: RuleState, opts?: pulumi.CustomResourceOptions): Rule;
    /**
     * Returns true if the given object is an instance of Rule.  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 Rule;
    /**
     * A list of reference to a Backend Address Pool over which this Load Balancing Rule operates.
     *
     * > **Note:** In most cases users can only set one Backend Address Pool ID in the `backendAddressPoolIds`. Especially, when the sku of the LB is `Gateway`, users can set up to two IDs in the `backendAddressPoolIds`.
     */
    readonly backendAddressPoolIds: pulumi.Output<string[] | undefined>;
    /**
     * The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive. A port of `0` means "Any Port".
     */
    readonly backendPort: pulumi.Output<number>;
    /**
     * Is snat enabled for this Load Balancer Rule? Default `false`.
     */
    readonly disableOutboundSnat: pulumi.Output<boolean | undefined>;
    /**
     * @deprecated This field is deprecated in favour of `floatingIpEnabled` and will be removed in version 5.0 of the provider.
     */
    readonly enableFloatingIp: pulumi.Output<boolean>;
    /**
     * @deprecated This field is deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider.
     */
    readonly enableTcpReset: pulumi.Output<boolean>;
    /**
     * Are the Floating IPs enabled for this Load Balancer Rule? A "floating" IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`.
     */
    readonly floatingIpEnabled: pulumi.Output<boolean>;
    readonly frontendIpConfigurationId: pulumi.Output<string>;
    /**
     * The name of the frontend IP configuration to which the rule is associated.
     */
    readonly frontendIpConfigurationName: pulumi.Output<string>;
    /**
     * The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 0 and 65534, inclusive. A port of `0` means "Any Port".
     */
    readonly frontendPort: pulumi.Output<number>;
    /**
     * Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `100` minutes. Defaults to `4` minutes.
     */
    readonly idleTimeoutInMinutes: pulumi.Output<number | undefined>;
    /**
     * Specifies the load balancing distribution type to be used by the Load Balancer. Possible values are `Default`, `SourceIP` and `SourceIPProtocol`. Defaults to `Default.`
     * * `Default` – The load balancer is configured to use a 5 tuple hash to map traffic to available servers.
     * * `SourceIP` – The load balancer is configured to use a 2 tuple hash to map traffic to available servers.
     * * `SourceIPProtocol` – The load balancer is configured to use a 3 tuple hash to map traffic to available servers.
     *
     * > **Note:** In the portal, this is known as Session Persistence where the options are `None`, `Client IP` and `Client IP and Protocol` respectively.
     */
    readonly loadDistribution: pulumi.Output<string | undefined>;
    /**
     * The ID of the Load Balancer in which to create the Rule. Changing this forces a new resource to be created.
     */
    readonly loadbalancerId: pulumi.Output<string>;
    /**
     * Specifies the name of the LB Rule. Changing this forces a new resource to be created.
     */
    readonly name: pulumi.Output<string>;
    /**
     * A reference to a Probe used by this Load Balancing Rule.
     */
    readonly probeId: pulumi.Output<string | undefined>;
    /**
     * The transport protocol for the external endpoint. Possible values are `Tcp`, `Udp` or `All`.
     */
    readonly protocol: pulumi.Output<string>;
    /**
     * Is TCP Reset enabled for this Load Balancer Rule?
     */
    readonly tcpResetEnabled: pulumi.Output<boolean>;
    /**
     * Create a Rule 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: RuleArgs, opts?: pulumi.CustomResourceOptions);
}
/**
 * Input properties used for looking up and filtering Rule resources.
 */
export interface RuleState {
    /**
     * A list of reference to a Backend Address Pool over which this Load Balancing Rule operates.
     *
     * > **Note:** In most cases users can only set one Backend Address Pool ID in the `backendAddressPoolIds`. Especially, when the sku of the LB is `Gateway`, users can set up to two IDs in the `backendAddressPoolIds`.
     */
    backendAddressPoolIds?: pulumi.Input<pulumi.Input<string>[] | undefined>;
    /**
     * The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive. A port of `0` means "Any Port".
     */
    backendPort?: pulumi.Input<number | undefined>;
    /**
     * Is snat enabled for this Load Balancer Rule? Default `false`.
     */
    disableOutboundSnat?: pulumi.Input<boolean | undefined>;
    /**
     * @deprecated This field is deprecated in favour of `floatingIpEnabled` and will be removed in version 5.0 of the provider.
     */
    enableFloatingIp?: pulumi.Input<boolean | undefined>;
    /**
     * @deprecated This field is deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider.
     */
    enableTcpReset?: pulumi.Input<boolean | undefined>;
    /**
     * Are the Floating IPs enabled for this Load Balancer Rule? A "floating" IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`.
     */
    floatingIpEnabled?: pulumi.Input<boolean | undefined>;
    frontendIpConfigurationId?: pulumi.Input<string | undefined>;
    /**
     * The name of the frontend IP configuration to which the rule is associated.
     */
    frontendIpConfigurationName?: pulumi.Input<string | undefined>;
    /**
     * The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 0 and 65534, inclusive. A port of `0` means "Any Port".
     */
    frontendPort?: pulumi.Input<number | undefined>;
    /**
     * Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `100` minutes. Defaults to `4` minutes.
     */
    idleTimeoutInMinutes?: pulumi.Input<number | undefined>;
    /**
     * Specifies the load balancing distribution type to be used by the Load Balancer. Possible values are `Default`, `SourceIP` and `SourceIPProtocol`. Defaults to `Default.`
     * * `Default` – The load balancer is configured to use a 5 tuple hash to map traffic to available servers.
     * * `SourceIP` – The load balancer is configured to use a 2 tuple hash to map traffic to available servers.
     * * `SourceIPProtocol` – The load balancer is configured to use a 3 tuple hash to map traffic to available servers.
     *
     * > **Note:** In the portal, this is known as Session Persistence where the options are `None`, `Client IP` and `Client IP and Protocol` respectively.
     */
    loadDistribution?: pulumi.Input<string | undefined>;
    /**
     * The ID of the Load Balancer in which to create the Rule. Changing this forces a new resource to be created.
     */
    loadbalancerId?: pulumi.Input<string | undefined>;
    /**
     * Specifies the name of the LB Rule. Changing this forces a new resource to be created.
     */
    name?: pulumi.Input<string | undefined>;
    /**
     * A reference to a Probe used by this Load Balancing Rule.
     */
    probeId?: pulumi.Input<string | undefined>;
    /**
     * The transport protocol for the external endpoint. Possible values are `Tcp`, `Udp` or `All`.
     */
    protocol?: pulumi.Input<string | undefined>;
    /**
     * Is TCP Reset enabled for this Load Balancer Rule?
     */
    tcpResetEnabled?: pulumi.Input<boolean | undefined>;
}
/**
 * The set of arguments for constructing a Rule resource.
 */
export interface RuleArgs {
    /**
     * A list of reference to a Backend Address Pool over which this Load Balancing Rule operates.
     *
     * > **Note:** In most cases users can only set one Backend Address Pool ID in the `backendAddressPoolIds`. Especially, when the sku of the LB is `Gateway`, users can set up to two IDs in the `backendAddressPoolIds`.
     */
    backendAddressPoolIds?: pulumi.Input<pulumi.Input<string>[] | undefined>;
    /**
     * The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive. A port of `0` means "Any Port".
     */
    backendPort: pulumi.Input<number>;
    /**
     * Is snat enabled for this Load Balancer Rule? Default `false`.
     */
    disableOutboundSnat?: pulumi.Input<boolean | undefined>;
    /**
     * @deprecated This field is deprecated in favour of `floatingIpEnabled` and will be removed in version 5.0 of the provider.
     */
    enableFloatingIp?: pulumi.Input<boolean | undefined>;
    /**
     * @deprecated This field is deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider.
     */
    enableTcpReset?: pulumi.Input<boolean | undefined>;
    /**
     * Are the Floating IPs enabled for this Load Balancer Rule? A "floating" IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`.
     */
    floatingIpEnabled?: pulumi.Input<boolean | undefined>;
    /**
     * The name of the frontend IP configuration to which the rule is associated.
     */
    frontendIpConfigurationName: pulumi.Input<string>;
    /**
     * The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 0 and 65534, inclusive. A port of `0` means "Any Port".
     */
    frontendPort: pulumi.Input<number>;
    /**
     * Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `100` minutes. Defaults to `4` minutes.
     */
    idleTimeoutInMinutes?: pulumi.Input<number | undefined>;
    /**
     * Specifies the load balancing distribution type to be used by the Load Balancer. Possible values are `Default`, `SourceIP` and `SourceIPProtocol`. Defaults to `Default.`
     * * `Default` – The load balancer is configured to use a 5 tuple hash to map traffic to available servers.
     * * `SourceIP` – The load balancer is configured to use a 2 tuple hash to map traffic to available servers.
     * * `SourceIPProtocol` – The load balancer is configured to use a 3 tuple hash to map traffic to available servers.
     *
     * > **Note:** In the portal, this is known as Session Persistence where the options are `None`, `Client IP` and `Client IP and Protocol` respectively.
     */
    loadDistribution?: pulumi.Input<string | undefined>;
    /**
     * The ID of the Load Balancer in which to create the Rule. Changing this forces a new resource to be created.
     */
    loadbalancerId: pulumi.Input<string>;
    /**
     * Specifies the name of the LB Rule. Changing this forces a new resource to be created.
     */
    name?: pulumi.Input<string | undefined>;
    /**
     * A reference to a Probe used by this Load Balancing Rule.
     */
    probeId?: pulumi.Input<string | undefined>;
    /**
     * The transport protocol for the external endpoint. Possible values are `Tcp`, `Udp` or `All`.
     */
    protocol: pulumi.Input<string>;
    /**
     * Is TCP Reset enabled for this Load Balancer Rule?
     */
    tcpResetEnabled?: pulumi.Input<boolean | undefined>;
}
//# sourceMappingURL=rule.d.ts.map