Condividi tramite


TaskCollection.GetIfExists(String, CancellationToken) Method

Definition

Tries to get details for this resource from the service.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tasks/{taskName}.
  • Operation Id. : Tasks_Get.
  • Default Api Version. : 2025-03-01-preview.
public virtual Azure.NullableResponse<Azure.ResourceManager.ContainerRegistry.Tasks.TaskResource> GetIfExists(string taskName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.ContainerRegistry.Tasks.TaskResource>
override this.GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.ContainerRegistry.Tasks.TaskResource>
Public Overridable Function GetIfExists (taskName As String, Optional cancellationToken As CancellationToken = Nothing) As NullableResponse(Of TaskResource)

Parameters

taskName
String

The name of the container registry task.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

taskName is null.

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

Applies to