{"files":{"SKILL.md":"---\nname: amazon-cognito-sync\ndescription: \"Amazon Cognito Sync API skill. Use when working with Amazon Cognito Sync for identitypools. Covers 17 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Amazon Cognito Sync\nAPI version: 2014-06-30\n\n## Auth\nAWS SigV4\n\n## Base URL\nNot specified.\n\n## Setup\n1. Configure auth: AWS SigV4\n2. GET /identitypools -- gets a list of identity pools registered with cognito. listidentitypoolusage can only be called with developer credentials. you cannot make this api call with the temporary user credentials provided by cognito identity.\n3. POST /identitypools/{IdentityPoolId}/bulkpublish -- create first bulkpublish\n\n## Endpoints\n17 endpoints across 1 group. See references/api-spec.lap for full details.\n\n### Identitypools\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /identitypools/{IdentityPoolId}/bulkpublish | Initiates a bulk publish of all existing datasets for an Identity Pool to the configured stream. Customers are limited to one successful bulk publish per 24 hours. Bulk publish is an asynchronous request, customers can see the status of the request via the GetBulkPublishDetails operation.This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity. |\n| DELETE | /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName} | Deletes the specific dataset. The dataset will be deleted permanently, and the action can't be undone. Datasets that this dataset was merged with will no longer report the merge. Any subsequent operation on this dataset will result in a ResourceNotFoundException. This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials. |\n| GET | /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName} | Gets meta data about a dataset by identity and dataset name. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data. This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call. |\n| GET | /identitypools/{IdentityPoolId} | Gets usage details (for example, data storage) about a particular identity pool. This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity. |\n| GET | /identitypools/{IdentityPoolId}/identities/{IdentityId} | Gets usage information for an identity, including number of datasets and data usage. This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials. |\n| POST | /identitypools/{IdentityPoolId}/getBulkPublishDetails | Get the status of the last BulkPublish operation for an identity pool.This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity. |\n| GET | /identitypools/{IdentityPoolId}/events | Gets the events and the corresponding Lambda functions associated with an identity pool.This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity. |\n| GET | /identitypools/{IdentityPoolId}/configuration | Gets the configuration settings of an identity pool.This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity. |\n| GET | /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets | Lists datasets for an identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data. ListDatasets can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use the Cognito Identity credentials to make this API call. |\n| GET | /identitypools | Gets a list of identity pools registered with Cognito. ListIdentityPoolUsage can only be called with developer credentials. You cannot make this API call with the temporary user credentials provided by Cognito Identity. |\n| GET | /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/records | Gets paginated records, optionally changed after a particular sync count for a dataset and identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data. ListRecords can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call. |\n| POST | /identitypools/{IdentityPoolId}/identity/{IdentityId}/device | Registers a device to receive push sync notifications.This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials. |\n| POST | /identitypools/{IdentityPoolId}/events | Sets the AWS Lambda function for a given event type for an identity pool. This request only updates the key/value pair specified. Other key/values pairs are not updated. To remove a key value pair, pass a empty value for the particular key.This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity. |\n| POST | /identitypools/{IdentityPoolId}/configuration | Sets the necessary configuration for push sync.This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity. |\n| POST | /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId} | Subscribes to receive notifications when a dataset is modified by another device.This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials. |\n| DELETE | /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId} | Unsubscribes from receiving notifications when a dataset is modified by another device.This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials. |\n| POST | /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName} | Posts updates to records and adds and deletes records for a dataset and user. The sync count in the record patch is your last known sync count for that record. The server will reject an UpdateRecords request with a ResourceConflictException if you try to patch a record with a new value but a stale sync count.For example, if the sync count on the server is 5 for a key called highScore and you try and submit a new highScore with sync count of 4, the request will be rejected. To obtain the current sync count for a record, call ListRecords. On a successful update of the record, the response returns the new sync count for that record. You should present that sync count the next time you try to update that same record. When the record does not exist, specify the sync count as 0. This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials. |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Create a bulkpublish?\" -> POST /identitypools/{IdentityPoolId}/bulkpublish\n- \"Delete a dataset?\" -> DELETE /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}\n- \"Get dataset details?\" -> GET /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}\n- \"Get identitypool details?\" -> GET /identitypools/{IdentityPoolId}\n- \"Get identity details?\" -> GET /identitypools/{IdentityPoolId}/identities/{IdentityId}\n- \"Create a getBulkPublishDetail?\" -> POST /identitypools/{IdentityPoolId}/getBulkPublishDetails\n- \"List all events?\" -> GET /identitypools/{IdentityPoolId}/events\n- \"List all configuration?\" -> GET /identitypools/{IdentityPoolId}/configuration\n- \"List all datasets?\" -> GET /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets\n- \"List all identitypools?\" -> GET /identitypools\n- \"List all records?\" -> GET /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/records\n- \"Create a device?\" -> POST /identitypools/{IdentityPoolId}/identity/{IdentityId}/device\n- \"Create a event?\" -> POST /identitypools/{IdentityPoolId}/events\n- \"Create a configuration?\" -> POST /identitypools/{IdentityPoolId}/configuration\n- \"Delete a subscription?\" -> DELETE /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}\n- \"How to authenticate?\" -> See Auth section above\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Create/update endpoints return the modified resource on success\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Amazon Cognito Sync\n@version 2014-06-30\n@auth AWS SigV4\n@endpoints 17\n@toc identitypools(17)\n\n@endpoint POST /identitypools/{IdentityPoolId}/bulkpublish\n@desc Initiates a bulk publish of all existing datasets for an Identity Pool to the configured stream. Customers are limited to one successful bulk publish per 24 hours. Bulk publish is an asynchronous request, customers can see the status of the request via the GetBulkPublishDetails operation.This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.\n@required {IdentityPoolId: str}\n@returns(200) {IdentityPoolId: str?}\n\n@endpoint DELETE /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}\n@desc Deletes the specific dataset. The dataset will be deleted permanently, and the action can't be undone. Datasets that this dataset was merged with will no longer report the merge. Any subsequent operation on this dataset will result in a ResourceNotFoundException. This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.\n@required {IdentityPoolId: str, IdentityId: str, DatasetName: str}\n@returns(200) {Dataset: Dataset?{IdentityId: str?, DatasetName: str?, CreationDate: str(timestamp)?, LastModifiedDate: str(timestamp)?, LastModifiedBy: str?, DataStorage: int(i64)?, NumRecords: int(i64)?}}\n\n@endpoint GET /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}\n@desc Gets meta data about a dataset by identity and dataset name. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data. This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call.\n@required {IdentityPoolId: str, IdentityId: str, DatasetName: str}\n@returns(200) {Dataset: Dataset?{IdentityId: str?, DatasetName: str?, CreationDate: str(timestamp)?, LastModifiedDate: str(timestamp)?, LastModifiedBy: str?, DataStorage: int(i64)?, NumRecords: int(i64)?}}\n\n@endpoint GET /identitypools/{IdentityPoolId}\n@desc Gets usage details (for example, data storage) about a particular identity pool. This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.\n@required {IdentityPoolId: str}\n@returns(200) {IdentityPoolUsage: IdentityPoolUsage?{IdentityPoolId: str?, SyncSessionsCount: int(i64)?, DataStorage: int(i64)?, LastModifiedDate: str(timestamp)?}}\n\n@endpoint GET /identitypools/{IdentityPoolId}/identities/{IdentityId}\n@desc Gets usage information for an identity, including number of datasets and data usage. This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.\n@required {IdentityPoolId: str, IdentityId: str}\n@returns(200) {IdentityUsage: IdentityUsage?{IdentityId: str?, IdentityPoolId: str?, LastModifiedDate: str(timestamp)?, DatasetCount: int?, DataStorage: int(i64)?}}\n\n@endpoint POST /identitypools/{IdentityPoolId}/getBulkPublishDetails\n@desc Get the status of the last BulkPublish operation for an identity pool.This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.\n@required {IdentityPoolId: str}\n@returns(200) {IdentityPoolId: str?, BulkPublishStartTime: str(timestamp)?, BulkPublishCompleteTime: str(timestamp)?, BulkPublishStatus: str?, FailureMessage: str?}\n\n@endpoint GET /identitypools/{IdentityPoolId}/events\n@desc Gets the events and the corresponding Lambda functions associated with an identity pool.This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.\n@required {IdentityPoolId: str}\n@returns(200) {Events: map<str,str>?}\n\n@endpoint GET /identitypools/{IdentityPoolId}/configuration\n@desc Gets the configuration settings of an identity pool.This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.\n@required {IdentityPoolId: str}\n@returns(200) {IdentityPoolId: str?, PushSync: PushSync?{ApplicationArns: [str]?, RoleArn: str?}, CognitoStreams: CognitoStreams?{StreamName: str?, RoleArn: str?, StreamingStatus: str?}}\n\n@endpoint GET /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets\n@desc Lists datasets for an identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data. ListDatasets can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use the Cognito Identity credentials to make this API call.\n@required {IdentityPoolId: str, IdentityId: str}\n@optional {nextToken: str, maxResults: int}\n@returns(200) {Datasets: [Dataset]?, Count: int?, NextToken: str?}\n\n@endpoint GET /identitypools\n@desc Gets a list of identity pools registered with Cognito. ListIdentityPoolUsage can only be called with developer credentials. You cannot make this API call with the temporary user credentials provided by Cognito Identity.\n@optional {nextToken: str, maxResults: int}\n@returns(200) {IdentityPoolUsages: [IdentityPoolUsage]?, MaxResults: int?, Count: int?, NextToken: str?}\n\n@endpoint GET /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/records\n@desc Gets paginated records, optionally changed after a particular sync count for a dataset and identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data. ListRecords can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call.\n@required {IdentityPoolId: str, IdentityId: str, DatasetName: str}\n@optional {lastSyncCount: int(i64), nextToken: str, maxResults: int, syncSessionToken: str}\n@returns(200) {Records: [Record]?, NextToken: str?, Count: int?, DatasetSyncCount: int(i64)?, LastModifiedBy: str?, MergedDatasetNames: [str]?, DatasetExists: bool?, DatasetDeletedAfterRequestedSyncCount: bool?, SyncSessionToken: str?}\n\n@endpoint POST /identitypools/{IdentityPoolId}/identity/{IdentityId}/device\n@desc Registers a device to receive push sync notifications.This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.\n@required {IdentityPoolId: str, IdentityId: str, Platform: str, Token: str}\n@returns(200) {DeviceId: str?}\n\n@endpoint POST /identitypools/{IdentityPoolId}/events\n@desc Sets the AWS Lambda function for a given event type for an identity pool. This request only updates the key/value pair specified. Other key/values pairs are not updated. To remove a key value pair, pass a empty value for the particular key.This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.\n@required {IdentityPoolId: str, Events: map<str,str>}\n\n@endpoint POST /identitypools/{IdentityPoolId}/configuration\n@desc Sets the necessary configuration for push sync.This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.\n@required {IdentityPoolId: str}\n@optional {PushSync: PushSync, CognitoStreams: CognitoStreams}\n@returns(200) {IdentityPoolId: str?, PushSync: PushSync?{ApplicationArns: [str]?, RoleArn: str?}, CognitoStreams: CognitoStreams?{StreamName: str?, RoleArn: str?, StreamingStatus: str?}}\n\n@endpoint POST /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}\n@desc Subscribes to receive notifications when a dataset is modified by another device.This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.\n@required {IdentityPoolId: str, IdentityId: str, DatasetName: str, DeviceId: str}\n\n@endpoint DELETE /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}\n@desc Unsubscribes from receiving notifications when a dataset is modified by another device.This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.\n@required {IdentityPoolId: str, IdentityId: str, DatasetName: str, DeviceId: str}\n\n@endpoint POST /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}\n@desc Posts updates to records and adds and deletes records for a dataset and user. The sync count in the record patch is your last known sync count for that record. The server will reject an UpdateRecords request with a ResourceConflictException if you try to patch a record with a new value but a stale sync count.For example, if the sync count on the server is 5 for a key called highScore and you try and submit a new highScore with sync count of 4, the request will be rejected. To obtain the current sync count for a record, call ListRecords. On a successful update of the record, the response returns the new sync count for that record. You should present that sync count the next time you try to update that same record. When the record does not exist, specify the sync count as 0. This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.\n@required {IdentityPoolId: str, IdentityId: str, DatasetName: str, SyncSessionToken: str}\n@optional {x-amz-Client-Context: str, DeviceId: str, RecordPatches: [RecordPatch]}\n@returns(200) {Records: [Record]?}\n\n@end\n"}}