Skip to content

list_connectors async

list_connectors(
    *,
    config_overrides: Optional[AsyncPcaConnectorScepClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListConnectorsResponse

Lists the connectors belonging to your Amazon Web Services account.

Parameters:

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

    The maximum number of objects that you want Connector for SCEP to return for this request. If more objects are available, in the response, Connector for SCEP provides a NextToken value that you can use in a subsequent call to get the next batch of objects.

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

    When you request a list of objects with a MaxResults setting, if the number of objects that are still available for retrieval exceeds the maximum you requested, Connector for SCEP returns a NextToken value in the response. To retrieve the next batch of objects, use the token returned from the prior request in your next request.

Raises:

  • AccessDeniedException –

    You can receive this error if you attempt to perform an operation and you don't have the required permissions. This can be caused by insufficient permissions in policies attached to your Amazon Web Services Identity and Access Management (IAM) principal. It can also happen because of restrictions in place from an Amazon Web Services Organizations service control policy (SCP) that affects your Amazon Web Services account.

  • InternalServerException –

    The request processing has failed because of an unknown error, exception or failure with an internal server.

  • ThrottlingException –

    The limit on the number of requests per second was exceeded.

  • ValidationException –

    An input validation error occurred. For example, invalid characters in a name tag, or an invalid pagination token.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_pca_connector_scep/_services/async_pca_connector_scep.py
async def list_connectors(
    self,
    *,
    config_overrides: Optional[AsyncPcaConnectorScepClientConfig] = None,
    max_results: Optional[
        "capo_pca_connector_scep.types.max_results.MaxResults"
    ] = None,
    next_token: Optional[
        "capo_pca_connector_scep.types.next_token.NextToken"
    ] = None,
) -> (
    "capo_pca_connector_scep.types.list_connectors_response.ListConnectorsResponse"
):
    """<p>Lists the connectors belonging to your Amazon Web Services account.</p>

    Args:
        max_results: <p>The maximum number of objects that you want Connector for SCEP to return for this request. If more objects are available, in the response, Connector for SCEP provides a <code>NextToken</code> value that you can use in a subsequent call to get the next batch of objects.</p>
        next_token: <p>When you request a list of objects with a <code>MaxResults</code> setting, if the number of objects that are still available for retrieval exceeds the maximum you requested, Connector for SCEP returns a <code>NextToken</code> value in the response. To retrieve the next batch of objects, use the token returned from the prior request in your next request.</p>

    Raises:
        capo_pca_connector_scep.errors.access_denied_exception.AccessDeniedException: <p>You can receive this error if you attempt to perform an operation and you don't have the required permissions. This can be caused by insufficient permissions in policies attached to your Amazon Web Services Identity and Access Management (IAM) principal. It can also happen because of restrictions in place from an Amazon Web Services Organizations service control policy (SCP) that affects your Amazon Web Services account.</p>
        capo_pca_connector_scep.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure with an internal server.</p>
        capo_pca_connector_scep.errors.throttling_exception.ThrottlingException: <p>The limit on the number of requests per second was exceeded.</p>
        capo_pca_connector_scep.errors.validation_exception.ValidationException: <p>An input validation error occurred. For example, invalid characters in a name tag, or an invalid pagination token.</p>
        capo_pca_connector_scep.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_pca_connector_scep.types.list_connectors_request.ListConnectorsRequest]",
    ) -> AsyncOperationResponse[
        "capo_pca_connector_scep.types.list_connectors_response.ListConnectorsResponse"
    ]:
        import capo_pca_connector_scep._operations.pca_connector_scep.list_connectors

        (
            output,
            http_response,
        ) = await capo_pca_connector_scep._operations.pca_connector_scep.list_connectors.async_list_connectors(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListConnectors")
    )
    input_: capo_pca_connector_scep.types.list_connectors_request.ListConnectorsRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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