Share via


ContainerGroupCollection.GetIfExists(String, CancellationToken) Method

Definition

Tries to get details for this resource from the service.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}
  • Operation Id: ContainerGroups_Get
  • Default Api Version: 2023-05-01
  • Resource: ContainerGroupResource
public virtual Azure.NullableResponse<Azure.ResourceManager.ContainerInstance.ContainerGroupResource> GetIfExists (string containerGroupName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.ContainerInstance.ContainerGroupResource>
override this.GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.ContainerInstance.ContainerGroupResource>
Public Overridable Function GetIfExists (containerGroupName As String, Optional cancellationToken As CancellationToken = Nothing) As NullableResponse(Of ContainerGroupResource)

Parameters

containerGroupName
String

The name of the container group.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

containerGroupName is null.

Applies to