CfnSegmentPropsMixin

class aws_cdk.mixins_preview.aws_evidently.mixins.CfnSegmentPropsMixin(props, *, strategy=None)

Bases: Mixin

Creates or updates 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.

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-evidently-segment.html

CloudformationResource:

AWS::Evidently::Segment

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_evidently import mixins as evidently_mixins

cfn_segment_props_mixin = evidently_mixins.CfnSegmentPropsMixin(evidently_mixins.CfnSegmentMixinProps(
    description="description",
    name="name",
    pattern="pattern",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Evidently::Segment.

Parameters:
  • props (Union[CfnSegmentMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['description', 'name', 'pattern', 'tags']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental