Megosztás a következőn keresztül:


ContainerGroupCollection.GetIfExistsAsync(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: 2024-05-01-preview
  • Resource: ContainerGroupResource
public virtual System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.ContainerInstance.ContainerGroupResource>> GetIfExistsAsync (string containerGroupName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIfExistsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.ContainerInstance.ContainerGroupResource>>
override this.GetIfExistsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.ContainerInstance.ContainerGroupResource>>
Public Overridable Function GetIfExistsAsync (containerGroupName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of 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