Viewing docs for ucloud 1.39.3
published on Wednesday, Mar 11, 2026 by ucloud
published on Wednesday, Mar 11, 2026 by ucloud
Viewing docs for ucloud 1.39.3
published on Wednesday, Mar 11, 2026 by ucloud
published on Wednesday, Mar 11, 2026 by ucloud
This data source provides a list of Load Balancer Rule resources according to their Load Balancer Rule ID.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ucloud from "@pulumi/ucloud";
const example = ucloud.getLbRules({
loadBalancerId: "ulb-xxx",
listenerId: "vserver-xxx",
});
export const first = example.then(example => example.lbRules?.[0]?.id);
import pulumi
import pulumi_ucloud as ucloud
example = ucloud.get_lb_rules(load_balancer_id="ulb-xxx",
listener_id="vserver-xxx")
pulumi.export("first", example.lb_rules[0].id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ucloud/ucloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := ucloud.GetLbRules(ctx, &ucloud.GetLbRulesArgs{
LoadBalancerId: "ulb-xxx",
ListenerId: "vserver-xxx",
}, nil)
if err != nil {
return err
}
ctx.Export("first", example.LbRules[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ucloud = Pulumi.Ucloud;
return await Deployment.RunAsync(() =>
{
var example = Ucloud.GetLbRules.Invoke(new()
{
LoadBalancerId = "ulb-xxx",
ListenerId = "vserver-xxx",
});
return new Dictionary<string, object?>
{
["first"] = example.Apply(getLbRulesResult => getLbRulesResult.LbRules[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ucloud.UcloudFunctions;
import com.pulumi.ucloud.inputs.GetLbRulesArgs;
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 = UcloudFunctions.getLbRules(GetLbRulesArgs.builder()
.loadBalancerId("ulb-xxx")
.listenerId("vserver-xxx")
.build());
ctx.export("first", example.lbRules()[0].id());
}
}
variables:
example:
fn::invoke:
function: ucloud:getLbRules
arguments:
loadBalancerId: ulb-xxx
listenerId: vserver-xxx
outputs:
first: ${example.lbRules[0].id}
Using getLbRules
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 getLbRules(args: GetLbRulesArgs, opts?: InvokeOptions): Promise<GetLbRulesResult>
function getLbRulesOutput(args: GetLbRulesOutputArgs, opts?: InvokeOptions): Output<GetLbRulesResult>def get_lb_rules(id: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
listener_id: Optional[str] = None,
load_balancer_id: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetLbRulesResult
def get_lb_rules_output(id: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
listener_id: Optional[pulumi.Input[str]] = None,
load_balancer_id: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetLbRulesResult]func GetLbRules(ctx *Context, args *GetLbRulesArgs, opts ...InvokeOption) (*GetLbRulesResult, error)
func GetLbRulesOutput(ctx *Context, args *GetLbRulesOutputArgs, opts ...InvokeOption) GetLbRulesResultOutput> Note: This function is named GetLbRules in the Go SDK.
public static class GetLbRules
{
public static Task<GetLbRulesResult> InvokeAsync(GetLbRulesArgs args, InvokeOptions? opts = null)
public static Output<GetLbRulesResult> Invoke(GetLbRulesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetLbRulesResult> getLbRules(GetLbRulesArgs args, InvokeOptions options)
public static Output<GetLbRulesResult> getLbRules(GetLbRulesArgs args, InvokeOptions options)
fn::invoke:
function: ucloud:index/getLbRules:getLbRules
arguments:
# arguments dictionaryThe following arguments are supported:
- Listener
Id string - The ID of a listener server.
- Load
Balancer stringId - The ID of a load balancer.
- Id string
- The ID of LB Rule.
- Ids List<string>
- A list of LB Rule IDs, all the LB Rules belong to the Load Balancer listener will be retrieved if the ID is
[]. - Output
File string - File name where to save data source results (after running
pulumi preview).
- Listener
Id string - The ID of a listener server.
- Load
Balancer stringId - The ID of a load balancer.
- Id string
- The ID of LB Rule.
- Ids []string
- A list of LB Rule IDs, all the LB Rules belong to the Load Balancer listener will be retrieved if the ID is
[]. - Output
File string - File name where to save data source results (after running
pulumi preview).
- listener
Id String - The ID of a listener server.
- load
Balancer StringId - The ID of a load balancer.
- id String
- The ID of LB Rule.
- ids List<String>
- A list of LB Rule IDs, all the LB Rules belong to the Load Balancer listener will be retrieved if the ID is
[]. - output
File String - File name where to save data source results (after running
pulumi preview).
- listener
Id string - The ID of a listener server.
- load
Balancer stringId - The ID of a load balancer.
- id string
- The ID of LB Rule.
- ids string[]
- A list of LB Rule IDs, all the LB Rules belong to the Load Balancer listener will be retrieved if the ID is
[]. - output
File string - File name where to save data source results (after running
pulumi preview).
- listener_
id str - The ID of a listener server.
- load_
balancer_ strid - The ID of a load balancer.
- id str
- The ID of LB Rule.
- ids Sequence[str]
- A list of LB Rule IDs, all the LB Rules belong to the Load Balancer listener will be retrieved if the ID is
[]. - output_
file str - File name where to save data source results (after running
pulumi preview).
- listener
Id String - The ID of a listener server.
- load
Balancer StringId - The ID of a load balancer.
- id String
- The ID of LB Rule.
- ids List<String>
- A list of LB Rule IDs, all the LB Rules belong to the Load Balancer listener will be retrieved if the ID is
[]. - output
File String - File name where to save data source results (after running
pulumi preview).
getLbRules Result
The following output properties are available:
- Id string
- The ID of LB Rule.
- Ids List<string>
- Lb
Rules List<GetLb Rules Lb Rule> - It is a nested type which documented below.
- Listener
Id string - Load
Balancer stringId - Total
Count double - Total number of LB Rules that satisfy the condition.
- Output
File string
- Id string
- The ID of LB Rule.
- Ids []string
- Lb
Rules []GetLb Rules Lb Rule - It is a nested type which documented below.
- Listener
Id string - Load
Balancer stringId - Total
Count float64 - Total number of LB Rules that satisfy the condition.
- Output
File string
- id String
- The ID of LB Rule.
- ids List<String>
- lb
Rules List<GetLb Rules Lb Rule> - It is a nested type which documented below.
- listener
Id String - load
Balancer StringId - total
Count Double - Total number of LB Rules that satisfy the condition.
- output
File String
- id string
- The ID of LB Rule.
- ids string[]
- lb
Rules GetLb Rules Lb Rule[] - It is a nested type which documented below.
- listener
Id string - load
Balancer stringId - total
Count number - Total number of LB Rules that satisfy the condition.
- output
File string
- id str
- The ID of LB Rule.
- ids Sequence[str]
- lb_
rules Sequence[GetLb Rules Lb Rule] - It is a nested type which documented below.
- listener_
id str - load_
balancer_ strid - total_
count float - Total number of LB Rules that satisfy the condition.
- output_
file str
- id String
- The ID of LB Rule.
- ids List<String>
- lb
Rules List<Property Map> - It is a nested type which documented below.
- listener
Id String - load
Balancer StringId - total
Count Number - Total number of LB Rules that satisfy the condition.
- output
File String
Supporting Types
GetLbRulesLbRule
Package Details
- Repository
- ucloud ucloud/terraform-provider-ucloud
- License
- Notes
- This Pulumi package is based on the
ucloudTerraform Provider.
Viewing docs for ucloud 1.39.3
published on Wednesday, Mar 11, 2026 by ucloud
published on Wednesday, Mar 11, 2026 by ucloud
