MockableNetworkResourceGroupResource.GetLoadBalancer Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| GetLoadBalancer(String, String, Nullable<LoadBalancerDetailLevel>, CancellationToken) |
Gets the specified load balancer.
|
| GetLoadBalancer(String, String, CancellationToken) |
Invokes the GetLoadBalancer compatibility operation. |
GetLoadBalancer(String, String, Nullable<LoadBalancerDetailLevel>, CancellationToken)
Gets the specified load balancer.
- Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}.
- Operation Id. : LoadBalancers_Get.
- Default Api Version. : 2025-07-01.
public virtual Azure.Response<Azure.ResourceManager.Network.LoadBalancerResource> GetLoadBalancer(string loadBalancerName, string expand = default, Azure.ResourceManager.Network.Models.LoadBalancerDetailLevel? detailLevel = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetLoadBalancer : string * string * Nullable<Azure.ResourceManager.Network.Models.LoadBalancerDetailLevel> * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Network.LoadBalancerResource>
override this.GetLoadBalancer : string * string * Nullable<Azure.ResourceManager.Network.Models.LoadBalancerDetailLevel> * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Network.LoadBalancerResource>
Public Overridable Function GetLoadBalancer (loadBalancerName As String, Optional expand As String = Nothing, Optional detailLevel As Nullable(Of LoadBalancerDetailLevel) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of LoadBalancerResource)
Parameters
- loadBalancerName
- String
The name of the load balancer.
- expand
- String
Expands referenced resources.
- detailLevel
- Nullable<LoadBalancerDetailLevel>
Controls verbosity of the returned load balancer resource. When set to 'Reduced', read-only back-reference collections (e.g., rules referencing frontendIPConfigurations) are omitted from the response.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
loadBalancerName is null.
loadBalancerName is an empty string, and was expected to be non-empty.
Applies to
GetLoadBalancer(String, String, CancellationToken)
Invokes the GetLoadBalancer compatibility operation.
public virtual Azure.Response<Azure.ResourceManager.Network.LoadBalancerResource> GetLoadBalancer(string loadBalancerName, string expand = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetLoadBalancer : string * string * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Network.LoadBalancerResource>
override this.GetLoadBalancer : string * string * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Network.LoadBalancerResource>
Public Overridable Function GetLoadBalancer (loadBalancerName As String, Optional expand As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of LoadBalancerResource)
Parameters
- loadBalancerName
- String
The name of the load balancer.
- expand
- String
Expands referenced resources.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
loadBalancerName is null.
loadBalancerName is an empty string, and was expected to be non-empty.