event_triggers
Creates, updates, deletes or gets an event_trigger resource or lists event_triggers in a region
Overview
| Name | event_triggers |
| Type | Resource |
| Description | An event trigger resource of Amazon Connect Customer Profiles |
| Id | awscc.customerprofiles.event_triggers |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
domain_name | string | The unique name of the domain. |
event_trigger_name | string | The unique name of the event trigger. |
object_type_name | string | The unique name of the object type. |
description | string | The description of the event trigger. |
event_trigger_conditions | array | A list of conditions that determine when an event should trigger the destination. |
event_trigger_limits | object | Defines limits controlling whether an event triggers the destination, based on ingestion latency and the number of invocations per profile over specific time periods. |
segment_filter | string | The destination is triggered only for profiles that meet the criteria of a segment definition. |
created_at | string | The timestamp of when the event trigger was created. |
last_updated_at | string | The timestamp of when the event trigger was most recently updated. |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
domain_name | string | The unique name of the domain. |
event_trigger_name | string | The unique name of the event trigger. |
region | string | AWS region. |
For more information, see AWS::CustomerProfiles::EventTrigger.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | event_triggers | INSERT | DomainName, EventTriggerName, ObjectTypeName, EventTriggerConditions, region |
delete_resource | event_triggers | DELETE | Identifier, region |
update_resource | event_triggers | UPDATE | Identifier, PatchDocument, region |
list_resources | event_triggers_list_only | SELECT | region |
get_resource | event_triggers | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual event_trigger.
SELECT
region,
domain_name,
event_trigger_name,
object_type_name,
description,
event_trigger_conditions,
event_trigger_limits,
segment_filter,
created_at,
last_updated_at,
tags
FROM awscc.customerprofiles.event_triggers
WHERE
region = '{{ region }}' AND
Identifier = '{{ domain_name }}|{{ event_trigger_name }}';
Lists all event_triggers in a region.
SELECT
region,
domain_name,
event_trigger_name
FROM awscc.customerprofiles.event_triggers_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new event_trigger resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.customerprofiles.event_triggers (
DomainName,
EventTriggerName,
ObjectTypeName,
EventTriggerConditions,
region
)
SELECT
'{{ domain_name }}',
'{{ event_trigger_name }}',
'{{ object_type_name }}',
'{{ event_trigger_conditions }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.customerprofiles.event_triggers (
DomainName,
EventTriggerName,
ObjectTypeName,
Description,
EventTriggerConditions,
EventTriggerLimits,
SegmentFilter,
Tags,
region
)
SELECT
'{{ domain_name }}',
'{{ event_trigger_name }}',
'{{ object_type_name }}',
'{{ description }}',
'{{ event_trigger_conditions }}',
'{{ event_trigger_limits }}',
'{{ segment_filter }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: event_trigger
props:
- name: domain_name
value: '{{ domain_name }}'
- name: event_trigger_name
value: '{{ event_trigger_name }}'
- name: object_type_name
value: '{{ object_type_name }}'
- name: description
value: '{{ description }}'
- name: event_trigger_conditions
value:
- event_trigger_dimensions:
- object_attributes:
- source: '{{ source }}'
field_name: '{{ field_name }}'
comparison_operator: '{{ comparison_operator }}'
values:
- '{{ values[0] }}'
logical_operator: '{{ logical_operator }}'
- name: event_trigger_limits
value:
event_expiration: '{{ event_expiration }}'
periods:
- unit: '{{ unit }}'
value: '{{ value }}'
max_invocations_per_profile: '{{ max_invocations_per_profile }}'
unlimited: '{{ unlimited }}'
- name: segment_filter
value: '{{ segment_filter }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a event_trigger resource, using stack-deploy.
/*+ update */
UPDATE awscc.customerprofiles.event_triggers
SET PatchDocument = string('{{ {
"ObjectTypeName": object_type_name,
"Description": description,
"EventTriggerConditions": event_trigger_conditions,
"EventTriggerLimits": event_trigger_limits,
"SegmentFilter": segment_filter,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ domain_name }}|{{ event_trigger_name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.customerprofiles.event_triggers
WHERE
Identifier = '{{ domain_name }}|{{ event_trigger_name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the event_triggers resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
profile:CreateEventTrigger,
profile:TagResource
profile:GetEventTrigger
profile:GetEventTrigger,
profile:UpdateEventTrigger,
profile:UntagResource,
profile:TagResource
profile:DeleteEventTrigger
profile:ListEventTriggers