Skip to content

Create Segment

cloudwatchevidently_create_segment R Documentation

Use this operation to define a segment of your audience

Description

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 allows you to define different traffic splits for the different audience segments.

For more information about segment pattern syntax, see Segment rule pattern syntax.

The pattern that you define for a segment is matched against the value of evaluationContext, which is passed into Evidently in the evaluate_feature operation, when Evidently assigns a feature variation to a user.

Usage

cloudwatchevidently_create_segment(description, name, pattern, tags)

Arguments

description

An optional description for this segment.

name

[required] A name for the segment.

pattern

[required] The pattern to use for the segment. For more information about pattern syntax, see Segment rule pattern syntax.

tags

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.

You can associate as many as 50 tags with a segment.

For more information, see Tagging Amazon Web Services resources.

Value

A list with the following syntax:

list(
  segment = list(
    arn = "string",
    createdTime = as.POSIXct(
      "2015-01-01"
    ),
    description = "string",
    experimentCount = 123,
    lastUpdatedTime = as.POSIXct(
      "2015-01-01"
    ),
    launchCount = 123,
    name = "string",
    pattern = "string",
    tags = list(
      "string"
    )
  )
)

Request syntax

svc$create_segment(
  description = "string",
  name = "string",
  pattern = "string",
  tags = list(
    "string"
  )
)