Skip to content

list_credential_provider_pools async

list_credential_provider_pools(
    *,
    config_overrides: Optional[AsyncCredentialBrokerControlClientConfig] = None,
    name_contains: Optional[NameFilter] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[int] = None,
) -> ListCredentialProviderPoolsResponse

Lists the CredentialProviderPools in your account, optionally filtered by name substring. Each entry is a summary that omits the pool's encryption and IAM Identity Center configuration; call GetCredentialProviderPool for a single pool's full detail.

Parameters:

  • name_contains (Optional[NameFilter], default: None ) –

    Return only pools whose name contains this substring. Matching is case-sensitive. Omit to return pools of any name.

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

    Continues a previous ListCredentialProviderPools call. Set it to the nextToken the previous response returned, passed back unchanged. Valid only when you received a nextToken; there is no dedicated error for a token that is invalid or no longer current, so one is rejected as ValidationException.

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

    The maximum number of pools to return in one page. The service might return fewer than the number you request even when more results are available, so check nextToken on every response rather than inferring from the number of items returned.

Raises:

  • AccessDeniedException –

    The caller is not authorized to perform the request, or a resource the request depends on refused access. reason distinguishes a denial by this service from a denial reported by a dependency the caller configured, such as a customer-owned secret, KMS key, or external identity provider, which usually points at a permission or configuration fix outside this API.

  • InternalServerException –

    The request failed because of an unexpected error in the service. Whether the request took effect is undefined, so for a create or update, read the resource back before retrying. Retryable: the same request may succeed later.

  • ThrottlingException –

    The request was denied because the caller exceeded a request rate limit. Nothing was changed. Retry with exponential backoff, honoring retryAfterSeconds when it is present.

  • ValidationException –

    The request is not valid. The request was rejected before any change was made, so it is safe to correct the input and retry. Use reason to branch in code and message for the human-readable detail of which field or combination of fields was at fault.

  • UnknownServiceError –

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

Source code in docs_src/capo_credentialbroker_control/_services/async_credential_broker_control.py
async def list_credential_provider_pools(
    self,
    *,
    config_overrides: Optional[AsyncCredentialBrokerControlClientConfig] = None,
    name_contains: Optional[
        "capo_credentialbroker_control.types.name_filter.NameFilter"
    ] = None,
    next_token: Optional[
        "capo_credentialbroker_control.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional[int] = None,
) -> "capo_credentialbroker_control.types.list_credential_provider_pools_response.ListCredentialProviderPoolsResponse":
    """<p>Lists the CredentialProviderPools in your account, optionally filtered by name substring. Each entry is a summary that omits the pool's encryption and IAM Identity Center configuration; call <code>GetCredentialProviderPool</code> for a single pool's full detail.</p>

    Args:
        name_contains: <p>Return only pools whose name contains this substring. Matching is case-sensitive. Omit to return pools of any name.</p>
        next_token: <p>Continues a previous <code>ListCredentialProviderPools</code> call. Set it to the <code>nextToken</code> the previous response returned, passed back unchanged. Valid only when you received a <code>nextToken</code>; there is no dedicated error for a token that is invalid or no longer current, so one is rejected as <code>ValidationException</code>.</p>
        max_results: <p>The maximum number of pools to return in one page. The service might return fewer than the number you request even when more results are available, so check <code>nextToken</code> on every response rather than inferring from the number of items returned.</p>

    Raises:
        capo_credentialbroker_control.errors.access_denied_exception.AccessDeniedException: <p>The caller is not authorized to perform the request, or a resource the request depends on refused access. <code>reason</code> distinguishes a denial by this service from a denial reported by a dependency the caller configured, such as a customer-owned secret, KMS key, or external identity provider, which usually points at a permission or configuration fix outside this API.</p>
        capo_credentialbroker_control.errors.internal_server_exception.InternalServerException: <p>The request failed because of an unexpected error in the service. Whether the request took effect is undefined, so for a create or update, read the resource back before retrying. Retryable: the same request may succeed later.</p>
        capo_credentialbroker_control.errors.throttling_exception.ThrottlingException: <p>The request was denied because the caller exceeded a request rate limit. Nothing was changed. Retry with exponential backoff, honoring <code>retryAfterSeconds</code> when it is present.</p>
        capo_credentialbroker_control.errors.validation_exception.ValidationException: <p>The request is not valid. The request was rejected before any change was made, so it is safe to correct the input and retry. Use <code>reason</code> to branch in code and <code>message</code> for the human-readable detail of which field or combination of fields was at fault.</p>
        capo_credentialbroker_control.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_credentialbroker_control.types.list_credential_provider_pools_request.ListCredentialProviderPoolsRequest]",
    ) -> AsyncOperationResponse[
        "capo_credentialbroker_control.types.list_credential_provider_pools_response.ListCredentialProviderPoolsResponse"
    ]:
        import capo_credentialbroker_control._operations.aws_tessera_control_plane.list_credential_provider_pools

        (
            output,
            http_response,
        ) = await capo_credentialbroker_control._operations.aws_tessera_control_plane.list_credential_provider_pools.async_list_credential_provider_pools(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListCredentialProviderPools")
    )
    input_: capo_credentialbroker_control.types.list_credential_provider_pools_request.ListCredentialProviderPoolsRequest = {}
    if name_contains is not None:
        input_["name_contains"] = name_contains
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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