View a markdown version of this page

InfluxDBAction - AWS IoT

InfluxDBAction

The InfluxDB rule action converts the message payload into InfluxDB line protocol. It writes the result to a table in an InfluxDB database. The database can be an Amazon Timestream for InfluxDB instance or a self-managed InfluxDB cluster.

The action connects to InfluxDB through an InfluxDB topic rule destination, which must be in the ENABLED state before the action can write data.

Contents

databaseName

The name of the InfluxDB database to write to. In InfluxDB 2, this is the name of the bucket.

Type: String

Length Constraints: Minimum length of 2. Maximum length of 64.

Pattern: ^[^_\"][^\"]+$

Required: Yes

destinationArn

The ARN of the InfluxDB topic rule destination that identifies the InfluxDB instance to write to.

Type: String

Required: Yes

roleArn

The ARN of the role that grants permission to retrieve the InfluxDB API token from AWS Secrets Manager.

Type: String

Required: Yes

tableName

The name of the table to write the data point to. This is the measurement name of the InfluxDB line protocol record.

Accepts substitution templates.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: ^[^_].*$

Required: Yes

batchConfig

The batching configuration for the action. When present, AWS IoT collects data points from multiple messages and writes them to InfluxDB in a single request.

If omitted, each message is written to InfluxDB in its own request.

Type: InfluxDBBatchConfig object

Required: No

organization

The name of the InfluxDB organization that owns the database.

A write to an InfluxDB 2 instance fails if this value isn't set. This value isn't used when the destination is an InfluxDB 3 instance.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Required: No

tags

The set of tags to write with each data point. Tags are the indexed metadata of an InfluxDB data point.

Tag names and tag values accept substitution templates. A tag name can't use the @{...} per-element form. A tag name must resolve to the same value for every element of an array payload.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 498 items.

Key Length Constraints: Minimum length of 1. Maximum length of 256.

Key Pattern: ^[^_].*$

Value Length Constraints: Minimum length of 1. Maximum length of 1024.

Required: No

timestampUnit

The precision of the timestamp written with each data point. Valid values are s (seconds), ms (milliseconds), us (microseconds), and ns (nanoseconds).

If omitted, the topic rule action uses ms.

Type: String

Valid Values: s | ms | us | ns

Required: No

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: