ConfigurationsClient.ApplyConfigurationContentOnDeviceAsync Method

Definition

Applies configuration content to an Edge device.

public virtual System.Threading.Tasks.Task ApplyConfigurationContentOnDeviceAsync (string deviceId, Microsoft.Azure.Devices.ConfigurationContent content, System.Threading.CancellationToken cancellationToken = default);
abstract member ApplyConfigurationContentOnDeviceAsync : string * Microsoft.Azure.Devices.ConfigurationContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.ApplyConfigurationContentOnDeviceAsync : string * Microsoft.Azure.Devices.ConfigurationContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function ApplyConfigurationContentOnDeviceAsync (deviceId As String, content As ConfigurationContent, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

deviceId
String

The device Id.

content
ConfigurationContent

The configuration.

cancellationToken
CancellationToken

The token which allows the operation to be canceled.

Returns

Exceptions

Thrown when the provided deviceId or content is null.

Thrown if the deviceId is empty or whitespace.

Thrown if IoT hub responded to the request with a non-successful status code. For example, if the provided request was throttled, IotHubServiceException with ThrottlingException is thrown. For a complete list of possible error cases, see IotHubServiceErrorCode.

If the HTTP request fails due to an underlying issue such as network connectivity, DNS failure, or server certificate validation.

If the provided cancellationToken has requested cancellation.

Remarks

ModulesContent is required. DeviceContent is optional. ModuleContent is not applicable.

Applies to