Partager via


DeviceRegistryDiscoveredAssetCollection.CreateOrUpdateAsync Method

Definition

Create a DiscoveredAsset

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

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

discoveredAssetName
String

Discovered Asset name parameter.

data
DeviceRegistryDiscoveredAssetData

Resource create parameters.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

discoveredAssetName or data is null.

Applies to