Get-AzIotHubMessageEnrichment

Lists all message enrichments or a particular message enrichment for your IoT Hub.

Syntax

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

For a detailed explanation of message enrichments in Azure IoT Hub, see https://learn.microsoft.com/azure/iot-hub/iot-hub-message-enrichments-overview

Examples

Example 1

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

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

List all message enrichments in MyIotHub

Example 2

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

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

Show details about "newKey" message enrichment.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

IotHub object

Type:PSIotHub
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Key

The enrichment's key.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Name of the Iot Hub

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Name of the Resource Group

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceId

IotHub Resource Id

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

PSIotHub

String

Outputs

PSEnrichmentMetadata

PSEnrichmentProperties[]