az iot hub message-endpoint create
Note
This reference is part of the azure-iot extension for the Azure CLI (version 2.46.0 or higher). The extension will automatically install the first time you run an az iot hub message-endpoint create command. Learn more about extensions.
Command group 'iot hub message-endpoint' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Add an endpoint to an IoT Hub.
Commands
Name | Description | Type | Status |
---|---|---|---|
az iot hub message-endpoint create cosmosdb-container |
Add a Cosmos DB Container endpoint for an IoT Hub. |
Extension | Preview |
az iot hub message-endpoint create eventhub |
Add an Event Hub endpoint for an IoT Hub. |
Extension | Preview |
az iot hub message-endpoint create servicebus-queue |
Add a Service Bus Queue endpoint for an IoT Hub. |
Extension | Preview |
az iot hub message-endpoint create servicebus-topic |
Add a Service Bus Topic endpoint for an IoT Hub. |
Extension | Preview |
az iot hub message-endpoint create storage-container |
Add a Storage Container endpoint for an IoT Hub. |
Extension | Preview |
az iot hub message-endpoint create cosmosdb-container
Command group 'iot hub message-endpoint' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Add a Cosmos DB Container endpoint for an IoT Hub.
az iot hub message-endpoint create cosmosdb-container --container
--database-name
--en
--hub-name
[--connection-string]
[--endpoint-account]
[--endpoint-resource-group]
[--endpoint-subscription-id]
[--endpoint-uri]
[--identity]
[--partition-key-name]
[--partition-key-template]
[--pk]
[--resource-group]
[--secondary-key]
Examples
Create a key-based Cosmos DB Container endpoint for an IoT Hub.
az iot hub message-endpoint create cosmosdb-container -n {iothub_name} --en {endpoint_name} --container {container} --db {database} --endpoint-account {account_name}
Create a Cosmos DB Container endpoint for an IoT Hub using a connection string.
az iot hub message-endpoint create cosmosdb-container -n {iothub_name} --en {endpoint_name} -c {connection_string} --container {container} --db {database}
Create a Cosmos DB Container endpoint for an IoT Hub using the specified primary key and endpoint uri.
az iot hub message-endpoint create cosmosdb-container -n {iothub_name} --en {endpoint_name} --pk {primary_key} --endpoint-uri {endpoint_uri} --container {container} --db {database}
Create a Cosmos DB Container endpoint for an IoT Hub using system assigned identity and a partition key name. The partition key template will be the default.
az iot hub message-endpoint create cosmosdb-container -n {iothub_name} --en {endpoint_name} --endpoint-uri {endpoint_uri} --container {container} --db {database} --pkn {partition_key_name} --identity [system]
Create a Cosmos DB Container endpoint for an IoT Hub using user assigned identity, partition key name, and partition key template.
az iot hub message-endpoint create cosmosdb-container -n {iothub_name} --en {endpoint_name} --endpoint-uri {endpoint_uri} --container {container} --db {database} --pkn {partition_key_name} --pkt {partition_key_template} --identity {user_identity_resource_id}
Required Parameters
The name of the Cosmos DB SQL Container in the cosmos DB Database.
The name of the cosmos DB database in the cosmos DB account.
Name of the routing endpoint.
IoT Hub name.
Optional Parameters
Connection string of the routing endpoint.
The account name for the endpoint resource.
Resource group of the Endpoint resoure. If not provided, the IoT Hub's resource group will be used.
Subscription Id of the Endpoint resource. If not provided, the IoT Hub's subscription will be used.
The uri of the endpoint resource.
Use a system-assigned or user-assigned managed identity for endpoint authentication. Use "[system]" to refer to the system-assigned identity or a resource ID to refer to a user-assigned identity.
The name of the partition key associated with this Cosmos DB SQL Container if one exists.
The template for generating a synthetic partition key value for use with this Cosmos DB SQL Container. The template must include at least one of the following placeholders: {iothub}, {deviceid}, {DD}, {MM}, and {YYYY}. Any one placeholder may be specified at most once, but order and non-placeholder components are arbitrary. If partition key name is provided, partition key template defaults to {deviceid}-{YYYY}-{MM}.
The primary key of the cosmos DB account.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The secondary key of the cosmos DB account.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az iot hub message-endpoint create eventhub
Command group 'iot hub message-endpoint' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Add an Event Hub endpoint for an IoT Hub.
az iot hub message-endpoint create eventhub --en
--hub-name
[--connection-string]
[--endpoint-namespace-name]
[--endpoint-policy-name]
[--endpoint-resource-group]
[--endpoint-subscription-id]
[--endpoint-uri]
[--entity-path]
[--identity]
[--resource-group]
Examples
Create a key-based Event Hub endpoint for an IoT Hub.
az iot hub message-endpoint create eventhub -n {iothub_name} --en {endpoint_name} --namespace {namespace_name} --entity-path {entity_path} --policy {policy_name}
Create an Event Hub endpoint for an IoT Hub using a connection string. The endpoint uri and entity path are omitted.
az iot hub message-endpoint create eventhub -n {iothub_name} --en {endpoint_name} -c {connection_string}
Create an Event Hub endpoint for an IoT Hub using system assigned identity. The endpoint and entity path must be specified.
az iot hub message-endpoint create eventhub -n {iothub_name} --en {endpoint_name} --endpoint-uri {endpoint_uri} --entity-path {entity_path} --identity [system]
Create an Event Hub endpoint for an IoT Hub using user assigned identity. The endpoint and entity path must be specified.
az iot hub message-endpoint create eventhub -n {iothub_name} --en {endpoint_name} --endpoint-uri {endpoint_uri} --entity-path {entity_path} --identity {user_identity_resource_id}
Required Parameters
Name of the routing endpoint.
IoT Hub name.
Optional Parameters
Connection string of the routing endpoint.
The namespace name for the endpoint resource.
The policy name for connection string retrieval.
Resource group of the Endpoint resoure. If not provided, the IoT Hub's resource group will be used.
Subscription Id of the Endpoint resource. If not provided, the IoT Hub's subscription will be used.
The uri of the endpoint resource.
The entity path of the endpoint resource.
Use a system-assigned or user-assigned managed identity for endpoint authentication. Use "[system]" to refer to the system-assigned identity or a resource ID to refer to a user-assigned identity.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az iot hub message-endpoint create servicebus-queue
Command group 'iot hub message-endpoint' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Add a Service Bus Queue endpoint for an IoT Hub.
az iot hub message-endpoint create servicebus-queue --en
--hub-name
[--connection-string]
[--endpoint-namespace-name]
[--endpoint-policy-name]
[--endpoint-resource-group]
[--endpoint-subscription-id]
[--endpoint-uri]
[--entity-path]
[--identity]
[--resource-group]
Examples
Create a key-based Service Bus Queue endpoint for an IoT Hub.
az iot hub message-endpoint create servicebus-queue -n {iothub_name} --en {endpoint_name} --namespace {namespace_name} --entity-path {entity_path} --policy {policy_name}
Create a Service Bus Queue endpoint for an IoT Hub using a connection string. The endpoint uri and entity path are omitted.
az iot hub message-endpoint create servicebus-queue -n {iothub_name} --en {endpoint_name} -c {connection_string}
Create a Service Bus Queue endpoint for an IoT Hub using system assigned identity. The endpoint and entity path must be specified.
az iot hub message-endpoint create servicebus-queue -n {iothub_name} --en {endpoint_name} --endpoint-uri {endpoint_uri} --entity-path {entity_path} --identity [system]
Create a Service Bus Queue endpoint for an IoT Hub using user assigned identity. The endpoint and entity path must be specified.
az iot hub message-endpoint create servicebus-queue -n {iothub_name} --en {endpoint_name} --endpoint-uri {endpoint_uri} --entity-path {entity_path} --identity {user_identity_resource_id}
Required Parameters
Name of the routing endpoint.
IoT Hub name.
Optional Parameters
Connection string of the routing endpoint.
The namespace name for the endpoint resource.
The policy name for connection string retrieval.
Resource group of the Endpoint resoure. If not provided, the IoT Hub's resource group will be used.
Subscription Id of the Endpoint resource. If not provided, the IoT Hub's subscription will be used.
The uri of the endpoint resource.
The entity path of the endpoint resource.
Use a system-assigned or user-assigned managed identity for endpoint authentication. Use "[system]" to refer to the system-assigned identity or a resource ID to refer to a user-assigned identity.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az iot hub message-endpoint create servicebus-topic
Command group 'iot hub message-endpoint' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Add a Service Bus Topic endpoint for an IoT Hub.
az iot hub message-endpoint create servicebus-topic --en
--hub-name
[--connection-string]
[--endpoint-namespace-name]
[--endpoint-policy-name]
[--endpoint-resource-group]
[--endpoint-subscription-id]
[--endpoint-uri]
[--entity-path]
[--identity]
[--resource-group]
Examples
Create a key-based Service Bus Topic endpoint for an IoT Hub.
az iot hub message-endpoint create servicebus-topic -n {iothub_name} --en {endpoint_name} --namespace {namespace_name} --entity-path {entity_path} --policy {policy_name}
Create a Service Bus Topic endpoint for an IoT Hub using a connection string. The endpoint uri and entity path are omitted.
az iot hub message-endpoint create servicebus-topic -n {iothub_name} --en {endpoint_name} -c {connection_string}
Create a Service Bus Topic endpoint for an IoT Hub using system assigned identity. The endpoint and entity path must be specified.
az iot hub message-endpoint create servicebus-topic -n {iothub_name} --en {endpoint_name} --endpoint-uri {endpoint_uri} --entity-path {entity_path} --identity [system]
Create a Service Bus Topic endpoint for an IoT Hub using user assigned identity. The endpoint and entity path must be specified.
az iot hub message-endpoint create servicebus-topic -n {iothub_name} --en {endpoint_name} --endpoint-uri {endpoint_uri} --entity-path {entity_path} --identity {user_identity_resource_id}
Required Parameters
Name of the routing endpoint.
IoT Hub name.
Optional Parameters
Connection string of the routing endpoint.
The namespace name for the endpoint resource.
The policy name for connection string retrieval.
Resource group of the Endpoint resoure. If not provided, the IoT Hub's resource group will be used.
Subscription Id of the Endpoint resource. If not provided, the IoT Hub's subscription will be used.
The uri of the endpoint resource.
The entity path of the endpoint resource.
Use a system-assigned or user-assigned managed identity for endpoint authentication. Use "[system]" to refer to the system-assigned identity or a resource ID to refer to a user-assigned identity.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az iot hub message-endpoint create storage-container
Command group 'iot hub message-endpoint' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Add a Storage Container endpoint for an IoT Hub.
az iot hub message-endpoint create storage-container --container
--en
--hub-name
[--batch-frequency]
[--chunk-size]
[--connection-string]
[--encoding {avro, json}]
[--endpoint-account]
[--endpoint-resource-group]
[--endpoint-subscription-id]
[--endpoint-uri]
[--ff]
[--identity]
[--resource-group]
Examples
Create a key-based Storage Container endpoint for an IoT Hub.
az iot hub message-endpoint create storage-container -n {iothub_name} --en {endpoint_name} --container {container_name} --endpoint-account {account_name}
Create a Storage Container endpoint for an IoT Hub using a connection string. The endpoint uri is omitted.
az iot hub message-endpoint create storage-container -n {iothub_name} --en {endpoint_name} -c {connection_string} --container {container_name}
Create a Storage Container endpoint for an IoT Hub using system assigned identity with the given batch frequency, chunk size, and file name format. The endpoint must be specified.
az iot hub message-endpoint create storage-container -n {iothub_name} --en {endpoint_name} --endpoint-uri {endpoint_uri} --container {container_name} -b {batch_frequency} -w {chunk_size} --ff {file_format} --identity [system]
Create a Storage Container endpoint for an IoT Hub using user assigned identity with json encoding. The endpoint must be specified.
az iot hub message-endpoint create storage-container -n {iothub_name} --en {endpoint_name} --endpoint-uri {endpoint_uri} --container {container_name} --encoding json --identity {user_identity_resource_id}
Required Parameters
Name of the storage container.
Name of the routing endpoint.
IoT Hub name.
Optional Parameters
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.
Request chunk size in megabytes(MB). The maximum size of blobs, between 10 and 500 MB.
Connection string of the routing endpoint.
Encoding format for the container.
The account name for the endpoint resource.
Resource group of the Endpoint resoure. If not provided, the IoT Hub's resource group will be used.
Subscription Id of the Endpoint resource. If not provided, the IoT Hub's subscription will be used.
The uri of the endpoint resource.
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.
Use a system-assigned or user-assigned managed identity for endpoint authentication. Use "[system]" to refer to the system-assigned identity or a resource ID to refer to a user-assigned identity.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Azure CLI