你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

EnrollmentGroupsClient.GetAsync(String, CancellationToken) 方法

定义

按 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)

参数

enrollmentGroupId
String

enrollmentGroup 的 ID。

cancellationToken
CancellationToken

取消标记。

返回

检索到的注册组。

例外

Microsoft.Azure.Devices.Provisioning.Service.DeviceProvisioningServiceException

如果服务无法检索提供的 enrollmentGroupId的注册组信息。

如果提供的 enrollmentGroupId 为 null。

如果提供的 enrollmentGroupId 为空或空白。

如果服务无法检索提供的 enrollmentGroupId的注册组信息。

如果提供的 cancellationToken 已请求取消。

适用于