Skip to content

list_topic_reassignments async

list_topic_reassignments(
    cluster_arn: __string,
    *,
    config_overrides: Optional[AsyncKafkaClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[__string] = None,
    status_filter: Optional[__string] = None,
) -> ListTopicReassignmentsResponse

Lists topic reassignment operations for a cluster.

Parameters:

  • cluster_arn (__string) –

    The Amazon Resource Name (ARN) of the cluster.

  • max_results (Optional[MaxResults], default: None ) –

    Maximum number of reassignment operations to return. Default 50, maximum 100.

  • next_token (Optional[__string], default: None ) –

    If the response is truncated, it returns a nextToken. Send this in the subsequent request to get the remaining results.

  • status_filter (Optional[__string], default: None ) –

    Optional filter. Only return reassignments matching these statuses.

Raises:

Source code in docs_src/capo_kafka/_services/async_kafka.py
async def list_topic_reassignments(
    self,
    cluster_arn: "capo_kafka.types.__string.__string",
    *,
    config_overrides: Optional[AsyncKafkaClientConfig] = None,
    max_results: Optional["capo_kafka.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_kafka.types.__string.__string"] = None,
    status_filter: Optional["capo_kafka.types.__string.__string"] = None,
) -> "capo_kafka.types.list_topic_reassignments_response.ListTopicReassignmentsResponse":
    """<p>Lists topic reassignment operations for a cluster.</p>

    Args:
        cluster_arn: <p>The Amazon Resource Name (ARN) of the cluster.</p>
        max_results: <p>Maximum number of reassignment operations to return. Default 50, maximum 100.</p>
        next_token: <p>If the response is truncated, it returns a nextToken. Send this in the subsequent request to get the remaining results.</p>
        status_filter: <p>Optional filter. Only return reassignments matching these statuses.</p>

    Raises:
        capo_kafka.errors.bad_request_exception.BadRequestException: <p>Returns information about an error.</p>
        capo_kafka.errors.forbidden_exception.ForbiddenException: <p>Returns information about an error.</p>
        capo_kafka.errors.internal_server_error_exception.InternalServerErrorException: <p>Returns information about an error.</p>
        capo_kafka.errors.not_found_exception.NotFoundException: <p>Returns information about an error.</p>
        capo_kafka.errors.service_unavailable_exception.ServiceUnavailableException: <p>Returns information about an error.</p>
        capo_kafka.errors.too_many_requests_exception.TooManyRequestsException: <p>Returns information about an error.</p>
        capo_kafka.errors.unauthorized_exception.UnauthorizedException: <p>Returns information about an error.</p>
        capo_kafka.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_kafka.types.list_topic_reassignments_request.ListTopicReassignmentsRequest]",
    ) -> AsyncOperationResponse[
        "capo_kafka.types.list_topic_reassignments_response.ListTopicReassignmentsResponse"
    ]:
        import capo_kafka._operations.kafka.list_topic_reassignments

        (
            output,
            http_response,
        ) = await capo_kafka._operations.kafka.list_topic_reassignments.async_list_topic_reassignments(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListTopicReassignments")
    )
    input_: capo_kafka.types.list_topic_reassignments_request.ListTopicReassignmentsRequest = {
        "cluster_arn": cluster_arn
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if status_filter is not None:
        input_["status_filter"] = status_filter

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