cognitosync: Amazon Cognito Sync

View source: R/paws.R

cognitosyncR Documentation

Amazon Cognito Sync

Description

Amazon Cognito Sync provides an AWS service and client library that enable cross-device syncing of application-related user data. High-level client libraries are available for both iOS and Android. You can use these libraries to persist data locally so that it's available even if the device is offline. Developer credentials don't need to be stored on the mobile device to access the service. You can use Amazon Cognito to obtain a normalized user ID and credentials. User data is persisted in a dataset that can store up to 1 MB of key-value pairs, and you can have up to 20 datasets per user identity.

With Amazon Cognito Sync, the data stored for each identity is accessible only to credentials assigned to that identity. In order to use the Cognito Sync service, you need to make API calls using credentials retrieved with Amazon Cognito Identity service.

If you want to use Cognito Sync in an Android or iOS application, you will probably want to make API calls via the AWS Mobile SDK. To learn more, see the Developer Guide for Android and the Developer Guide for iOS.

Usage

cognitosync(
  config = list(),
  credentials = list(),
  endpoint = NULL,
  region = NULL
)

Arguments

config

Optional configuration of credentials, endpoint, and/or region.

  • credentials:

    • creds:

      • access_key_id: AWS access key ID

      • secret_access_key: AWS secret access key

      • session_token: AWS temporary session token

    • profile: The name of a profile to use. If not given, then the default profile is used.

    • anonymous: Set anonymous credentials.

  • endpoint: The complete URL to use for the constructed client.

  • region: The AWS Region used in instantiating the client.

  • close_connection: Immediately close all HTTP connections.

  • timeout: The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.

  • s3_force_path_style: Set this to true to force the request to use path-style addressing, i.e. ⁠http://s3.amazonaws.com/BUCKET/KEY⁠.

  • sts_regional_endpoint: Set sts regional endpoint resolver to regional or legacy https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html

credentials

Optional credentials shorthand for the config parameter

  • creds:

    • access_key_id: AWS access key ID

    • secret_access_key: AWS secret access key

    • session_token: AWS temporary session token

  • profile: The name of a profile to use. If not given, then the default profile is used.

  • anonymous: Set anonymous credentials.

endpoint

Optional shorthand for complete URL to use for the constructed client.

region

Optional shorthand for AWS Region used in instantiating the client.

Value

A client for the service. You can call the service's operations using syntax like svc$operation(...), where svc is the name you've assigned to the client. The available operations are listed in the Operations section.

Service syntax

svc <- cognitosync(
  config = list(
    credentials = list(
      creds = list(
        access_key_id = "string",
        secret_access_key = "string",
        session_token = "string"
      ),
      profile = "string",
      anonymous = "logical"
    ),
    endpoint = "string",
    region = "string",
    close_connection = "logical",
    timeout = "numeric",
    s3_force_path_style = "logical",
    sts_regional_endpoint = "string"
  ),
  credentials = list(
    creds = list(
      access_key_id = "string",
      secret_access_key = "string",
      session_token = "string"
    ),
    profile = "string",
    anonymous = "logical"
  ),
  endpoint = "string",
  region = "string"
)

Operations

bulk_publish Initiates a bulk publish of all existing datasets for an Identity Pool to the configured stream
delete_dataset Deletes the specific dataset
describe_dataset Gets meta data about a dataset by identity and dataset name
describe_identity_pool_usage Gets usage details (for example, data storage) about a particular identity pool
describe_identity_usage Gets usage information for an identity, including number of datasets and data usage
get_bulk_publish_details Get the status of the last BulkPublish operation for an identity pool
get_cognito_events Gets the events and the corresponding Lambda functions associated with an identity pool
get_identity_pool_configuration Gets the configuration settings of an identity pool
list_datasets Lists datasets for an identity
list_identity_pool_usage Gets a list of identity pools registered with Cognito
list_records Gets paginated records, optionally changed after a particular sync count for a dataset and identity
register_device Registers a device to receive push sync notifications
set_cognito_events Sets the AWS Lambda function for a given event type for an identity pool
set_identity_pool_configuration Sets the necessary configuration for push sync
subscribe_to_dataset Subscribes to receive notifications when a dataset is modified by another device
unsubscribe_from_dataset Unsubscribes from receiving notifications when a dataset is modified by another device
update_records Posts updates to records and adds and deletes records for a dataset and user

Examples

## Not run: 
svc <- cognitosync()
svc$bulk_publish(
  Foo = 123
)

## End(Not run)


paws documentation built on Sept. 17, 2024, 5:07 p.m.

Related to cognitosync in paws...