The following basic operations are available for the Azure Injector Module and can be executed within any of the available Ignition scopes using the format system.cirruslink.azure.operation
where:
Configuration changes made through scripting do have the same validation as when made through the UI. For example, attempting to delete a Sets configuring that is being referenced by a Servers configuration will result in no action being performed. |
| enabled | boolean | Whether or not the configuration resource is enabled |
| enabled | boolean | Whether or not the configuration resource is enabled |
| name | string | The unique name for the configuration resource |
| serverSet | string | The Set this Event Hub connection is associated with |
| certAuthEnabled | boolean | Enable certificate based authentication instead of using a connection string |
| connectionString | string | The Azure Connection String used for establishing a connection with the Event Hub |
| tenantId | string | The Azure Tenant ID |
| azureServicePrincipalClientId | string | The Service Principal Client ID associated with the client certificate |
| eventHubNamespace | string | The Event Hub Namespace associated with the client certificate |
| eventHubName | string | The Event Hub Namespace associated with the client certificate |
| clientCertFile | string | Client certificate file currently in use |
| clientPrivateKeyFile | string | Client private key file currently in use |
| c;lientKeyPassword | string | The password associated with the certificate's private key (optional) |
| historyEnabled | boolean | Enable Store and Forward capabilities for this stream |
| historyStoreType | string | The Type of this Store & Forward mechanism |
| partionPeriod | string | The partitioning scheme to use for the Disk-backed history store (e.g. HOUR, MINUTE, DAY, etc) |
| historyMaxSize | integer | Maximum number of megabytes history can use before dropping the data |
| trimmerTaskPeriodMultiplier | integer | A integer multiplier which is applied to the 'storageMonitorPeriod' which results in the period in which to trim potential excess history |
| historyMaxAge | integer | Maximum number of minutes to store history before dropping the data |
| queryTimeout | integer | The H2 DB query timeout in seconds for the disk-backed history store |
| flushPeriod | long | Upon reestablishing communication, the period to wait in milliseconds between sending when flushing messages |
| maxSize | integer | Maximum message size before dividing into multiple messages |
| contentEncoding | string | The content encoding of the data to push to Event Hub |
| azureDateTimeFormat | string | The date/time format to use when pushing data to Azure |
| h2dbDirectory | string | Directory to store the H2 Database in. Applicable for Disk-backed history store only |
| h2dbPort | integer | TCP Port to connect to H2 Database. Applicable for Disk-backed history store only |
| dbMaxMessageSize | integer | The Max Message size allowed in the Store and Forward DB. This only applies to Disk-Backed history stores |
| republishBirths | boolean | Whether or not to republish BIRTH messages on reestablishing connection to the endpoint |
| enabled | boolean | Whether or not the configuration resource is enabled |
| name | string | The unique name for the configuration resource |
| fileName | string | The name of this certificate file or private key |
| description | string | The description of this certificate file or private key |
| fileContents | string | The contents of this certificate file or private key |
| enabled | boolean | Whether or not the configuration resource is enabled |
| name | string | The unique name for the configuration resource |
| scopeId | string | The Azure IoT Central Scope ID |
| enrollmentGroupSymmetricKey | string | The Azure Enrollment Group Symmetric Key |
| globalEndPoint | string | The global endpoint of the IoT Central connection |
| provisionedDeviceId | string | The provisioned Device ID associated with this IoT Central connection |
| modelId | string | The Model ID associated with this IoT Central connection |
| serverSet | string | The Set this IoT Central connection is associated with |
| historyEnabled | boolean | Enable Store and Forward capabilities for this stream |
| historyStoreType | string | The Type of this Store & Forward mechanism |
| partionPeriod | string | The partitioning scheme to use for the Disk-backed history store (e.g. HOUR, MINUTE, DAY, etc) |
| historyMaxSize | integer | Maximum number of megabytes history can use before dropping the data |
| trimmerTaskPeriodMultiplier | integer | A integer multiplier which is applied to the 'storageMonitorPeriod' which results in the period in which to trim potential excess history |
| historyMaxAge | integer | Maximum number of minutes to store history before dropping the data |
| queryTimeout | integer | The H2 DB query timeout in seconds for the disk-backed history store |
| flushPeriod | long | Upon reestablishing communication, the period to wait in milliseconds between sending when flushing messages |
| maxSize | integer | Maximum message size before dividing into multiple messages |
| expiration | long | The number of seconds before the session token expires |
| azureDateTimeFormat | string | The date/time format to use when pushing data to Azure |
| h2dbDirectory | string | Directory to store the H2 Database in. Applicable for Disk-backed history store only |
| h2dbPort | integer | TCP Port to connect to H2 Database. Applicable for Disk-backed history store only |
| dbMaxMessageSize | integer | The Max Message size allowed in the Store and Forward DB. This only applies to Disk-Backed history stores |
| republishBirths | boolean | Whether or not to republish BIRTH messages on reestablishing connection to the endpoint |
| enabled | boolean | Whether or not the configuration resource is enabled |
| name | string | The unique name for the configuration resource |
| protocol | string | The IoT Edge Hub client protocol |
| serverSet | string | The Set this IoT Central connection is associated with |
| automatic | boolean | If true, Azure Edge environment variables will be used as the connection parameters rather than those defined in the Connectivity and Authentication sections of this configuration |
| mqttServerUrl | string | The MQTT Server URL for the Azure IoT Edge |
| certAuthEnabled | boolean | Enable certificate based authentication instead of using a connection string |
| connectionString | string | The Connection String used for establishing a connection with the IoT Edge when using 'Connection String Authentication'. This is either the Connection String associated with the Child Device or with the Azure Edge Module |
| caCertFile | string | CA Certificate file currently in use on the IoT Edge instance. It is used for both Certificate and Connection String based authentication. This is the CA Device Certificate that was uploaded to the Azure Edge instance |
| clientCertFile | string | Client certificate file currently in use |
| clientPrivateKeyFile | string | Client private key file currently in use |
| clientKeyPassword | string | The password associated with the certificate's private key (optional) |
| hostnameVerification | boolean | Enable TLS Hostname Verification. This should be true on production systems |
| mqttHostname | string | The hostname of the Azure IoT Hub endpoint |
| deviceId | string | The Device ID as provisioned in the Azure IoT Edge configuration |
| moduleIdOption | string | The method to use to configure the Module ID. Options are NONE, ENVIRONMENT_VARIABLE, IOTEDGE_MODULEID, or IGNITION_CONFIG |
| historyEnabled | boolean | Enable Store and Forward capabilities for this stream |
| historyStoreType | string | The Type of this Store & Forward mechanism |
| partionPeriod | string | The partitioning scheme to use for the Disk-backed history store (e.g. HOUR, MINUTE, DAY, etc) |
| historyMaxSize | integer | Maximum number of megabytes history can use before dropping the data |
| trimmerTaskPeriodMultiplier | integer | A integer multiplier which is applied to the 'storageMonitorPeriod' which results in the period in which to trim potential excess history |
| historyMaxAge | integer | Maximum number of minutes to store history before dropping the data |
| queryTimeout | integer | The H2 DB query timeout in seconds for the disk-backed history store |
| flushPeriod | long | Upon reestablishing communication, the period to wait in milliseconds between sending when flushing messages |
| maxSize | integer | Maximum message size before dividing into multiple messages |
| expiration | long | The number of seconds before the session token expires |
| contentType | string | The content type to include in the topic to Azure IoT Hub |
| contentEncoding | string | The content encoding to include in the topic to Azure IoT Hub |
| azureDateTimeFormat | string | The date/time format to use when pushing data to Azure |
| customTopicExtension | string | The Custom Topic Extension to append to the topic string for things like Application Properties |
| autoGenerated | boolean | Whether or not the connection details were auto-generated |
| h2dbDirectory | string | Directory to store the H2 Database in. Applicable for Disk-backed history store only |
| h2dbPort | integer | TCP Port to connect to H2 Database. Applicable for Disk-backed history store only |
| dbMaxMessageSize | integer | The Max Message size allowed in the Store and Forward DB. This only applies to Disk-Backed history stores |
| republishBirths | boolean | Whether or not to republish BIRTH messages on reestablishing connection to the endpoint |
| Cirrus Link provides these scripts as examples only, they are not supported or guaranteed to meet any particular functionality. Cirrus Link cannot provide any assistance to modify these scripts to meet a particular need. |
# Cirrus Link provides these scripts as examples only, they are not supported or guaranteed to meet any particular functionality. Cirrus Link cannot provide any assistance to modify these scripts to meet a particular need
# Update Certificates
# Get Id for current certificate
savedCerts = system.cirruslink.azure.readConfig("Cert Files")
for config in savedCerts:
if config["Name"] == "My current cert name":
certId = config["Id"]
# Read New Cert File
deviceCaCertFilePath = "/path/to/your/certs/iot-edge-device-ca-CA.cert.pem"
deviceCaCert = open(deviceCaCertFilePath, 'r').read()
# Update existing cert config using MergeOverwrite
certProps = {}
certProps["FileContents"] = deviceCaCert
system.cirruslink.azure.updateConfig(“Cert Files”, certId, “MergeOverwrite”, certProps)
|