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


EnrollmentGroupsClient.GetAsync(String, CancellationToken) Method

Definition

Get an enrollment group by its Id.

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

Parameters

enrollmentGroupId
String

The Id of the enrollmentGroup.

cancellationToken
CancellationToken

The cancellation token.

Returns

The retrieved enrollment group.

Exceptions

Microsoft.Azure.Devices.Provisioning.Service.DeviceProvisioningServiceException

If the service was not able to retrieve the enrollment group information for the provided enrollmentGroupId.

If the provided enrollmentGroupId is null.

If the provided enrollmentGroupId is empty or white space.

If the service was not able to retrieve the enrollment group information for the provided enrollmentGroupId.

If the provided cancellationToken has requested cancellation.

Applies to