GetBackendAddressPool

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

Example Usage

using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleLB = Output.Create(Azure.Lb.GetLB.InvokeAsync(new Azure.Lb.GetLBArgs
        {
            Name = "example-lb",
            ResourceGroupName = "example-resources",
        }));
        var exampleBackendAddressPool = exampleLB.Apply(exampleLB => Output.Create(Azure.Lb.GetBackendAddressPool.InvokeAsync(new Azure.Lb.GetBackendAddressPoolArgs
        {
            Name = "first",
            LoadbalancerId = exampleLB.Id,
        })));
        this.BackendAddressPoolId = exampleBackendAddressPool.Apply(exampleBackendAddressPool => exampleBackendAddressPool.Id);
        this.BackendIpConfigurationIds = data.Azurerm_lb_backend_address_pool.Beap.Backend_ip_configurations.Select(__item => __item.Id).ToList();
    }

    [Output("backendAddressPoolId")]
    public Output<string> BackendAddressPoolId { get; set; }
    [Output("backendIpConfigurationIds")]
    public Output<string> BackendIpConfigurationIds { get; set; }
}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/lb"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        exampleLB, err := lb.GetLB(ctx, &lb.GetLBArgs{
            Name:              "example-lb",
            ResourceGroupName: "example-resources",
        }, nil)
        if err != nil {
            return err
        }
        exampleBackendAddressPool, err := lb.LookupBackendAddressPool(ctx, &lb.LookupBackendAddressPoolArgs{
            Name:           "first",
            LoadbalancerId: exampleLB.Id,
        }, nil)
        if err != nil {
            return err
        }
        ctx.Export("backendAddressPoolId", exampleBackendAddressPool.Id)
        var splat0 []string
        for _, val0 := range data.Azurerm_lb_backend_address_pool.Beap.Backend_ip_configurations {
            splat0 = append(splat0, val0.Id)
        }
        ctx.Export("backendIpConfigurationIds", splat0)
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example_lb = azure.lb.get_lb(name="example-lb",
    resource_group_name="example-resources")
example_backend_address_pool = azure.lb.get_backend_address_pool(name="first",
    loadbalancer_id=example_lb.id)
pulumi.export("backendAddressPoolId", example_backend_address_pool.id)
pulumi.export("backendIpConfigurationIds", [__item["id"] for __item in data["azurerm_lb_backend_address_pool"]["beap"]["backend_ip_configurations"]])
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleLB = azure.lb.getLB({
    name: "example-lb",
    resourceGroupName: "example-resources",
});
const exampleBackendAddressPool = exampleLB.then(exampleLB => azure.lb.getBackendAddressPool({
    name: "first",
    loadbalancerId: exampleLB.id,
}));
export const backendAddressPoolId = exampleBackendAddressPool.then(exampleBackendAddressPool => exampleBackendAddressPool.id);
export const backendIpConfigurationIds = data.azurerm_lb_backend_address_pool.beap.backend_ip_configurations.map(__item => __item.id);

Using GetBackendAddressPool

function getBackendAddressPool(args: GetBackendAddressPoolArgs, opts?: InvokeOptions): Promise<GetBackendAddressPoolResult>
function  get_backend_address_pool(loadbalancer_id=None, name=None, opts=None)
func LookupBackendAddressPool(ctx *Context, args *LookupBackendAddressPoolArgs, opts ...InvokeOption) (*LookupBackendAddressPoolResult, error)

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

public static class GetBackendAddressPool {
    public static Task<GetBackendAddressPoolResult> InvokeAsync(GetBackendAddressPoolArgs args, InvokeOptions? opts = null)
}

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.

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.

GetBackendAddressPool Result

The following output properties are available:

BackendIpConfigurations List<GetBackendAddressPoolBackendIpConfiguration>

An array of references to IP addresses defined in network interfaces.

Id string

The provider-assigned unique ID for this managed resource.

LoadbalancerId string
Name string

The name of the Backend Address Pool.

BackendIpConfigurations []GetBackendAddressPoolBackendIpConfiguration

An array of references to IP addresses defined in network interfaces.

Id string

The provider-assigned unique ID for this managed resource.

LoadbalancerId string
Name string

The name of the Backend Address Pool.

backendIpConfigurations GetBackendAddressPoolBackendIpConfiguration[]

An array of references to IP addresses defined in network interfaces.

id string

The provider-assigned unique ID for this managed resource.

loadbalancerId string
name string

The name of the Backend Address Pool.

backend_ip_configurations List[GetBackendAddressPoolBackendIpConfiguration]

An array of references to IP addresses defined in network interfaces.

id str

The provider-assigned unique ID for this managed resource.

loadbalancer_id str
name str

The name of the Backend Address Pool.

Supporting Types

GetBackendAddressPoolBackendIpConfiguration

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

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.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.