segment_definitions
Creates, updates, deletes or gets a segment_definition
resource or lists segment_definitions
in a region
Overview
Name | segment_definitions |
Type | Resource |
Description | A segment definition resource of Amazon Connect Customer Profiles |
Id | aws.customerprofiles.segment_definitions |
Fields
Name | Datatype | Description |
---|---|---|
created_at | string | The time of this segment definition got created. |
description | string | The description of the segment definition. |
display_name | string | The display name of the segment definition. |
domain_name | string | The unique name of the domain. |
segment_definition_name | string | The unique name of the segment definition. |
segment_groups | object | An array that defines the set of segment criteria to evaluate when handling segment groups for the segment. |
segment_definition_arn | string | The Amazon Resource Name (ARN) of the segment definition. |
tags | array | The tags used to organize, track, or control access for this resource. |
region | string | AWS region. |
For more information, see AWS::CustomerProfiles::SegmentDefinition
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | DomainName, DisplayName, SegmentDefinitionName, SegmentGroups, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.customerprofiles.segment_definitions (
DisplayName,
DomainName,
SegmentDefinitionName,
SegmentGroups,
region
)
SELECT
'{{ DisplayName }}',
'{{ DomainName }}',
'{{ SegmentDefinitionName }}',
'{{ SegmentGroups }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.customerprofiles.segment_definitions (
Description,
DisplayName,
DomainName,
SegmentDefinitionName,
SegmentGroups,
Tags,
region
)
SELECT
'{{ Description }}',
'{{ DisplayName }}',
'{{ DomainName }}',
'{{ SegmentDefinitionName }}',
'{{ SegmentGroups }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: segment_definition
props:
- name: Description
value: '{{ Description }}'
- name: DisplayName
value: '{{ DisplayName }}'
- name: DomainName
value: '{{ DomainName }}'
- name: SegmentDefinitionName
value: '{{ SegmentDefinitionName }}'
- name: SegmentGroups
value:
Groups:
- Dimensions:
- null
SourceSegments:
- SegmentDefinitionName: '{{ SegmentDefinitionName }}'
SourceType: '{{ SourceType }}'
Type: null
Include: null
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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