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

We recommend using Azure Native.

Azure Classic v5.84.0 published on Tuesday, Jul 16, 2024 by Pulumi

azure.lb.getBackendAddressPool

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.84.0 published on Tuesday, Jul 16, 2024 by Pulumi

    Use this data source to access information about an existing Load Balancer’s Backend Address Pool.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.lb.getLB({
        name: "example-lb",
        resourceGroupName: "example-resources",
    });
    const exampleGetBackendAddressPool = example.then(example => azure.lb.getBackendAddressPool({
        name: "first",
        loadbalancerId: example.id,
    }));
    export const backendAddressPoolId = exampleGetBackendAddressPool.then(exampleGetBackendAddressPool => exampleGetBackendAddressPool.id);
    export const backendIpConfigurationIds = beap.backendIpConfigurations.map(__item => __item.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.lb.get_lb(name="example-lb",
        resource_group_name="example-resources")
    example_get_backend_address_pool = azure.lb.get_backend_address_pool(name="first",
        loadbalancer_id=example.id)
    pulumi.export("backendAddressPoolId", example_get_backend_address_pool.id)
    pulumi.export("backendIpConfigurationIds", [__item["id"] for __item in beap["backendIpConfigurations"]])
    
    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.GetLB(ctx, &lb.GetLBArgs{
    			Name:              "example-lb",
    			ResourceGroupName: "example-resources",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleGetBackendAddressPool, err := lb.LookupBackendAddressPool(ctx, &lb.LookupBackendAddressPoolArgs{
    			Name:           "first",
    			LoadbalancerId: example.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("backendAddressPoolId", exampleGetBackendAddressPool.Id)
    		var splat0 []interface{}
    		for _, val0 := range beap.BackendIpConfigurations {
    			splat0 = append(splat0, val0.Id)
    		}
    		ctx.Export("backendIpConfigurationIds", splat0)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.Lb.GetLB.Invoke(new()
        {
            Name = "example-lb",
            ResourceGroupName = "example-resources",
        });
    
        var exampleGetBackendAddressPool = Azure.Lb.GetBackendAddressPool.Invoke(new()
        {
            Name = "first",
            LoadbalancerId = example.Apply(getLBResult => getLBResult.Id),
        });
    
        return new Dictionary<string, object?>
        {
            ["backendAddressPoolId"] = exampleGetBackendAddressPool.Apply(getBackendAddressPoolResult => getBackendAddressPoolResult.Id),
            ["backendIpConfigurationIds"] = beap.BackendIpConfigurations.Select(__item => __item.Id).ToList(),
        };
    });
    
    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.GetLBArgs;
    import com.pulumi.azure.lb.inputs.GetBackendAddressPoolArgs;
    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.getLB(GetLBArgs.builder()
                .name("example-lb")
                .resourceGroupName("example-resources")
                .build());
    
            final var exampleGetBackendAddressPool = LbFunctions.getBackendAddressPool(GetBackendAddressPoolArgs.builder()
                .name("first")
                .loadbalancerId(example.applyValue(getLBResult -> getLBResult.id()))
                .build());
    
            ctx.export("backendAddressPoolId", exampleGetBackendAddressPool.applyValue(getBackendAddressPoolResult -> getBackendAddressPoolResult.id()));
            ctx.export("backendIpConfigurationIds", beap.backendIpConfigurations().stream().map(element -> element.id()).collect(toList()));
        }
    }
    
    Coming soon!
    

    Using getBackendAddressPool

    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 getBackendAddressPool(args: GetBackendAddressPoolArgs, opts?: InvokeOptions): Promise<GetBackendAddressPoolResult>
    function getBackendAddressPoolOutput(args: GetBackendAddressPoolOutputArgs, opts?: InvokeOptions): Output<GetBackendAddressPoolResult>
    def get_backend_address_pool(loadbalancer_id: Optional[str] = None,
                                 name: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetBackendAddressPoolResult
    def get_backend_address_pool_output(loadbalancer_id: Optional[pulumi.Input[str]] = None,
                                 name: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetBackendAddressPoolResult]
    func LookupBackendAddressPool(ctx *Context, args *LookupBackendAddressPoolArgs, opts ...InvokeOption) (*LookupBackendAddressPoolResult, error)
    func LookupBackendAddressPoolOutput(ctx *Context, args *LookupBackendAddressPoolOutputArgs, opts ...InvokeOption) LookupBackendAddressPoolResultOutput

    > Note: This function is named LookupBackendAddressPool in the Go SDK.

    public static class GetBackendAddressPool 
    {
        public static Task<GetBackendAddressPoolResult> InvokeAsync(GetBackendAddressPoolArgs args, InvokeOptions? opts = null)
        public static Output<GetBackendAddressPoolResult> Invoke(GetBackendAddressPoolInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetBackendAddressPoolResult> getBackendAddressPool(GetBackendAddressPoolArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:lb/getBackendAddressPool:getBackendAddressPool
      arguments:
        # arguments dictionary

    The following arguments are supported:

    LoadbalancerId string
    The ID of the Load Balancer in which the Backend Address Pool exists.
    Name string
    Specifies the name of the Backend Address Pool.
    LoadbalancerId string
    The ID of the Load Balancer in which the Backend Address Pool exists.
    Name string
    Specifies the name of the Backend Address Pool.
    loadbalancerId String
    The ID of the Load Balancer in which the Backend Address Pool exists.
    name String
    Specifies the name of the Backend Address Pool.
    loadbalancerId string
    The ID of the Load Balancer in which the Backend Address Pool exists.
    name string
    Specifies the name of the Backend Address Pool.
    loadbalancer_id str
    The ID of the Load Balancer in which the Backend Address Pool exists.
    name str
    Specifies the name of the Backend Address Pool.
    loadbalancerId String
    The ID of the Load Balancer in which the Backend Address Pool exists.
    name String
    Specifies the name of the Backend Address Pool.

    getBackendAddressPool Result

    The following output properties are available:

    BackendAddresses List<Pulumi.Azure.Lb.Outputs.GetBackendAddressPoolBackendAddress>
    A list of backend_address block as defined below.
    BackendIpConfigurations List<Pulumi.Azure.Lb.Outputs.GetBackendAddressPoolBackendIpConfiguration>
    A list of references to IP addresses defined in network interfaces.
    Id string
    The provider-assigned unique ID for this managed resource.
    InboundNatRules List<string>
    A list of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool.
    LoadBalancingRules List<string>
    A list of the Load Balancing Rules associated with this Backend Address Pool.
    LoadbalancerId string
    Name string
    The name of the Backend Address.
    OutboundRules List<string>
    A list of the Load Balancing Outbound Rules associated with this Backend Address Pool.
    BackendAddresses []GetBackendAddressPoolBackendAddress
    A list of backend_address block as defined below.
    BackendIpConfigurations []GetBackendAddressPoolBackendIpConfiguration
    A list of references to IP addresses defined in network interfaces.
    Id string
    The provider-assigned unique ID for this managed resource.
    InboundNatRules []string
    A list of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool.
    LoadBalancingRules []string
    A list of the Load Balancing Rules associated with this Backend Address Pool.
    LoadbalancerId string
    Name string
    The name of the Backend Address.
    OutboundRules []string
    A list of the Load Balancing Outbound Rules associated with this Backend Address Pool.
    backendAddresses List<GetBackendAddressPoolBackendAddress>
    A list of backend_address block as defined below.
    backendIpConfigurations List<GetBackendAddressPoolBackendIpConfiguration>
    A list of references to IP addresses defined in network interfaces.
    id String
    The provider-assigned unique ID for this managed resource.
    inboundNatRules List<String>
    A list of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool.
    loadBalancingRules List<String>
    A list of the Load Balancing Rules associated with this Backend Address Pool.
    loadbalancerId String
    name String
    The name of the Backend Address.
    outboundRules List<String>
    A list of the Load Balancing Outbound Rules associated with this Backend Address Pool.
    backendAddresses GetBackendAddressPoolBackendAddress[]
    A list of backend_address block as defined below.
    backendIpConfigurations GetBackendAddressPoolBackendIpConfiguration[]
    A list of references to IP addresses defined in network interfaces.
    id string
    The provider-assigned unique ID for this managed resource.
    inboundNatRules string[]
    A list of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool.
    loadBalancingRules string[]
    A list of the Load Balancing Rules associated with this Backend Address Pool.
    loadbalancerId string
    name string
    The name of the Backend Address.
    outboundRules string[]
    A list of the Load Balancing Outbound Rules associated with this Backend Address Pool.
    backend_addresses Sequence[GetBackendAddressPoolBackendAddress]
    A list of backend_address block as defined below.
    backend_ip_configurations Sequence[GetBackendAddressPoolBackendIpConfiguration]
    A list of references to IP addresses defined in network interfaces.
    id str
    The provider-assigned unique ID for this managed resource.
    inbound_nat_rules Sequence[str]
    A list of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool.
    load_balancing_rules Sequence[str]
    A list of the Load Balancing Rules associated with this Backend Address Pool.
    loadbalancer_id str
    name str
    The name of the Backend Address.
    outbound_rules Sequence[str]
    A list of the Load Balancing Outbound Rules associated with this Backend Address Pool.
    backendAddresses List<Property Map>
    A list of backend_address block as defined below.
    backendIpConfigurations List<Property Map>
    A list of references to IP addresses defined in network interfaces.
    id String
    The provider-assigned unique ID for this managed resource.
    inboundNatRules List<String>
    A list of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool.
    loadBalancingRules List<String>
    A list of the Load Balancing Rules associated with this Backend Address Pool.
    loadbalancerId String
    name String
    The name of the Backend Address.
    outboundRules List<String>
    A list of the Load Balancing Outbound Rules associated with this Backend Address Pool.

    Supporting Types

    GetBackendAddressPoolBackendAddress

    InboundNatRulePortMappings List<Pulumi.Azure.Lb.Inputs.GetBackendAddressPoolBackendAddressInboundNatRulePortMapping>
    A list of inbound_nat_rule_port_mapping block as defined below.
    IpAddress string
    The Static IP address for this Load Balancer within the Virtual Network.
    Name string
    Specifies the name of the Backend Address Pool.
    VirtualNetworkId string
    The ID of the Virtual Network where the Backend Address of the Load Balancer exists.
    InboundNatRulePortMappings []GetBackendAddressPoolBackendAddressInboundNatRulePortMapping
    A list of inbound_nat_rule_port_mapping block as defined below.
    IpAddress string
    The Static IP address for this Load Balancer within the Virtual Network.
    Name string
    Specifies the name of the Backend Address Pool.
    VirtualNetworkId string
    The ID of the Virtual Network where the Backend Address of the Load Balancer exists.
    inboundNatRulePortMappings List<GetBackendAddressPoolBackendAddressInboundNatRulePortMapping>
    A list of inbound_nat_rule_port_mapping block as defined below.
    ipAddress String
    The Static IP address for this Load Balancer within the Virtual Network.
    name String
    Specifies the name of the Backend Address Pool.
    virtualNetworkId String
    The ID of the Virtual Network where the Backend Address of the Load Balancer exists.
    inboundNatRulePortMappings GetBackendAddressPoolBackendAddressInboundNatRulePortMapping[]
    A list of inbound_nat_rule_port_mapping block as defined below.
    ipAddress string
    The Static IP address for this Load Balancer within the Virtual Network.
    name string
    Specifies the name of the Backend Address Pool.
    virtualNetworkId string
    The ID of the Virtual Network where the Backend Address of the Load Balancer exists.
    inbound_nat_rule_port_mappings Sequence[GetBackendAddressPoolBackendAddressInboundNatRulePortMapping]
    A list of inbound_nat_rule_port_mapping block as defined below.
    ip_address str
    The Static IP address for this Load Balancer within the Virtual Network.
    name str
    Specifies the name of the Backend Address Pool.
    virtual_network_id str
    The ID of the Virtual Network where the Backend Address of the Load Balancer exists.
    inboundNatRulePortMappings List<Property Map>
    A list of inbound_nat_rule_port_mapping block as defined below.
    ipAddress String
    The Static IP address for this Load Balancer within the Virtual Network.
    name String
    Specifies the name of the Backend Address Pool.
    virtualNetworkId String
    The ID of the Virtual Network where the Backend Address of the Load Balancer exists.

    GetBackendAddressPoolBackendAddressInboundNatRulePortMapping

    BackendPort int
    The Backend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
    FrontendPort int
    The Frontend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
    InboundNatRuleName string
    The name of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
    BackendPort int
    The Backend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
    FrontendPort int
    The Frontend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
    InboundNatRuleName string
    The name of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
    backendPort Integer
    The Backend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
    frontendPort Integer
    The Frontend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
    inboundNatRuleName String
    The name of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
    backendPort number
    The Backend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
    frontendPort number
    The Frontend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
    inboundNatRuleName string
    The name of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
    backend_port int
    The Backend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
    frontend_port int
    The Frontend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
    inbound_nat_rule_name str
    The name of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
    backendPort Number
    The Backend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
    frontendPort Number
    The Frontend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.
    inboundNatRuleName String
    The name of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address.

    GetBackendAddressPoolBackendIpConfiguration

    Id string
    The ID of the Backend Address Pool.
    Id string
    The ID of the Backend Address Pool.
    id String
    The ID of the Backend Address Pool.
    id string
    The ID of the Backend Address Pool.
    id str
    The ID of the Backend Address Pool.
    id String
    The ID of the Backend Address Pool.

    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.84.0 published on Tuesday, Jul 16, 2024 by Pulumi