HttpActionBatchConfig

class aws_cdk.aws_iot_actions_alpha.HttpActionBatchConfig(*, max_batch_open_duration=None, max_batch_size=None, max_batch_size_bytes=None)

Bases: object

(experimental) Configuration for batching HTTP action messages.

Parameters:
  • max_batch_open_duration (Optional[Duration]) – (experimental) The maximum amount of time an outgoing message waits for other messages to create the batch. Must be between 5 ms and 200 ms. Default: Duration.millis(20)

  • max_batch_size (Union[int, float, None]) – (experimental) The maximum number of messages that are batched together in a single IoT rule action execution. Must be between 2 and 10. Default: 10

  • max_batch_size_bytes (Optional[Size]) – (experimental) Maximum size of a message batch. Must be between 100 bytes and 128 KiB. Default: Size.kibibytes(5)

See:

https://docs.aws.amazon.com/iot/latest/developerguide/http_batching.html

Stability:

experimental

ExampleMetadata:

infused

Example:

from aws_cdk import Size

# topic_rule: iot.TopicRule


topic_rule.add_action(
    actions.HttpsAction("https://example.com/endpoint",
        batch_config=actions.HttpActionBatchConfig(
            max_batch_open_duration=Duration.millis(100),
            max_batch_size=5,
            max_batch_size_bytes=Size.kibibytes(1)
        )
    ))

Attributes

max_batch_open_duration

(experimental) The maximum amount of time an outgoing message waits for other messages to create the batch.

Must be between 5 ms and 200 ms.

Default:

Duration.millis(20)

Stability:

experimental

max_batch_size

(experimental) The maximum number of messages that are batched together in a single IoT rule action execution.

Must be between 2 and 10.

Default:

10

Stability:

experimental

max_batch_size_bytes

(experimental) Maximum size of a message batch.

Must be between 100 bytes and 128 KiB.

Default:

Size.kibibytes(5)

Stability:

experimental