Skip to content

stream resource

Description

StreamResource manages one Kinesis data stream.

Source: internal/service/kinesis/stream_types.go:4

Example usage:

imports: {
  aws-kinesis: 'github.com/cloudboss/unobin-library-aws//service/kinesis'
}

resources: {
  example: aws-kinesis.stream {
    # Set input fields here.
  }
}

Inputs

name

string

required

encryption-type

string

default NONE

enforce-consumer-deletion

boolean

default false

kms-key-id

optional(string)

max-record-size-in-kib

optional(integer)

retention-period

integer

default 24

shard-count

optional(integer)

shard-level-metrics

optional(list(string))

stream-mode-details

optional(object)
optional(
  object({
    stream-mode: string
  })
)

tags

optional(map(string))

warm-throughput-mib-ps

optional(integer)

Input Constraints

Encryption type rules

encryption-type must be NONE or KMS.

Rule logic
Require
input.encryption-type == 'NONE'
|| input.encryption-type == 'KMS'

KMS encryption requires a non-empty kms-key-id.

Rule logic
When
input.encryption-type == 'KMS'
Require
@core.length(input.kms-key-id ?? '') >= 1

Retention period rules

retention-period must be between 24 and 8760.

Rule logic
Require
input.retention-period >= 24
&& input.retention-period <= 8760

Max record size in kib rules

max-record-size-in-kib must be between 1024 and 10240.

Rule logic
When
input.max-record-size-in-kib != null
Require
input.max-record-size-in-kib >= 1024
&& input.max-record-size-in-kib <= 10240

Stream mode details rules

PROVISIONED mode requires shard-count.

Rule logic
When
input.stream-mode-details == null
Require
input.shard-count != null

stream-mode must be PROVISIONED or ON_DEMAND.

Rule logic
When
input.stream-mode-details != null
Require
input.stream-mode-details.stream-mode == 'PROVISIONED'
|| input.stream-mode-details.stream-mode == 'ON_DEMAND'

PROVISIONED mode requires shard-count.

Rule logic
When
input.stream-mode-details.stream-mode == 'PROVISIONED'
Require
input.shard-count != null

ON_DEMAND mode forbids shard-count.

Rule logic
When
input.stream-mode-details.stream-mode == 'ON_DEMAND'
Require
input.shard-count == null

Shard count rules

shard-count must be at least 1.

Rule logic
When
input.shard-count != null
Require
input.shard-count >= 1

Field combinations

warm-throughput-mib-ps conflicts with shard-count.

Shard level metrics rules

shard-level-metrics contains an unsupported metric.

Rule logic
For each
input.shard-level-metrics ?? []
Require
@each.value == 'IncomingBytes'
|| @each.value == 'IncomingRecords'
|| @each.value == 'OutgoingBytes'
|| @each.value == 'OutgoingRecords'
|| @each.value == 'WriteProvisionedThroughputExceeded'
|| @each.value == 'ReadProvisionedThroughputExceeded'
|| @each.value == 'IteratorAgeMilliseconds'
|| @each.value == 'ALL'

Outputs

arn

string

name

string

open-shard-count

integer

stream-creation-timestamp

string

stream-status

string

consumer-count

optional(integer)

max-record-size-in-kib

optional(integer)

stream-mode-details

optional(object)
optional(
  object({
    stream-mode: string
  })
)

warm-throughput

optional(object)
optional(
  object({
    current-mib-ps: optional(integer)
    target-mib-ps: optional(integer)
  })
)