Skip to content

get_identity_provider_by_identifier

get_identity_provider_by_identifier(
    user_pool_id: UserPoolIdType,
    idp_identifier: IdpIdentifierType,
    *,
    config_overrides: Optional[CognitoIdentityProviderClientConfig] = None,
) -> GetIdentityProviderByIdentifierResponse

Given the identifier of an identity provider (IdP), for example examplecorp, returns information about the user pool configuration for that IdP. For more information about IdPs, see Third-party IdP sign-in.

Parameters:

  • user_pool_id (UserPoolIdType) –

    The ID of the user pool where you want to get information about the IdP.

  • idp_identifier (IdpIdentifierType) –

    The identifier that you assigned to your user pool. The identifier is an alternative name for an IdP that is distinct from the IdP name. For example, an IdP with a name of MyIdP might have an identifier of the email domain example.com.

Raises:

Source code in docs_src/capo_cognito_identity_provider/_services/cognito_identity_provider.py
def get_identity_provider_by_identifier(
    self,
    user_pool_id: "capo_cognito_identity_provider.types.user_pool_id_type.UserPoolIdType",
    idp_identifier: "capo_cognito_identity_provider.types.idp_identifier_type.IdpIdentifierType",
    *,
    config_overrides: Optional[CognitoIdentityProviderClientConfig] = None,
) -> "capo_cognito_identity_provider.types.get_identity_provider_by_identifier_response.GetIdentityProviderByIdentifierResponse":
    """<p>Given the identifier of an identity provider (IdP), for example <code>examplecorp</code>, returns information about the user pool configuration for that IdP. For more information about IdPs, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-identity-federation.html">Third-party IdP sign-in</a>.</p>

    Args:
        user_pool_id: <p>The ID of the user pool where you want to get information about the IdP.</p>
        idp_identifier: <p>The identifier that you assigned to your user pool. The identifier is an alternative name for an IdP that is distinct from the IdP name. For example, an IdP with a name of <code>MyIdP</code> might have an identifier of the email domain <code>example.com</code>.</p>

    Raises:
        capo_cognito_identity_provider.errors.internal_error_exception.InternalErrorException: <p>This exception is thrown when Amazon Cognito encounters an internal error.</p>
        capo_cognito_identity_provider.errors.invalid_parameter_exception.InvalidParameterException: <p>This exception is thrown when the Amazon Cognito service encounters an invalid parameter.</p>
        capo_cognito_identity_provider.errors.not_authorized_exception.NotAuthorizedException: <p>This exception is thrown when a user isn't authorized.</p>
        capo_cognito_identity_provider.errors.resource_not_found_exception.ResourceNotFoundException: <p>This exception is thrown when the Amazon Cognito service can't find the requested resource.</p>
        capo_cognito_identity_provider.errors.too_many_requests_exception.TooManyRequestsException: <p>This exception is thrown when the user has made too many requests for a given operation.</p>
        capo_cognito_identity_provider.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_cognito_identity_provider.types.get_identity_provider_by_identifier_request.GetIdentityProviderByIdentifierRequest]",
    ) -> OperationResponse[
        "capo_cognito_identity_provider.types.get_identity_provider_by_identifier_response.GetIdentityProviderByIdentifierResponse"
    ]:
        import capo_cognito_identity_provider._operations.aws_cognito_identity_provider_service.get_identity_provider_by_identifier

        output, http_response = (
            capo_cognito_identity_provider._operations.aws_cognito_identity_provider_service.get_identity_provider_by_identifier.get_identity_provider_by_identifier(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetIdentityProviderByIdentifier")
    )
    input_: capo_cognito_identity_provider.types.get_identity_provider_by_identifier_request.GetIdentityProviderByIdentifierRequest = {
        "user_pool_id": user_pool_id,
        "idp_identifier": idp_identifier,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output