Partilhar via


DeviceRegistryAssetCollection.CreateOrUpdateAsync Method

Definition

Create a Asset

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

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.

assetName
String

Asset name parameter.

data
DeviceRegistryAssetData

Resource create parameters.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

assetName or data is null.

Applies to