cognito_events
Creates, updates, deletes, gets or lists a cognito_events resource.
Overview
| Name | cognito_events |
| Type | Resource |
| Id | aws.cognito_sync.cognito_events |
Fields
The following fields are returned by SELECT queries:
- get_cognito_events
| Name | Datatype | Description |
|---|---|---|
events | object | The Cognito Events returned from the GetCognitoEvents request |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_cognito_events | select | identity_pool_id, region | 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. | |
set_cognito_events | update | identity_pool_id, region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
identity_pool_id | string | The Cognito Identity Pool to use when configuring Cognito Events |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_cognito_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.
SELECT
events
FROM aws.cognito_sync.cognito_events
WHERE identity_pool_id = '{{ identity_pool_id }}' -- required
AND region = '{{ region }}' -- required
;
UPDATE examples
- set_cognito_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.
UPDATE aws.cognito_sync.cognito_events
SET
Events = '{{ Events }}'
WHERE
identity_pool_id = '{{ identity_pool_id }}' --required
AND region = '{{ region }}' --required;