Skip to content

update_queue_records_visibility async

update_queue_records_visibility(
    queue_arn: QueueARN,
    entries: UpdateQueueRecordsVisibilityRequestEntryList,
    *,
    config_overrides: Optional[AsyncKinesisClientConfig] = None,
) -> UpdateQueueRecordsVisibilityOutput

Changes the visibility timeout of up to 10 records that you have received from the specified queue but not yet acknowledged. The result for each entry is reported individually in the response.

Extend the visibility timeout of a record when your queue consumer needs more time to finish processing it, so the record does not become visible and get redelivered while it is still being processed. Set the visibility timeout to 0 to make a record visible in the queue immediately, so that it can be received again without waiting for its current timeout to expire.

Because the request can result in a combination of successful and unsuccessful entries, check the Failed list even when the call returns an HTTP status code of 200.

Parameters:

  • queue_arn (QueueARN) –

    The ARN of the queue the records were received from.

  • entries (UpdateQueueRecordsVisibilityRequestEntryList) –

    The records whose visibility timeout is changed, identified by their receipt handles, and the new visibility timeout for each.

Raises:

  • AccessDeniedException –

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

  • InternalFailureException –

    The processing of the request failed because of an unknown error, exception, or failure.

  • InvalidArgumentException –

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

  • ResourceNotFoundException –

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

  • ThrottlingException –

    The request was denied because the request rate is too high. Reduce the frequency of your requests, and retry them with exponential backoff.

  • 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_queue_records_visibility(
    self,
    queue_arn: "capo_kinesis.types.queue_arn.QueueARN",
    entries: "capo_kinesis.types.update_queue_records_visibility_request_entry_list.UpdateQueueRecordsVisibilityRequestEntryList",
    *,
    config_overrides: Optional[AsyncKinesisClientConfig] = None,
) -> "capo_kinesis.types.update_queue_records_visibility_output.UpdateQueueRecordsVisibilityOutput":
    """<p>Changes the visibility timeout of up to 10 records that you have received from the specified queue but not yet acknowledged. The result for each entry is reported individually in the response.</p> <p>Extend the visibility timeout of a record when your queue consumer needs more time to finish processing it, so the record does not become visible and get redelivered while it is still being processed. Set the visibility timeout to <code>0</code> to make a record visible in the queue immediately, so that it can be received again without waiting for its current timeout to expire.</p> <p>Because the request can result in a combination of successful and unsuccessful entries, check the <code>Failed</code> list even when the call returns an HTTP status code of <code>200</code>.</p>

    Args:
        queue_arn: <p>The ARN of the queue the records were received from.</p>
        entries: <p>The records whose visibility timeout is changed, identified by their receipt handles, and the new visibility timeout for each.</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.internal_failure_exception.InternalFailureException: <p>The processing of the request failed because of an unknown error, exception, or failure.</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.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found. The stream might not be specified correctly.</p>
        capo_kinesis.errors.throttling_exception.ThrottlingException: <p>The request was denied because the request rate is too high. Reduce the frequency of your requests, and retry them with exponential backoff.</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_queue_records_visibility_input.UpdateQueueRecordsVisibilityInput]",
    ) -> AsyncOperationResponse[
        "capo_kinesis.types.update_queue_records_visibility_output.UpdateQueueRecordsVisibilityOutput"
    ]:
        import capo_kinesis._operations.kinesis_20131202.update_queue_records_visibility

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateQueueRecordsVisibility")
    )
    input_: capo_kinesis.types.update_queue_records_visibility_input.UpdateQueueRecordsVisibilityInput = {
        "queue_arn": queue_arn,
        "entries": entries,
    }

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