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

Update-AzIoTDeviceProvisioningServiceLinkedHub

在 Azure IoT 中心设备预配服务中更新链接的 IoT 中心。

语法

Update-AzIoTDeviceProvisioningServiceLinkedHub
      [-ResourceGroupName] <String>
      [-Name] <String>
      [-LinkedHubName] <String>
      [-AllocationWeight <Int32>]
      [-ApplyAllocationPolicy]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzIoTDeviceProvisioningServiceLinkedHub
      [-InputObject] <PSIotHubDefinitionDescription>
      [-AllocationWeight <Int32>]
      [-ApplyAllocationPolicy]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzIoTDeviceProvisioningServiceLinkedHub
      [-ResourceId] <String>
      [-LinkedHubName] <String>
      [-AllocationWeight <Int32>]
      [-ApplyAllocationPolicy]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

说明

有关 Azure IoT 中心设备预配服务的简介,请参阅 https://learn.microsoft.com/azure/iot-dps/about-iot-dps

示例

示例 1

Update-AzIoTDeviceProvisioningServiceLinkedHub -ResourceGroupName "myresourcegroup" -Name "myiotdps" -LinkedHubName "myiothub" -AllocationWeight 10 -ApplyAllocationPolicy

ResourceGroupName     : myresourcegroup
Name                  : myiotdps
LinkedHubName         : myiothub.azure-devices.net
ConnectionString      : HostName=myiothub.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=****
AllocationWeight      : 10
ApplyAllocationPolicy : True
Location              : eastus

更新 Azure IoT 中心设备预配服务中链接的 IoT 中心“myiothub.azure-devices.net”。

参数

-AllocationWeight

IoT 中心的分配权重

类型:Nullable<T>[Int32]
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-ApplyAllocationPolicy

将分配策略应用于 IoT 中心

类型:SwitchParameter
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-Confirm

在运行 cmdlet 之前,提示你进行确认。

类型:SwitchParameter
别名:cf
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-DefaultProfile

用于与 Azure 通信的凭据、帐户、租户和订阅。

类型:IAzureContextContainer
别名:AzContext, AzureRmContext, AzureCredential
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-InputObject

IoT 设备预配服务对象

类型:PSIotHubDefinitionDescription
Position:0
默认值:None
必需:True
接受管道输入:True
接受通配符:False

-LinkedHubName

链接的 IoT 中心的主机名

类型:String
Position:1
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-Name

IoT 设备预配服务的名称

类型:String
Position:1
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-ResourceGroupName

资源组的名称

类型:String
Position:0
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-ResourceId

IoT 设备预配服务资源 ID

类型:String
Position:0
默认值:None
必需:True
接受管道输入:True
接受通配符:False

-WhatIf

显示 cmdlet 运行时会发生什么情况。 cmdlet 未运行。

类型:SwitchParameter
别名:wi
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

输入

PSIotHubDefinitionDescription

String

输出

PSIotHubDefinitionDescription