Dijelite putem


az iot ops asset endpoint create

Note

This reference is part of the azure-iot-ops extension for the Azure CLI (version 2.62.0 or higher). The extension will automatically install the first time you run an az iot ops asset endpoint create command. Learn more about extensions.

Create asset endpoint profiles.

Commands

Name Description Type Status
az iot ops asset endpoint create opcua

Create an asset endpoint profile for an OPCUA connector.

Extension GA

az iot ops asset endpoint create opcua

Create an asset endpoint profile for an OPCUA connector.

Azure IoT OPC UA Connector (preview) uses the same client certificate for all secure channels between itself and the OPC UA servers that it connects to.

For OPC UA connector arguments, a value of -1 means that parameter will not be used (ex: --session-reconnect-backoff -1 means that no exponential backoff should be used). A value of 0 means use the fastest practical rate (ex: --default-sampling-int 0 means use the fastest sampling interval possible for the server).

For more information on how to configure asset endpoints for the OPC UA connector, please see https://aka.ms/opcua-quickstart.

az iot ops asset endpoint create opcua --instance
                                       --name
                                       --resource-group
                                       --ta --target-address
                                       [--accept-untrusted-certs --auc {false, true}]
                                       [--app --application]
                                       [--default-publishing-int --dpi]
                                       [--default-queue-size --dqs]
                                       [--default-sampling-int --dsi]
                                       [--ig --instance-resource-group]
                                       [--ka --keep-alive]
                                       [--location]
                                       [--pass-ref --password-ref]
                                       [--pr]
                                       [--rad --run-asset-discovery {false, true}]
                                       [--security-mode --sm {none, sign, signAndEncrypt}]
                                       [--security-policy --sp {Aes128_Sha256_RsaOaep, Aes256_Sha256_RsaPss, Basic128Rsa15, Basic256, Basic256Sha256, none}]
                                       [--session-keep-alive --ska]
                                       [--session-reconnect-backoff --srb]
                                       [--session-reconnect-period --srp]
                                       [--session-timeout --st]
                                       [--slt --subscription-life-time]
                                       [--smi --subscription-max-items]
                                       [--tags]
                                       [--ur --username-reference]
                                       [--user-ref --username-ref]

Examples

Create an asset endpoint with anonymous user authentication using the given instance in the same resource group.

az iot ops asset endpoint create opcua --name myprofile -g myresourcegroup --instance myinstance --target-address opc.tcp://opcplc-000000:50000

Create an asset endpoint with anonymous user authentication using the given instance in a different resource group but same subscription. Note that the Digital Operations Experience may not display the asset endpoint profile if it is in a different subscription from the instance.

az iot ops asset endpoint create opcua --name myprofile -g myresourcegroup --instance myinstance --instance-resource-group myinstanceresourcegroup --target-address opc.tcp://opcplc-000000:50000

Create an asset endpoint with username-password user authentication using the given instance in the same resource group.

az iot ops asset endpoint create opcua --name myprofile -g myresourcegroup --instance myinstance --target-address opc.tcp://opcplc-000000:50000 --username-ref myusername --password-ref mypassword

Create an asset endpoint with anonymous user authentication and recommended values for the OPCUA configuration using the given instance in the same resource group. Note that for successfully using the connector, you will need to have the OPC PLC service deployed and the target address must point to the service. If the OPC PLC service is in the same cluster and namespace as IoT Ops, the target address should be formatted as `opc.tcp://{opc-plc-service-name}:{service-port}` If the OPC PLC service is in the same cluster but different namespace as IoT Ops, include the service namespace like so `opc.tcp://{opc-plc-service-name}.{service-namespace}:{service-port}` For more information, please see aka.ms/opcua-quickstart

az iot ops asset endpoint create opcua --name myprofile -g myresourcegroup --instance myinstance --target-address opc.tcp://opcplc-000000:50000 --accept-untrusted-certs --application myopcuaconnector --default-publishing-int 1000 --default-queue-size 1 --default-sampling-int 1000 --keep-alive 10000 --run-asset-discovery --security-mode sign --security-policy Basic256 --session-keep-alive 10000 --session-reconnect-backoff 10000 --session-reconnect-period 2000 --session-timeout 60000 --subscription-life-time 60000 --subscription-max-items 1000

Required Parameters

--instance

Instance name to associate the created asset with.

--name -n

Asset Endpoint Profile name.

--resource-group -g

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

--ta --target-address

Target Address. Must be a valid local address that follows the opc.tcp protocol.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--accept-untrusted-certs --auc

Flag to enable auto accept untrusted server certificates.

Property Value
Parameter group: Connector Arguments
Accepted values: false, true
--app --application

Application name. Will be used as the subject for any certificates generated by the connector.

Property Value
Parameter group: Connector Arguments
--default-publishing-int --dpi

Default publishing interval in milliseconds. Minimum: -1. Recommended: 1000.

Property Value
Parameter group: Connector Arguments
--default-queue-size --dqs

Default queue size. Minimum: 0. Recommended: 1.

Property Value
Parameter group: Connector Arguments
--default-sampling-int --dsi

Default sampling interval in milliseconds. Minimum: -1. Recommended: 1000.

Property Value
Parameter group: Connector Arguments
--ig --instance-resource-group

Instance resource group. If not provided, asset endpoint profile resource group will be used.

--ka --keep-alive

Time in milliseconds after which a keep alive publish response is sent. Minimum: 0. Recommended: 10000.

Property Value
Parameter group: Connector Arguments
--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--pass-ref --password-ref

Reference for the password used in authentication.

Property Value
Parameter group: Authentication Arguments
--pr
Deprecated

Option '--pr' has been deprecated and will be removed in a future release. Use '--pass-ref' instead.

Reference for the password used in authentication.

Property Value
Parameter group: Authentication Arguments
--rad --run-asset-discovery

Flag to determine if asset discovery should be run.

Property Value
Parameter group: Connector Arguments
Accepted values: false, true
--security-mode --sm

Security mode.

Property Value
Parameter group: Connector Arguments
Accepted values: none, sign, signAndEncrypt
--security-policy --sp

Security policy.

Property Value
Parameter group: Connector Arguments
Accepted values: Aes128_Sha256_RsaOaep, Aes256_Sha256_RsaPss, Basic128Rsa15, Basic256, Basic256Sha256, none
--session-keep-alive --ska

Time in milliseconds after which a session keep alive challenge is sent to detect connection issues. Minimum: 0. Recommended: 10000.

Property Value
Parameter group: Connector Arguments
--session-reconnect-backoff --srb

Session reconnect exponential back off in milliseconds. Minimum: -1. Recommended: 10000.

Property Value
Parameter group: Connector Arguments
--session-reconnect-period --srp

Session reconnect period in milliseconds. Minimum: 0. Recommended: 2000.

Property Value
Parameter group: Connector Arguments
--session-timeout --st

Session timeout in milliseconds. Minimum: 0. Recommended: 60000.

Property Value
Parameter group: Connector Arguments
--slt --subscription-life-time

Life time in milliseconds of the items created by the connector for the subscription. Minimum: 0. Recommended: 60000.

Property Value
Parameter group: Connector Arguments
--smi --subscription-max-items

Maximum number of items that the connector can create for the subscription. Minimum: 1. Recommended: 1000.

Property Value
Parameter group: Connector Arguments
--tags

Asset Endpoint Profile resource tags. Property bag in key-value pairs with the following format: a=b c=d.

--ur --username-reference
Deprecated

Option '--username-reference' has been deprecated and will be removed in a future release. Use '--user-ref' instead.

Reference for the username used in authentication.

Property Value
Parameter group: Authentication Arguments
--user-ref --username-ref

Reference for the username used in authentication.

Property Value
Parameter group: Authentication Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False