Partager via


DeviceRegistryDiscoveredAssetCollection.GetIfExists Method

Definition

Tries to get details for this resource from the service.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssets/{discoveredAssetName}
  • Operation Id: DiscoveredAsset_Get
  • Default Api Version: 2024-09-01-preview
  • Resource: DeviceRegistryDiscoveredAssetResource
public virtual Azure.NullableResponse<Azure.ResourceManager.DeviceRegistry.DeviceRegistryDiscoveredAssetResource> GetIfExists (string discoveredAssetName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.DeviceRegistry.DeviceRegistryDiscoveredAssetResource>
override this.GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.DeviceRegistry.DeviceRegistryDiscoveredAssetResource>
Public Overridable Function GetIfExists (discoveredAssetName As String, Optional cancellationToken As CancellationToken = Nothing) As NullableResponse(Of DeviceRegistryDiscoveredAssetResource)

Parameters

discoveredAssetName
String

Discovered Asset name parameter.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

discoveredAssetName is null.

Applies to