共用方式為


Get-AzIotHubMessageEnrichment

列出 IoT 中樞 的所有訊息擴充或特定訊息擴充。

語法

Get-AzIotHubMessageEnrichment
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Key <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzIotHubMessageEnrichment
   [-InputObject] <PSIotHub>
   [-Key <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzIotHubMessageEnrichment
   [-ResourceId] <String>
   [-Key <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

如需訊息擴充 Azure IoT 中樞 的詳細說明,請參閱https://learn.microsoft.com/azure/iot-hub/iot-hub-message-enrichments-overview

範例

範例 1

Get-AzIotHubMessageEnrichment -ResourceGroupName "myresourcegroup" -Name "myiothub"

Key  Value   Endpoint(s)
---  -----   -----------
key1 value1  {endpoint1, endpoint2}
key2 value2  {endpoint3, endpoint4}

列出 MyIotHub 中的所有訊息擴充

範例 2

Get-AzIotHubMessageEnrichment -ResourceGroupName "myresourcegroup" -Name "myiothub" -Key "newKey"

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

顯示 「newKey」 訊息擴充的詳細數據。

參數

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-InputObject

IotHub 物件

類型:PSIotHub
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Key

擴充的索引鍵。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Name

IoT 中樞的名稱

類型:String
Position:1
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ResourceGroupName

資源群組的名稱

類型:String
Position:0
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ResourceId

IotHub 資源標識碼

類型:String
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

輸入

PSIotHub

String

輸出

PSEnrichmentMetadata

PSEnrichmentProperties[]