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.

Create a new custom endpoint in your IoT Hub.

az iot hub routing-endpoint create --endpoint-name
                                   --endpoint-resource-group
                                   --endpoint-subscription-id
                                   --endpoint-type {azurestoragecontainer, eventhub, servicebusqueue, servicebustopic}
                                   --hub-name
                                   [--auth-type {identitybased, keybased}]
                                   [--batch-frequency]
                                   [--chunk-size]
                                   [--connection-string]
                                   [--container]
                                   [--encoding {avro, json}]
                                   [--endpoint-uri]
                                   [--entity-path]
                                   [--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}

Add a new identity-based EventHub endpoint named "EventHubIdentity"

az iot hub routing-endpoint create --resource-group MyResourceGroup --hub-name MyIotHub --endpoint-name EventHubIdentity --endpoint-type eventhub --endpoint-resource-group {ResourceGroup} --endpoint-subscription-id {SubscriptionId} --auth-type identityBased --endpoint-uri {EventHubEndpointUri} --entity-path {EntityPath}

Required Parameters

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

--auth-type

Authentication type for the endpoint. The default is keyBased.

accepted values: identitybased, keybased
--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
--connection-string -c

Connection string of the Routing Endpoint.

--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
--endpoint-uri

The uri of the endpoint resource.

--entity-path

The entity path of the endpoint resource.

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

Delete an endpoint for your IoT Hub. We recommend that you delete any routes to the endpoint, before deleting the endpoint.

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. You should provide either --ids or other 'Resource Id' arguments.

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

Get information on all endpoints in your IoT Hub. You can also specify which endpoint type you want to get informaiton on.

az iot hub routing-endpoint list [--endpoint-type {azurestoragecontainer, eventhub, servicebusqueue, servicebustopic}]
                                 [--hub-name]
                                 [--ids]
                                 [--query-examples]
                                 [--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. You should provide either --ids or other 'Resource Id' arguments.

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

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

Get information on a specific endpoint in your IoT Hub.

az iot hub routing-endpoint show --endpoint-name
                                 [--hub-name]
                                 [--ids]
                                 [--query-examples]
                                 [--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. You should provide either --ids or other 'Resource Id' arguments.

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

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