import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a Load Balancer Outbound Rule. * * > **Note:** When using this resource, the Load Balancer needs to have a FrontEnd IP Configuration and a Backend Address Pool 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: example.location, * resourceGroupName: example.name, * allocationMethod: "Static", * }); * const exampleLoadBalancer = new azure.lb.LoadBalancer("example", { * name: "TestLoadBalancer", * location: example.location, * resourceGroupName: example.name, * frontendIpConfigurations: [{ * name: "PublicIPAddress", * publicIpAddressId: examplePublicIp.id, * }], * }); * const exampleBackendAddressPool = new azure.lb.BackendAddressPool("example", { * name: "example", * loadbalancerId: exampleLoadBalancer.id, * }); * const exampleOutboundRule = new azure.lb.OutboundRule("example", { * name: "OutboundRule", * loadbalancerId: exampleLoadBalancer.id, * protocol: "Tcp", * backendAddressPoolId: exampleBackendAddressPool.id, * frontendIpConfigurations: [{ * name: "PublicIPAddress", * }], * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Network` - 2023-09-01 * * ## Import * * Load Balancer Outbound Rules can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:lb/outboundRule:OutboundRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/lb1/outboundRules/rule1 * ``` */ export declare class OutboundRule extends pulumi.CustomResource { /** * Get an existing OutboundRule 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?: OutboundRuleState, opts?: pulumi.CustomResourceOptions): OutboundRule; /** * Returns true if the given object is an instance of OutboundRule. 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 OutboundRule; /** * The number of outbound ports to be used for NAT. Defaults to `1024`. */ readonly allocatedOutboundPorts: pulumi.Output; /** * The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs. */ readonly backendAddressPoolId: pulumi.Output; /** * @deprecated This property is being deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider. */ readonly enableTcpReset: pulumi.Output; /** * One or more `frontendIpConfiguration` blocks as defined below. */ readonly frontendIpConfigurations: pulumi.Output; /** * The timeout for the TCP idle connection Defaults to `4`. */ readonly idleTimeoutInMinutes: pulumi.Output; /** * The ID of the Load Balancer in which to create the Outbound Rule. Changing this forces a new resource to be created. */ readonly loadbalancerId: pulumi.Output; /** * Specifies the name of the Outbound Rule. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`. */ readonly protocol: pulumi.Output; /** * Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. */ readonly tcpResetEnabled: pulumi.Output; /** * Create a OutboundRule 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: OutboundRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering OutboundRule resources. */ export interface OutboundRuleState { /** * The number of outbound ports to be used for NAT. Defaults to `1024`. */ allocatedOutboundPorts?: pulumi.Input; /** * The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs. */ backendAddressPoolId?: pulumi.Input; /** * @deprecated This property is being deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider. */ enableTcpReset?: pulumi.Input; /** * One or more `frontendIpConfiguration` blocks as defined below. */ frontendIpConfigurations?: pulumi.Input[]>; /** * The timeout for the TCP idle connection Defaults to `4`. */ idleTimeoutInMinutes?: pulumi.Input; /** * The ID of the Load Balancer in which to create the Outbound Rule. Changing this forces a new resource to be created. */ loadbalancerId?: pulumi.Input; /** * Specifies the name of the Outbound Rule. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`. */ protocol?: pulumi.Input; /** * Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. */ tcpResetEnabled?: pulumi.Input; } /** * The set of arguments for constructing a OutboundRule resource. */ export interface OutboundRuleArgs { /** * The number of outbound ports to be used for NAT. Defaults to `1024`. */ allocatedOutboundPorts?: pulumi.Input; /** * The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs. */ backendAddressPoolId: pulumi.Input; /** * @deprecated This property is being deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider. */ enableTcpReset?: pulumi.Input; /** * One or more `frontendIpConfiguration` blocks as defined below. */ frontendIpConfigurations?: pulumi.Input[]>; /** * The timeout for the TCP idle connection Defaults to `4`. */ idleTimeoutInMinutes?: pulumi.Input; /** * The ID of the Load Balancer in which to create the Outbound Rule. Changing this forces a new resource to be created. */ loadbalancerId: pulumi.Input; /** * Specifies the name of the Outbound Rule. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`. */ protocol: pulumi.Input; /** * Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. */ tcpResetEnabled?: pulumi.Input; }