Skip to main content

cognito_events

Creates, updates, deletes, gets or lists a cognito_events resource.

Overview

Namecognito_events
TypeResource
Idaws.cognito_sync.cognito_events

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
eventsobjectThe Cognito Events returned from the GetCognitoEvents request

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_cognito_eventsselectidentity_pool_id, regionGets 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.
set_cognito_eventsupdateidentity_pool_id, regionSets 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
identity_pool_idstringThe Cognito Identity Pool to use when configuring Cognito Events
regionstringAWS region (default: us-east-1)

SELECT examples

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.

SELECT
events
FROM aws.cognito_sync.cognito_events
WHERE identity_pool_id = '{{ identity_pool_id }}' -- required
AND region = '{{ region }}' -- required
;

UPDATE examples

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.

UPDATE aws.cognito_sync.cognito_events
SET
Events = '{{ Events }}'
WHERE
identity_pool_id = '{{ identity_pool_id }}' --required
AND region = '{{ region }}' --required;