CognitoSyncClient
Index > CognitoSync > CognitoSyncClient
Auto-generated documentation for CognitoSync type annotations stubs module mypy-boto3-cognito-sync.
CognitoSyncClient
Type annotations and code completion for boto3.client("cognito-sync")
.
boto3 documentation
from boto3.session import Session
from mypy_boto3_cognito_sync.client import CognitoSyncClient
def get_cognito-sync_client() -> CognitoSyncClient:
return Session().client("cognito-sync")
Exceptions
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("cognito-sync").exceptions
structure.
client = boto3.client("cognito-sync")
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)
from mypy_boto3_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 boto3.client("cognito-sync").bulk_publish
method.
boto3 documentation
def bulk_publish(
self,
*,
IdentityPoolId: str,
) -> BulkPublishResponseTypeDef: # (1)
...
kwargs: BulkPublishRequestRequestTypeDef = { # (1)
"IdentityPoolId": ...,
}
parent.bulk_publish(**kwargs)
can_paginate
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("cognito-sync").can_paginate
method.
boto3 documentation
close
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("cognito-sync").close
method.
boto3 documentation
delete_dataset
Deletes the specific dataset.
Type annotations and code completion for boto3.client("cognito-sync").delete_dataset
method.
boto3 documentation
def delete_dataset(
self,
*,
IdentityPoolId: str,
IdentityId: str,
DatasetName: str,
) -> DeleteDatasetResponseTypeDef: # (1)
...
kwargs: DeleteDatasetRequestRequestTypeDef = { # (1)
"IdentityPoolId": ...,
"IdentityId": ...,
"DatasetName": ...,
}
parent.delete_dataset(**kwargs)
describe_dataset
Gets meta data about a dataset by identity and dataset name.
Type annotations and code completion for boto3.client("cognito-sync").describe_dataset
method.
boto3 documentation
def describe_dataset(
self,
*,
IdentityPoolId: str,
IdentityId: str,
DatasetName: str,
) -> DescribeDatasetResponseTypeDef: # (1)
...
kwargs: DescribeDatasetRequestRequestTypeDef = { # (1)
"IdentityPoolId": ...,
"IdentityId": ...,
"DatasetName": ...,
}
parent.describe_dataset(**kwargs)
describe_identity_pool_usage
Gets usage details (for example, data storage) about a particular identity pool.
Type annotations and code completion for boto3.client("cognito-sync").describe_identity_pool_usage
method.
boto3 documentation
def describe_identity_pool_usage(
self,
*,
IdentityPoolId: str,
) -> DescribeIdentityPoolUsageResponseTypeDef: # (1)
...
kwargs: DescribeIdentityPoolUsageRequestRequestTypeDef = { # (1)
"IdentityPoolId": ...,
}
parent.describe_identity_pool_usage(**kwargs)
describe_identity_usage
Gets usage information for an identity, including number of datasets and data usage.
Type annotations and code completion for boto3.client("cognito-sync").describe_identity_usage
method.
boto3 documentation
def describe_identity_usage(
self,
*,
IdentityPoolId: str,
IdentityId: str,
) -> DescribeIdentityUsageResponseTypeDef: # (1)
...
kwargs: DescribeIdentityUsageRequestRequestTypeDef = { # (1)
"IdentityPoolId": ...,
"IdentityId": ...,
}
parent.describe_identity_usage(**kwargs)
generate_presigned_url
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for boto3.client("cognito-sync").generate_presigned_url
method.
boto3 documentation
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 boto3.client("cognito-sync").get_bulk_publish_details
method.
boto3 documentation
def get_bulk_publish_details(
self,
*,
IdentityPoolId: str,
) -> GetBulkPublishDetailsResponseTypeDef: # (1)
...
kwargs: GetBulkPublishDetailsRequestRequestTypeDef = { # (1)
"IdentityPoolId": ...,
}
parent.get_bulk_publish_details(**kwargs)
get_cognito_events
Gets the events and the corresponding Lambda functions associated with an identity pool.
Type annotations and code completion for boto3.client("cognito-sync").get_cognito_events
method.
boto3 documentation
def get_cognito_events(
self,
*,
IdentityPoolId: str,
) -> GetCognitoEventsResponseTypeDef: # (1)
...
kwargs: GetCognitoEventsRequestRequestTypeDef = { # (1)
"IdentityPoolId": ...,
}
parent.get_cognito_events(**kwargs)
get_identity_pool_configuration
Gets the configuration settings of an identity pool.
Type annotations and code completion for boto3.client("cognito-sync").get_identity_pool_configuration
method.
boto3 documentation
def get_identity_pool_configuration(
self,
*,
IdentityPoolId: str,
) -> GetIdentityPoolConfigurationResponseTypeDef: # (1)
...
kwargs: GetIdentityPoolConfigurationRequestRequestTypeDef = { # (1)
"IdentityPoolId": ...,
}
parent.get_identity_pool_configuration(**kwargs)
list_datasets
Lists datasets for an identity.
Type annotations and code completion for boto3.client("cognito-sync").list_datasets
method.
boto3 documentation
def list_datasets(
self,
*,
IdentityPoolId: str,
IdentityId: str,
NextToken: str = ...,
MaxResults: int = ...,
) -> ListDatasetsResponseTypeDef: # (1)
...
kwargs: ListDatasetsRequestRequestTypeDef = { # (1)
"IdentityPoolId": ...,
"IdentityId": ...,
}
parent.list_datasets(**kwargs)
list_identity_pool_usage
Gets a list of identity pools registered with Cognito.
Type annotations and code completion for boto3.client("cognito-sync").list_identity_pool_usage
method.
boto3 documentation
def list_identity_pool_usage(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
) -> ListIdentityPoolUsageResponseTypeDef: # (1)
...
kwargs: ListIdentityPoolUsageRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_identity_pool_usage(**kwargs)
list_records
Gets paginated records, optionally changed after a particular sync count for a dataset and identity.
Type annotations and code completion for boto3.client("cognito-sync").list_records
method.
boto3 documentation
def list_records(
self,
*,
IdentityPoolId: str,
IdentityId: str,
DatasetName: str,
LastSyncCount: int = ...,
NextToken: str = ...,
MaxResults: int = ...,
SyncSessionToken: str = ...,
) -> ListRecordsResponseTypeDef: # (1)
...
kwargs: ListRecordsRequestRequestTypeDef = { # (1)
"IdentityPoolId": ...,
"IdentityId": ...,
"DatasetName": ...,
}
parent.list_records(**kwargs)
register_device
Registers a device to receive push sync notifications.
Type annotations and code completion for boto3.client("cognito-sync").register_device
method.
boto3 documentation
def register_device(
self,
*,
IdentityPoolId: str,
IdentityId: str,
Platform: PlatformType, # (1)
Token: str,
) -> RegisterDeviceResponseTypeDef: # (2)
...
kwargs: RegisterDeviceRequestRequestTypeDef = { # (1)
"IdentityPoolId": ...,
"IdentityId": ...,
"Platform": ...,
"Token": ...,
}
parent.register_device(**kwargs)
set_cognito_events
Sets the AWS Lambda function for a given event type for an identity pool.
Type annotations and code completion for boto3.client("cognito-sync").set_cognito_events
method.
boto3 documentation
def set_cognito_events(
self,
*,
IdentityPoolId: str,
Events: Mapping[str, str],
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: SetCognitoEventsRequestRequestTypeDef = { # (1)
"IdentityPoolId": ...,
"Events": ...,
}
parent.set_cognito_events(**kwargs)
set_identity_pool_configuration
Sets the necessary configuration for push sync.
Type annotations and code completion for boto3.client("cognito-sync").set_identity_pool_configuration
method.
boto3 documentation
def set_identity_pool_configuration(
self,
*,
IdentityPoolId: str,
PushSync: PushSyncTypeDef = ..., # (1)
CognitoStreams: CognitoStreamsTypeDef = ..., # (2)
) -> SetIdentityPoolConfigurationResponseTypeDef: # (3)
...
kwargs: SetIdentityPoolConfigurationRequestRequestTypeDef = { # (1)
"IdentityPoolId": ...,
}
parent.set_identity_pool_configuration(**kwargs)
subscribe_to_dataset
Subscribes to receive notifications when a dataset is modified by another device.
Type annotations and code completion for boto3.client("cognito-sync").subscribe_to_dataset
method.
boto3 documentation
def subscribe_to_dataset(
self,
*,
IdentityPoolId: str,
IdentityId: str,
DatasetName: str,
DeviceId: str,
) -> Dict[str, Any]:
...
kwargs: SubscribeToDatasetRequestRequestTypeDef = { # (1)
"IdentityPoolId": ...,
"IdentityId": ...,
"DatasetName": ...,
"DeviceId": ...,
}
parent.subscribe_to_dataset(**kwargs)
unsubscribe_from_dataset
Unsubscribes from receiving notifications when a dataset is modified by another device.
Type annotations and code completion for boto3.client("cognito-sync").unsubscribe_from_dataset
method.
boto3 documentation
def unsubscribe_from_dataset(
self,
*,
IdentityPoolId: str,
IdentityId: str,
DatasetName: str,
DeviceId: str,
) -> Dict[str, Any]:
...
kwargs: UnsubscribeFromDatasetRequestRequestTypeDef = { # (1)
"IdentityPoolId": ...,
"IdentityId": ...,
"DatasetName": ...,
"DeviceId": ...,
}
parent.unsubscribe_from_dataset(**kwargs)
update_records
Posts updates to records and adds and deletes records for a dataset and user.
Type annotations and code completion for boto3.client("cognito-sync").update_records
method.
boto3 documentation
def update_records(
self,
*,
IdentityPoolId: str,
IdentityId: str,
DatasetName: str,
SyncSessionToken: str,
DeviceId: str = ...,
RecordPatches: Sequence[RecordPatchTypeDef] = ..., # (1)
ClientContext: str = ...,
) -> UpdateRecordsResponseTypeDef: # (2)
...