Updates the configuration attributes of the specified queue. You can change the queue's visibility timeout, its dead-letter handling configuration, or both.
A new visibility timeout applies to records received after the update completes. Records that are already in flight keep the visibility timeout they were received with. To change the visibility timeout of a record that is already in flight, use UpdateQueueRecordsVisibility.
UpdateQueue is an asynchronous operation. Upon receiving an UpdateQueue request, Amazon Kinesis Data Streams sets the QueueStatus to UPDATING, and sets it back to ACTIVE when the update is complete. You can continue to receive and acknowledge records while the queue is UPDATING.
You can't change the data stream or the starting position of a queue after you create it. To read from a different stream or position, create a new queue.
Parameters:
-
queue_arn
(QueueARN)
–
The ARN of the queue to update.
-
queue_attributes
(QueueAttributes)
–
The configuration attributes to apply to the queue. Attributes you do not specify are left unchanged.
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.
-
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
–
The request failed validation. For example, a parameter value is not valid, a combination of parameters is not supported, or the operation is not supported for the stream's capacity mode. The error message describes the specific reason.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_kinesis/_services/kinesis.py
| def update_queue(
self,
queue_arn: "capo_kinesis.types.queue_arn.QueueARN",
queue_attributes: "capo_kinesis.types.queue_attributes.QueueAttributes",
*,
config_overrides: Optional[KinesisClientConfig] = None,
) -> "capo_kinesis.types.update_queue_output.UpdateQueueOutput":
"""<p>Updates the configuration attributes of the specified queue. You can change the queue's visibility timeout, its dead-letter handling configuration, or both.</p> <p>A new visibility timeout applies to records received after the update completes. Records that are already in flight keep the visibility timeout they were received with. To change the visibility timeout of a record that is already in flight, use <a>UpdateQueueRecordsVisibility</a>.</p> <p> <code>UpdateQueue</code> is an asynchronous operation. Upon receiving an <code>UpdateQueue</code> request, Amazon Kinesis Data Streams sets the <code>QueueStatus</code> to <code>UPDATING</code>, and sets it back to <code>ACTIVE</code> when the update is complete. You can continue to receive and acknowledge records while the queue is <code>UPDATING</code>.</p> <p>You can't change the data stream or the starting position of a queue after you create it. To read from a different stream or position, create a new queue.</p>
Args:
queue_arn: <p>The ARN of the queue to update.</p>
queue_attributes: <p>The configuration attributes to apply to the queue. Attributes you do not specify are left unchanged.</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.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>The request failed validation. For example, a parameter value is not valid, a combination of parameters is not supported, or the operation is not supported for the stream's capacity mode. The error message describes the specific reason.</p>
capo_kinesis.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_kinesis.types.update_queue_input.UpdateQueueInput]",
) -> OperationResponse[
"capo_kinesis.types.update_queue_output.UpdateQueueOutput"
]:
import capo_kinesis._operations.kinesis_20131202.update_queue
output, http_response = (
capo_kinesis._operations.kinesis_20131202.update_queue.update_queue(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateQueue")
)
input_: capo_kinesis.types.update_queue_input.UpdateQueueInput = {
"queue_arn": queue_arn,
"queue_attributes": queue_attributes,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|