EnrollmentGroupsClient.RunBulkOperationAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Create, update or delete a set of enrollment groups.
public System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.BulkEnrollmentOperationResult> RunBulkOperationAsync (Microsoft.Azure.Devices.Provisioning.Service.BulkOperationMode bulkOperationMode, System.Collections.Generic.IEnumerable<Microsoft.Azure.Devices.Provisioning.Service.EnrollmentGroup> enrollmentGroups, System.Threading.CancellationToken cancellationToken = default);
member this.RunBulkOperationAsync : Microsoft.Azure.Devices.Provisioning.Service.BulkOperationMode * seq<Microsoft.Azure.Devices.Provisioning.Service.EnrollmentGroup> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.BulkEnrollmentOperationResult>
Public Function RunBulkOperationAsync (bulkOperationMode As BulkOperationMode, enrollmentGroups As IEnumerable(Of EnrollmentGroup), Optional cancellationToken As CancellationToken = Nothing) As Task(Of BulkEnrollmentOperationResult)
Parameters
- bulkOperationMode
- BulkOperationMode
The BulkOperationMode that defines the single operation to do over the enrollment group. It cannot be null.
- enrollmentGroups
- IEnumerable<EnrollmentGroup>
The collection of EnrollmentGroup that contains the description of each enrollment group. It cannot be null or empty.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
An object with the result of each operation.
Exceptions
If the client failed to send the request or service was not able to execute the bulk operation.
If the provided enrollmentGroups
is null.
If the provided enrollmentGroups
is an empty collection.
If the client failed to send the request or service was not able to execute the bulk operation.
If the provided cancellationToken
has requested cancellation.
Remarks
This API provide the means to do a single operation over multiple enrollment groups. A valid operation is determined by BulkOperationMode, and can be 'create', 'update', 'updateIfMatchETag', or 'delete'.
Applies to
Azure SDK for .NET