次の方法で共有


DeviceRegistryAssetCollection.CreateOrUpdate 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 Azure.ResourceManager.ArmOperation<Azure.ResourceManager.DeviceRegistry.DeviceRegistryAssetResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string assetName, Azure.ResourceManager.DeviceRegistry.DeviceRegistryAssetData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.DeviceRegistry.DeviceRegistryAssetData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.DeviceRegistry.DeviceRegistryAssetResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.DeviceRegistry.DeviceRegistryAssetData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.DeviceRegistry.DeviceRegistryAssetResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, assetName As String, data As DeviceRegistryAssetData, Optional cancellationToken As CancellationToken = Nothing) As 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