Share via


你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

IotHubResourceOperationsExtensions.BeginCreateOrUpdateAsync 方法

定义

创建或更新 IoT 中心的元数据。

public static System.Threading.Tasks.Task<Microsoft.Azure.Management.IotHub.Models.IotHubDescription> BeginCreateOrUpdateAsync (this Microsoft.Azure.Management.IotHub.IIotHubResourceOperations operations, string resourceGroupName, string resourceName, Microsoft.Azure.Management.IotHub.Models.IotHubDescription iotHubDescription, string ifMatch = default, System.Threading.CancellationToken cancellationToken = default);
static member BeginCreateOrUpdateAsync : 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>
<Extension()>
Public Function BeginCreateOrUpdateAsync (operations As IIotHubResourceOperations, resourceGroupName As String, resourceName As String, iotHubDescription As IotHubDescription, Optional ifMatch As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IotHubDescription)

参数

operations
IIotHubResourceOperations

此扩展方法的操作组。

resourceGroupName
String

包含 IoT 中心的资源组的名称。

resourceName
String

IoT 中心的名称。

iotHubDescription
IotHubDescription

IoT 中心元数据和安全元数据。

ifMatch
String

IoT 中心的 ETag。 不要指定 用于创建全新的IoT 中心。 更新现有IoT 中心所必需的。

cancellationToken
CancellationToken

取消标记。

返回

注解

创建或更新 IoT 中心的元数据。 修改属性的常用模式是检索 IoT 中心元数据和安全元数据,然后将它们与新正文中修改的值合并,以更新 IoT 中心。 如果 JSON 中缺少某些属性,更新IoT 中心可能会导致这些值回退为默认值,这可能会导致意外行为。

适用于