ContainerServiceMachineCollection.GetIfExists Method

Definition

Tries to get details for this resource from the service.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}.
  • Operation Id. : Machines_Get.
  • Default Api Version. : 2026-04-02-preview.
public virtual Azure.NullableResponse<Azure.ResourceManager.ContainerService.ContainerServiceMachineResource> GetIfExists(string machineName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.ContainerService.ContainerServiceMachineResource>
override this.GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.ContainerService.ContainerServiceMachineResource>
Public Overridable Function GetIfExists (machineName As String, Optional cancellationToken As CancellationToken = Nothing) As NullableResponse(Of ContainerServiceMachineResource)

Parameters

machineName
String

Host name of the machine.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

machineName is null.

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

Applies to