import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement } from '../shared' ; param sid export class CognitoSync extends PolicyStatement { public servicePrefix = 'cognito-sync' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Initiates a bulk publish of all existing datasets for an Identity Pool to the configured stream.
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cognitosync/latest/APIReference/API_BulkPublish.html
     */ public toBulkPublish ( ) { return this . to ( 'BulkPublish' ) ; } /**
     * Deletes the specific dataset.
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cognitosync/latest/APIReference/API_DeleteDataset.html
     */ public toDeleteDataset ( ) { return this . to ( 'DeleteDataset' ) ; } /**
     * Gets meta data about a dataset by identity and dataset name.
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/cognitosync/latest/APIReference/API_DescribeDataset.html
     */ public toDescribeDataset ( ) { return this . to ( 'DescribeDataset' ) ; } /**
     * Gets usage details (for example, data storage) about a particular identity pool.
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/cognitosync/latest/APIReference/API_DescribeIdentityPoolUsage.html
     */ public toDescribeIdentityPoolUsage ( ) { return this . to ( 'DescribeIdentityPoolUsage' ) ; } /**
     * Gets usage information for an identity, including number of datasets and data usage.
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/cognitosync/latest/APIReference/API_DescribeIdentityUsage.html
     */ public toDescribeIdentityUsage ( ) { return this . to ( 'DescribeIdentityUsage' ) ; } /**
     * Get the status of the last BulkPublish operation for an identity pool.
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/cognitosync/latest/APIReference/API_GetBulkPublishDetails.html
     */ public toGetBulkPublishDetails ( ) { return this . to ( 'GetBulkPublishDetails' ) ; } /**
     * Gets the events and the corresponding Lambda functions associated with an identity pool.
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/cognitosync/latest/APIReference/API_GetCognitoEvents.html
     */ public toGetCognitoEvents ( ) { return this . to ( 'GetCognitoEvents' ) ; } /**
     * Gets the configuration settings of an identity pool.
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/cognitosync/latest/APIReference/API_GetIdentityPoolConfiguration.html
     */ public toGetIdentityPoolConfiguration ( ) { return this . to ( 'GetIdentityPoolConfiguration' ) ; } /**
     * Lists datasets for an identity.
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/cognitosync/latest/APIReference/API_ListDatasets.html
     */ public toListDatasets ( ) { return this . to ( 'ListDatasets' ) ; } /**
     * Gets a list of identity pools registered with Cognito.
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/cognitosync/latest/APIReference/API_ListIdentityPoolUsage.html
     */ public toListIdentityPoolUsage ( ) { return this . to ( 'ListIdentityPoolUsage' ) ; } /**
     * Gets paginated records, optionally changed after a particular sync count for a dataset and identity.
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/cognitosync/latest/APIReference/API_ListRecords.html
     */ public toListRecords ( ) { return this . to ( 'ListRecords' ) ; } /**
     * A permission that grants the ability to query records.
     *
     * Access Level: Read
     */ public toQueryRecords ( ) { return this . to ( 'QueryRecords' ) ; } /**
     * Registers a device to receive push sync notifications.
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cognitosync/latest/APIReference/API_RegisterDevice.html
     */ public toRegisterDevice ( ) { return this . to ( 'RegisterDevice' ) ; } /**
     * Sets the AWS Lambda function for a given event type for an identity pool.
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cognitosync/latest/APIReference/API_SetCognitoEvents.html
     */ public toSetCognitoEvents ( ) { return this . to ( 'SetCognitoEvents' ) ; } /**
     * A permission that grants ability to configure datasets.
     *
     * Access Level: Write
     */ public toSetDatasetConfiguration ( ) { return this . to ( 'SetDatasetConfiguration' ) ; } /**
     * Sets the necessary configuration for push sync.
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cognitosync/latest/APIReference/API_SetIdentityPoolConfiguration.html
     */ public toSetIdentityPoolConfiguration ( ) { return this . to ( 'SetIdentityPoolConfiguration' ) ; } /**
     * Subscribes to receive notifications when a dataset is modified by another device.
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cognitosync/latest/APIReference/API_SubscribeToDataset.html
     */ public toSubscribeToDataset ( ) { return this . to ( 'SubscribeToDataset' ) ; } /**
     * Unsubscribes from receiving notifications when a dataset is modified by another device.
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cognitosync/latest/APIReference/API_UnsubscribeFromDataset.html
     */ public toUnsubscribeFromDataset ( ) { return this . to ( 'UnsubscribeFromDataset' ) ; } /**
     * Posts updates to records and adds and deletes records for a dataset and user.
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/cognitosync/latest/APIReference/API_UpdateRecords.html
     */ public toUpdateRecords ( ) { return this . to ( 'UpdateRecords' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'BulkPublish' , 'DeleteDataset' , 'RegisterDevice' , 'SetCognitoEvents' , 'SetDatasetConfiguration' , 'SetIdentityPoolConfiguration' , 'SubscribeToDataset' , 'UnsubscribeFromDataset' , 'UpdateRecords' ] , Read : [ 'DescribeDataset' , 'DescribeIdentityPoolUsage' , 'DescribeIdentityUsage' , 'GetBulkPublishDetails' , 'GetCognitoEvents' , 'GetIdentityPoolConfiguration' , 'ListIdentityPoolUsage' , 'ListRecords' , 'QueryRecords' ] , List : [ 'ListDatasets' ] } ; param identityPoolId param identityId param datasetName param account param region param partition public onDataset ( identityPoolId , identityId , datasetName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:cognito-sync:${ region || '*' }:${ account || '*' }:identitypool/${ identityPoolId }/identity/${ identityId }/dataset/${ datasetName }` ) ; } param identityPoolId param identityId param account param region param partition public onIdentity ( identityPoolId , identityId , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:cognito-sync:${ region || '*' }:${ account || '*' }:identitypool/${ identityPoolId }/identity/${ identityId }` ) ; } param identityPoolId param account param region param partition public onIdentitypool ( identityPoolId , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:cognito-sync:${ region || '*' }:${ account || '*' }:identitypool/${ identityPoolId }` ) ; } }