segment_snapshots
Creates, updates, deletes, gets or lists a segment_snapshots resource.
Overview
| Name | segment_snapshots |
| Type | Resource |
| Id | aws.customer_profiles.segment_snapshots |
Fields
The following fields are returned by SELECT queries:
- get_segment_snapshot
| Name | Datatype | Description |
|---|---|---|
data_format | string | The format in which the segment will be exported. (CSV, JSONL, ORC) |
destination_uri | string | The destination to which the segment will be exported. This field must be provided if the request is not submitted from the Connect Customer Admin Website. |
encryption_key | string | The Amazon Resource Name (ARN) of the KMS key used to encrypt the exported segment. |
role_arn | string | The Amazon Resource Name (ARN) of the IAM role that allows Customer Profiles service principal to assume the role for conducting KMS and S3 operations. (pattern: <code>arn:aws:iam:.:[0-9]+:.</code>) |
snapshot_id | string | The unique identifier of the segment snapshot. (pattern: <code>[a-f0-9]{32}</code>) |
status | string | The status of the asynchronous job for exporting the segment snapshot. (COMPLETED, IN_PROGRESS, FAILED) |
status_message | string | The status message of the asynchronous job for exporting the segment snapshot. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_segment_snapshot | select | domain_name, segment_definition_name, snapshot_id, region | Retrieve the latest status of a segment snapshot. | |
create_segment_snapshot | insert | domain_name, segment_definition_name, region, DataFormat | Triggers a job to export a segment to a specified destination. |
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 |
|---|---|---|
domain_name | string | The unique name of the domain. |
region | string | AWS region (default: us-east-1) |
segment_definition_name | string | The name of the segment definition used in this snapshot request. |
snapshot_id | string | The unique identifier of the segment snapshot. |
SELECT examples
- get_segment_snapshot
Retrieve the latest status of a segment snapshot.
SELECT
data_format,
destination_uri,
encryption_key,
role_arn,
snapshot_id,
status,
status_message
FROM aws.customer_profiles.segment_snapshots
WHERE domain_name = '{{ domain_name }}' -- required
AND segment_definition_name = '{{ segment_definition_name }}' -- required
AND snapshot_id = '{{ snapshot_id }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_segment_snapshot
- Manifest
Triggers a job to export a segment to a specified destination.
INSERT INTO aws.customer_profiles.segment_snapshots (
DataFormat,
EncryptionKey,
RoleArn,
DestinationUri,
domain_name,
segment_definition_name,
region
)
SELECT
'{{ DataFormat }}' /* required */,
'{{ EncryptionKey }}',
'{{ RoleArn }}',
'{{ DestinationUri }}',
'{{ domain_name }}',
'{{ segment_definition_name }}',
'{{ region }}'
RETURNING
snapshot_id
;
# Description fields are for documentation purposes
- name: segment_snapshots
props:
- name: domain_name
value: "{{ domain_name }}"
description: Required parameter for the segment_snapshots resource.
- name: segment_definition_name
value: "{{ segment_definition_name }}"
description: Required parameter for the segment_snapshots resource.
- name: region
value: "{{ region }}"
description: Required parameter for the segment_snapshots resource.
- name: DataFormat
value: "{{ DataFormat }}"
valid_values: ['CSV', 'JSONL', 'ORC']
- name: EncryptionKey
value: "{{ EncryptionKey }}"
- name: RoleArn
value: "{{ RoleArn }}"
- name: DestinationUri
value: "{{ DestinationUri }}"