Learn R Programming

paws.security.identity (version 0.7.0)

cognitosync: 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
)

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.

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.

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_publishInitiates a bulk publish of all existing datasets for an Identity Pool to the configured stream
delete_datasetDeletes the specific dataset
describe_datasetGets meta data about a dataset by identity and dataset name
describe_identity_pool_usageGets usage details (for example, data storage) about a particular identity pool
describe_identity_usageGets usage information for an identity, including number of datasets and data usage
get_bulk_publish_detailsGet the status of the last BulkPublish operation for an identity pool
get_cognito_eventsGets the events and the corresponding Lambda functions associated with an identity pool
get_identity_pool_configurationGets the configuration settings of an identity pool
list_datasetsLists datasets for an identity
list_identity_pool_usageGets a list of identity pools registered with Cognito
list_recordsGets paginated records, optionally changed after a particular sync count for a dataset and identity
register_deviceRegisters a device to receive push sync notifications
set_cognito_eventsSets the AWS Lambda function for a given event type for an identity pool
set_identity_pool_configurationSets the necessary configuration for push sync
subscribe_to_datasetSubscribes to receive notifications when a dataset is modified by another device
unsubscribe_from_datasetUnsubscribes from receiving notifications when a dataset is modified by another device
update_recordsPosts updates to records and adds and deletes records for a dataset and user

Examples

Run this code
if (FALSE) {
svc <- cognitosync()
svc$bulk_publish(
  Foo = 123
)
}

Run the code above in your browser using DataLab