EnrollmentGroupsClient.CreateOrUpdateAsync 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 or update an enrollment group.
public System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.EnrollmentGroup> CreateOrUpdateAsync (Microsoft.Azure.Devices.Provisioning.Service.EnrollmentGroup enrollmentGroup, System.Threading.CancellationToken cancellationToken = default);
member this.CreateOrUpdateAsync : Microsoft.Azure.Devices.Provisioning.Service.EnrollmentGroup * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.EnrollmentGroup>
Public Function CreateOrUpdateAsync (enrollmentGroup As EnrollmentGroup, Optional cancellationToken As CancellationToken = Nothing) As Task(Of EnrollmentGroup)
Parameters
- enrollmentGroup
- EnrollmentGroup
The enrollment group to create or update.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
The created or updated enrollment group.
Exceptions
If the service was not able to create or update the enrollment.
If the provided enrollmentGroup
is null.
If the service was not able to create or update the enrollment.
If the provided cancellationToken
has requested cancellation.
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 enrollment group information by the new one. On the other hand, if the enrollmentGroupId does not exit, it will be created.
Applies to
Azure SDK for .NET