We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Use this data source to access information about an existing Load Balancer Rule.
Example Usage
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 exampleLBRule = exampleLB.Apply(exampleLB => Output.Create(Azure.Lb.GetLBRule.InvokeAsync(new Azure.Lb.GetLBRuleArgs
{
Name = "first",
ResourceGroupName = "example-resources",
LoadbalancerId = exampleLB.Id,
})));
this.LbRuleId = exampleLBRule.Apply(exampleLBRule => exampleLBRule.Id);
}
[Output("lbRuleId")]
public Output<string> LbRuleId { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/lb"
"github.com/pulumi/pulumi/sdk/v3/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
}
exampleLBRule, err := lb.GetLBRule(ctx, &lb.GetLBRuleArgs{
Name: "first",
ResourceGroupName: "example-resources",
LoadbalancerId: exampleLB.Id,
}, nil)
if err != nil {
return err
}
ctx.Export("lbRuleId", exampleLBRule.Id)
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleLB = azure.lb.getLB({
name: "example-lb",
resourceGroupName: "example-resources",
});
const exampleLBRule = exampleLB.then(exampleLB => azure.lb.getLBRule({
name: "first",
resourceGroupName: "example-resources",
loadbalancerId: exampleLB.id,
}));
export const lbRuleId = exampleLBRule.then(exampleLBRule => exampleLBRule.id);
import pulumi
import pulumi_azure as azure
example_lb = azure.lb.get_lb(name="example-lb",
resource_group_name="example-resources")
example_lb_rule = azure.lb.get_lb_rule(name="first",
resource_group_name="example-resources",
loadbalancer_id=example_lb.id)
pulumi.export("lbRuleId", example_lb_rule.id)
Example coming soon!
Using getLBRule
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 getLBRule(args: GetLBRuleArgs, opts?: InvokeOptions): Promise<GetLBRuleResult>
function getLBRuleOutput(args: GetLBRuleOutputArgs, opts?: InvokeOptions): Output<GetLBRuleResult>def get_lb_rule(loadbalancer_id: Optional[str] = None,
name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetLBRuleResult
def get_lb_rule_output(loadbalancer_id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetLBRuleResult]func GetLBRule(ctx *Context, args *GetLBRuleArgs, opts ...InvokeOption) (*GetLBRuleResult, error)
func GetLBRuleOutput(ctx *Context, args *GetLBRuleOutputArgs, opts ...InvokeOption) GetLBRuleResultOutput> Note: This function is named GetLBRule in the Go SDK.
public static class GetLBRule
{
public static Task<GetLBRuleResult> InvokeAsync(GetLBRuleArgs args, InvokeOptions? opts = null)
public static Output<GetLBRuleResult> Invoke(GetLBRuleInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetLBRuleResult> getLBRule(GetLBRuleArgs args, InvokeOptions options)
public static Output<GetLBRuleResult> getLBRule(GetLBRuleArgs args, InvokeOptions options)
fn::invoke:
function: azure:lb/getLBRule:getLBRule
arguments:
# arguments dictionaryThe following arguments are supported:
- Loadbalancer
Id string - The ID of the Load Balancer Rule.
- Name string
- The name of this Load Balancer Rule.
- Resource
Group stringName - The name of the Resource Group where the Load Balancer Rule exists.
- Loadbalancer
Id string - The ID of the Load Balancer Rule.
- Name string
- The name of this Load Balancer Rule.
- Resource
Group stringName - The name of the Resource Group where the Load Balancer Rule exists.
- loadbalancer
Id String - The ID of the Load Balancer Rule.
- name String
- The name of this Load Balancer Rule.
- resource
Group StringName - The name of the Resource Group where the Load Balancer Rule exists.
- loadbalancer
Id string - The ID of the Load Balancer Rule.
- name string
- The name of this Load Balancer Rule.
- resource
Group stringName - The name of the Resource Group where the Load Balancer Rule exists.
- loadbalancer_
id str - The ID of the Load Balancer Rule.
- name str
- The name of this Load Balancer Rule.
- resource_
group_ strname - The name of the Resource Group where the Load Balancer Rule exists.
- loadbalancer
Id String - The ID of the Load Balancer Rule.
- name String
- The name of this Load Balancer Rule.
- resource
Group StringName - The name of the Resource Group where the Load Balancer Rule exists.
getLBRule Result
The following output properties are available:
- Backend
Address stringPool Id - A reference to a Backend Address Pool over which this Load Balancing Rule operates.
- Backend
Port int - The port used for internal connections on the endpoint.
- Disable
Outbound boolSnat - If outbound SNAT is enabled for this Load Balancer Rule.
- Enable
Floating boolIp - If Floating IPs are enabled for this Load Balancer Rule
- Enable
Tcp boolReset - If TCP Reset is enabled for this Load Balancer Rule.
- Frontend
Ip stringConfiguration Name - The name of the frontend IP configuration to which the rule is associated.
- Frontend
Port int - The port for the external endpoint.
- Id string
- The provider-assigned unique ID for this managed resource.
- Idle
Timeout intIn Minutes - Specifies the idle timeout in minutes for TCP connections.
- Load
Distribution string - Specifies the load balancing distribution type used by the Load Balancer.
- Loadbalancer
Id string - Name string
- Probe
Id string - A reference to a Probe used by this Load Balancing Rule.
- Protocol string
- The transport protocol for the external endpoint.
- Resource
Group stringName
- Backend
Address stringPool Id - A reference to a Backend Address Pool over which this Load Balancing Rule operates.
- Backend
Port int - The port used for internal connections on the endpoint.
- Disable
Outbound boolSnat - If outbound SNAT is enabled for this Load Balancer Rule.
- Enable
Floating boolIp - If Floating IPs are enabled for this Load Balancer Rule
- Enable
Tcp boolReset - If TCP Reset is enabled for this Load Balancer Rule.
- Frontend
Ip stringConfiguration Name - The name of the frontend IP configuration to which the rule is associated.
- Frontend
Port int - The port for the external endpoint.
- Id string
- The provider-assigned unique ID for this managed resource.
- Idle
Timeout intIn Minutes - Specifies the idle timeout in minutes for TCP connections.
- Load
Distribution string - Specifies the load balancing distribution type used by the Load Balancer.
- Loadbalancer
Id string - Name string
- Probe
Id string - A reference to a Probe used by this Load Balancing Rule.
- Protocol string
- The transport protocol for the external endpoint.
- Resource
Group stringName
- backend
Address StringPool Id - A reference to a Backend Address Pool over which this Load Balancing Rule operates.
- backend
Port Integer - The port used for internal connections on the endpoint.
- disable
Outbound BooleanSnat - If outbound SNAT is enabled for this Load Balancer Rule.
- enable
Floating BooleanIp - If Floating IPs are enabled for this Load Balancer Rule
- enable
Tcp BooleanReset - If TCP Reset is enabled for this Load Balancer Rule.
- frontend
Ip StringConfiguration Name - The name of the frontend IP configuration to which the rule is associated.
- frontend
Port Integer - The port for the external endpoint.
- id String
- The provider-assigned unique ID for this managed resource.
- idle
Timeout IntegerIn Minutes - Specifies the idle timeout in minutes for TCP connections.
- load
Distribution String - Specifies the load balancing distribution type used by the Load Balancer.
- loadbalancer
Id String - name String
- probe
Id String - A reference to a Probe used by this Load Balancing Rule.
- protocol String
- The transport protocol for the external endpoint.
- resource
Group StringName
- backend
Address stringPool Id - A reference to a Backend Address Pool over which this Load Balancing Rule operates.
- backend
Port number - The port used for internal connections on the endpoint.
- disable
Outbound booleanSnat - If outbound SNAT is enabled for this Load Balancer Rule.
- enable
Floating booleanIp - If Floating IPs are enabled for this Load Balancer Rule
- enable
Tcp booleanReset - If TCP Reset is enabled for this Load Balancer Rule.
- frontend
Ip stringConfiguration Name - The name of the frontend IP configuration to which the rule is associated.
- frontend
Port number - The port for the external endpoint.
- id string
- The provider-assigned unique ID for this managed resource.
- idle
Timeout numberIn Minutes - Specifies the idle timeout in minutes for TCP connections.
- load
Distribution string - Specifies the load balancing distribution type used by the Load Balancer.
- loadbalancer
Id string - name string
- probe
Id string - A reference to a Probe used by this Load Balancing Rule.
- protocol string
- The transport protocol for the external endpoint.
- resource
Group stringName
- backend_
address_ strpool_ id - A reference to a Backend Address Pool over which this Load Balancing Rule operates.
- backend_
port int - The port used for internal connections on the endpoint.
- disable_
outbound_ boolsnat - If outbound SNAT is enabled for this Load Balancer Rule.
- enable_
floating_ boolip - If Floating IPs are enabled for this Load Balancer Rule
- enable_
tcp_ boolreset - If TCP Reset is enabled for this Load Balancer Rule.
- frontend_
ip_ strconfiguration_ name - The name of the frontend IP configuration to which the rule is associated.
- frontend_
port int - The port for the external endpoint.
- id str
- The provider-assigned unique ID for this managed resource.
- idle_
timeout_ intin_ minutes - Specifies the idle timeout in minutes for TCP connections.
- load_
distribution str - Specifies the load balancing distribution type used by the Load Balancer.
- loadbalancer_
id str - name str
- probe_
id str - A reference to a Probe used by this Load Balancing Rule.
- protocol str
- The transport protocol for the external endpoint.
- resource_
group_ strname
- backend
Address StringPool Id - A reference to a Backend Address Pool over which this Load Balancing Rule operates.
- backend
Port Number - The port used for internal connections on the endpoint.
- disable
Outbound BooleanSnat - If outbound SNAT is enabled for this Load Balancer Rule.
- enable
Floating BooleanIp - If Floating IPs are enabled for this Load Balancer Rule
- enable
Tcp BooleanReset - If TCP Reset is enabled for this Load Balancer Rule.
- frontend
Ip StringConfiguration Name - The name of the frontend IP configuration to which the rule is associated.
- frontend
Port Number - The port for the external endpoint.
- id String
- The provider-assigned unique ID for this managed resource.
- idle
Timeout NumberIn Minutes - Specifies the idle timeout in minutes for TCP connections.
- load
Distribution String - Specifies the load balancing distribution type used by the Load Balancer.
- loadbalancer
Id String - name String
- probe
Id String - A reference to a Probe used by this Load Balancing Rule.
- protocol String
- The transport protocol for the external endpoint.
- resource
Group StringName
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
