Skip to content

list_credential_providers async

list_credential_providers(
    credential_provider_pool_identifier: CredentialProviderPoolIdentifier,
    *,
    config_overrides: Optional[AsyncCredentialBrokerControlClientConfig] = None,
    name_contains: Optional[NameFilter] = None,
    provider_types: Optional[ProviderTypeFilter] = None,
    max_results: Optional[int] = None,
    next_token: Optional[PaginationToken] = None,
) -> ListCredentialProvidersResponse

Lists the CredentialProviders in a pool, optionally filtered by name substring and provider type. Each entry is a summary that omits the provider's type-specific configuration; call GetCredentialProvider for a single provider's full detail.

Results are returned in no particular order, and the order may change between calls. Do not rely on it.

Parameters:

  • credential_provider_pool_identifier (CredentialProviderPoolIdentifier) –

    Parent pool identifier. Accepts an ARN or service-generated ID.

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

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

  • provider_types (Optional[ProviderTypeFilter], default: None ) –

    Provider types to include. When omitted, all provider types are returned.

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

    The maximum number of providers 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.

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

    Continues a previous ListCredentialProviders 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.

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.

  • ResourceNotFoundException –

    The requested resource does not exist, or the caller is not permitted to know that it exists. A resource that was deleted, or that is still being created, can also be reported this way.

  • 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_providers(
    self,
    credential_provider_pool_identifier: "capo_credentialbroker_control.types.credential_provider_pool_identifier.CredentialProviderPoolIdentifier",
    *,
    config_overrides: Optional[AsyncCredentialBrokerControlClientConfig] = None,
    name_contains: Optional[
        "capo_credentialbroker_control.types.name_filter.NameFilter"
    ] = None,
    provider_types: Optional[
        "capo_credentialbroker_control.types.provider_type_filter.ProviderTypeFilter"
    ] = None,
    max_results: Optional[int] = None,
    next_token: Optional[
        "capo_credentialbroker_control.types.pagination_token.PaginationToken"
    ] = None,
) -> "capo_credentialbroker_control.types.list_credential_providers_response.ListCredentialProvidersResponse":
    """<p>Lists the CredentialProviders in a pool, optionally filtered by name substring and provider type. Each entry is a summary that omits the provider's type-specific configuration; call <code>GetCredentialProvider</code> for a single provider's full detail.</p> <p>Results are returned in no particular order, and the order may change between calls. Do not rely on it.</p>

    Args:
        credential_provider_pool_identifier: <p>Parent pool identifier. Accepts an ARN or service-generated ID.</p>
        name_contains: <p>Return only providers whose name contains this substring. Matching is case-sensitive. Omit to return providers of any name.</p>
        provider_types: <p>Provider types to include. When omitted, all provider types are returned.</p>
        max_results: <p>The maximum number of providers 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>
        next_token: <p>Continues a previous <code>ListCredentialProviders</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>

    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.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource does not exist, or the caller is not permitted to know that it exists. A resource that was deleted, or that is still being created, can also be reported this way.</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_providers_request.ListCredentialProvidersRequest]",
    ) -> AsyncOperationResponse[
        "capo_credentialbroker_control.types.list_credential_providers_response.ListCredentialProvidersResponse"
    ]:
        import capo_credentialbroker_control._operations.aws_tessera_control_plane.list_credential_providers

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListCredentialProviders")
    )
    input_: capo_credentialbroker_control.types.list_credential_providers_request.ListCredentialProvidersRequest = {
        "credential_provider_pool_identifier": credential_provider_pool_identifier
    }
    if name_contains is not None:
        input_["name_contains"] = name_contains
    if provider_types is not None:
        input_["provider_types"] = provider_types
    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