Udostępnij za pośrednictwem


IIotHubResourceOperations.BeginCreateOrUpdateWithHttpMessagesAsync Method

Definition

Create or update the metadata of an IoT hub.

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Management.IotHub.Models.IotHubDescription>> BeginCreateOrUpdateWithHttpMessagesAsync (string resourceGroupName, string resourceName, Microsoft.Azure.Management.IotHub.Models.IotHubDescription iotHubDescription, string ifMatch = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member BeginCreateOrUpdateWithHttpMessagesAsync : string * string * Microsoft.Azure.Management.IotHub.Models.IotHubDescription * string * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Management.IotHub.Models.IotHubDescription>>
Public Function BeginCreateOrUpdateWithHttpMessagesAsync (resourceGroupName As String, resourceName As String, iotHubDescription As IotHubDescription, Optional ifMatch As String = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationResponse(Of IotHubDescription))

Parameters

resourceGroupName
String

The name of the resource group that contains the IoT hub.

resourceName
String

The name of the IoT hub.

iotHubDescription
IotHubDescription

The IoT hub metadata and security metadata.

ifMatch
String

ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required to update an existing IoT Hub.

customHeaders
Dictionary<String,List<String>>

The headers that will be added to request.

cancellationToken
CancellationToken

The cancellation token.

Returns

Exceptions

Thrown when the operation returned an invalid status code

Thrown when unable to deserialize the response

Thrown when a required parameter is null

Remarks

Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub metadata and security metadata, and then combine them with the modified values in a new body to update the IoT hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to default, which may lead to unexpected behavior.

Applies to