Skip to main content

segment_definitions

Creates, updates, deletes or gets a segment_definition resource or lists segment_definitions in a region

Overview

Namesegment_definitions
TypeResource
DescriptionA segment definition resource of Amazon Connect Customer Profiles
Idaws.customerprofiles.segment_definitions

Fields

NameDatatypeDescription
created_atstringThe time of this segment definition got created.
descriptionstringThe description of the segment definition.
display_namestringThe display name of the segment definition.
domain_namestringThe unique name of the domain.
segment_definition_namestringThe unique name of the segment definition.
segment_groupsobjectAn array that defines the set of segment criteria to evaluate when handling segment groups for the segment.
segment_definition_arnstringThe Amazon Resource Name (ARN) of the segment definition.
tagsarrayThe tags used to organize, track, or control access for this resource.
regionstringAWS region.

For more information, see AWS::CustomerProfiles::SegmentDefinition.

Methods

NameAccessible byRequired Params
create_resourceINSERTDomainName, DisplayName, SegmentDefinitionName, SegmentGroups, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all segment_definitions in a region.

SELECT
region,
created_at,
description,
display_name,
domain_name,
segment_definition_name,
segment_groups,
segment_definition_arn,
tags
FROM aws.customerprofiles.segment_definitions
WHERE region = 'us-east-1';

Gets all properties from an individual segment_definition.

SELECT
region,
created_at,
description,
display_name,
domain_name,
segment_definition_name,
segment_groups,
segment_definition_arn,
tags
FROM aws.customerprofiles.segment_definitions
WHERE region = 'us-east-1' AND data__Identifier = '<DomainName>|<SegmentDefinitionName>';

INSERT example

Use the following StackQL query and manifest file to create a new segment_definition resource, using stack-deploy.

/*+ create */
INSERT INTO aws.customerprofiles.segment_definitions (
DisplayName,
DomainName,
SegmentDefinitionName,
SegmentGroups,
region
)
SELECT
'{{ DisplayName }}',
'{{ DomainName }}',
'{{ SegmentDefinitionName }}',
'{{ SegmentGroups }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.customerprofiles.segment_definitions
WHERE data__Identifier = '<DomainName|SegmentDefinitionName>'
AND region = 'us-east-1';

Permissions

To operate on the segment_definitions resource, the following permissions are required:

Create

profile:CreateSegmentDefinition,
profile:TagResource

Read

profile:GetSegmentDefinition

Update

profile:GetSegmentDefinition,
profile:UntagResource,
profile:TagResource

Delete

profile:DeleteSegmentDefinition

List

profile:ListSegmentDefinitions