Megosztás a következőn keresztül:


IndividualEnrollmentsClient.CreateOrUpdateAsync Method

Definition

Create or update an individual enrollment.

public System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.IndividualEnrollment> CreateOrUpdateAsync (Microsoft.Azure.Devices.Provisioning.Service.IndividualEnrollment individualEnrollment, System.Threading.CancellationToken cancellationToken = default);
member this.CreateOrUpdateAsync : Microsoft.Azure.Devices.Provisioning.Service.IndividualEnrollment * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.IndividualEnrollment>
Public Function CreateOrUpdateAsync (individualEnrollment As IndividualEnrollment, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IndividualEnrollment)

Parameters

individualEnrollment
IndividualEnrollment

The individual enrollment to create or update.

cancellationToken
CancellationToken

The cancellation token.

Returns

The created or updated individual enrollment.

Exceptions

Microsoft.Azure.Devices.Provisioning.Service.DeviceProvisioningServiceException

If the service was not able to create or update the enrollment.

If the provided individualEnrollment is null.

If the service was not able to create or update the enrollment.

If the provided cancellationToken has requested cancellation.

Applies to