Skip to content

CognitoSyncClient

Index > CognitoSync > CognitoSyncClient

Auto-generated documentation for CognitoSync type annotations stubs module types-aiobotocore-cognito-sync.

CognitoSyncClient

Type annotations and code completion for session.client("cognito-sync") boto3 documentation

Usage example
from aioboto3.session import Session
from types_aiobotocore_cognito_sync.client import CognitoSyncClient

session = Session()
async with session.client("cognito-sync") as client:
    client: CognitoSyncClient

Exceptions

aioboto3 client exceptions are generated in runtime. This class provides code completion for session.client("cognito-sync").exceptions structure.

Usage example
async with session.client("cognito-sync") as client:
    try:
        do_something(client)
    except (
            client.AlreadyStreamedException,
        client.ClientError,
        client.ConcurrentModificationException,
        client.DuplicateRequestException,
        client.InternalErrorException,
        client.InvalidConfigurationException,
        client.InvalidLambdaFunctionOutputException,
        client.InvalidParameterException,
        client.LambdaThrottledException,
        client.LimitExceededException,
        client.NotAuthorizedException,
        client.ResourceConflictException,
        client.ResourceNotFoundException,
        client.TooManyRequestsException,
    ) as e:
        print(e)
Type checking example
from types_aiobotocore_cognito_sync.client import Exceptions

def handle_error(exc: Exceptions.AlreadyStreamedException) -> None:
    ...

Methods

bulk_publish

Initiates a bulk publish of all existing datasets for an Identity Pool to the configured stream.

Type annotations and code completion for session.client("cognito-sync").bulk_publish method. boto3 documentation

Method definition
await def bulk_publish(
    self,
    *,
    IdentityPoolId: str,
) -> BulkPublishResponseTypeDef:  # (1)
    ...
  1. See BulkPublishResponseTypeDef
Usage example with kwargs
kwargs: BulkPublishRequestRequestTypeDef = {  # (1)
    "IdentityPoolId": ...,
}

parent.bulk_publish(**kwargs)
  1. See BulkPublishRequestRequestTypeDef

can_paginate

Check if an operation can be paginated.

Type annotations and code completion for session.client("cognito-sync").can_paginate method. boto3 documentation

Method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close

Closes underlying endpoint connections.

Type annotations and code completion for session.client("cognito-sync").close method. boto3 documentation

Method definition
await def close(
    self,
) -> None:
    ...

delete_dataset

Deletes the specific dataset.

Type annotations and code completion for session.client("cognito-sync").delete_dataset method. boto3 documentation

Method definition
await def delete_dataset(
    self,
    *,
    IdentityPoolId: str,
    IdentityId: str,
    DatasetName: str,
) -> DeleteDatasetResponseTypeDef:  # (1)
    ...
  1. See DeleteDatasetResponseTypeDef
Usage example with kwargs
kwargs: DeleteDatasetRequestRequestTypeDef = {  # (1)
    "IdentityPoolId": ...,
    "IdentityId": ...,
    "DatasetName": ...,
}

parent.delete_dataset(**kwargs)
  1. See DeleteDatasetRequestRequestTypeDef

describe_dataset

Gets meta data about a dataset by identity and dataset name.

Type annotations and code completion for session.client("cognito-sync").describe_dataset method. boto3 documentation

Method definition
await def describe_dataset(
    self,
    *,
    IdentityPoolId: str,
    IdentityId: str,
    DatasetName: str,
) -> DescribeDatasetResponseTypeDef:  # (1)
    ...
  1. See DescribeDatasetResponseTypeDef
Usage example with kwargs
kwargs: DescribeDatasetRequestRequestTypeDef = {  # (1)
    "IdentityPoolId": ...,
    "IdentityId": ...,
    "DatasetName": ...,
}

parent.describe_dataset(**kwargs)
  1. See DescribeDatasetRequestRequestTypeDef

describe_identity_pool_usage

Gets usage details (for example, data storage) about a particular identity pool.

Type annotations and code completion for session.client("cognito-sync").describe_identity_pool_usage method. boto3 documentation

Method definition
await def describe_identity_pool_usage(
    self,
    *,
    IdentityPoolId: str,
) -> DescribeIdentityPoolUsageResponseTypeDef:  # (1)
    ...
  1. See DescribeIdentityPoolUsageResponseTypeDef
Usage example with kwargs
kwargs: DescribeIdentityPoolUsageRequestRequestTypeDef = {  # (1)
    "IdentityPoolId": ...,
}

parent.describe_identity_pool_usage(**kwargs)
  1. See DescribeIdentityPoolUsageRequestRequestTypeDef

describe_identity_usage

Gets usage information for an identity, including number of datasets and data usage.

Type annotations and code completion for session.client("cognito-sync").describe_identity_usage method. boto3 documentation

Method definition
await def describe_identity_usage(
    self,
    *,
    IdentityPoolId: str,
    IdentityId: str,
) -> DescribeIdentityUsageResponseTypeDef:  # (1)
    ...
  1. See DescribeIdentityUsageResponseTypeDef
Usage example with kwargs
kwargs: DescribeIdentityUsageRequestRequestTypeDef = {  # (1)
    "IdentityPoolId": ...,
    "IdentityId": ...,
}

parent.describe_identity_usage(**kwargs)
  1. See DescribeIdentityUsageRequestRequestTypeDef

generate_presigned_url

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for session.client("cognito-sync").generate_presigned_url method. boto3 documentation

Method definition
await def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_bulk_publish_details

Get the status of the last BulkPublish operation for an identity pool.

Type annotations and code completion for session.client("cognito-sync").get_bulk_publish_details method. boto3 documentation

Method definition
await def get_bulk_publish_details(
    self,
    *,
    IdentityPoolId: str,
) -> GetBulkPublishDetailsResponseTypeDef:  # (1)
    ...
  1. See GetBulkPublishDetailsResponseTypeDef
Usage example with kwargs
kwargs: GetBulkPublishDetailsRequestRequestTypeDef = {  # (1)
    "IdentityPoolId": ...,
}

parent.get_bulk_publish_details(**kwargs)
  1. See GetBulkPublishDetailsRequestRequestTypeDef

get_cognito_events

Gets the events and the corresponding Lambda functions associated with an identity pool.

Type annotations and code completion for session.client("cognito-sync").get_cognito_events method. boto3 documentation

Method definition
await def get_cognito_events(
    self,
    *,
    IdentityPoolId: str,
) -> GetCognitoEventsResponseTypeDef:  # (1)
    ...
  1. See GetCognitoEventsResponseTypeDef
Usage example with kwargs
kwargs: GetCognitoEventsRequestRequestTypeDef = {  # (1)
    "IdentityPoolId": ...,
}

parent.get_cognito_events(**kwargs)
  1. See GetCognitoEventsRequestRequestTypeDef

get_identity_pool_configuration

Gets the configuration settings of an identity pool.

Type annotations and code completion for session.client("cognito-sync").get_identity_pool_configuration method. boto3 documentation

Method definition
await def get_identity_pool_configuration(
    self,
    *,
    IdentityPoolId: str,
) -> GetIdentityPoolConfigurationResponseTypeDef:  # (1)
    ...
  1. See GetIdentityPoolConfigurationResponseTypeDef
Usage example with kwargs
kwargs: GetIdentityPoolConfigurationRequestRequestTypeDef = {  # (1)
    "IdentityPoolId": ...,
}

parent.get_identity_pool_configuration(**kwargs)
  1. See GetIdentityPoolConfigurationRequestRequestTypeDef

list_datasets

Lists datasets for an identity.

Type annotations and code completion for session.client("cognito-sync").list_datasets method. boto3 documentation

Method definition
await def list_datasets(
    self,
    *,
    IdentityPoolId: str,
    IdentityId: str,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListDatasetsResponseTypeDef:  # (1)
    ...
  1. See ListDatasetsResponseTypeDef
Usage example with kwargs
kwargs: ListDatasetsRequestRequestTypeDef = {  # (1)
    "IdentityPoolId": ...,
    "IdentityId": ...,
}

parent.list_datasets(**kwargs)
  1. See ListDatasetsRequestRequestTypeDef

list_identity_pool_usage

Gets a list of identity pools registered with Cognito.

Type annotations and code completion for session.client("cognito-sync").list_identity_pool_usage method. boto3 documentation

Method definition
await def list_identity_pool_usage(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListIdentityPoolUsageResponseTypeDef:  # (1)
    ...
  1. See ListIdentityPoolUsageResponseTypeDef
Usage example with kwargs
kwargs: ListIdentityPoolUsageRequestRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.list_identity_pool_usage(**kwargs)
  1. See ListIdentityPoolUsageRequestRequestTypeDef

list_records

Gets paginated records, optionally changed after a particular sync count for a dataset and identity.

Type annotations and code completion for session.client("cognito-sync").list_records method. boto3 documentation

Method definition
await def list_records(
    self,
    *,
    IdentityPoolId: str,
    IdentityId: str,
    DatasetName: str,
    LastSyncCount: int = ...,
    NextToken: str = ...,
    MaxResults: int = ...,
    SyncSessionToken: str = ...,
) -> ListRecordsResponseTypeDef:  # (1)
    ...
  1. See ListRecordsResponseTypeDef
Usage example with kwargs
kwargs: ListRecordsRequestRequestTypeDef = {  # (1)
    "IdentityPoolId": ...,
    "IdentityId": ...,
    "DatasetName": ...,
}

parent.list_records(**kwargs)
  1. See ListRecordsRequestRequestTypeDef

register_device

Registers a device to receive push sync notifications.

Type annotations and code completion for session.client("cognito-sync").register_device method. boto3 documentation

Method definition
await def register_device(
    self,
    *,
    IdentityPoolId: str,
    IdentityId: str,
    Platform: PlatformType,  # (1)
    Token: str,
) -> RegisterDeviceResponseTypeDef:  # (2)
    ...
  1. See PlatformType
  2. See RegisterDeviceResponseTypeDef
Usage example with kwargs
kwargs: RegisterDeviceRequestRequestTypeDef = {  # (1)
    "IdentityPoolId": ...,
    "IdentityId": ...,
    "Platform": ...,
    "Token": ...,
}

parent.register_device(**kwargs)
  1. See RegisterDeviceRequestRequestTypeDef

set_cognito_events

Sets the AWS Lambda function for a given event type for an identity pool.

Type annotations and code completion for session.client("cognito-sync").set_cognito_events method. boto3 documentation

Method definition
await def set_cognito_events(
    self,
    *,
    IdentityPoolId: str,
    Events: Mapping[str, str],
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: SetCognitoEventsRequestRequestTypeDef = {  # (1)
    "IdentityPoolId": ...,
    "Events": ...,
}

parent.set_cognito_events(**kwargs)
  1. See SetCognitoEventsRequestRequestTypeDef

set_identity_pool_configuration

Sets the necessary configuration for push sync.

Type annotations and code completion for session.client("cognito-sync").set_identity_pool_configuration method. boto3 documentation

Method definition
await def set_identity_pool_configuration(
    self,
    *,
    IdentityPoolId: str,
    PushSync: PushSyncTypeDef = ...,  # (1)
    CognitoStreams: CognitoStreamsTypeDef = ...,  # (2)
) -> SetIdentityPoolConfigurationResponseTypeDef:  # (3)
    ...
  1. See PushSyncTypeDef
  2. See CognitoStreamsTypeDef
  3. See SetIdentityPoolConfigurationResponseTypeDef
Usage example with kwargs
kwargs: SetIdentityPoolConfigurationRequestRequestTypeDef = {  # (1)
    "IdentityPoolId": ...,
}

parent.set_identity_pool_configuration(**kwargs)
  1. See SetIdentityPoolConfigurationRequestRequestTypeDef

subscribe_to_dataset

Subscribes to receive notifications when a dataset is modified by another device.

Type annotations and code completion for session.client("cognito-sync").subscribe_to_dataset method. boto3 documentation

Method definition
await def subscribe_to_dataset(
    self,
    *,
    IdentityPoolId: str,
    IdentityId: str,
    DatasetName: str,
    DeviceId: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: SubscribeToDatasetRequestRequestTypeDef = {  # (1)
    "IdentityPoolId": ...,
    "IdentityId": ...,
    "DatasetName": ...,
    "DeviceId": ...,
}

parent.subscribe_to_dataset(**kwargs)
  1. See SubscribeToDatasetRequestRequestTypeDef

unsubscribe_from_dataset

Unsubscribes from receiving notifications when a dataset is modified by another device.

Type annotations and code completion for session.client("cognito-sync").unsubscribe_from_dataset method. boto3 documentation

Method definition
await def unsubscribe_from_dataset(
    self,
    *,
    IdentityPoolId: str,
    IdentityId: str,
    DatasetName: str,
    DeviceId: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: UnsubscribeFromDatasetRequestRequestTypeDef = {  # (1)
    "IdentityPoolId": ...,
    "IdentityId": ...,
    "DatasetName": ...,
    "DeviceId": ...,
}

parent.unsubscribe_from_dataset(**kwargs)
  1. See UnsubscribeFromDatasetRequestRequestTypeDef

update_records

Posts updates to records and adds and deletes records for a dataset and user.

Type annotations and code completion for session.client("cognito-sync").update_records method. boto3 documentation

Method definition
await def update_records(
    self,
    *,
    IdentityPoolId: str,
    IdentityId: str,
    DatasetName: str,
    SyncSessionToken: str,
    DeviceId: str = ...,
    RecordPatches: Sequence[RecordPatchTypeDef] = ...,  # (1)
    ClientContext: str = ...,
) -> UpdateRecordsResponseTypeDef:  # (2)
    ...
  1. See RecordPatchTypeDef
  2. See UpdateRecordsResponseTypeDef
Usage example with kwargs
kwargs: UpdateRecordsRequestRequestTypeDef = {  # (1)
    "IdentityPoolId": ...,
    "IdentityId": ...,
    "DatasetName": ...,
    "SyncSessionToken": ...,
}

parent.update_records(**kwargs)
  1. See UpdateRecordsRequestRequestTypeDef

__aenter__

Type annotations and code completion for session.client("cognito-sync").__aenter__ method. boto3 documentation

Method definition
await def __aenter__(
    self,
) -> CognitoSyncClient:
    ...

__aexit__

Type annotations and code completion for session.client("cognito-sync").__aexit__ method. boto3 documentation

Method definition
await def __aexit__(
    self,
    exc_type: Any,
    exc_val: Any,
    exc_tb: Any,
) -> Any:
    ...