Linode v4.35.0 published on Wednesday, Mar 12, 2025 by Pulumi
linode.getNodebalancers
Explore with Pulumi AI
Provides information about Linode NodeBalancers that match a set of filters. For more information, see the Linode APIv4 docs.
Example Usage
The following example shows how one might use this data source to access information about a Linode NodeBalancer.
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";
const specific_nodebalancers = linode.getNodebalancers({
    filters: [
        {
            name: "label",
            values: ["my-nodebalancer"],
        },
        {
            name: "region",
            values: ["us-iad"],
        },
    ],
});
export const nodebalancerId = specific_nodebalancers.then(specific_nodebalancers => specific_nodebalancers.nodebalancers?.[0]?.id);
import pulumi
import pulumi_linode as linode
specific_nodebalancers = linode.get_nodebalancers(filters=[
    {
        "name": "label",
        "values": ["my-nodebalancer"],
    },
    {
        "name": "region",
        "values": ["us-iad"],
    },
])
pulumi.export("nodebalancerId", specific_nodebalancers.nodebalancers[0].id)
package main
import (
	"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		specific_nodebalancers, err := linode.GetNodebalancers(ctx, &linode.GetNodebalancersArgs{
			Filters: []linode.GetNodebalancersFilter{
				{
					Name: "label",
					Values: []string{
						"my-nodebalancer",
					},
				},
				{
					Name: "region",
					Values: []string{
						"us-iad",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("nodebalancerId", specific_nodebalancers.Nodebalancers[0].Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;
return await Deployment.RunAsync(() => 
{
    var specific_nodebalancers = Linode.GetNodebalancers.Invoke(new()
    {
        Filters = new[]
        {
            new Linode.Inputs.GetNodebalancersFilterInputArgs
            {
                Name = "label",
                Values = new[]
                {
                    "my-nodebalancer",
                },
            },
            new Linode.Inputs.GetNodebalancersFilterInputArgs
            {
                Name = "region",
                Values = new[]
                {
                    "us-iad",
                },
            },
        },
    });
    return new Dictionary<string, object?>
    {
        ["nodebalancerId"] = specific_nodebalancers.Apply(specific_nodebalancers => specific_nodebalancers.Apply(getNodebalancersResult => getNodebalancersResult.Nodebalancers[0]?.Id)),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.LinodeFunctions;
import com.pulumi.linode.inputs.GetNodebalancersArgs;
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 specific-nodebalancers = LinodeFunctions.getNodebalancers(GetNodebalancersArgs.builder()
            .filters(            
                GetNodebalancersFilterArgs.builder()
                    .name("label")
                    .values("my-nodebalancer")
                    .build(),
                GetNodebalancersFilterArgs.builder()
                    .name("region")
                    .values("us-iad")
                    .build())
            .build());
        ctx.export("nodebalancerId", specific_nodebalancers.nodebalancers()[0].id());
    }
}
variables:
  specific-nodebalancers:
    fn::invoke:
      function: linode:getNodebalancers
      arguments:
        filters:
          - name: label
            values:
              - my-nodebalancer
          - name: region
            values:
              - us-iad
outputs:
  nodebalancerId: ${["specific-nodebalancers"].nodebalancers[0].id}
Filterable Fields
- label
- tags
- ipv4
- ipv6
- hostname
- region
- client_conn_throttle
Using getNodebalancers
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 getNodebalancers(args: GetNodebalancersArgs, opts?: InvokeOptions): Promise<GetNodebalancersResult>
function getNodebalancersOutput(args: GetNodebalancersOutputArgs, opts?: InvokeOptions): Output<GetNodebalancersResult>def get_nodebalancers(filters: Optional[Sequence[GetNodebalancersFilter]] = None,
                      nodebalancers: Optional[Sequence[GetNodebalancersNodebalancer]] = None,
                      order: Optional[str] = None,
                      order_by: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetNodebalancersResult
def get_nodebalancers_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetNodebalancersFilterArgs]]]] = None,
                      nodebalancers: Optional[pulumi.Input[Sequence[pulumi.Input[GetNodebalancersNodebalancerArgs]]]] = None,
                      order: Optional[pulumi.Input[str]] = None,
                      order_by: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetNodebalancersResult]func GetNodebalancers(ctx *Context, args *GetNodebalancersArgs, opts ...InvokeOption) (*GetNodebalancersResult, error)
func GetNodebalancersOutput(ctx *Context, args *GetNodebalancersOutputArgs, opts ...InvokeOption) GetNodebalancersResultOutput> Note: This function is named GetNodebalancers in the Go SDK.
public static class GetNodebalancers 
{
    public static Task<GetNodebalancersResult> InvokeAsync(GetNodebalancersArgs args, InvokeOptions? opts = null)
    public static Output<GetNodebalancersResult> Invoke(GetNodebalancersInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetNodebalancersResult> getNodebalancers(GetNodebalancersArgs args, InvokeOptions options)
public static Output<GetNodebalancersResult> getNodebalancers(GetNodebalancersArgs args, InvokeOptions options)
fn::invoke:
  function: linode:index/getNodebalancers:getNodebalancers
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Filters
List<GetNodebalancers Filter> 
- Nodebalancers
List<GetNodebalancers Nodebalancer> 
- Order string
- The order in which results should be returned. (asc,desc; defaultasc)
- OrderBy string
- The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- Filters
[]GetNodebalancers Filter 
- Nodebalancers
[]GetNodebalancers Nodebalancer 
- Order string
- The order in which results should be returned. (asc,desc; defaultasc)
- OrderBy string
- The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- filters
List<GetNodebalancers Filter> 
- nodebalancers
List<GetNodebalancers Nodebalancer> 
- order String
- The order in which results should be returned. (asc,desc; defaultasc)
- orderBy String
- The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- filters
GetNodebalancers Filter[] 
- nodebalancers
GetNodebalancers Nodebalancer[] 
- order string
- The order in which results should be returned. (asc,desc; defaultasc)
- orderBy string
- The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- filters
Sequence[GetNodebalancers Filter] 
- nodebalancers
Sequence[GetNodebalancers Nodebalancer] 
- order str
- The order in which results should be returned. (asc,desc; defaultasc)
- order_by str
- The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- filters List<Property Map>
- nodebalancers List<Property Map>
- order String
- The order in which results should be returned. (asc,desc; defaultasc)
- orderBy String
- The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
getNodebalancers Result
The following output properties are available:
- Id string
- The Linode NodeBalancer's unique ID
- Filters
List<GetNodebalancers Filter> 
- Nodebalancers
List<GetNodebalancers Nodebalancer> 
- Order string
- OrderBy string
- Id string
- The Linode NodeBalancer's unique ID
- Filters
[]GetNodebalancers Filter 
- Nodebalancers
[]GetNodebalancers Nodebalancer 
- Order string
- OrderBy string
- id String
- The Linode NodeBalancer's unique ID
- filters
List<GetNodebalancers Filter> 
- nodebalancers
List<GetNodebalancers Nodebalancer> 
- order String
- orderBy String
- id string
- The Linode NodeBalancer's unique ID
- filters
GetNodebalancers Filter[] 
- nodebalancers
GetNodebalancers Nodebalancer[] 
- order string
- orderBy string
- id str
- The Linode NodeBalancer's unique ID
- filters
Sequence[GetNodebalancers Filter] 
- nodebalancers
Sequence[GetNodebalancers Nodebalancer] 
- order str
- order_by str
- id String
- The Linode NodeBalancer's unique ID
- filters List<Property Map>
- nodebalancers List<Property Map>
- order String
- orderBy String
Supporting Types
GetNodebalancersFilter  
- Name string
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- Values List<string>
- A list of values for the filter to allow. These values should all be in string form.
- MatchBy string
- The method to match the field by. (exact,regex,substring; defaultexact)
- Name string
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- Values []string
- A list of values for the filter to allow. These values should all be in string form.
- MatchBy string
- The method to match the field by. (exact,regex,substring; defaultexact)
- name String
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values List<String>
- A list of values for the filter to allow. These values should all be in string form.
- matchBy String
- The method to match the field by. (exact,regex,substring; defaultexact)
- name string
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values string[]
- A list of values for the filter to allow. These values should all be in string form.
- matchBy string
- The method to match the field by. (exact,regex,substring; defaultexact)
- name str
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values Sequence[str]
- A list of values for the filter to allow. These values should all be in string form.
- match_by str
- The method to match the field by. (exact,regex,substring; defaultexact)
- name String
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values List<String>
- A list of values for the filter to allow. These values should all be in string form.
- matchBy String
- The method to match the field by. (exact,regex,substring; defaultexact)
GetNodebalancersNodebalancer  
- ClientConn intThrottle 
- Throttle connections per second (0-20)
- Created string
- When this Linode NodeBalancer was created
- Hostname string
- This NodeBalancer's hostname, ending with .ip.linodeusercontent.com
- Id int
- The Linode NodeBalancer's unique ID
- Ipv4 string
- The Public IPv4 Address of this NodeBalancer
- Ipv6 string
- The Public IPv6 Address of this NodeBalancer
- Label string
- The label of the Linode NodeBalancer
- Region string
- The Region where this Linode NodeBalancer is located. NodeBalancers only support backends in the same Region.
- List<string>
- A list of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
- Transfers
List<GetNodebalancers Nodebalancer Transfer> 
- Information about the amount of transfer this NodeBalancer has had so far this month.
- Updated string
- When this Linode NodeBalancer was last updated
- ClientConn intThrottle 
- Throttle connections per second (0-20)
- Created string
- When this Linode NodeBalancer was created
- Hostname string
- This NodeBalancer's hostname, ending with .ip.linodeusercontent.com
- Id int
- The Linode NodeBalancer's unique ID
- Ipv4 string
- The Public IPv4 Address of this NodeBalancer
- Ipv6 string
- The Public IPv6 Address of this NodeBalancer
- Label string
- The label of the Linode NodeBalancer
- Region string
- The Region where this Linode NodeBalancer is located. NodeBalancers only support backends in the same Region.
- []string
- A list of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
- Transfers
[]GetNodebalancers Nodebalancer Transfer 
- Information about the amount of transfer this NodeBalancer has had so far this month.
- Updated string
- When this Linode NodeBalancer was last updated
- clientConn IntegerThrottle 
- Throttle connections per second (0-20)
- created String
- When this Linode NodeBalancer was created
- hostname String
- This NodeBalancer's hostname, ending with .ip.linodeusercontent.com
- id Integer
- The Linode NodeBalancer's unique ID
- ipv4 String
- The Public IPv4 Address of this NodeBalancer
- ipv6 String
- The Public IPv6 Address of this NodeBalancer
- label String
- The label of the Linode NodeBalancer
- region String
- The Region where this Linode NodeBalancer is located. NodeBalancers only support backends in the same Region.
- List<String>
- A list of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
- transfers
List<GetNodebalancers Nodebalancer Transfer> 
- Information about the amount of transfer this NodeBalancer has had so far this month.
- updated String
- When this Linode NodeBalancer was last updated
- clientConn numberThrottle 
- Throttle connections per second (0-20)
- created string
- When this Linode NodeBalancer was created
- hostname string
- This NodeBalancer's hostname, ending with .ip.linodeusercontent.com
- id number
- The Linode NodeBalancer's unique ID
- ipv4 string
- The Public IPv4 Address of this NodeBalancer
- ipv6 string
- The Public IPv6 Address of this NodeBalancer
- label string
- The label of the Linode NodeBalancer
- region string
- The Region where this Linode NodeBalancer is located. NodeBalancers only support backends in the same Region.
- string[]
- A list of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
- transfers
GetNodebalancers Nodebalancer Transfer[] 
- Information about the amount of transfer this NodeBalancer has had so far this month.
- updated string
- When this Linode NodeBalancer was last updated
- client_conn_ intthrottle 
- Throttle connections per second (0-20)
- created str
- When this Linode NodeBalancer was created
- hostname str
- This NodeBalancer's hostname, ending with .ip.linodeusercontent.com
- id int
- The Linode NodeBalancer's unique ID
- ipv4 str
- The Public IPv4 Address of this NodeBalancer
- ipv6 str
- The Public IPv6 Address of this NodeBalancer
- label str
- The label of the Linode NodeBalancer
- region str
- The Region where this Linode NodeBalancer is located. NodeBalancers only support backends in the same Region.
- Sequence[str]
- A list of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
- transfers
Sequence[GetNodebalancers Nodebalancer Transfer] 
- Information about the amount of transfer this NodeBalancer has had so far this month.
- updated str
- When this Linode NodeBalancer was last updated
- clientConn NumberThrottle 
- Throttle connections per second (0-20)
- created String
- When this Linode NodeBalancer was created
- hostname String
- This NodeBalancer's hostname, ending with .ip.linodeusercontent.com
- id Number
- The Linode NodeBalancer's unique ID
- ipv4 String
- The Public IPv4 Address of this NodeBalancer
- ipv6 String
- The Public IPv6 Address of this NodeBalancer
- label String
- The label of the Linode NodeBalancer
- region String
- The Region where this Linode NodeBalancer is located. NodeBalancers only support backends in the same Region.
- List<String>
- A list of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
- transfers List<Property Map>
- Information about the amount of transfer this NodeBalancer has had so far this month.
- updated String
- When this Linode NodeBalancer was last updated
GetNodebalancersNodebalancerTransfer   
Package Details
- Repository
- Linode pulumi/pulumi-linode
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the linodeTerraform Provider.