1. Packages
  2. Azure Classic
  3. API Docs
  4. lb
  5. getLBOutboundRule

We recommend using Azure Native.

Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi

azure.lb.getLBOutboundRule

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi

    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/v5/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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:lb/getLBOutboundRule:getLBOutboundRule
      arguments:
        # arguments dictionary

    The 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:

    AllocatedOutboundPorts int
    The number of outbound ports used for NAT.
    BackendAddressPoolId string
    The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs.
    FrontendIpConfigurations List<Pulumi.Azure.Lb.Outputs.GetLBOutboundRuleFrontendIpConfiguration>
    A frontend_ip_configuration block as defined below.
    Id string
    The provider-assigned unique ID for this managed resource.
    IdleTimeoutInMinutes int
    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.
    TcpResetEnabled bool
    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.
    AllocatedOutboundPorts int
    The number of outbound ports used for NAT.
    BackendAddressPoolId string
    The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs.
    FrontendIpConfigurations []GetLBOutboundRuleFrontendIpConfiguration
    A frontend_ip_configuration block as defined below.
    Id string
    The provider-assigned unique ID for this managed resource.
    IdleTimeoutInMinutes int
    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.
    TcpResetEnabled bool
    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.
    allocatedOutboundPorts Integer
    The number of outbound ports used for NAT.
    backendAddressPoolId String
    The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs.
    frontendIpConfigurations List<GetLBOutboundRuleFrontendIpConfiguration>
    A frontend_ip_configuration block as defined below.
    id String
    The provider-assigned unique ID for this managed resource.
    idleTimeoutInMinutes Integer
    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.
    tcpResetEnabled Boolean
    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.
    allocatedOutboundPorts number
    The number of outbound ports used for NAT.
    backendAddressPoolId string
    The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs.
    frontendIpConfigurations GetLBOutboundRuleFrontendIpConfiguration[]
    A frontend_ip_configuration block as defined below.
    id string
    The provider-assigned unique ID for this managed resource.
    idleTimeoutInMinutes number
    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.
    tcpResetEnabled boolean
    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_ports int
    The number of outbound ports used for NAT.
    backend_address_pool_id str
    The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs.
    frontend_ip_configurations Sequence[GetLBOutboundRuleFrontendIpConfiguration]
    A frontend_ip_configuration block as defined below.
    id str
    The provider-assigned unique ID for this managed resource.
    idle_timeout_in_minutes int
    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_enabled bool
    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.
    allocatedOutboundPorts Number
    The number of outbound ports used for NAT.
    backendAddressPoolId String
    The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs.
    frontendIpConfigurations List<Property Map>
    A frontend_ip_configuration block as defined below.
    id String
    The provider-assigned unique ID for this managed resource.
    idleTimeoutInMinutes Number
    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.
    tcpResetEnabled Boolean
    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

    Id string
    The ID of the Frontend IP Configuration.
    Name string
    The name of this Load Balancer Outbound Rule.
    Id string
    The ID of the Frontend IP Configuration.
    Name string
    The name of this Load Balancer Outbound Rule.
    id String
    The ID of the Frontend IP Configuration.
    name String
    The name of this Load Balancer Outbound Rule.
    id string
    The ID of the Frontend IP Configuration.
    name string
    The name of this Load Balancer Outbound Rule.
    id str
    The ID of the Frontend IP Configuration.
    name str
    The name of this Load Balancer Outbound Rule.
    id String
    The ID of the Frontend IP Configuration.
    name String
    The name of this Load Balancer Outbound Rule.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi