az iot hub message-endpoint update

Note

This reference is part of the azure-iot extension for the Azure CLI (version 2.37.0 or higher). The extension will automatically install the first time you run an az iot hub message-endpoint update 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

Update the properties of an existing endpoint for an IoT Hub.

Commands

Name Description Type Status
az iot hub message-endpoint update cosmosdb-container

Update the properties of an existing Cosmos DB Container endpoint for an IoT Hub.

Extension Preview
az iot hub message-endpoint update eventhub

Update the properties of an existing Event Hub endpoint for an IoT Hub.

Extension Preview
az iot hub message-endpoint update servicebus-queue

Update the properties of an existing Service Bus Queue endpoint for an IoT Hub.

Extension Preview
az iot hub message-endpoint update servicebus-topic

Update the properties of an existing Service Bus Topic endpoint for an IoT Hub.

Extension Preview
az iot hub message-endpoint update storage-container

Update the properties of an existing Storage Container endpoint for an IoT Hub.

Extension Preview

az iot hub message-endpoint update cosmosdb-container

Preview

Command group 'iot hub message-endpoint' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update the properties of an existing Cosmos DB Container endpoint for an IoT Hub.

If updating the authentication type from a key-based to identity-based Cosmos DB Container endpoint, you must provide the identity (via --identity) and the endpoint uri (via --endpoint-uri). The old primary key and secondary key will be nulled out.

If updating the authentication type from an identity-based to key-based Cosmos DB Container endpoint, you must provide the connection string (via --connection-string), the primary key (via --primary-key) or the secondary key (via --secondary-key).

Container name for the endpoint cannot be changed. Account names can only be changed if containers with the same name exist in both accounts.

az iot hub message-endpoint update cosmosdb-container --en
                                                      --hub-name
                                                      [--connection-string]
                                                      [--database-name]
                                                      [--endpoint-resource-group]
                                                      [--endpoint-subscription-id]
                                                      [--endpoint-uri]
                                                      [--identity]
                                                      [--partition-key-name]
                                                      [--partition-key-template]
                                                      [--pk]
                                                      [--resource-group]
                                                      [--secondary-key]

Examples

Update a key-based or identity-based Cosmos DB Container endpoint for an IoT Hub to use a new specified connection string.

az iot hub message-endpoint update cosmosdb-container -n {iothub_name} --en {endpoint_name} --connection-string {connection_string}

Update a Cosmos DB Container endpoint for an IoT Hub to use a specified primary key and secondary key.

az iot hub message-endpoint update cosmosdb-container -n {iothub_name} --en {endpoint_name} --pk {primary_key} --sk {secondary_key}

Update a Cosmos DB Container endpoint for an IoT Hub to use system assigned identity and a partition key name. The partition key template will be the default.

az iot hub message-endpoint update cosmosdb-container -n {iothub_name} --en {endpoint_name} --pkn {partition_key_name} --identity [system]

Update a key-based Cosmos DB Container endpoint for an IoT Hub to use user assigned identity (you can omit --endpoint-uri if the endpoint is already identity-based).

az iot hub message-endpoint update cosmosdb-container -n {iothub_name} --en {endpoint_name} --identity {user_identity_resource_id} --endpoint-uri {endpoint_uri}

Required Parameters

--en --endpoint --endpoint-name

Name of the routing endpoint.

--hub-name -n

IoT Hub name.

Optional Parameters

--connection-string -c

Connection string of the routing endpoint.

--database-name --db

The name of the cosmos DB database in the cosmos DB account.

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

Resource group of the Endpoint resoure. If not provided, the IoT Hub's resource group will be used.

--endpoint-subscription-id -s

Subscription Id of the Endpoint resource. If not provided, the IoT Hub's subscription will be used.

--endpoint-uri

The uri of the endpoint resource.

--identity

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.

--partition-key-name --pkn

The name of the partition key associated with this Cosmos DB SQL Container if one exists. To clear this property, set this to "".

--partition-key-template --pkt

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}. To clear this property, set this to "".

--pk --primary-key

The primary key of the cosmos DB account.

--resource-group -g

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

--secondary-key --sk

The secondary key of the cosmos DB account.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az iot hub message-endpoint update eventhub

Preview

Command group 'iot hub message-endpoint' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update the properties of an existing Event Hub endpoint for an IoT Hub.

If updating the authentication type from a key-based to identity-based Event Hub endpoint, you must provide the identity (via --identity), the endpoint uri (via --endpoint-uri) and the entity path (via --entity-path). The old connection string will be nulled out.

If updating the authentication type from an identity-based to key-based Event Hub endpoint, you must provide the connection string (via --connection-string). The old endpoint uri and entity path will be nulled out.

az iot hub message-endpoint update eventhub --en
                                            --hub-name
                                            [--connection-string]
                                            [--endpoint-resource-group]
                                            [--endpoint-subscription-id]
                                            [--endpoint-uri]
                                            [--entity-path]
                                            [--identity]
                                            [--resource-group]

Examples

Update a key-based or identity-based Event Hub endpoint for an IoT Hub to use a new specified connection string.

az iot hub message-endpoint update eventhub -n {iothub_name} --en {endpoint_name} -c {connection_string}

Update an Event Hub endpoint for an IoT Hub to use system assigned identity and a different entity path.

az iot hub message-endpoint update eventhub -n {iothub_name} --en {endpoint_name} --entity-path {entity_path} --identity [system]

Update a key-based Event Hub endpoint for an IoT Hub to use user assigned identity (you can omit --endpoint-uri if the endpoint is already identity-based).

az iot hub message-endpoint update eventhub -n {iothub_name} --en {endpoint_name} --identity {user_identity_resource_id} --endpoint-uri {endpoint_uri} --entity-path {entity_path}

Required Parameters

--en --endpoint --endpoint-name

Name of the routing endpoint.

--hub-name -n

IoT Hub name.

Optional Parameters

--connection-string -c

Connection string of the routing endpoint.

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

Resource group of the Endpoint resoure. If not provided, the IoT Hub's resource group will be used.

--endpoint-subscription-id -s

Subscription Id of the Endpoint resource. If not provided, the IoT Hub's subscription will be used.

--endpoint-uri

The uri of the endpoint resource.

--entity-path

The entity path of the endpoint resource.

--identity

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.

--resource-group -g

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az iot hub message-endpoint update servicebus-queue

Preview

Command group 'iot hub message-endpoint' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update the properties of an existing Service Bus Queue endpoint for an IoT Hub.

If updating the authentication type from a key-based to identity-based Service Bus Queue endpoint, you must provide the identity (via --identity), the endpoint uri (via --endpoint-uri) and the entity path (via --entity-path). The old connection string will be nulled out.

If updating the authentication type from an identity-based to key-based Service Bus Queue endpoint, you must provide the connection string (via --connection-string). The old endpoint uri and entity path will be nulled out.

az iot hub message-endpoint update servicebus-queue --en
                                                    --hub-name
                                                    [--connection-string]
                                                    [--endpoint-resource-group]
                                                    [--endpoint-subscription-id]
                                                    [--endpoint-uri]
                                                    [--entity-path]
                                                    [--identity]
                                                    [--resource-group]

Examples

Update a key-based or identity-based Service Bus Queue endpoint for an IoT Hub to use a new specified connection string.

az iot hub message-endpoint update servicebus-queue -n {iothub_name} --en {endpoint_name} -c {connection_string}

Update a Service Bus Queue endpoint for an IoT Hub to use system assigned identity and a different entity path.

az iot hub message-endpoint update servicebus-queue -n {iothub_name} --en {endpoint_name} --entity-path {entity_path} --identity [system]

Update a key-based Service Bus Queue endpoint for an IoT Hub to use user assigned identity (you can omit --endpoint-uri if the endpoint is already identity-based).

az iot hub message-endpoint update servicebus-queue -n {iothub_name} --en {endpoint_name} --identity {user_identity_resource_id} --endpoint-uri {endpoint_uri} --entity-path {entity_path}

Required Parameters

--en --endpoint --endpoint-name

Name of the routing endpoint.

--hub-name -n

IoT Hub name.

Optional Parameters

--connection-string -c

Connection string of the routing endpoint.

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

Resource group of the Endpoint resoure. If not provided, the IoT Hub's resource group will be used.

--endpoint-subscription-id -s

Subscription Id of the Endpoint resource. If not provided, the IoT Hub's subscription will be used.

--endpoint-uri

The uri of the endpoint resource.

--entity-path

The entity path of the endpoint resource.

--identity

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.

--resource-group -g

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az iot hub message-endpoint update servicebus-topic

Preview

Command group 'iot hub message-endpoint' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update the properties of an existing Service Bus Topic endpoint for an IoT Hub.

If updating the authentication type from a key-based to identity-based Service Bus Topic endpoint, you must provide the identity (via --identity), the endpoint uri (via --endpoint-uri) and the entity path (via --entity-path). The old connection string will be nulled out.

If updating the authentication type from an identity-based to key-based Service Bus Topic endpoint, you must provide the connection string (via --connection-string). The old endpoint uri and entity path will be nulled out.

az iot hub message-endpoint update servicebus-topic --en
                                                    --hub-name
                                                    [--connection-string]
                                                    [--endpoint-resource-group]
                                                    [--endpoint-subscription-id]
                                                    [--endpoint-uri]
                                                    [--entity-path]
                                                    [--identity]
                                                    [--resource-group]

Examples

Update a key-based or identity-based Service Bus Topic endpoint for an IoT Hub to use a new specified connection string.

az iot hub message-endpoint update servicebus-topic -n {iothub_name} --en {endpoint_name} -c {connection_string}

Update a Service Bus Topic endpoint for an IoT Hub to use system assigned identity and a different entity path.

az iot hub message-endpoint update servicebus-topic -n {iothub_name} --en {endpoint_name} --entity-path {entity_path} --identity [system]

Update a key-based Service Bus Topic endpoint for an IoT Hub to use user assigned identity (you can omit --endpoint-uri if the endpoint is already identity-based).

az iot hub message-endpoint update servicebus-topic -n {iothub_name} --en {endpoint_name}  --identity {user_identity_resource_id} --endpoint-uri {endpoint_uri} --entity-path {entity_path}

Required Parameters

--en --endpoint --endpoint-name

Name of the routing endpoint.

--hub-name -n

IoT Hub name.

Optional Parameters

--connection-string -c

Connection string of the routing endpoint.

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

Resource group of the Endpoint resoure. If not provided, the IoT Hub's resource group will be used.

--endpoint-subscription-id -s

Subscription Id of the Endpoint resource. If not provided, the IoT Hub's subscription will be used.

--endpoint-uri

The uri of the endpoint resource.

--entity-path

The entity path of the endpoint resource.

--identity

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.

--resource-group -g

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az iot hub message-endpoint update storage-container

Preview

Command group 'iot hub message-endpoint' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update the properties of an existing Storage Container endpoint for an IoT Hub.

If updating the authentication type from a key-based to identity-based Storage Container endpoint, you must provide the identity (via --identity) and the endpoint uri (via --endpoint-uri). The old connection string will be nulled out.

If updating the authentication type from an identity-based to key-based Storage Container endpoint, you must provide the connection string (via --connection-string).

Container name and encoding for the endpoint cannot be changed. Account names can only be changed if containers with the same name exist in both accounts.

az iot hub message-endpoint update storage-container --en
                                                     --hub-name
                                                     [--batch-frequency]
                                                     [--chunk-size]
                                                     [--connection-string]
                                                     [--endpoint-resource-group]
                                                     [--endpoint-subscription-id]
                                                     [--endpoint-uri]
                                                     [--ff]
                                                     [--identity]
                                                     [--resource-group]

Examples

Update a key-based or identity-based Storage Container endpoint for an IoT Hub to use a new specified connection string.

az iot hub message-endpoint update storage-container -n {iothub_name} --en {endpoint_name} -c {connection_string}

Update a Storage Container endpoint for an IoT Hub to use system assigned identity with the given batch frequency, chunk size, and file name format.

az iot hub message-endpoint update storage-container -n {iothub_name} --en {endpoint_name}  -b {batch_frequency} -w {chunk_size} --ff {file_format} --identity [system]

Update a key-based Storage Container endpoint for an IoT Hub to use user assigned identity (you can omit --endpoint-uri if the endpoint is already identity-based).

az iot hub message-endpoint update storage-container -n {iothub_name} --en {endpoint_name} --identity {user_identity_resource_id} --endpoint-uri {endpoint_uri}

Required Parameters

--en --endpoint --endpoint-name

Name of the routing endpoint.

--hub-name -n

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.

--chunk-size -w

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

--connection-string -c

Connection string of the routing endpoint.

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

Resource group of the Endpoint resoure. If not provided, the IoT Hub's resource group will be used.

--endpoint-subscription-id -s

Subscription Id of the Endpoint resource. If not provided, the IoT Hub's subscription will be used.

--endpoint-uri

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

--identity

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.

--resource-group -g

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.