Share via


ProvisioningServiceClient.RunBulkEnrollmentOperationAsync Method

Definition

Overloads

RunBulkEnrollmentOperationAsync(BulkOperationMode, IEnumerable<IndividualEnrollment>)

Create, update or delete a set of individual Device Enrollments.

RunBulkEnrollmentOperationAsync(BulkOperationMode, IEnumerable<IndividualEnrollment>, CancellationToken)

Create, update or delete a set of individual Device Enrollments.

RunBulkEnrollmentOperationAsync(BulkOperationMode, IEnumerable<IndividualEnrollment>)

Create, update or delete a set of individual Device Enrollments.

public System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.BulkEnrollmentOperationResult> RunBulkEnrollmentOperationAsync (Microsoft.Azure.Devices.Provisioning.Service.BulkOperationMode bulkOperationMode, System.Collections.Generic.IEnumerable<Microsoft.Azure.Devices.Provisioning.Service.IndividualEnrollment> individualEnrollments);
member this.RunBulkEnrollmentOperationAsync : Microsoft.Azure.Devices.Provisioning.Service.BulkOperationMode * seq<Microsoft.Azure.Devices.Provisioning.Service.IndividualEnrollment> -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.BulkEnrollmentOperationResult>
Public Function RunBulkEnrollmentOperationAsync (bulkOperationMode As BulkOperationMode, individualEnrollments As IEnumerable(Of IndividualEnrollment)) As Task(Of BulkEnrollmentOperationResult)

Parameters

bulkOperationMode
BulkOperationMode

the BulkOperationMode that defines the single operation to do over the individualEnrollments. It cannot be null.

individualEnrollments
IEnumerable<IndividualEnrollment>

the collection of IndividualEnrollment that contains the description of each individualEnrollment. It cannot be null or empty.

Returns

A BulkEnrollmentOperationResult object with the result of operation for each enrollment.

Exceptions

if the provided parameters are not correct.

if the SDK failed to send the request to the Device Provisioning Service.

if the Device Provisioning Service was not able to execute the bulk operation.

Remarks

This API provide the means to do a single operation over multiple individualEnrollments. A valid operation is determined by BulkOperationMode, and can be 'create', 'update', 'updateIfMatchETag', or 'delete'.

Applies to

RunBulkEnrollmentOperationAsync(BulkOperationMode, IEnumerable<IndividualEnrollment>, CancellationToken)

Create, update or delete a set of individual Device Enrollments.

public System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.BulkEnrollmentOperationResult> RunBulkEnrollmentOperationAsync (Microsoft.Azure.Devices.Provisioning.Service.BulkOperationMode bulkOperationMode, System.Collections.Generic.IEnumerable<Microsoft.Azure.Devices.Provisioning.Service.IndividualEnrollment> individualEnrollments, System.Threading.CancellationToken cancellationToken);
member this.RunBulkEnrollmentOperationAsync : Microsoft.Azure.Devices.Provisioning.Service.BulkOperationMode * seq<Microsoft.Azure.Devices.Provisioning.Service.IndividualEnrollment> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.BulkEnrollmentOperationResult>
Public Function RunBulkEnrollmentOperationAsync (bulkOperationMode As BulkOperationMode, individualEnrollments As IEnumerable(Of IndividualEnrollment), cancellationToken As CancellationToken) As Task(Of BulkEnrollmentOperationResult)

Parameters

bulkOperationMode
BulkOperationMode

the BulkOperationMode that defines the single operation to do over the individualEnrollments. It cannot be null.

individualEnrollments
IEnumerable<IndividualEnrollment>

the collection of IndividualEnrollment that contains the description of each individualEnrollment. It cannot be null or empty.

cancellationToken
CancellationToken

The cancellation token.

Returns

A BulkEnrollmentOperationResult object with the result of operation for each enrollment.

Exceptions

if the provided parameters are not correct.

if the SDK failed to send the request to the Device Provisioning Service.

if the Device Provisioning Service was not able to execute the bulk operation.

Remarks

This API provide the means to do a single operation over multiple individualEnrollments. A valid operation is determined by BulkOperationMode, and can be 'create', 'update', 'updateIfMatchETag', or 'delete'.

Applies to