Skip to main content

segments

Creates, updates, deletes or gets a segment resource or lists segments in a region

Overview

Namesegments
TypeResource
DescriptionResource Type definition for AWS::Evidently::Segment
Idaws.evidently.segments

Fields

NameDatatypeDescription
arnstring
namestring
descriptionstring
patternstring
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, region
delete_resourceDELETEdata__Identifier, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all segments in a region.

SELECT
region,
arn,
name,
description,
pattern,
tags
FROM aws.evidently.segments
WHERE region = 'us-east-1';

Gets all properties from an individual segment.

SELECT
region,
arn,
name,
description,
pattern,
tags
FROM aws.evidently.segments
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

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

/*+ create */
INSERT INTO aws.evidently.segments (
Name,
region
)
SELECT
'{{ Name }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.evidently.segments
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

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

Create

evidently:CreateSegment,
evidently:GetSegment,
evidently:TagResource

Read

evidently:GetSegment,
evidently:ListTagsForResource

Delete

evidently:DeleteSegment,
evidently:GetSegment,
evidently:UntagResource

List

evidently:ListSegment,
evidently:ListTagsForResource