LoadBalancerCollection.Exists Method

Definition

Overloads

Name Description
Exists(String, String, Nullable<LoadBalancerDetailLevel>, CancellationToken)

Checks to see if the resource exists in azure.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}.
  • Operation Id. : LoadBalancers_Get.
  • Default Api Version. : 2025-07-01.
Exists(String, String, CancellationToken)

Invokes the Exists compatibility operation.

Exists(String, String, Nullable<LoadBalancerDetailLevel>, CancellationToken)

Source:
LoadBalancerCollection.cs

Checks to see if the resource exists in azure.

  • 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<bool> Exists(string loadBalancerName, string expand = default, Azure.ResourceManager.Network.Models.LoadBalancerDetailLevel? detailLevel = default, System.Threading.CancellationToken cancellationToken = default);
abstract member Exists : string * string * Nullable<Azure.ResourceManager.Network.Models.LoadBalancerDetailLevel> * System.Threading.CancellationToken -> Azure.Response<bool>
override this.Exists : string * string * Nullable<Azure.ResourceManager.Network.Models.LoadBalancerDetailLevel> * System.Threading.CancellationToken -> Azure.Response<bool>
Public Overridable Function Exists (loadBalancerName As String, Optional expand As String = Nothing, Optional detailLevel As Nullable(Of LoadBalancerDetailLevel) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of Boolean)

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

Exists(String, String, CancellationToken)

Source:
LoadBalancerCollection.cs
Source:
LoadBalancerCollection.cs

Invokes the Exists compatibility operation.

public virtual Azure.Response<bool> Exists(string p0, string p1, System.Threading.CancellationToken p2);
public virtual Azure.Response<bool> Exists(string loadBalancerName, string expand = default, System.Threading.CancellationToken cancellationToken = default);
abstract member Exists : string * string * System.Threading.CancellationToken -> Azure.Response<bool>
override this.Exists : string * string * System.Threading.CancellationToken -> Azure.Response<bool>
abstract member Exists : string * string * System.Threading.CancellationToken -> Azure.Response<bool>
override this.Exists : string * string * System.Threading.CancellationToken -> Azure.Response<bool>
Public Overridable Function Exists (p0 As String, p1 As String, p2 As CancellationToken) As Response(Of Boolean)
Public Overridable Function Exists (loadBalancerName As String, Optional expand As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of Boolean)

Parameters

p0loadBalancerName
String
p1expand
String
p2cancellationToken
CancellationToken

Returns

Exceptions

loadBalancerName is an empty string, and was expected to be non-empty.

loadBalancerName is null.

Applies to