Class CfnSegment
- All Implemented Interfaces:
- IConstruct,- IDependable,- IInspectable,- software.amazon.jsii.JsiiSerializable,- software.constructs.IConstruct
AWS::Evidently::Segment.
 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();
 - 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObjectsoftware.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstructIConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstructsoftware.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectableIInspectable.Jsii$Default, IInspectable.Jsii$Proxy
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionCfnSegment(Construct scope, String id, CfnSegmentProps props) Create a newAWS::Evidently::Segment.protectedCfnSegment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnSegment(software.amazon.jsii.JsiiObjectRef objRef) 
- 
Method SummaryModifier 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()Assigns one or more tags (key-value pairs) to the feature.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetDescription(String value) An optional description for this segment.voidA name for the segment.voidsetPattern(String value) The pattern to use for the segment.Methods inherited from class software.amazon.awscdk.core.CfnResourceaddDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElementgetRefMethods inherited from class software.amazon.awscdk.core.CfnElementgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.ConstructgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObjectjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable$jsii$toJson
- 
Field Details- 
CFN_RESOURCE_TYPE_NAMEThe CloudFormation resource type name for this resource class.
 
- 
- 
Constructor Details- 
CfnSegmentprotected CfnSegment(software.amazon.jsii.JsiiObjectRef objRef) 
- 
CfnSegmentprotected CfnSegment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) 
- 
CfnSegment@Stability(Stable) public CfnSegment(@NotNull Construct scope, @NotNull String id, @NotNull CfnSegmentProps props) Create a newAWS::Evidently::Segment.- Parameters:
- scope-- scope in which this resource is defined.
 
- id-- scoped id of the resource.
 
- props-- resource properties.
 
 
 
- 
- 
Method Details- 
inspectExamines the CloudFormation resource and discloses attributes.- Specified by:
- inspectin interface- IInspectable
- Parameters:
- inspector-- tree inspector to collect and process attributes.
 
 
- 
renderProperties@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
- renderPropertiesin class- CfnResource
- Parameters:
- props- This parameter is required.
 
- 
getAttrArnThe ARN of the segment.For example, arn:aws:evidently:us-west-2:123456789012:segment/australiaSegment
- 
getCfnProperties- Overrides:
- getCfnPropertiesin class- CfnResource
 
- 
getTagsAssigns one or more tags (key-value pairs) to the feature.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 . 
- 
getNameA name for the segment.
- 
setNameA name for the segment.
- 
getDescriptionAn optional description for this segment.
- 
setDescriptionAn optional description for this segment.
- 
getPatternThe pattern to use for the segment.For more information about pattern syntax, see Segment rule pattern syntax . 
- 
setPatternThe pattern to use for the segment.For more information about pattern syntax, see Segment rule pattern syntax . 
 
-