Metadata-Version: 2.4
Name: rboto-cognito-identity
Version: 0.1.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Framework :: AsyncIO
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Programming Language :: Rust
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Dist: rboto==0.1.0
License-File: LICENSE
Summary: rboto: async-only, typed Python client for Amazon Cognito Identity, powered by Rust. Alpha preview.
Keywords: rboto,aws,cognito-identity,asyncio,typing,rust
Home-Page: https://github.com/ferrumio/rboto
Author-email: Leandro Cavalcante Damascena <leandro.damascena@gmail.com>
License-Expression: Apache-2.0
Requires-Python: >=3.12
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Changelog, https://github.com/ferrumio/rboto/releases
Project-URL: Documentation, https://ferrumio.github.io/rboto/clients/
Project-URL: Homepage, https://ferrumio.github.io/rboto/
Project-URL: Issues, https://github.com/ferrumio/rboto/issues
Project-URL: Repository, https://github.com/ferrumio/rboto

<!-- Generated by rboto-codegen. Edit the descriptor, template, or example source. -->
# rboto-cognito-identity

rboto is an independent project maintained by [Ferrumio](https://github.com/ferrumio).
It is not affiliated with, sponsored by, or endorsed by Amazon Web Services (AWS).

**Preview (Alpha).** rboto is under active development. APIs may change between releases.

rboto provides an **async-only, typed Python client for Amazon Cognito Identity**,
powered by Rust. This package contains `CognitoIdentityClient` and
**23 operations**.

## Installation

Requires Python 3.12 or newer and a native wheel for your Python version and platform.

```bash
python -m pip install "rboto[cognito-identity]"
```

You can also install `rboto-cognito-identity` directly; it installs the matching
`rboto` package. Only the selected service is installed.

These are the package names to use when a release is available on your package index.
If your index has no release yet, follow the
[source installation instructions](https://ferrumio.github.io/rboto/getting-started/).

## Usage

Configure credentials through your environment, shared profile, or workload role.
The example uses `us-east-1`; select a region where your service and resources are available.
Resource names, identifiers, input files, and model IDs in the example are placeholders
to replace with your own.

```python
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())
```

In an application with an event loop, call `await main()` instead of `asyncio.run(main())`.
Reuse the client across calls. Constructing a client does not send a request.

## API conventions

- Import the client with `from rboto import CognitoIdentityClient`.
- Every operation is asynchronous: use `await client.method(...)`.
- Operation arguments are keyword-only and use the Python names listed below.
- Structured inputs use typed dictionaries and tagged unions from `rboto_cognito_identity.types`.
- Regular responses expose typed attributes; `response.to_dict()` converts them to a dictionary.
- Event-stream responses may be typed dictionaries containing async iterators. Follow the
  declared return type; consume event streams with `async for`.
- Byte streams are consumed asynchronously. `await stream.read()` buffers the complete body;
  iterate the stream when processing a large response.
- Direct operation calls return one page.
- Use `async for page in client.paginators.method(...)` for supported paginated operations.
  Paginators accept the same typed arguments as the corresponding client method.

- Catch modeled exceptions from `rboto_cognito_identity.exceptions`. Their `error_code`,
  `message`, and `operation_name` identify service failures.

Clients also accept `profile`, `endpoint_url`, or shared `Session` settings.
See [configuration](https://ferrumio.github.io/rboto/guides/configuration/),
[errors](https://ferrumio.github.io/rboto/guides/errors/), and
[streaming](https://ferrumio.github.io/rboto/guides/streaming/).

## Operations

This is the complete operation catalog for this generated package. “Required arguments”
lists arguments without defaults in the Python signature. Service-side conditions may
require additional arguments. Each method links to its complete signature, including
optional arguments. Nested input definitions are in `rboto_cognito_identity.types`;
native response definitions are in the package's `_native.pyi`.

| Method | Required arguments | Return type |
|---|---|---|
| [`create_identity_pool`](#create_identity_pool) | <code>identity_pool_name: str</code>, <code>allow_unauthenticated_identities: bool</code> | <code>CreateIdentityPoolOutput</code> |
| [`delete_identities`](#delete_identities) | <code>identity_ids_to_delete: Sequence[str]</code> | <code>DeleteIdentitiesOutput</code> |
| [`delete_identity_pool`](#delete_identity_pool) | <code>identity_pool_id: str</code> | <code>None</code> |
| [`describe_identity`](#describe_identity) | <code>identity_id: str</code> | <code>DescribeIdentityOutput</code> |
| [`describe_identity_pool`](#describe_identity_pool) | <code>identity_pool_id: str</code> | <code>DescribeIdentityPoolOutput</code> |
| [`get_credentials_for_identity`](#get_credentials_for_identity) | <code>identity_id: str</code> | <code>GetCredentialsForIdentityOutput</code> |
| [`get_id`](#get_id) | <code>identity_pool_id: str</code> | <code>GetIdOutput</code> |
| [`get_identity_pool_roles`](#get_identity_pool_roles) | <code>identity_pool_id: str</code> | <code>GetIdentityPoolRolesOutput</code> |
| [`get_open_id_token`](#get_open_id_token) | <code>identity_id: str</code> | <code>GetOpenIdTokenOutput</code> |
| [`get_open_id_token_for_developer_identity`](#get_open_id_token_for_developer_identity) | <code>identity_pool_id: str</code>, <code>logins: dict[str, str]</code> | <code>GetOpenIdTokenForDeveloperIdentityOutput</code> |
| [`get_principal_tag_attribute_map`](#get_principal_tag_attribute_map) | <code>identity_pool_id: str</code>, <code>identity_provider_name: str</code> | <code>GetPrincipalTagAttributeMapOutput</code> |
| [`list_identities`](#list_identities) | <code>identity_pool_id: str</code>, <code>max_results: int</code> | <code>ListIdentitiesOutput</code> |
| [`list_identity_pools`](#list_identity_pools) | <code>max_results: int</code> | <code>ListIdentityPoolsOutput</code> |
| [`list_tags_for_resource`](#list_tags_for_resource) | <code>resource_arn: str</code> | <code>ListTagsForResourceOutput</code> |
| [`lookup_developer_identity`](#lookup_developer_identity) | <code>identity_pool_id: str</code> | <code>LookupDeveloperIdentityOutput</code> |
| [`merge_developer_identities`](#merge_developer_identities) | <code>source_user_identifier: str</code>, <code>destination_user_identifier: str</code>, <code>developer_provider_name: str</code>, <code>identity_pool_id: str</code> | <code>MergeDeveloperIdentitiesOutput</code> |
| [`set_identity_pool_roles`](#set_identity_pool_roles) | <code>identity_pool_id: str</code>, <code>roles: dict[str, str]</code> | <code>None</code> |
| [`set_principal_tag_attribute_map`](#set_principal_tag_attribute_map) | <code>identity_pool_id: str</code>, <code>identity_provider_name: str</code> | <code>SetPrincipalTagAttributeMapOutput</code> |
| [`tag_resource`](#tag_resource) | <code>resource_arn: str</code>, <code>tags: dict[str, str]</code> | <code>TagResourceOutput</code> |
| [`unlink_developer_identity`](#unlink_developer_identity) | <code>identity_id: str</code>, <code>identity_pool_id: str</code>, <code>developer_provider_name: str</code>, <code>developer_user_identifier: str</code> | <code>None</code> |
| [`unlink_identity`](#unlink_identity) | <code>identity_id: str</code>, <code>logins: dict[str, str]</code>, <code>logins_to_remove: Sequence[str]</code> | <code>None</code> |
| [`untag_resource`](#untag_resource) | <code>resource_arn: str</code>, <code>tag_keys: Sequence[str]</code> | <code>UntagResourceOutput</code> |
| [`update_identity_pool`](#update_identity_pool) | <code>identity_pool_id: str</code>, <code>identity_pool_name: str</code>, <code>allow_unauthenticated_identities: bool</code> | <code>UpdateIdentityPoolOutput</code> |

## Complete signatures

### create_identity_pool

```python
async def create_identity_pool(
    *,
    identity_pool_name: str,
    allow_unauthenticated_identities: bool,
    allow_classic_flow: bool | None = None,
    supported_login_providers: dict[str, str] | None = None,
    developer_provider_name: str | None = None,
    open_id_connect_provider_arns: Sequence[str] | None = None,
    cognito_identity_providers: Sequence[CognitoIdentityProvider] | None = None,
    saml_provider_arns: Sequence[str] | None = None,
    identity_pool_tags: dict[str, str] | None = None,
) -> CreateIdentityPoolOutput: ...
```


### delete_identities

```python
async def delete_identities(
    *,
    identity_ids_to_delete: Sequence[str],
) -> DeleteIdentitiesOutput: ...
```


### delete_identity_pool

```python
async def delete_identity_pool(
    *,
    identity_pool_id: str,
) -> None: ...
```


### describe_identity

```python
async def describe_identity(
    *,
    identity_id: str,
) -> DescribeIdentityOutput: ...
```


### describe_identity_pool

```python
async def describe_identity_pool(
    *,
    identity_pool_id: str,
) -> DescribeIdentityPoolOutput: ...
```


### get_credentials_for_identity

```python
async def get_credentials_for_identity(
    *,
    identity_id: str,
    logins: dict[str, str] | None = None,
    custom_role_arn: str | None = None,
) -> GetCredentialsForIdentityOutput: ...
```


### get_id

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


### get_identity_pool_roles

```python
async def get_identity_pool_roles(
    *,
    identity_pool_id: str,
) -> GetIdentityPoolRolesOutput: ...
```


### get_open_id_token

```python
async def get_open_id_token(
    *,
    identity_id: str,
    logins: dict[str, str] | None = None,
) -> GetOpenIdTokenOutput: ...
```


### get_open_id_token_for_developer_identity

```python
async def get_open_id_token_for_developer_identity(
    *,
    identity_pool_id: str,
    logins: dict[str, str],
    identity_id: str | None = None,
    principal_tags: dict[str, str] | None = None,
    token_duration: int | None = None,
) -> GetOpenIdTokenForDeveloperIdentityOutput: ...
```


### get_principal_tag_attribute_map

```python
async def get_principal_tag_attribute_map(
    *,
    identity_pool_id: str,
    identity_provider_name: str,
) -> GetPrincipalTagAttributeMapOutput: ...
```


### list_identities

```python
async def list_identities(
    *,
    identity_pool_id: str,
    max_results: int,
    next_token: str | None = None,
    hide_disabled: bool | None = None,
) -> ListIdentitiesOutput: ...
```


### list_identity_pools

```python
async def list_identity_pools(
    *,
    max_results: int,
    next_token: str | None = None,
) -> ListIdentityPoolsOutput: ...
```

Also available as `client.paginators.list_identity_pools(...)`, returning an
async iterator of the response type above.


### list_tags_for_resource

```python
async def list_tags_for_resource(
    *,
    resource_arn: str,
) -> ListTagsForResourceOutput: ...
```


### lookup_developer_identity

```python
async def lookup_developer_identity(
    *,
    identity_pool_id: str,
    identity_id: str | None = None,
    developer_user_identifier: str | None = None,
    max_results: int | None = None,
    next_token: str | None = None,
) -> LookupDeveloperIdentityOutput: ...
```


### merge_developer_identities

```python
async def merge_developer_identities(
    *,
    source_user_identifier: str,
    destination_user_identifier: str,
    developer_provider_name: str,
    identity_pool_id: str,
) -> MergeDeveloperIdentitiesOutput: ...
```


### set_identity_pool_roles

```python
async def set_identity_pool_roles(
    *,
    identity_pool_id: str,
    roles: dict[str, str],
    role_mappings: dict[str, RoleMapping] | None = None,
) -> None: ...
```


### set_principal_tag_attribute_map

```python
async def set_principal_tag_attribute_map(
    *,
    identity_pool_id: str,
    identity_provider_name: str,
    use_defaults: bool | None = None,
    principal_tags: dict[str, str] | None = None,
) -> SetPrincipalTagAttributeMapOutput: ...
```


### tag_resource

```python
async def tag_resource(
    *,
    resource_arn: str,
    tags: dict[str, str],
) -> TagResourceOutput: ...
```


### unlink_developer_identity

```python
async def unlink_developer_identity(
    *,
    identity_id: str,
    identity_pool_id: str,
    developer_provider_name: str,
    developer_user_identifier: str,
) -> None: ...
```


### unlink_identity

```python
async def unlink_identity(
    *,
    identity_id: str,
    logins: dict[str, str],
    logins_to_remove: Sequence[str],
) -> None: ...
```


### untag_resource

```python
async def untag_resource(
    *,
    resource_arn: str,
    tag_keys: Sequence[str],
) -> UntagResourceOutput: ...
```


### update_identity_pool

```python
async def update_identity_pool(
    *,
    identity_pool_id: str,
    identity_pool_name: str,
    allow_unauthenticated_identities: bool,
    allow_classic_flow: bool | None = None,
    supported_login_providers: dict[str, str] | None = None,
    developer_provider_name: str | None = None,
    open_id_connect_provider_arns: Sequence[str] | None = None,
    cognito_identity_providers: Sequence[CognitoIdentityProvider] | None = None,
    saml_provider_arns: Sequence[str] | None = None,
    identity_pool_tags: dict[str, str] | None = None,
) -> UpdateIdentityPoolOutput: ...
```


## Links

- [Service guide](https://ferrumio.github.io/rboto/clients/)
- [Repository](https://github.com/ferrumio/rboto)
- [Issues](https://github.com/ferrumio/rboto/issues)
- [Releases](https://github.com/ferrumio/rboto/releases)

Licensed under Apache-2.0.

