@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:36.165Z") 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 . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnSegment(Construct scope,
java.lang.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 |
---|---|
java.lang.String |
getAttrArn()
The ARN of the segment.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getDescription()
An optional description for this segment.
|
java.lang.String |
getName()
A name for the segment.
|
java.lang.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 java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setDescription(java.lang.String value)
An optional description for this segment.
|
void |
setName(java.lang.String value)
A name for the segment.
|
void |
setPattern(java.lang.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, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnSegment(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnSegment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnSegment(Construct scope, java.lang.String id, 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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
For example, arn:aws:evidently:us-west-2:123456789012:segment/australiaSegment
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
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 .
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.String getPattern()
For more information about pattern syntax, see Segment rule pattern syntax .
public void setPattern(java.lang.String value)
For more information about pattern syntax, see Segment rule pattern syntax .