Share via


ProvisioningServiceClient.CreateOrUpdateEnrollmentGroupAsync Method

Definition

Overloads

CreateOrUpdateEnrollmentGroupAsync(EnrollmentGroup)

Create or update an enrollment group record.

CreateOrUpdateEnrollmentGroupAsync(EnrollmentGroup, CancellationToken)

Create or update an enrollment group record.

CreateOrUpdateEnrollmentGroupAsync(EnrollmentGroup)

Create or update an enrollment group record.

public System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.EnrollmentGroup> CreateOrUpdateEnrollmentGroupAsync (Microsoft.Azure.Devices.Provisioning.Service.EnrollmentGroup enrollmentGroup);
member this.CreateOrUpdateEnrollmentGroupAsync : Microsoft.Azure.Devices.Provisioning.Service.EnrollmentGroup -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.EnrollmentGroup>
Public Function CreateOrUpdateEnrollmentGroupAsync (enrollmentGroup As EnrollmentGroup) As Task(Of EnrollmentGroup)

Parameters

enrollmentGroup
EnrollmentGroup

the EnrollmentGroup object that describes the individualEnrollment that will be created of updated.

Returns

An EnrollmentGroup object with the result of the create or update requested.

Exceptions

if the Provisioning was not able to create or update the enrollment.

Remarks

This API creates a new enrollment group or update a existed one. All enrollment group in the Device Provisioning Service contains a unique identifier called enrollmentGroupId. If this API is called with an enrollmentGroupId that already exists, it will replace the existed enrollmentGroup information by the new one. On the other hand, if the enrollmentGroupId does not exit, it will be created.

To use the Device Provisioning Service API, you must include the follow package on your application. // Include the following using to use the Device Provisioning Service APIs. using Microsoft.Azure.Devices.Provisioning.Service;

Applies to

CreateOrUpdateEnrollmentGroupAsync(EnrollmentGroup, CancellationToken)

Create or update an enrollment group record.

public System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.EnrollmentGroup> CreateOrUpdateEnrollmentGroupAsync (Microsoft.Azure.Devices.Provisioning.Service.EnrollmentGroup enrollmentGroup, System.Threading.CancellationToken cancellationToken);
member this.CreateOrUpdateEnrollmentGroupAsync : Microsoft.Azure.Devices.Provisioning.Service.EnrollmentGroup * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.EnrollmentGroup>
Public Function CreateOrUpdateEnrollmentGroupAsync (enrollmentGroup As EnrollmentGroup, cancellationToken As CancellationToken) As Task(Of EnrollmentGroup)

Parameters

enrollmentGroup
EnrollmentGroup

the EnrollmentGroup object that describes the individualEnrollment that will be created of updated.

cancellationToken
CancellationToken

The cancellation token.

Returns

An EnrollmentGroup object with the result of the create or update requested.

Exceptions

if the Provisioning was not able to create or update the enrollment.

Remarks

This API creates a new enrollment group or update a existed one. All enrollment group in the Device Provisioning Service contains a unique identifier called enrollmentGroupId. If this API is called with an enrollmentGroupId that already exists, it will replace the existed enrollmentGroup information by the new one. On the other hand, if the enrollmentGroupId does not exit, it will be created.

To use the Device Provisioning Service API, you must include the follow package on your application. // Include the following using to use the Device Provisioning Service APIs. using Microsoft.Azure.Devices.Provisioning.Service;

Applies to