az iot hub routing-endpoint

Manage custom endpoints of an IoT hub.

Commands

az iot hub routing-endpoint create Add an endpoint to your IoT Hub.
az iot hub routing-endpoint delete Delete all or mentioned endpoint for your IoT Hub.
az iot hub routing-endpoint list Get information on all the endpoints for your IoT Hub.
az iot hub routing-endpoint show Get information on mentioned endpoint for your IoT Hub.

az iot hub routing-endpoint create

Add an endpoint to your IoT Hub.

az iot hub routing-endpoint create --connection-string
--endpoint-name
--endpoint-resource-group
--endpoint-subscription-id
--endpoint-type {azurestoragecontainer, eventhub, servicebusqueue, servicebustopic}
--hub-name
[--batch-frequency]
[--chunk-size]
[--container]
[--encoding {avro, json}]
[--ff]
[--resource-group]
[--subscription]

Examples

Add a new endpoint "E2" of type EventHub to "MyIotHub" IoT Hub.

az iot hub routing-endpoint create --resource-group MyResourceGroup --hub-name MyIotHub --endpoint-name E2 --endpoint-type eventhub --endpoint-resource-group {ResourceGroup} --endpoint-subscription-id {SubscriptionId} --connection-string {ConnectionString}

Add a new endpoint "S1" of type AzureStorageContainer to "MyIotHub" IoT Hub.

az iot hub routing-endpoint create --resource-group MyResourceGroup --hub-name MyIotHub \
--endpoint-name S1 --endpoint-type azurestoragecontainer --endpoint-resource-group "[Resource Group]" \
--endpoint-subscription-id {SubscriptionId} --connection-string {ConnectionString} \
--container-name {ContainerName} --batch-frequency 100 --chunk-size 100 \
--ff {iothub}-{partition}-{YYYY}-{MM}-{DD}-{HH}-{mm}

Required Parameters

--connection-string -c

Connection string of the Routing Endpoint.

--endpoint-name --name -n

Name of the Routing Endpoint.

--endpoint-resource-group --erg -r

Resource group of the Endpoint resoure.

--endpoint-subscription-id -s

SubscriptionId of the Endpoint resource.

--endpoint-type --type -t

Type of the Routing Endpoint.

accepted values: azurestoragecontainer, eventhub, servicebusqueue, servicebustopic
--hub-name

IoT Hub name.

Optional Parameters

--batch-frequency -b

Request batch frequency in seconds. The maximum amount of time that can elapse before data is written to a blob, between 60 and 720 seconds.

default value: 300
--chunk-size -w

Request chunk size in megabytes(MB). The maximum size of blobs, between 10 and 500 MB.

default value: 300
--container --container-name

Name of the storage container.

--encoding

Encoding format for the container. The default is AVRO. Note that this field is applicable only for blob container endpoints.

accepted values: avro, json
--ff --file-name-format

File name format for the blob. The file name format must contain {iothub}, {partition}, {YYYY}, {MM}, {DD}, {HH} and {mm} fields. All parameters are mandatory but can be reordered with or without delimiters.

default value: {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}
--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 routing-endpoint delete

Delete all or mentioned endpoint for your IoT Hub.

az iot hub routing-endpoint delete [--endpoint-name]
[--endpoint-type {azurestoragecontainer, eventhub, servicebusqueue, servicebustopic}]
[--hub-name]
[--ids]
[--resource-group]
[--subscription]

Examples

Delete endpoint "E2" from "MyIotHub" IoT Hub.

az iot hub routing-endpoint delete --resource-group MyResourceGroup --hub-name MyIotHub --endpoint-name E2

Delete all the endpoints of type "EventHub" from "MyIotHub" IoT Hub.

az iot hub routing-endpoint delete --resource-group MyResourceGroup --hub-name MyIotHub --endpoint-type eventhub

Delete all the endpoints from "MyIotHub" IoT Hub.

az iot hub routing-endpoint delete --resource-group MyResourceGroup --hub-name MyIotHub

Optional Parameters

--endpoint-name --name -n

Name of the Routing Endpoint.

--endpoint-type --type -t

Type of the Routing Endpoint.

accepted values: azurestoragecontainer, eventhub, servicebusqueue, servicebustopic
--hub-name

IoT Hub name.

--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.

--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 routing-endpoint list

Get information on all the endpoints for your IoT Hub.

az iot hub routing-endpoint list [--endpoint-type {azurestoragecontainer, eventhub, servicebusqueue, servicebustopic}]
[--hub-name]
[--ids]
[--resource-group]
[--subscription]

Examples

Get all the endpoints from "MyIotHub" IoT Hub.

az iot hub routing-endpoint list -g MyResourceGroup --hub-name MyIotHub

Get all the endpoints of type "EventHub" from "MyIotHub" IoT Hub.

az iot hub routing-endpoint list -g MyResourceGroup --hub-name MyIotHub --endpoint-type eventhub

Optional Parameters

--endpoint-type --type -t

Type of the Routing Endpoint.

accepted values: azurestoragecontainer, eventhub, servicebusqueue, servicebustopic
--hub-name

IoT Hub name.

--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.

--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 routing-endpoint show

Get information on mentioned endpoint for your IoT Hub.

az iot hub routing-endpoint show --endpoint-name
[--hub-name]
[--ids]
[--resource-group]
[--subscription]

Examples

Get an endpoint information from "MyIotHub" IoT Hub.

az iot hub routing-endpoint show --resource-group MyResourceGroup --hub-name MyIotHub \
--endpoint-name {endpointName}

Required Parameters

--endpoint-name --name -n

Name of the Routing Endpoint.

Optional Parameters

--hub-name

IoT Hub name.

--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.

--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.