We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.lb.getLBOutboundRule
Explore with Pulumi AI
Use this data source to access information about an existing Load Balancer Outbound Rule.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.lb.getLBOutboundRule({
    name: "existing_lb_outbound_rule",
    loadbalancerId: "existing_load_balancer_id",
});
export const id = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.lb.get_lb_outbound_rule(name="existing_lb_outbound_rule",
    loadbalancer_id="existing_load_balancer_id")
pulumi.export("id", example.id)
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/lb"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := lb.GetLBOutboundRule(ctx, &lb.GetLBOutboundRuleArgs{
			Name:           "existing_lb_outbound_rule",
			LoadbalancerId: "existing_load_balancer_id",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("id", example.Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.Lb.GetLBOutboundRule.Invoke(new()
    {
        Name = "existing_lb_outbound_rule",
        LoadbalancerId = "existing_load_balancer_id",
    });
    return new Dictionary<string, object?>
    {
        ["id"] = example.Apply(getLBOutboundRuleResult => getLBOutboundRuleResult.Id),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.lb.LbFunctions;
import com.pulumi.azure.lb.inputs.GetLBOutboundRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var example = LbFunctions.getLBOutboundRule(GetLBOutboundRuleArgs.builder()
            .name("existing_lb_outbound_rule")
            .loadbalancerId("existing_load_balancer_id")
            .build());
        ctx.export("id", example.applyValue(getLBOutboundRuleResult -> getLBOutboundRuleResult.id()));
    }
}
variables:
  example:
    fn::invoke:
      function: azure:lb:getLBOutboundRule
      arguments:
        name: existing_lb_outbound_rule
        loadbalancerId: existing_load_balancer_id
outputs:
  id: ${example.id}
Using getLBOutboundRule
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getLBOutboundRule(args: GetLBOutboundRuleArgs, opts?: InvokeOptions): Promise<GetLBOutboundRuleResult>
function getLBOutboundRuleOutput(args: GetLBOutboundRuleOutputArgs, opts?: InvokeOptions): Output<GetLBOutboundRuleResult>def get_lb_outbound_rule(loadbalancer_id: Optional[str] = None,
                         name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetLBOutboundRuleResult
def get_lb_outbound_rule_output(loadbalancer_id: Optional[pulumi.Input[str]] = None,
                         name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetLBOutboundRuleResult]func GetLBOutboundRule(ctx *Context, args *GetLBOutboundRuleArgs, opts ...InvokeOption) (*GetLBOutboundRuleResult, error)
func GetLBOutboundRuleOutput(ctx *Context, args *GetLBOutboundRuleOutputArgs, opts ...InvokeOption) GetLBOutboundRuleResultOutput> Note: This function is named GetLBOutboundRule in the Go SDK.
public static class GetLBOutboundRule 
{
    public static Task<GetLBOutboundRuleResult> InvokeAsync(GetLBOutboundRuleArgs args, InvokeOptions? opts = null)
    public static Output<GetLBOutboundRuleResult> Invoke(GetLBOutboundRuleInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetLBOutboundRuleResult> getLBOutboundRule(GetLBOutboundRuleArgs args, InvokeOptions options)
public static Output<GetLBOutboundRuleResult> getLBOutboundRule(GetLBOutboundRuleArgs args, InvokeOptions options)
fn::invoke:
  function: azure:lb/getLBOutboundRule:getLBOutboundRule
  arguments:
    # arguments dictionaryThe following arguments are supported:
- LoadbalancerId string
- The ID of the Load Balancer in which the Outbound Rule exists.
- Name string
- The name of this Load Balancer Outbound Rule.
- LoadbalancerId string
- The ID of the Load Balancer in which the Outbound Rule exists.
- Name string
- The name of this Load Balancer Outbound Rule.
- loadbalancerId String
- The ID of the Load Balancer in which the Outbound Rule exists.
- name String
- The name of this Load Balancer Outbound Rule.
- loadbalancerId string
- The ID of the Load Balancer in which the Outbound Rule exists.
- name string
- The name of this Load Balancer Outbound Rule.
- loadbalancer_id str
- The ID of the Load Balancer in which the Outbound Rule exists.
- name str
- The name of this Load Balancer Outbound Rule.
- loadbalancerId String
- The ID of the Load Balancer in which the Outbound Rule exists.
- name String
- The name of this Load Balancer Outbound Rule.
getLBOutboundRule Result
The following output properties are available:
- AllocatedOutbound intPorts 
- The number of outbound ports used for NAT.
- BackendAddress stringPool Id 
- The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs.
- FrontendIp List<GetConfigurations LBOutbound Rule Frontend Ip Configuration> 
- A frontend_ip_configurationblock as defined below.
- Id string
- The provider-assigned unique ID for this managed resource.
- IdleTimeout intIn Minutes 
- The timeout for the TCP idle connection.
- LoadbalancerId string
- Name string
- The name of the Frontend IP Configuration.
- Protocol string
- The transport protocol for the external endpoint.
- TcpReset boolEnabled 
- Is the bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination enabled? This value is useful when the protocol is set to TCP.
- AllocatedOutbound intPorts 
- The number of outbound ports used for NAT.
- BackendAddress stringPool Id 
- The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs.
- FrontendIp []GetConfigurations LBOutbound Rule Frontend Ip Configuration 
- A frontend_ip_configurationblock as defined below.
- Id string
- The provider-assigned unique ID for this managed resource.
- IdleTimeout intIn Minutes 
- The timeout for the TCP idle connection.
- LoadbalancerId string
- Name string
- The name of the Frontend IP Configuration.
- Protocol string
- The transport protocol for the external endpoint.
- TcpReset boolEnabled 
- Is the bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination enabled? This value is useful when the protocol is set to TCP.
- allocatedOutbound IntegerPorts 
- The number of outbound ports used for NAT.
- backendAddress StringPool Id 
- The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs.
- frontendIp List<GetConfigurations LBOutbound Rule Frontend Ip Configuration> 
- A frontend_ip_configurationblock as defined below.
- id String
- The provider-assigned unique ID for this managed resource.
- idleTimeout IntegerIn Minutes 
- The timeout for the TCP idle connection.
- loadbalancerId String
- name String
- The name of the Frontend IP Configuration.
- protocol String
- The transport protocol for the external endpoint.
- tcpReset BooleanEnabled 
- Is the bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination enabled? This value is useful when the protocol is set to TCP.
- allocatedOutbound numberPorts 
- The number of outbound ports used for NAT.
- backendAddress stringPool Id 
- The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs.
- frontendIp GetConfigurations LBOutbound Rule Frontend Ip Configuration[] 
- A frontend_ip_configurationblock as defined below.
- id string
- The provider-assigned unique ID for this managed resource.
- idleTimeout numberIn Minutes 
- The timeout for the TCP idle connection.
- loadbalancerId string
- name string
- The name of the Frontend IP Configuration.
- protocol string
- The transport protocol for the external endpoint.
- tcpReset booleanEnabled 
- Is the bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination enabled? This value is useful when the protocol is set to TCP.
- allocated_outbound_ intports 
- The number of outbound ports used for NAT.
- backend_address_ strpool_ id 
- The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs.
- frontend_ip_ Sequence[Getconfigurations LBOutbound Rule Frontend Ip Configuration] 
- A frontend_ip_configurationblock as defined below.
- id str
- The provider-assigned unique ID for this managed resource.
- idle_timeout_ intin_ minutes 
- The timeout for the TCP idle connection.
- loadbalancer_id str
- name str
- The name of the Frontend IP Configuration.
- protocol str
- The transport protocol for the external endpoint.
- tcp_reset_ boolenabled 
- Is the bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination enabled? This value is useful when the protocol is set to TCP.
- allocatedOutbound NumberPorts 
- The number of outbound ports used for NAT.
- backendAddress StringPool Id 
- The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs.
- frontendIp List<Property Map>Configurations 
- A frontend_ip_configurationblock as defined below.
- id String
- The provider-assigned unique ID for this managed resource.
- idleTimeout NumberIn Minutes 
- The timeout for the TCP idle connection.
- loadbalancerId String
- name String
- The name of the Frontend IP Configuration.
- protocol String
- The transport protocol for the external endpoint.
- tcpReset BooleanEnabled 
- Is the bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination enabled? This value is useful when the protocol is set to TCP.
Supporting Types
GetLBOutboundRuleFrontendIpConfiguration     
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.