Condividi tramite


ManagedClusterNamespaceCollection.GetIfExistsAsync Method

Definition

Tries to get details for this resource from the service.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}.
  • Operation Id. : ManagedNamespaces_Get.
  • Default Api Version. : 2026-01-01.
public virtual System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.ContainerService.ManagedClusterNamespaceResource>> GetIfExistsAsync(string managedNamespaceName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIfExistsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.ContainerService.ManagedClusterNamespaceResource>>
override this.GetIfExistsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.ContainerService.ManagedClusterNamespaceResource>>
Public Overridable Function GetIfExistsAsync (managedNamespaceName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of NullableResponse(Of ManagedClusterNamespaceResource))

Parameters

managedNamespaceName
String

The name of the managed namespace.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

managedNamespaceName is null.

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

Applies to