Skip to content

CognitoIdentityClient.get_id

rboto-cognito-identity==0.4.0 · Service index · Types

Model summary (excerpt): Generates (or retrieves) IdentityID. Supplying multiple logins will create an implicit linked account. This is a public API. You do not need any credentials to call this API.

Install and imports

python -m pip install "rboto[cognito-identity]==0.4.0"
from rboto import CognitoIdentityClient
from rboto_cognito_identity.types import (
    GetIdOutput,
)

Signature

async def get_id(
    *,
    identity_pool_id: str,
    account_id: str | None = None,
    logins: dict[str, str] | None = None,
) -> GetIdOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
identity_pool_id Yes An identity pool ID in the format REGION:GUID.
account_id No A standard Amazon Web Services account ID (9+ digits).
logins No A set of optional name-value pairs that map provider names to provider tokens. The available provider names for Logins are as follows: Facebook: graph.facebook.com Amazon Cognito user pool: cognito-idp. .amazonaws.com/ , for example, cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789 . Google: accounts.google.com Amazon: www.amazon.com Twitter: api.twitter.com Digits: www.digits.com

Output

GetIdOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
identity_id str | None Always present —

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

GetIdOutput

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_cognito_identity.exceptions:

ExternalServiceError, InternalError, InvalidParameterError, LimitExceededError, NotAuthorizedError, ResourceConflictError, ResourceNotFoundError, TooManyRequestsError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Example

Complete, type-checked service example. Replace its placeholders and configure credentials before running it.

import asyncio

from rboto import CognitoIdentityClient


async def main() -> None:
    client = CognitoIdentityClient(region="us-east-1")
    # The identity pool must allow unauthenticated identities for this request.
    response = await client.get_id(
        identity_pool_id="us-east-1:00000000-0000-0000-0000-000000000000",
    )
    print(response.identity_id)


if __name__ == "__main__":
    asyncio.run(main())

Service guide · Pinned model