@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:39.252Z") public class CfnSegment extends CfnResource implements IInspectable
Updates the configuration, dimension, and other settings for an existing segment.
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.pinpoint.*; Object attributes; Object metrics; Object tags; Object userAttributes; CfnSegment cfnSegment = CfnSegment.Builder.create(this, "MyCfnSegment") .applicationId("applicationId") .name("name") // the properties below are optional .dimensions(SegmentDimensionsProperty.builder() .attributes(attributes) .behavior(BehaviorProperty.builder() .recency(RecencyProperty.builder() .duration("duration") .recencyType("recencyType") .build()) .build()) .demographic(DemographicProperty.builder() .appVersion(SetDimensionProperty.builder() .dimensionType("dimensionType") .values(List.of("values")) .build()) .channel(SetDimensionProperty.builder() .dimensionType("dimensionType") .values(List.of("values")) .build()) .deviceType(SetDimensionProperty.builder() .dimensionType("dimensionType") .values(List.of("values")) .build()) .make(SetDimensionProperty.builder() .dimensionType("dimensionType") .values(List.of("values")) .build()) .model(SetDimensionProperty.builder() .dimensionType("dimensionType") .values(List.of("values")) .build()) .platform(SetDimensionProperty.builder() .dimensionType("dimensionType") .values(List.of("values")) .build()) .build()) .location(LocationProperty.builder() .country(SetDimensionProperty.builder() .dimensionType("dimensionType") .values(List.of("values")) .build()) .gpsPoint(GPSPointProperty.builder() .coordinates(CoordinatesProperty.builder() .latitude(123) .longitude(123) .build()) .rangeInKilometers(123) .build()) .build()) .metrics(metrics) .userAttributes(userAttributes) .build()) .segmentGroups(SegmentGroupsProperty.builder() .groups(List.of(GroupsProperty.builder() .dimensions(List.of(SegmentDimensionsProperty.builder() .attributes(attributes) .behavior(BehaviorProperty.builder() .recency(RecencyProperty.builder() .duration("duration") .recencyType("recencyType") .build()) .build()) .demographic(DemographicProperty.builder() .appVersion(SetDimensionProperty.builder() .dimensionType("dimensionType") .values(List.of("values")) .build()) .channel(SetDimensionProperty.builder() .dimensionType("dimensionType") .values(List.of("values")) .build()) .deviceType(SetDimensionProperty.builder() .dimensionType("dimensionType") .values(List.of("values")) .build()) .make(SetDimensionProperty.builder() .dimensionType("dimensionType") .values(List.of("values")) .build()) .model(SetDimensionProperty.builder() .dimensionType("dimensionType") .values(List.of("values")) .build()) .platform(SetDimensionProperty.builder() .dimensionType("dimensionType") .values(List.of("values")) .build()) .build()) .location(LocationProperty.builder() .country(SetDimensionProperty.builder() .dimensionType("dimensionType") .values(List.of("values")) .build()) .gpsPoint(GPSPointProperty.builder() .coordinates(CoordinatesProperty.builder() .latitude(123) .longitude(123) .build()) .rangeInKilometers(123) .build()) .build()) .metrics(metrics) .userAttributes(userAttributes) .build())) .sourceSegments(List.of(SourceSegmentsProperty.builder() .id("id") // the properties below are optional .version(123) .build())) .sourceType("sourceType") .type("type") .build())) .include("include") .build()) .tags(tags) .build();
Modifier and Type | Class and Description |
---|---|
static interface |
CfnSegment.AttributeDimensionProperty
Specifies attribute-based criteria for including or excluding endpoints from a segment.
|
static interface |
CfnSegment.BehaviorProperty
Specifies behavior-based criteria for the segment, such as how recently users have used your app.
|
static class |
CfnSegment.Builder
A fluent builder for
CfnSegment . |
static interface |
CfnSegment.CoordinatesProperty
Specifies the GPS coordinates of a location.
|
static interface |
CfnSegment.DemographicProperty
Specifies demographic-based criteria, such as device platform, for the segment.
|
static interface |
CfnSegment.GPSPointProperty
Specifies the GPS coordinates of the endpoint location.
|
static interface |
CfnSegment.GroupsProperty
An array that defines the set of segment criteria to evaluate when handling segment groups for the segment.
|
static interface |
CfnSegment.LocationProperty
Specifies location-based criteria, such as region or GPS coordinates, for the segment.
|
static interface |
CfnSegment.RecencyProperty
Specifies how recently segment members were active.
|
static interface |
CfnSegment.SegmentDimensionsProperty
Specifies the dimension settings for a segment.
|
static interface |
CfnSegment.SegmentGroupsProperty
Specifies the set of segment criteria to evaluate when handling segment groups for the segment.
|
static interface |
CfnSegment.SetDimensionProperty
Specifies the dimension type and values for a segment dimension.
|
static interface |
CfnSegment.SourceSegmentsProperty
Specifies the base segment to build the segment on.
|
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::Pinpoint::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 |
getApplicationId()
The unique identifier for the Amazon Pinpoint application that the segment is associated with.
|
java.lang.String |
getAttrArn()
The Amazon Resource Name (ARN) of the segment.
|
java.lang.String |
getAttrSegmentId()
The unique identifier for the segment.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getDimensions()
The criteria that define the dimensions for the segment.
|
java.lang.String |
getName()
The name of the segment.
|
java.lang.Object |
getSegmentGroups()
The segment group to use and the dimensions to apply to the group's base segments in order to build the segment.
|
TagManager |
getTags()
An array of key-value pairs to apply to this resource.
|
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 |
setApplicationId(java.lang.String value)
The unique identifier for the Amazon Pinpoint application that the segment is associated with.
|
void |
setDimensions(CfnSegment.SegmentDimensionsProperty value)
The criteria that define the dimensions for the segment.
|
void |
setDimensions(IResolvable value)
The criteria that define the dimensions for the segment.
|
void |
setName(java.lang.String value)
The name of the segment.
|
void |
setSegmentGroups(CfnSegment.SegmentGroupsProperty value)
The segment group to use and the dimensions to apply to the group's base segments in order to build the segment.
|
void |
setSegmentGroups(IResolvable value)
The segment group to use and the dimensions to apply to the group's base segments in order to build 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()
public java.lang.String getAttrSegmentId()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
For more information, see Tag .
public java.lang.String getApplicationId()
public void setApplicationId(java.lang.String value)
public java.lang.String getName()
A segment must have a name otherwise it will not appear in the Amazon Pinpoint console.
public void setName(java.lang.String value)
A segment must have a name otherwise it will not appear in the Amazon Pinpoint console.
public java.lang.Object getDimensions()
public void setDimensions(IResolvable value)
public void setDimensions(CfnSegment.SegmentDimensionsProperty value)
public java.lang.Object getSegmentGroups()
A segment group can consist of zero or more base segments. Your request can include only one segment group.
public void setSegmentGroups(IResolvable value)
A segment group can consist of zero or more base segments. Your request can include only one segment group.
public void setSegmentGroups(CfnSegment.SegmentGroupsProperty value)
A segment group can consist of zero or more base segments. Your request can include only one segment group.