To deregister a consumer, provide its ARN. Alternatively, you can provide the ARN of the data stream and the name you gave the consumer when you registered it. You may also provide all three parameters, as long as they don't conflict with each other. If you don't know the name or ARN of the consumer that you want to deregister, you can use the ListStreamConsumers operation to get a list of the descriptions of all the consumers that are currently registered with a given data stream. The description of a consumer contains its name and ARN.
This operation has a limit of five transactions per second per stream.
Parameters:
-
stream_arn
(Optional[StreamARN], default:
None
)
–
-
consumer_name
(Optional[ConsumerName], default:
None
)
–
The name that you gave to the consumer.
-
consumer_arn
(Optional[ConsumerARN], default:
None
)
–
The ARN returned by Kinesis Data Streams when you registered the consumer. If you don't know the ARN of the consumer that you want to deregister, you can use the ListStreamConsumers operation to get a list of the descriptions of all the consumers that are currently registered with a given data stream. The description of a consumer contains its ARN.
-
stream_id
(Optional[StreamId], default:
None
)
–
Not Implemented. Reserved for future use.
Raises:
-
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.
-
ResourceNotFoundException
–
The requested resource could not be found. The stream might not be specified correctly.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_kinesis/_services/kinesis.py
| def deregister_stream_consumer(
self,
*,
config_overrides: Optional[KinesisClientConfig] = None,
stream_arn: Optional["capo_kinesis.types.stream_arn.StreamARN"] = None,
consumer_name: Optional["capo_kinesis.types.consumer_name.ConsumerName"] = None,
consumer_arn: Optional["capo_kinesis.types.consumer_arn.ConsumerARN"] = None,
stream_id: Optional["capo_kinesis.types.stream_id.StreamId"] = None,
) -> None:
"""<p>To deregister a consumer, provide its ARN. Alternatively, you can provide the ARN of the data stream and the name you gave the consumer when you registered it. You may also provide all three parameters, as long as they don't conflict with each other. If you don't know the name or ARN of the consumer that you want to deregister, you can use the <a>ListStreamConsumers</a> operation to get a list of the descriptions of all the consumers that are currently registered with a given data stream. The description of a consumer contains its name and ARN.</p> <p>This operation has a limit of five transactions per second per stream.</p>
Args:
stream_arn: <p>The ARN of the Kinesis data stream that the consumer is registered with. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a>.</p>
consumer_name: <p>The name that you gave to the consumer.</p>
consumer_arn: <p>The ARN returned by Kinesis Data Streams when you registered the consumer. If you don't know the ARN of the consumer that you want to deregister, you can use the ListStreamConsumers operation to get a list of the descriptions of all the consumers that are currently registered with a given data stream. The description of a consumer contains its ARN.</p>
stream_id: <p>Not Implemented. Reserved for future use.</p>
Raises:
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_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found. The stream might not be specified correctly.</p>
capo_kinesis.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_kinesis.types.deregister_stream_consumer_input.DeregisterStreamConsumerInput]",
) -> OperationResponse[None]:
import capo_kinesis._operations.kinesis_20131202.deregister_stream_consumer
output, http_response = (
capo_kinesis._operations.kinesis_20131202.deregister_stream_consumer.deregister_stream_consumer(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeregisterStreamConsumer")
)
input_: capo_kinesis.types.deregister_stream_consumer_input.DeregisterStreamConsumerInput = {}
if stream_arn is not None:
input_["stream_arn"] = stream_arn
if consumer_name is not None:
input_["consumer_name"] = consumer_name
if consumer_arn is not None:
input_["consumer_arn"] = consumer_arn
if stream_id is not None:
input_["stream_id"] = stream_id
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|