![]()
Contents
Cirrus Link Resources
Cirrus Link Website![]()
Contact Us (Sales/Support)![]()
Forum![]()
Cirrus Link Modules Docs for Ignition 7.9.x![]()
Inductive Resources
Ignition User Manual![]()
Knowledge Base Articles![]()
Inductive University![]()
Forum![]()
The following API calls are available for the Azure Injector Module and can be executed within any of the
...
available Ignition scopes.
APIsAnchor createConfig createConfig
system.cirruslink.azure.createConfig(type, props) → voidParametersString type (str)The type of configuration to create with valid options:
"Cert Files""IoT Hubs""IoT Edges""IoT EdgeCentrals""Event Hubs""Agents""Sets"Map propsDictionary of properties making up the configuration with the following keys and datatypes:Cert FilesName (str)
FileName (str)
FileContents (str)
Description (str)
IoT HubsId (long)(cannot be null)
Name (str)
Enabled (strbool)
Protocol (str) "MQTT"
AzureSetId (long)(must be included)
CertAuthEnabled (bool)
ConnectionString (str)
MqttHostname (str)
DeviceId (str)
CaCertFileId (long)
ClientCertFileId (long)
ClientPrivateKeyFileId (long)
ClientKeyPassword (str)
HistoryEnabled (bool)
HistoryStoreType (str) "In_Memory"
MessageCapacity (int)
FlushPeriod (long)
KeepAlive (int)
MaxSize (int)
" or "Disk_Backed" (added 4.0.17)
MessageCapacity (int)(deprecated 4.0.19)
HistoryMaxSize (int)(added 4.0.22)HistoryMaxAge (int)(added 4.0.19)FlushPeriod Expiration (long)ContentType
H2dbDirectory (str)(added 4.0.25)H2dbPort (int)(added 4.0.22)KeepAlive (int)
MaxSize (int)
Expiration (long)
ContentType (str) "NONE" or "APPLICATION_JSON"
ContentEncoding (str) " "NONE" or "APPLICATION_JSON"ContentEncoding (str) "NONE", "UTF_8", "UTF_16", or "UTF_32"
AzureDateTimeFormat (str) "LONG_MS_SINCE_EPOCH" or "STRING_AZURE_COMPAT"
CustomTopicExtension (str)
IoT Edges IoT EdgeId (long)(cannot be null)
Name (str)
Enabled (strbool)
Protocol (str) "MQTT"
AzureSetId (long)(must be included)
MqttServerUrl (str)
CertAuthEnabled (bool)
ConnectionString (str)
CaCertFileId (long)
ClientCertFileId (long)
ClientPrivateKeyFileId (long)
ClientKeyPassword (str)
HostnameVerification (bool)
MqttHostname (str)
DeviceId (str)
ModuleIdOption (str) "NONE", "ENVIRONMENT_VARIABLE" or "IGNITION_CONFIG"
ModuleId (str)
HistoryEnabled (bool)
HistoryStoreType (str) "In_Memory" or "Disk_Backed" (added 4.0.17)
MessageCapacity (int)FlushPeriod (long(deprecated 4.0.19)KeepAlive
HistoryMaxSize (int)(added 4.0.22)HistoryMaxAge (int)(added 4.0.19)Expiration FlushPeriod (long)
H2dbDirectory (str)(added 4.0.25)H2dbPort (int)(added 4.0.22)KeepAlive (int)
MaxSize (int)
Expiration (long)
ContentType (str) "NONE" or "APPLICATION_JSON"
ContentEncoding (str) "NONE", "UTF_8", "UTF_16", or "UTF_32"
AzureDateTimeFormat (str) "LONG_MS_SINCE_EPOCH" or "STRING_AZURE_COMPAT"
CustomTopicExtension (str)
IoT CentralsEvent HubsId (long(Long)(cannot be null)Name (str)Enabled (strbool)ScopeId (str)EnrollmentGroupSymmetricKey (str)GlobalEndpoint (strHistoryEnabled (bool)ProvisionedDeviceId (str) "In_Memory"ModelId (intstr)AureSetId (long)(must be included)HistoryEnabled (intbool)HistoryStoreType (str) "LONG_MS_SINCE_EPOCHIn_Memory" or "STRINGDisk_AZURE_COMPAT"AgentsId (long)
TagProvider (str)
TagPath (str)
PushTrigger (str) "EVENT_DRIVEN" or "PERIODIC"
TagPacingPeriod (long)
ConvertUdts (bool)
PublishUdtDefinitions (bool)
OptimizeUdts (bool)
AzureSetId (long)
AutoDiscover (bool)
GroupId (str)
EdgeNodeId (str)
DeviceId (str)
FilteredProperties (str)
Backed" (added 4.0.17)MessageCapacity (int)(deprecated 4.0.19)HistoryMaxSize (int)(added 4.0.22)HistoryMaxAge (int)(added 4.0.19)FlushPeriod (long)H2dbDirectory (str)(added 4.0.25)H2dbPort (int)(added 4.0.22)MaximumSize (int)AzureDateTimeFormat (str) "LONG_MS_SINCE_EPCOH" or "STRING_AZURE_COMPAT"ParametersString typeThe type of configuration to read with valid options:
GeneralCert FilesIoT HubsIoT EdgeEvent HubsAgentsSetsReturn ValueA List of Dictionaries of properties making up the configurations with the following keys and datatypes:GeneralId (long)
Enabled (bool)
Cert FilesName (str)
FileName (str)
FileContents (str)
Description (str)
IoT HubsId (long)
Name (str)
Enabled (str)
Protocol (str) "MQTT"
AzureSetId (long)
CertAuthEnabled (bool)
ConnectionString (str)
MqttHostname (str)
DeviceId (str)
CaCertFileId (long)
ClientCertFileId (long)
ClientPrivateKeyFileId (long)
ClientKeyPassword (str)
HistoryEnabled (bool)
HistoryStoreType (str) "In_Memory"
MessageCapacity (int)
FlushPeriod (long)
KeepAlive (int)
MaxSize (int)
Expiration (long)
ContentType (str) "NONE" or "APPLICATION_JSON"
Event HubsId (long)(cannot be null
SetsId (long)
Name (str)
Description Enabled (strbool)
PushPolicy (str) "PUSH_TO_ALL" or "PUSH_TO_ANY"
Return ValueNoneAzureSetId(long)(must be included)
CertAuthEnabled (bool)(added 4.0.26)TenantId (str)(added 4.0.26)AzureServicePrincipalClientId (str)(added 4.0.26)EventHubNamespace (str)(added 4.0.26)EventHubName (str)(added 4.0.26)ClientCertFileId (long)(added 4.0.26)ClientPrivateKeyFileId (long)(added 4.0.26)ClientKeyPassword (str)(added 4.0.26)ConnectionString (str)
HistoryEnabled (bool)
HistoryStoreType (str) "In_Memory" or "Disk_Backed" (added 4.0.17)
MessageCapacity (int)(deprecated 4.0.19)
HistoryMaxSize (int)(added 4.0.22)HistoryMaxAge (int)(added 4.0.19)FlushPeriod (long)
H2dbDirectory (str)(added 4.0.25)H2dbPort (int)(added 4.0.22)MaxSize (int)
ContentEncoding (str) "NONE", "UTF_8", "UTF_16", or "UTF_32"AzureDateTimeFormat (str) "LONG_MS_SINCE_EPOCH" or "STRING_AZURE_COMPAT"
CustomTopicExtension (str)
IoT EdgeAgentsId (long)(cannot be null)
Name (str) (added 4.0.17)Enabled (bool) (added 4.0.17)TagProvider (str)
TagPath (str)
PushTrigger (str) "
EVENT_DRIVEN", "PERIODIC" or "HYBRID"
TagPacingPeriod (long)
ConvertUdts (
bool)
PublishUdtDefinitions (bool)
OptimizeUdts (
bool)
AzureSetId (long)
ClientCertFileId (long)
ClientPrivateKeyFileId (long)
(must be included)
GroupId (str)
EdgeNodeId (str)
DeviceId (str)
FilteredProperties
(str)
SendAllProps (bool)(added 4.0.25)SetsId (long)(cannot be null)
Name
(str)
Description (str)
PushPolicy (str) "
PUSH_TO_ALL" or "
PUSH_TO_
ANY"
ModuleId (str)
HistoryEnabled (bool)
HistoryStoreType (str) "In_Memory"
MessageCapacity (int)
FlushPeriod (long)
KeepAlive (int)
MaxSize (int)
Expiration (long)
ContentType (str) "NONE" or "APPLICATION_JSON"
ContentEncoding (str) "NONE", "UTF_8", "UTF_16", or "UTF_32"
AzureDateTimeFormat (str) "LONG_MS_SINCE_EPOCH" or "STRING_AZURE_COMPAT"
CustomTopicExtension (str)
Return ValueA map representing the newly created configuration after it has been written to the database. (added 4.0.16)Anchor readConfig readConfig
system.cirruslink.azure.readConfig(type) → List Parameterstype (str)The type of configuration to read with valid options:
"General""Cert Files""IoT Hubs""IoT Edges""IoT Centrals""Event Hubs""Agents""Sets"Return ValueA List of Dictionaries of properties making up the configurations with the following keys and datatypes:GeneralEvent HubsId (long)
Name Enabled (strbool)
Cert FilesEnabled Name (str)
ConnectionString FileName (str)
HistoryEnabled FileContents (boolstr)
HistoryStoreType Description (str) "In_Memory"
IoT HubsId (long)
Name (str)
Enabled (str)
Protocol
MessageCapacity (int)
FlushPeriod (long)
MaxSize (int)
AzureDateTimeFormat (str) "LONG_MS_SINCE_EPOCH" or "STRING_AZURE_COMPAT"
AgentsMQTT"
AzureSetId (long)
CertAuthEnabled (bool)
ConnectionString
Id (long)
TagProvider (str)
TagPath MqttHostname (str)
PushTrigger DeviceId (str) "EVENT_DRIVEN" or "PERIODIC"
CaCertFileId TagPacingPeriod (long)
ConvertUdts ClientCertFileId (boollong)
PublishUdtDefinitions ClientPrivateKeyFileId (boollong)
OptimizeUdts ClientKeyPassword (boolstr)
AzureSetId HistoryEnabled (longbool)
AutoDiscover HistoryStoreType (bool)
GroupId (str)
EdgeNodeId (str)
DeviceId (str)
FilteredProperties (str)
SetsId (long)
Name (str)
Description (str)
PushPolicy (str) "PUSH_TO_ALL" or "PUSH_TO_ANY"
str) "In_Memory" or "Disk_Backed" (added 4.0.17)
MessageCapacity (int)(deprecated 4.0.19)
HistoryMaxSize (int)(added 4.0.22)HistoryMaxAge (int)(added 4.0.19)FlushPeriod (long)
H2dbDirectory (str)(added 4.0.25)H2dbPort (int)(added 4.0.22)KeepAlive (int)
MaxSize (int)
Expiration (long)
ContentType (str) "NONE" or "APPLICATION_JSON"
ContentEncoding (str) "NONE", "UTF_8", "UTF_16", or "UTF_32"
AzureDateTimeFormat (str) "LONG_MS_SINCE_EPOCH" or "STRING_AZURE_COMPAT"
CustomTopicExtension (str)
IoT EdgesId (long)
Name (str)
Enabled (str)
Protocol (str) "MQTT"
AzureSetId (long)
MqttServerUrl (str)
CertAuthEnabled (bool)
ConnectionString (str)
CaCertFileId (long)
ClientCertFileId (long)
ClientPrivateKeyFileId (long)
ClientKeyPassword (str)
HostnameVerification (bool)
ParametersString typeThe type of configuration to update with valid options:
GeneralCert FilesIoT HubsIoT EdgeEvent HubsAgentsSetsLong idThe ID of the record to updateString collisionPolicy"MergeOverwrite" or "Overwrite""MergeOverwrite" will replace the existing properties in the record ID with only those included in the call"Overwrite" will replace all properties in the record ID with those in the callMap propsDictionary of properties making up the configuration with the following keys and datatypes:GeneralId (long)
Enabled (bool)
Cert FilesName (str)
FileName (str)
FileContents (str)
Description (str)
IoT HubsId (long)
Name (str)
Enabled (str)
Protocol (str) "MQTT"
AzureSetId (long)
CertAuthEnabled (bool)
ConnectionString (str)
MqttHostname (str)
DeviceId (str)
ModuleIdOption (str) "NONE", "ENVIRONMENT_VARIABLE" or "IGNITION_CONFIG"
ModuleId
ClientCertFileId (long)
ClientPrivateKeyFileId (long)
(str)
HistoryEnabled (bool)
HistoryStoreType (str) "In_Memory" or "Disk_Backed" (added 4.0.17)
MessageCapacity (int)
(deprecated 4.0.19)
HistoryMaxSize (int)(added 4.0.22)HistoryMaxAge (int)(added 4.0.19)FlushPeriod
MaxSize (int)
(long)
H2dbDirectory (str)(added 4.0.25)H2dbPort (int)(added 4.0.22)KeepAlive (int)
MaxSize (int)
Expiration (long)
ContentType (str) "NONE" or "APPLICATION_JSON"
ContentEncoding (str) "NONE"
, "UTF_8", "UTF_16", or "UTF_32"
AzureDateTimeFormat (str) "LONG_MS_SINCE_EPOCH" or "STRING_AZURE_COMPAT"
CustomTopicExtension (str)
IoT EdgeIoT CentralsId (long)Name (str)Enabled (strbool)ScopeId (str) "MQTT"EnrollmentGroupSymmetricKey (longstr)GlobalEndpoint (str)ProvisionedDeviceId (boolstr)ModelId (str)CaCertFileId (long)
ClientCertFileId (long)
ClientPrivateKeyFileId (long)
AzureSetId (str)HistoryEnabled (bool)HistoryStoreType (str) DeviceId (str)
"In_Memory" or "IGNITIONDisk_CONFIGBacked" ModuleId (str)
HistoryEnabled (bool)
HistoryStoreType (str) "In_Memory"
MessageCapacity (int)
FlushPeriod (long)
KeepAlive (int)
MaxSize (int)
Expiration (long)
ContentType (str) "NONE" or "APPLICATION_JSON"
ContentEncoding (str) "NONE", "UTF_8", "UTF_16", or "UTF_32"(added 4.0.17)MessageCapacity (int)(deprecated 4.0.19)HistoryMaxSize (int)(added 4.0.22)HistoryMaxAge (int)(added 4.0.19)FlushPeriod (long)H2dbDirectory (str)(added 4.0.25)H2dbPort (int)(added 4.0.22)MaximumSize (int)AzureDateTimeFormat (str) "LONG_MS_SINCE_EPOCHEPOCK" or "STRING_AZURE_COMPAT"CustomTopicExtension (str)Event HubsId (long)
Name (str)
Enabled (str)
CertAuthEnabled (bool)(added 4.0.26)TenantId (str)HistoryEnabled (bool(added 4.0.26)AzureServicePrincipalClientId (str) "In_Memory"MessageCapacity (int)
FlushPeriod (long)
MaxSize (int)
AzureDateTimeFormat (str) "LONG_MS_SINCE_EPOCH" or "STRING_AZURE_COMPAT"
AgentsId (long)
TagProvider (str)
TagPath (str)
PushTrigger (str) "EVENT_DRIVEN" or "PERIODIC"
TagPacingPeriod (long)
ConvertUdts (bool)
PublishUdtDefinitions (bool)
OptimizeUdts (bool)
AzureSetId (long)
AutoDiscover (bool)
GroupId (str)
EdgeNodeId (str)
DeviceId (str)
FilteredProperties (str)
SetsId (long)
Name (str)
Description (str)
PushPolicy (str) "PUSH_TO_ALL" or "PUSH_TO_ANY"
Return ValueNoneParametersString typeThe type of configuration to delete with valid options:
Cert FilesIoT HubsIoT EdgeEvent HubsAgentsSetsLong idThe ID of the record to deleteReturn ValueNone(added 4.0.26)EventHubNamespace (str)(added 4.0.26)EventHubName (str)(added 4.0.26)ClientCertFileId (long)(added 4.0.26)ClientPrivateKeyFileId (long)(added 4.0.26)ClientKeyPassword (str)(added 4.0.26)ConnectionString (str)
HistoryEnabled (bool)
HistoryStoreType (str) "In_Memory" or "Disk_Backed" (added 4.0.17)
MessageCapacity (int)(deprecated 4.0.19)
HistoryMaxSize (int)(added 4.0.22)HistoryMaxAge (int)(added 4.0.19)FlushPeriod (long)
H2dbDirectory (str)(added 4.0.25)H2dbPort (int)(added 4.0.22)MaxSize (int)
ContentEncoding (str) "NONE", "UTF_8", "UTF_16", or "UTF_32"AzureDateTimeFormat (str) "LONG_MS_SINCE_EPOCH" or "STRING_AZURE_COMPAT"
AgentsId (long)
Name (str) (added 4.0.17)Enabled (bool) (added 4.0.17)TagProvider (str)
TagPath (str)
PushTrigger (str) "EVENT_DRIVEN", "PERIODIC" or "HYBRID"
TagPacingPeriod (long)
ConvertUdts (bool)
PublishUdtDefinitions (bool)
OptimizeUdts (bool)
AzureSetId (long)
GroupId (str)
EdgeNodeId (str)
DeviceId (str)
FilteredProperties (str)
SendAllProps (bool)(added 4.0.25)SetsId (long)
Name (str)
Description (str)
PushPolicy (str) "PUSH_TO_ALL" or "PUSH_TO_ANY"
Anchor updateConfig updateConfig
system.cirruslink.azure.updateConfig(type, id, collisionPolicy, props) → voidParametersType (str)The type of configuration to update with valid options:
"General""Cert Files""IoT Hubs""IoT Edges""IoT Centrals""Event Hubs""Agents""Sets"Id (long)The ID of the record to updatecollisionPolicy(str)"MergeOverwrite" or "Overwrite""MergeOverwrite" will replace the existing properties in the record ID with only those included in the call"Overwrite" will replace all properties in the record ID with those in the callMap propsDictionary of properties making up the configuration with the following keys and datatypes:GeneralId (long)
Enabled (bool)
Cert FilesName (str)
FileName (str)
FileContents (str)
Description (str)
IoT HubsId (long)
Name (str)
Enabled (str)
Protocol (str) "MQTT"
AzureSetId (long)
CertAuthEnabled (bool)
ConnectionString (str)
MqttHostname (str)
DeviceId (str)
CaCertFileId (long)
ClientCertFileId (long)
ClientPrivateKeyFileId (long)
ClientKeyPassword (str)
HistoryEnabled (bool)
HistoryStoreType (str) "In_Memory" or "Disk_Backed" (added 4.0.17)
MessageCapacity (int)(deprecated 4.0.19)
HistoryMaxSize (int)(added 4.0.22)HistoryMaxAge (int) (added 4.0.19)FlushPeriod (long)
H2dbDirectory (str)(added 4.0.25)H2dbPort (int)(added 4.0.22)KeepAlive (int)
MaxSize (int)
Expiration (long)
ContentType (str) "NONE" or "APPLICATION_JSON"
ContentEncoding (str) "NONE", "UTF_8", "UTF_16", or "UTF_32"
AzureDateTimeFormat (str) "LONG_MS_SINCE_EPOCH" or "STRING_AZURE_COMPAT"
CustomTopicExtension (str)
IoT EdgesId (long)
Name (str)
Enabled (str)
Protocol (str) "MQTT"
AzureSetId (long)
MqttServerUrl (str)
CertAuthEnabled (bool)
ConnectionString (str)
CaCertFileId (long)
ClientCertFileId (long)
ClientPrivateKeyFileId (long)
ClientKeyPassword (str)
HostnameVerification (bool)
MqttHostname (str)
DeviceId (str)
ModuleIdOption (str) "NONE", "ENVIRONMENT_VARIABLE" or "IGNITION_CONFIG"
ModuleId (str)
HistoryEnabled (bool)
HistoryStoreType (str) "In_Memory" or "Disk_Backed" (added 4.0.17)
MessageCapacity (int)(deprecated 4.0.19)
HistoryMaxSize (int)(added 4.0.22)HistoryMaxAge (int)(added 4.0.19)FlushPeriod (long)
H2dbDirectory (str)(added 4.0.25)H2dbPort (int)(added 4.0.22)KeepAlive (int)
MaxSize (int)
Expiration (long)
ContentType (str) "NONE" or "APPLICATION_JSON"
ContentEncoding (str) "NONE", "UTF_8", "UTF_16", or "UTF_32"
AzureDateTimeFormat (str) "LONG_MS_SINCE_EPOCH" or "STRING_AZURE_COMPAT"
CustomTopicExtension (str)
IoT CentralsId (long)Name (str)Enabled (bool)ScopeId (str)EnrollmentGroupSymmetricKey (str)GlobalEndpoint (str)ModelId (str)AzureSetId (long)HistoryEnabled (bool)HistoryStoreType (str) "In_Memory" or "Disk_Backed" (added 4.0.17)MessageCapacity (int)(depreacted 4.0.19)HistoryMaxSize (int)(added 4.0.22)HistoryMaxAge (int)(added 4.0.19)FlushPeriod (long)H2dbDirectory (str)(added 4.0.25)H2dbPort (int)(added 4.0.22)MaximumSize (int)AzureDateTimeFormat (str) "LONG_MS_SINCE_EPOCH" or "STRING_AZURE_COMPAT"Event HubsId (long)
Name (str)
Enabled (str)
CertAuthEnabled (bool)(added 4.0.26)TenantId (str)(added 4.0.26)AzureServicePrincipalClientId (str)(added 4.0.26)EventHubNamespace (str)(added 4.0.26)EventHubName (str)(added 4.0.26)ClientCertFileId (long)(added 4.0.26)ClientPrivateKeyFileId (long)(added 4.0.26)ClientKeyPassword (str)(added 4.0.26)ConnectionString (str)
HistoryEnabled (bool)
HistoryStoreType (str) "In_Memory" or "Disk_Backed" (added 4.0.17)
MessageCapacity (int)(deprecated 4.0.19)
HistoryMaxSize (int)(added 4.0.22)HistoryMaxAge (int)(added 4.0.19)FlushPeriod (long)
H2dbDirectory (str)(added 4.0.25)H2dbPort (int)(added 4.0.22)MaxSize (int)
ContentEncoding (str) "NONE", "UTF_8", "UTF_16", or "UTF_32"AzureDateTimeFormat (str) "LONG_MS_SINCE_EPOCH" or "STRING_AZURE_COMPAT"
AgentsId (long)
Name (str) (added 4.0.17)Enabled (bool) (added 4.0.17)TagProvider (str)
TagPath (str)
PushTrigger (str) "EVENT_DRIVEN", "PERIODIC" or "HYBRID"
TagPacingPeriod (long)
ConvertUdts (bool)
PublishUdtDefinitions (bool)
OptimizeUdts (bool)
AzureSetId (long)
GroupId (str)
EdgeNodeId (str)
DeviceId (str)
FilteredProperties (str)
SendAllProps (bool)(added 4.0.25)SetsId (long)
Name (str)
Description (str)
PushPolicy (str) "PUSH_TO_ALL" or "PUSH_TO_ANY"
Return ValueA map representing the updated configuration after it has been written to the database. (added 4.0.16)Anchor deleteConfig deleteConfig
system.cirruslink.azure.deleteConfig(type, id) → voidParametersType (str)The type of configuration to delete with valid options:
"Cert Files""IoT Hubs""IoT Edges""IoT Centrals""Event Hubs""Agents""Sets"Id (long)The ID of the record to deleteReturn ValueTrue if the record was successfully deleted otherwise False (added 4.0.16)| Warning |
|---|
| 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. |
| Code Block | ||
|---|---|---|
| ||
# 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)
|