Share via


IotHubResourceOperationsExtensions.CreateOrUpdate Method

Definition

Create or update the metadata of an IoT hub.

public static Microsoft.Azure.Management.IotHub.Models.IotHubDescription CreateOrUpdate (this Microsoft.Azure.Management.IotHub.IIotHubResourceOperations operations, string resourceGroupName, string resourceName, Microsoft.Azure.Management.IotHub.Models.IotHubDescription iotHubDescription, string ifMatch = default);
static member CreateOrUpdate : Microsoft.Azure.Management.IotHub.IIotHubResourceOperations * string * string * Microsoft.Azure.Management.IotHub.Models.IotHubDescription * string -> Microsoft.Azure.Management.IotHub.Models.IotHubDescription
<Extension()>
Public Function CreateOrUpdate (operations As IIotHubResourceOperations, resourceGroupName As String, resourceName As String, iotHubDescription As IotHubDescription, Optional ifMatch As String = Nothing) As IotHubDescription

Parameters

operations
IIotHubResourceOperations

The operations group for this extension method.

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.

Returns

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