Linode v4.22.0 published on Tuesday, Jun 25, 2024 by Pulumi
linode.getNodebalancers
Explore with Pulumi AI
Provides information about Linode NodeBalancers that match a set of filters.
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=[
linode.GetNodebalancersFilterArgs(
name="label",
values=["my-nodebalancer"],
),
linode.GetNodebalancersFilterArgs(
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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: linode:index/getNodebalancers:getNodebalancers
arguments:
# arguments dictionary
The following arguments are supported:
- Filters
List<Get
Nodebalancers Filter> - Nodebalancers
List<Get
Nodebalancers Nodebalancer> - Order string
- The order in which results should be returned. (
asc
,desc
; defaultasc
) - Order
By string - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- Filters
[]Get
Nodebalancers Filter - Nodebalancers
[]Get
Nodebalancers Nodebalancer - Order string
- The order in which results should be returned. (
asc
,desc
; defaultasc
) - Order
By string - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- filters
List<Get
Nodebalancers Filter> - nodebalancers
List<Get
Nodebalancers Nodebalancer> - order String
- The order in which results should be returned. (
asc
,desc
; defaultasc
) - order
By String - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- filters
Get
Nodebalancers Filter[] - nodebalancers
Get
Nodebalancers Nodebalancer[] - order string
- The order in which results should be returned. (
asc
,desc
; defaultasc
) - order
By string - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- filters
Sequence[Get
Nodebalancers Filter] - nodebalancers
Sequence[Get
Nodebalancers 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
) - order
By 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<Get
Nodebalancers Filter> - Nodebalancers
List<Get
Nodebalancers Nodebalancer> - Order string
- Order
By string
- Id string
- The Linode NodeBalancer's unique ID
- Filters
[]Get
Nodebalancers Filter - Nodebalancers
[]Get
Nodebalancers Nodebalancer - Order string
- Order
By string
- id String
- The Linode NodeBalancer's unique ID
- filters
List<Get
Nodebalancers Filter> - nodebalancers
List<Get
Nodebalancers Nodebalancer> - order String
- order
By String
- id string
- The Linode NodeBalancer's unique ID
- filters
Get
Nodebalancers Filter[] - nodebalancers
Get
Nodebalancers Nodebalancer[] - order string
- order
By string
- id str
- The Linode NodeBalancer's unique ID
- filters
Sequence[Get
Nodebalancers Filter] - nodebalancers
Sequence[Get
Nodebalancers Nodebalancer] - order str
- order_
by str
- id String
- The Linode NodeBalancer's unique ID
- filters List<Property Map>
- nodebalancers List<Property Map>
- order String
- order
By 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.
- Match
By 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.
- Match
By 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.
- match
By 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.
- match
By 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.
- match
By String - The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
GetNodebalancersNodebalancer
- Client
Conn 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<Get
Nodebalancers 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 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
[]Get
Nodebalancers 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 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<Get
Nodebalancers 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 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
Get
Nodebalancers 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[Get
Nodebalancers 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
- client
Conn 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
linode
Terraform Provider.