Skip to content

update_max_record_size async

update_max_record_size(
    max_record_size_in_ki_b: MaxRecordSizeInKiB,
    *,
    config_overrides: Optional[AsyncKinesisClientConfig] = None,
    stream_arn: Optional[StreamARN] = None,
    stream_id: Optional[StreamId] = None,
) -> None

This allows you to update the MaxRecordSize of a single record that you can write to, and read from a stream. You can ingest and digest single records up to 10240 KiB.

Parameters:

  • stream_arn (Optional[StreamARN], default: None ) –

    The Amazon Resource Name (ARN) of the stream for the MaxRecordSize update.

  • stream_id (Optional[StreamId], default: None ) –

    Not Implemented. Reserved for future use.

  • max_record_size_in_ki_b (MaxRecordSizeInKiB) –

    The maximum record size of a single record in KiB that you can write to, and read from a stream. Specify a value between 1024 and 10240 KiB (1 to 10 MiB). If you specify a value that is out of this range, UpdateMaxRecordSize sends back an ValidationException message.

Raises:

  • AccessDeniedException –

    Specifies that you do not have the permissions required to perform this operation.

  • InvalidArgumentException –

    A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.

  • LimitExceededException –

    The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed.

  • ResourceInUseException –

    The resource is not available for this operation. For successful operation, the resource must be in the ACTIVE state.

  • ResourceNotFoundException –

    The requested resource could not be found. The stream might not be specified correctly.

  • ValidationException –

    Specifies that you tried to invoke this API for a data stream with the on-demand capacity mode. This API is only supported for data streams with the provisioned capacity mode.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_kinesis/_services/async_kinesis.py
async def update_max_record_size(
    self,
    max_record_size_in_ki_b: "capo_kinesis.types.max_record_size_in_ki_b.MaxRecordSizeInKiB",
    *,
    config_overrides: Optional[AsyncKinesisClientConfig] = None,
    stream_arn: Optional["capo_kinesis.types.stream_arn.StreamARN"] = None,
    stream_id: Optional["capo_kinesis.types.stream_id.StreamId"] = None,
) -> None:
    """<p>This allows you to update the <code>MaxRecordSize</code> of a single record that you can write to, and read from a stream. You can ingest and digest single records up to 10240 KiB.</p>

    Args:
        stream_arn: <p>The Amazon Resource Name (ARN) of the stream for the <code>MaxRecordSize</code> update.</p>
        stream_id: <p>Not Implemented. Reserved for future use.</p>
        max_record_size_in_ki_b: <p>The maximum record size of a single record in KiB that you can write to, and read from a stream. Specify a value between 1024 and 10240 KiB (1 to 10 MiB). If you specify a value that is out of this range, <code>UpdateMaxRecordSize</code> sends back an <code>ValidationException</code> message.</p>

    Raises:
        capo_kinesis.errors.access_denied_exception.AccessDeniedException: <p>Specifies that you do not have the permissions required to perform this operation.</p>
        capo_kinesis.errors.invalid_argument_exception.InvalidArgumentException: <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p>
        capo_kinesis.errors.limit_exceeded_exception.LimitExceededException: <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p>
        capo_kinesis.errors.resource_in_use_exception.ResourceInUseException: <p>The resource is not available for this operation. For successful operation, the resource must be in the <code>ACTIVE</code> state.</p>
        capo_kinesis.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found. The stream might not be specified correctly.</p>
        capo_kinesis.errors.validation_exception.ValidationException: <p>Specifies that you tried to invoke this API for a data stream with the on-demand capacity mode. This API is only supported for data streams with the provisioned capacity mode. </p>
        capo_kinesis.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_kinesis.types.update_max_record_size_input.UpdateMaxRecordSizeInput]",
    ) -> AsyncOperationResponse[None]:
        import capo_kinesis._operations.kinesis_20131202.update_max_record_size

        (
            output,
            http_response,
        ) = await capo_kinesis._operations.kinesis_20131202.update_max_record_size.async_update_max_record_size(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateMaxRecordSize")
    )
    input_: capo_kinesis.types.update_max_record_size_input.UpdateMaxRecordSizeInput = {
        "max_record_size_in_ki_b": max_record_size_in_ki_b
    }
    if stream_arn is not None:
        input_["stream_arn"] = stream_arn
    if stream_id is not None:
        input_["stream_id"] = stream_id

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output