segments
Creates, updates, deletes or gets a segment
resource or lists segments
in a region
Overview
Name | segments |
Type | Resource |
Description | Resource Type definition for AWS::Evidently::Segment |
Id | aws.evidently.segments |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | |
name | string | |
description | string | |
pattern | string | |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.evidently.segments (
Name,
region
)
SELECT
'{{ Name }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.evidently.segments (
Name,
Description,
Pattern,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ Pattern }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: segment
props:
- name: Name
value: '{{ Name }}'
- name: Description
value: '{{ Description }}'
- name: Pattern
value: '{{ Pattern }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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