@Generated(value="jsii-pacmak/1.71.0 (build f1f58ae)", date="2022-12-07T17:24:34.931Z") @Stability(value=Stable) public class CfnSegment extends CfnResource implements IInspectable
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.
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();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnSegment.Builder
A fluent builder for
CfnSegment. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$ProxyIConstruct.Jsii$Default| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnSegment(Construct scope,
String id,
CfnSegmentProps props)
Create a new `AWS::Evidently::Segment`.
|
protected |
CfnSegment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnSegment(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrArn()
The ARN of the segment.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getDescription()
An optional description for this segment.
|
String |
getName()
A name for the segment.
|
String |
getPattern()
The pattern to use for the segment.
|
TagManager |
getTags()
Assigns one or more tags (key-value pairs) to the feature.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setDescription(String value)
An optional description for this segment.
|
void |
setName(String value)
A name for the segment.
|
void |
setPattern(String value)
The pattern to use for the segment.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnSegment(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnSegment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnSegment(@NotNull
Construct scope,
@NotNull
String id,
@NotNull
CfnSegmentProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
For example, arn:aws:evidently:us-west-2:123456789012:segment/australiaSegment
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
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 AWS and are interpreted strictly as strings of characters.
You can associate as many as 50 tags with a feature.
For more information, see Tagging AWS resources .
@Stability(value=Stable) @NotNull public String getName()
@Stability(value=Stable)
public void setName(@NotNull
String value)
@Stability(value=Stable) @Nullable public String getDescription()
@Stability(value=Stable)
public void setDescription(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getPattern()
For more information about pattern syntax, see Segment rule pattern syntax .
@Stability(value=Stable)
public void setPattern(@Nullable
String value)
For more information about pattern syntax, see Segment rule pattern syntax .
Copyright © 2022. All rights reserved.