Skip to content

Commit

Permalink
r/aws_iot_topic_rule: docs for timestream as iot action
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagoarrais committed Mar 7, 2022
1 parent 37cc161 commit 6f0e727
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
12 changes: 12 additions & 0 deletions internal/service/iot/topic_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,12 @@ func ResourceTopicRule() *schema.Resource {
"unit": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{
"SECONDS",
"MILLISECONDS",
"MICROSECONDS",
"NANOSECONDS",
}, false),
},
"value": {
Type: schema.TypeString,
Expand Down Expand Up @@ -1182,6 +1188,12 @@ func ResourceTopicRule() *schema.Resource {
"unit": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{
"SECONDS",
"MILLISECONDS",
"MICROSECONDS",
"NANOSECONDS",
}, false),
},
"value": {
Type: schema.TypeString,
Expand Down
14 changes: 13 additions & 1 deletion website/docs/r/iot_topic_rule.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ EOF
* `enabled` - (Required) Specifies whether the rule is enabled.
* `sql` - (Required) The SQL statement used to query the topic. For more information, see AWS IoT SQL Reference (http://docs.aws.amazon.com/iot/latest/developerguide/iot-rules.html#aws-iot-sql-reference) in the AWS IoT Developer Guide.
* `sql_version` - (Required) The version of the SQL rules engine to use when evaluating the rule.
* `error_action` - (Optional) Configuration block with error action to be associated with the rule. See the documentation for `cloudwatch_alarm`, `cloudwatch_metric`, `dynamodb`, `dynamodbv2`, `elasticsearch`, `firehose`, `iot_analytics`, `iot_events`, `kinesis`, `lambda`, `republish`, `s3`, `step_functions`, `sns`, `sqs` configuration blocks for further configuration details.
* `error_action` - (Optional) Configuration block with error action to be associated with the rule. See the documentation for `cloudwatch_alarm`, `cloudwatch_metric`, `dynamodb`, `dynamodbv2`, `elasticsearch`, `firehose`, `iot_analytics`, `iot_events`, `kinesis`, `lambda`, `republish`, `s3`, `step_functions`, `sns`, `sqs`, `timestream` configuration blocks for further configuration details.
* `tags` - (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configuration block](/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level.

The `cloudwatch_alarm` object takes the following arguments:
Expand Down Expand Up @@ -180,6 +180,18 @@ The `step_functions` object takes the following arguments:
* `state_machine_name` - (Required) The name of the Step Functions state machine whose execution will be started.
* `role_arn` - (Required) The ARN of the IAM role that grants access to start execution of the state machine.

The `timestream` object takes the following arguments:

* `database_name` - (Required) The name of an Amazon Timestream database.
* `dimension` - (Required) Configuration blocks with metadata attributes of the time series that are written in each measure record. Nested arguments below.
* `name` - (Required) The metadata dimension name. This is the name of the column in the Amazon Timestream database table record.
* `value` - (Required) The value to write in this column of the database record.
* `role_arn` - (Required) The ARN of the role that grants permission to write to the Amazon Timestream database table.
* `table_name` - (Required) The name of the database table into which to write the measure records.
* `timestamp` - (Optional) Configuration block specifying an application-defined value to replace the default value assigned to the Timestream record's timestamp in the time column. Nested arguments below.
* `unit` - (Required) The precision of the timestamp value that results from the expression described in value. Valid values: `SECONDS`, `MILLISECONDS`, `MICROSECONDS`, `NANOSECONDS`.
* `value` - (Required) An expression that returns a long epoch time value.

The `iot_analytics` object takes the following arguments:

* `channel_name` - (Required) Name of AWS IOT Analytics channel.
Expand Down

0 comments on commit 6f0e727

Please sign in to comment.