次の方法で共有


Set-AzIotHubMessageEnrichment

IoT ハブでメッセージ エンリッチメントを更新します。

構文

Set-AzIotHubMessageEnrichment
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Key] <String>
   [-Value <String>]
   [-Endpoint <String[]>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzIotHubMessageEnrichment
   [-InputObject] <PSIotHub>
   [-Key] <String>
   [-Value <String>]
   [-Endpoint <String[]>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzIotHubMessageEnrichment
   [-ResourceId] <String>
   [-Key] <String>
   [-Value <String>]
   [-Endpoint <String[]>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

説明

Azure IoT Hub のメッセージ エンリッチメントの詳細については、https://learn.microsoft.com/azure/iot-hub/iot-hub-message-enrichments-overview を参照してください。

例 1

Set-AzIotHubMessageEnrichment -ResourceGroupName "myresourcegroup" -Name "myiothub" -Key "newKey" -Value "updatedValue"

Key         : newKey
Value       : updatedValue
Endpoint(s) : {endpoint1, endpoint2}

エンリッチメントの値を、キー "newKey" の "updatedValue" に更新します。 Azure IoT Hub のメッセージ エンリッチメントの詳細については、https://learn.microsoft.com/azure/iot-hub/iot-hub-message-enrichments-overview を参照してください。

例 2

Set-AzIotHubMessageEnrichment -ResourceGroupName "myresourcegroup" -Name "myiothub" -Key "newKey" -Endpoint endpoint1,endpoint2,endpoint3

Key         : newKey
Value       : value1
Endpoint(s) : {endpoint1, endpoint2, endpoint3}

エンリッチメントのエンドポイントを、キー "newKey" の "endpoint1、endpoint2、endpoint3" に更新します。 Azure IoT Hub のメッセージ エンリッチメントの詳細については、https://learn.microsoft.com/azure/iot-hub/iot-hub-message-enrichments-overview を参照してください。

パラメーター

-Confirm

コマンドレットを実行する前に確認を求めるメッセージが表示されます。

型:SwitchParameter
Aliases:cf
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-DefaultProfile

Azure との通信に使用される資格情報、アカウント、テナント、サブスクリプション。

型:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-Endpoint

エンリッチメントを適用するエンドポイント。

型:String[]
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-InputObject

IotHub オブジェクト

型:PSIotHub
配置:0
規定値:None
必須:True
パイプライン入力を受け取る:True
ワイルドカード文字を受け取る:False

-Key

エンリッチメントのキー。

型:String
配置:1
規定値:None
必須:True
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-Name

IoT ハブの名前

型:String
配置:1
規定値:None
必須:True
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-ResourceGroupName

リソース グループの名前

型:String
配置:0
規定値:None
必須:True
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-ResourceId

IotHub リソース ID

型:String
配置:0
規定値:None
必須:True
パイプライン入力を受け取る:True
ワイルドカード文字を受け取る:False

-Value

エンリッチメントの値。

型:String
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-WhatIf

コマンドレットを実行した場合の動作を示します。 コマンドレットは実行されません。

型:SwitchParameter
Aliases:wi
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

入力

PSIotHub

String

出力

PSEnrichmentMetadata