{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Amazonka.Evidently.CreateSegment -- Copyright : (c) 2013-2023 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- -- 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 EvaluateFeature operation, when Evidently assigns a feature variation to a user.
You can associate as many as 50 tags with a segment.
For more information, see Tagging Amazon Web Services resources.
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text), -- | A name for the segment. name :: Prelude.Text, -- | The pattern to use for the segment. For more information about pattern -- syntax, see --You can associate as many as 50 tags with a segment.
For more information, see Tagging Amazon Web Services resources.
-- -- 'name', 'createSegment_name' - A name for the segment. -- -- 'pattern'', 'createSegment_pattern' - The pattern to use for the segment. For more information about pattern -- syntax, see --You can associate as many as 50 tags with a segment.
For more information, see Tagging Amazon Web Services resources.
createSegment_tags :: Lens.Lens' CreateSegment (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)) createSegment_tags = Lens.lens (\CreateSegment' {tags} -> tags) (\s@CreateSegment' {} a -> s {tags = a} :: CreateSegment) Prelude.. Lens.mapping Lens.coerced -- | A name for the segment. createSegment_name :: Lens.Lens' CreateSegment Prelude.Text createSegment_name = Lens.lens (\CreateSegment' {name} -> name) (\s@CreateSegment' {} a -> s {name = a} :: CreateSegment) -- | The pattern to use for the segment. For more information about pattern -- syntax, see --