Class CfnSegment
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.evidently.*; CfnSegment cfnSegment = CfnSegment.Builder.create(this, "MyCfnSegment") .name("name") // the properties below are optional .description("description") .pattern("pattern") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .build();
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnSegment
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnSegment
(software.amazon.jsii.JsiiObjectRef objRef) CfnSegment
(software.constructs.Construct scope, String id, CfnSegmentProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe ARN of the segment.An optional description for this segment.getName()
A name for the segment.The pattern to use for the segment.getTags()
Tag Manager which manages the tags for this resource.Assigns one or more tags (key-value pairs) to the feature.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setDescription
(String value) An optional description for this segment.void
A name for the segment.void
setPattern
(String value) The pattern to use for the segment.void
setTagsRaw
(List<CfnTag> value) Assigns one or more tags (key-value pairs) to the feature.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnSegment
protected CfnSegment(software.amazon.jsii.JsiiObjectRef objRef) -
CfnSegment
protected CfnSegment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnSegment
@Stability(Stable) public CfnSegment(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnSegmentProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrArn
The ARN of the segment.For example,
arn:aws:evidently:us-west-2:123456789012:segment/australiaSegment
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getName
A name for the segment. -
setName
A name for the segment. -
getDescription
An optional description for this segment. -
setDescription
An optional description for this segment. -
getPattern
The pattern to use for the segment. -
setPattern
The pattern to use for the segment. -
getTagsRaw
Assigns one or more tags (key-value pairs) to the feature. -
setTagsRaw
Assigns one or more tags (key-value pairs) to the feature.
-