Skip to content

list_replicators async

list_replicators(
    *,
    config_overrides: Optional[AsyncKafkaClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[__string] = None,
    replicator_name_filter: Optional[__string] = None,
) -> ListReplicatorsResponse

Lists the replicators.

Parameters:

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

    The maximum number of results to return in the response. If there are more results, the response includes a NextToken parameter.

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

    If the response of ListReplicators is truncated, it returns a NextToken in the response. This NextToken should be sent in the subsequent request to ListReplicators.

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

    Returns replicators starting with given name.

Raises:

Source code in docs_src/capo_kafka/_services/async_kafka.py
async def list_replicators(
    self,
    *,
    config_overrides: Optional[AsyncKafkaClientConfig] = None,
    max_results: Optional["capo_kafka.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_kafka.types.__string.__string"] = None,
    replicator_name_filter: Optional["capo_kafka.types.__string.__string"] = None,
) -> "capo_kafka.types.list_replicators_response.ListReplicatorsResponse":
    """<p>Lists the replicators.</p>

    Args:
        max_results: <p>The maximum number of results to return in the response. If there are more results, the response includes a NextToken parameter.</p>
        next_token: <p>If the response of ListReplicators is truncated, it returns a NextToken in the response. This NextToken should be sent in the subsequent request to ListReplicators.</p>
        replicator_name_filter: <p>Returns replicators starting with given name.</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_replicators_request.ListReplicatorsRequest]",
    ) -> AsyncOperationResponse[
        "capo_kafka.types.list_replicators_response.ListReplicatorsResponse"
    ]:
        import capo_kafka._operations.kafka.list_replicators

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListReplicators")
    )
    input_: capo_kafka.types.list_replicators_request.ListReplicatorsRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if replicator_name_filter is not None:
        input_["replicator_name_filter"] = replicator_name_filter

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