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


ProvisioningServiceClient.GetDeviceRegistrationStateAsync Method

Definition

Overloads

GetDeviceRegistrationStateAsync(String)

Retrieve the registration status information.

GetDeviceRegistrationStateAsync(String, CancellationToken)

Retrieve the registration status information.

GetDeviceRegistrationStateAsync(String)

Retrieve the registration status information.

public System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.DeviceRegistrationState> GetDeviceRegistrationStateAsync (string id);
member this.GetDeviceRegistrationStateAsync : string -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.DeviceRegistrationState>
Public Function GetDeviceRegistrationStateAsync (id As String) As Task(Of DeviceRegistrationState)

Parameters

id
String

the string that identifies the DeviceRegistrationState. It cannot be null or empty.

Returns

The DeviceRegistrationState with the content of the DeviceRegistrationState in the Provisioning Device Service.

Exceptions

if the Provisioning Device Service was not able to retrieve the DeviceRegistrationState information for the provided registrationId.

Remarks

This method will return the DeviceRegistrationState for the provided id. It will retrieve the correspondent DeviceRegistrationState from the Device Provisioning Service, and return it in the DeviceRegistrationState object.

If the id does not exist, this method will throw ProvisioningServiceClientException.

Applies to

GetDeviceRegistrationStateAsync(String, CancellationToken)

Retrieve the registration status information.

public System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.DeviceRegistrationState> GetDeviceRegistrationStateAsync (string id, System.Threading.CancellationToken cancellationToken);
member this.GetDeviceRegistrationStateAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.DeviceRegistrationState>
Public Function GetDeviceRegistrationStateAsync (id As String, cancellationToken As CancellationToken) As Task(Of DeviceRegistrationState)

Parameters

id
String

the string that identifies the DeviceRegistrationState. It cannot be null or empty.

cancellationToken
CancellationToken

The cancellation token.

Returns

The DeviceRegistrationState with the content of the DeviceRegistrationState in the Provisioning Device Service.

Exceptions

if the Provisioning Device Service was not able to retrieve the DeviceRegistrationState information for the provided registrationId.

Remarks

This method will return the DeviceRegistrationState for the provided id. It will retrieve the correspondent DeviceRegistrationState from the Device Provisioning Service, and return it in the DeviceRegistrationState object.

If the id does not exist, this method will throw ProvisioningServiceClientException.

Applies to