event_streams
Creates, updates, deletes or gets an event_stream resource or lists event_streams in a region
Overview
| Name | event_streams |
| Type | Resource |
| Description | An Event Stream resource of Amazon Connect Customer Profiles |
| Id | awscc.customerprofiles.event_streams |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
domain_name | string | The unique name of the domain. |
event_stream_name | string | The name of the event stream. |
uri | string | The StreamARN of the destination to deliver profile events to. For example, arn:aws:kinesis:region:account-id:stream/stream-name |
event_stream_arn | string | A unique identifier for the event stream. |
tags | array | The tags used to organize, track, or control access for this resource. |
created_at | string | The timestamp of when the export was created. |
state | string | The operational state of destination stream for export. |
destination_details | object | Details regarding the Kinesis stream. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
domain_name | string | The unique name of the domain. |
event_stream_name | string | The name of the event stream. |
region | string | AWS region. |
For more information, see AWS::CustomerProfiles::EventStream.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | event_streams | INSERT | DomainName, EventStreamName, Uri, region |
delete_resource | event_streams | DELETE | Identifier, region |
update_resource | event_streams | UPDATE | Identifier, PatchDocument, region |
list_resources | event_streams_list_only | SELECT | region |
get_resource | event_streams | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual event_stream.
SELECT
region,
domain_name,
event_stream_name,
uri,
event_stream_arn,
tags,
created_at,
state,
destination_details
FROM awscc.customerprofiles.event_streams
WHERE
region = '{{ region }}' AND
Identifier = '{{ domain_name }}|{{ event_stream_name }}';
Lists all event_streams in a region.
SELECT
region,
domain_name,
event_stream_name
FROM awscc.customerprofiles.event_streams_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new event_stream resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.customerprofiles.event_streams (
DomainName,
EventStreamName,
Uri,
region
)
SELECT
'{{ domain_name }}',
'{{ event_stream_name }}',
'{{ uri }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.customerprofiles.event_streams (
DomainName,
EventStreamName,
Uri,
Tags,
region
)
SELECT
'{{ domain_name }}',
'{{ event_stream_name }}',
'{{ uri }}',
'{{ 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_stream
props:
- name: domain_name
value: '{{ domain_name }}'
- name: event_stream_name
value: '{{ event_stream_name }}'
- name: uri
value: '{{ uri }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a event_stream resource, using stack-deploy.
/*+ update */
UPDATE awscc.customerprofiles.event_streams
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ domain_name }}|{{ event_stream_name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.customerprofiles.event_streams
WHERE
Identifier = '{{ domain_name }}|{{ event_stream_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_streams resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
profile:CreateEventStream,
iam:PutRolePolicy,
kinesis:DescribeStreamSummary,
profile:TagResource
profile:GetEventStream,
kinesis:DescribeStreamSummary
kinesis:DescribeStreamSummary,
profile:GetEventStream,
profile:UntagResource,
profile:TagResource
profile:DeleteEventStream,
iam:DeleteRolePolicy
profile:ListEventStreams