az iot hub message-enrichment

Manage message enrichments for endpoints of an IoT Hub.

Commands

az iot hub message-enrichment create Create a message enrichment for chosen endpoints in your IoT Hub.
az iot hub message-enrichment delete Delete a message enrichment in your IoT hub (by key).
az iot hub message-enrichment list Get information on all message enrichments for your IoT Hub.
az iot hub message-enrichment update Update a message enrichment in your IoT hub (by key).

az iot hub message-enrichment create

Create a message enrichment for chosen endpoints in your IoT Hub.

az iot hub message-enrichment create --endpoints
--key
--name
--value
[--resource-group]
[--subscription]

Examples

Create a message enrichment of {"key":"value"} for the "events" endpoint in your IoT Hub

az iot hub message-enrichment create --key key --value value --endpoints events -n {iothub_name}

Required Parameters

--endpoints -e

Endpoint(s) to apply enrichments to. Use a space-separated list for multiple endpoints.

--key -k

The enrichment's key.

--name -n

IoT Hub name.

--value -v

The enrichment's value.

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az iot hub message-enrichment delete

Delete a message enrichment in your IoT hub (by key).

az iot hub message-enrichment delete --key
[--ids]
[--name]
[--resource-group]
[--subscription]

Examples

Delete a message enrichment with key 'test' from your IoT Hub

az iot hub message-enrichment delete --key test -n {iothub_name}

Required Parameters

--key -k

The enrichment's key.

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. If provided, no other 'Resource Id' arguments should be specified.

--name -n

IoT Hub name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az iot hub message-enrichment list

Get information on all message enrichments for your IoT Hub.

az iot hub message-enrichment list [--ids]
[--name]
[--resource-group]
[--subscription]

Examples

List all message enrichments for your IoT Hub

az iot hub message-enrichment list -n {iothub_name}

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. If provided, no other 'Resource Id' arguments should be specified.

--name -n

IoT Hub name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az iot hub message-enrichment update

Update a message enrichment in your IoT hub (by key).

az iot hub message-enrichment update --endpoints
--key
--value
[--ids]
[--name]
[--resource-group]
[--subscription]

Examples

Update a message enrichment in your IoT hub to apply to a new set of endpoints

az iot hub message-enrichment update --key {key} --value {value} --endpoints NewEndpoint1 NewEndpoint2 -n {iothub_name}

Required Parameters

--endpoints -e

Endpoint(s) to apply enrichments to. Use a space-separated list for multiple endpoints.

--key -k

The enrichment's key.

--value -v

The enrichment's value.

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. If provided, no other 'Resource Id' arguments should be specified.

--name -n

IoT Hub name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.