Class CfnSegment

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

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:06.396Z") @Stability(Stable) public class CfnSegment extends CfnResource implements IInspectable, ITaggable
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();
 

See Also:
  • 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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnSegmentProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). 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()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • 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.
    • setName

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

      @Stability(Stable) @Nullable public Object getDimensions()
      An array that defines the dimensions for the segment.
    • setDimensions

      @Stability(Stable) public void setDimensions(@Nullable IResolvable value)
      An array that defines the dimensions for the segment.
    • setDimensions

      @Stability(Stable) public void setDimensions(@Nullable CfnSegment.SegmentDimensionsProperty value)
      An array that defines 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.
    • 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.
    • 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.
    • getTagsRaw

      @Stability(Stable) @Nullable public Object getTagsRaw()
      An array of key-value pairs to apply to this resource.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable Object value)
      An array of key-value pairs to apply to this resource.