IotHubResourceOperationsExtensions.CreateOrUpdateAsync(IIotHubResourceOperations, String, String, IotHubDescription, String, CancellationToken) Method

Definition

Create or update the metadata of an IoT hub.

public static System.Threading.Tasks.Task<Microsoft.Azure.Management.IotHub.Models.IotHubDescription> CreateOrUpdateAsync (this Microsoft.Azure.Management.IotHub.IIotHubResourceOperations operations, string resourceGroupName, string resourceName, Microsoft.Azure.Management.IotHub.Models.IotHubDescription iotHubDescription, string ifMatch = null, System.Threading.CancellationToken cancellationToken = null);
static member CreateOrUpdateAsync : Microsoft.Azure.Management.IotHub.IIotHubResourceOperations * string * string * Microsoft.Azure.Management.IotHub.Models.IotHubDescription * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Management.IotHub.Models.IotHubDescription>

Parameters

operations
IIotHubResourceOperations

The operations group for this extension method.

resourceGroupName
System.String

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

resourceName
System.String

The name of the IoT hub.

iotHubDescription
IotHubDescription

The IoT hub metadata and security metadata.

ifMatch
System.String

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

cancellationToken
System.Threading.CancellationToken

The cancellation token.

Returns

System.Threading.Tasks.Task<IotHubDescription>

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.

Applies to