fix(Amazon Kinesis Action): batch size restriction

Make sure that the Amazon Kinesis action has the same batch size
restriction as the Amazon Kinesis bridge.

Fixes:
https://emqx.atlassian.net/browse/EMQX-11983
This commit is contained in:
Kjell Winblad 2024-03-12 12:52:54 +01:00
parent f24a76e770
commit 7e73b79b75
1 changed files with 14 additions and 1 deletions

View File

@ -62,7 +62,19 @@ fields(kinesis_action) ->
required => true,
desc => ?DESC("action_parameters")
}
)
),
#{
resource_opts_ref => hoconsc:ref(?MODULE, action_resource_opts)
}
);
fields(action_resource_opts) ->
emqx_bridge_v2_schema:action_resource_opts_fields(
_Overrides = [
{batch_size, #{
type => range(1, 500),
validator => emqx_resource_validator:max(int, 500)
}}
]
);
fields("config_producer") ->
emqx_bridge_schema:common_bridge_fields() ++
@ -84,6 +96,7 @@ fields("resource_opts") ->
fields("creation_opts") ->
emqx_resource_schema:create_opts([
{batch_size, #{
type => range(1, 500),
validator => emqx_resource_validator:max(int, 500)
}}
]);