DeviceProvisioningServiceCollection.CreateOrUpdateAsync Method

Definition

Create or update the metadata of the provisioning service. The usual pattern to modify a property is to retrieve the provisioning service metadata and security metadata, and then combine them with the modified values in a new body to update the provisioning service.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}
  • Operation Id: IotDpsResource_CreateOrUpdate
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.DeviceProvisioningServices.DeviceProvisioningServiceResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string provisioningServiceName, Azure.ResourceManager.DeviceProvisioningServices.DeviceProvisioningServiceData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.DeviceProvisioningServices.DeviceProvisioningServiceData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.DeviceProvisioningServices.DeviceProvisioningServiceResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.DeviceProvisioningServices.DeviceProvisioningServiceData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.DeviceProvisioningServices.DeviceProvisioningServiceResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, provisioningServiceName As String, data As DeviceProvisioningServiceData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of DeviceProvisioningServiceResource))

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.

provisioningServiceName
String

Name of provisioning service to create or update.

data
DeviceProvisioningServiceData

Description of the provisioning service to create or update.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

provisioningServiceName or data is null.

Applies to