Class CfnSegment

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:00.868Z") @Stability(Stable) public class CfnSegment extends CfnResource implements IInspectable
A CloudFormation AWS::Pinpoint::Segment.

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();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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 Construct scope, @NotNull String id, @NotNull CfnSegmentProps props)
      Create a new AWS::Pinpoint::Segment.

      Parameters:
      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.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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 class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the segment.
    • getAttrSegmentId

      @Stability(Stable) @NotNull public String getAttrSegmentId()
      The unique identifier for the segment.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      An array of key-value pairs to apply to this resource.

      For more information, see Tag .

    • getApplicationId

      @Stability(Stable) @NotNull public String getApplicationId()
      The unique identifier for the Amazon Pinpoint application that the segment is associated with.
    • setApplicationId

      @Stability(Stable) public void setApplicationId(@NotNull String value)
      The unique identifier for the Amazon Pinpoint application that the segment is associated with.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the segment.

      A segment must have a name otherwise it will not appear in the Amazon Pinpoint console.

    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the segment.

      A segment must have a name otherwise it will not appear in the Amazon Pinpoint console.

    • getDimensions

      @Stability(Stable) @Nullable public Object getDimensions()
      The criteria that define the dimensions for the segment.
    • setDimensions

      @Stability(Stable) public void setDimensions(@Nullable IResolvable value)
      The criteria that define the dimensions for the segment.
    • setDimensions

      @Stability(Stable) public void setDimensions(@Nullable CfnSegment.SegmentDimensionsProperty value)
      The criteria that define the dimensions for the segment.
    • getSegmentGroups

      @Stability(Stable) @Nullable public Object getSegmentGroups()
      The segment group to use and the dimensions to apply to the group's base segments in order to build the segment.

      A segment group can consist of zero or more base segments. Your request can include only one segment group.

    • setSegmentGroups

      @Stability(Stable) public void setSegmentGroups(@Nullable IResolvable value)
      The segment group to use and the dimensions to apply to the group's base segments in order to build the segment.

      A segment group can consist of zero or more base segments. Your request can include only one segment group.

    • setSegmentGroups

      @Stability(Stable) public void setSegmentGroups(@Nullable 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.

      A segment group can consist of zero or more base segments. Your request can include only one segment group.