Use this operation to define a segment of your audience. A segment is a portion of your audience that share one or more characteristics. Examples could be Chrome browser users, users in Europe, or Firefox browser users in Europe who also fit other criteria that your application collects, such as age.
Using a segment in an experiment limits that experiment to evaluate only the users who match the segment criteria. Using one or more segments in a launch allow you to define different traffic splits for the different audience segments.
<p>For more information about segment pattern syntax, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-segments-syntax.html"> Segment rule pattern syntax</a>.</p> <p>The pattern that you define for a segment is matched against the value of <code>evaluationContext</code>, which is passed into Evidently in the <a href="https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_EvaluateFeature.html">EvaluateFeature</a> operation, when Evidently assigns a feature variation to a user.</p>
See also: AWS API Documentation
See ‘aws help’ for descriptions of global parameters.
create-segment
[--description <value>]
--name <value>
--pattern <value>
[--tags <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
--description
(string)
An optional description for this segment.
--name
(string)
A name for the segment.
--pattern
(string)
The pattern to use for the segment. For more information about pattern syntax, see Segment rule pattern syntax .
--tags
(map)
Assigns one or more tags (key-value pairs) to the segment.
Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
Tags don’t have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.
<p>You can associate as many as 50 tags with a segment.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a>.</p>
key -> (string)value -> (string)
Shorthand Syntax:
KeyName1=string,KeyName2=string
JSON Syntax:
{"string": "string"
...}
--cli-input-json
| --cli-input-yaml
(string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton
. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml
.
--generate-cli-skeleton
(string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input
, prints a sample input JSON that can be used as an argument for --cli-input-json
. Similarly, if provided yaml-input
it will print a sample input YAML that can be used with --cli-input-yaml
. If provided with the value output
, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.
See ‘aws help’ for descriptions of global parameters.
segment -> (structure)
A structure that contains the complete information about the segment that was just created.
arn -> (string)
The ARN of the segment.
createdTime -> (timestamp)
The date and time that this segment was created.
description -> (string)
The customer-created description for this segment.
experimentCount -> (long)
The number of experiments that this segment is used in. This count includes all current experiments, not just those that are currently running.
lastUpdatedTime -> (timestamp)
The date and time that this segment was most recently updated.
launchCount -> (long)
The number of launches that this segment is used in. This count includes all current launches, not just those that are currently running.
name -> (string)
The name of the segment.
pattern -> (string)
tags -> (map)
The list of tag keys and values associated with this launch.
key -> (string)
value -> (string)