CfnSegment

class aws_cdk.aws_pinpoint.CfnSegment(scope, id, *, application_id, name, dimensions=None, segment_groups=None, tags=None)

Bases: CfnResource

A CloudFormation AWS::Pinpoint::Segment.

Updates the configuration, dimension, and other settings for an existing segment.

CloudformationResource:

AWS::Pinpoint::Segment

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-segment.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_pinpoint as pinpoint

# attributes: Any
# metrics: Any
# tags: Any
# user_attributes: Any

cfn_segment = pinpoint.CfnSegment(self, "MyCfnSegment",
    application_id="applicationId",
    name="name",

    # the properties below are optional
    dimensions=pinpoint.CfnSegment.SegmentDimensionsProperty(
        attributes=attributes,
        behavior=pinpoint.CfnSegment.BehaviorProperty(
            recency=pinpoint.CfnSegment.RecencyProperty(
                duration="duration",
                recency_type="recencyType"
            )
        ),
        demographic=pinpoint.CfnSegment.DemographicProperty(
            app_version=pinpoint.CfnSegment.SetDimensionProperty(
                dimension_type="dimensionType",
                values=["values"]
            ),
            channel=pinpoint.CfnSegment.SetDimensionProperty(
                dimension_type="dimensionType",
                values=["values"]
            ),
            device_type=pinpoint.CfnSegment.SetDimensionProperty(
                dimension_type="dimensionType",
                values=["values"]
            ),
            make=pinpoint.CfnSegment.SetDimensionProperty(
                dimension_type="dimensionType",
                values=["values"]
            ),
            model=pinpoint.CfnSegment.SetDimensionProperty(
                dimension_type="dimensionType",
                values=["values"]
            ),
            platform=pinpoint.CfnSegment.SetDimensionProperty(
                dimension_type="dimensionType",
                values=["values"]
            )
        ),
        location=pinpoint.CfnSegment.LocationProperty(
            country=pinpoint.CfnSegment.SetDimensionProperty(
                dimension_type="dimensionType",
                values=["values"]
            ),
            gps_point=pinpoint.CfnSegment.GPSPointProperty(
                coordinates=pinpoint.CfnSegment.CoordinatesProperty(
                    latitude=123,
                    longitude=123
                ),
                range_in_kilometers=123
            )
        ),
        metrics=metrics,
        user_attributes=user_attributes
    ),
    segment_groups=pinpoint.CfnSegment.SegmentGroupsProperty(
        groups=[pinpoint.CfnSegment.GroupsProperty(
            dimensions=[pinpoint.CfnSegment.SegmentDimensionsProperty(
                attributes=attributes,
                behavior=pinpoint.CfnSegment.BehaviorProperty(
                    recency=pinpoint.CfnSegment.RecencyProperty(
                        duration="duration",
                        recency_type="recencyType"
                    )
                ),
                demographic=pinpoint.CfnSegment.DemographicProperty(
                    app_version=pinpoint.CfnSegment.SetDimensionProperty(
                        dimension_type="dimensionType",
                        values=["values"]
                    ),
                    channel=pinpoint.CfnSegment.SetDimensionProperty(
                        dimension_type="dimensionType",
                        values=["values"]
                    ),
                    device_type=pinpoint.CfnSegment.SetDimensionProperty(
                        dimension_type="dimensionType",
                        values=["values"]
                    ),
                    make=pinpoint.CfnSegment.SetDimensionProperty(
                        dimension_type="dimensionType",
                        values=["values"]
                    ),
                    model=pinpoint.CfnSegment.SetDimensionProperty(
                        dimension_type="dimensionType",
                        values=["values"]
                    ),
                    platform=pinpoint.CfnSegment.SetDimensionProperty(
                        dimension_type="dimensionType",
                        values=["values"]
                    )
                ),
                location=pinpoint.CfnSegment.LocationProperty(
                    country=pinpoint.CfnSegment.SetDimensionProperty(
                        dimension_type="dimensionType",
                        values=["values"]
                    ),
                    gps_point=pinpoint.CfnSegment.GPSPointProperty(
                        coordinates=pinpoint.CfnSegment.CoordinatesProperty(
                            latitude=123,
                            longitude=123
                        ),
                        range_in_kilometers=123
                    )
                ),
                metrics=metrics,
                user_attributes=user_attributes
            )],
            source_segments=[pinpoint.CfnSegment.SourceSegmentsProperty(
                id="id",

                # the properties below are optional
                version=123
            )],
            source_type="sourceType",
            type="type"
        )],
        include="include"
    ),
    tags=tags
)

Create a new AWS::Pinpoint::Segment.

Parameters:
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • application_id (str) – The unique identifier for the Amazon Pinpoint application that the segment is associated with.

  • name (str) – The name of the segment. .. epigraph:: A segment must have a name otherwise it will not appear in the Amazon Pinpoint console.

  • dimensions (Union[IResolvable, SegmentDimensionsProperty, Dict[str, Any], None]) – The criteria that define the dimensions for the segment.

  • segment_groups (Union[IResolvable, SegmentGroupsProperty, Dict[str, Any], None]) – 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.

  • tags (Optional[Any]) – An array of key-value pairs to apply to this resource. For more information, see Tag .

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_depends_on(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

Return type:

None

get_att(attribute_name)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:

attribute_name (str) – The name of the attribute.

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type:

None

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::Pinpoint::Segment'
application_id

The unique identifier for the Amazon Pinpoint application that the segment is associated with.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-segment.html#cfn-pinpoint-segment-applicationid

attr_arn

The Amazon Resource Name (ARN) of the segment.

CloudformationAttribute:

Arn

attr_segment_id

The unique identifier for the segment.

CloudformationAttribute:

SegmentId

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

dimensions

The criteria that define the dimensions for the segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-segment.html#cfn-pinpoint-segment-dimensions

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

name

The name of the segment.

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

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-segment.html#cfn-pinpoint-segment-name

node

The construct tree node associated with this construct.

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

segment_groups

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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-segment.html#cfn-pinpoint-segment-segmentgroups

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

tags

An array of key-value pairs to apply to this resource.

For more information, see Tag .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-segment.html#cfn-pinpoint-segment-tags

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters:

construct (IConstruct) –

Return type:

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters:

x (Any) –

Return type:

bool

AttributeDimensionProperty

class CfnSegment.AttributeDimensionProperty(*, attribute_type=None, values=None)

Bases: object

Specifies attribute-based criteria for including or excluding endpoints from a segment.

Parameters:
  • attribute_type (Optional[str]) – The type of segment dimension to use. Valid values are:. - INCLUSIVE – endpoints that have attributes matching the values are included in the segment. - EXCLUSIVE – endpoints that have attributes matching the values are excluded from the segment. - CONTAINS – endpoints that have attributes’ substrings match the values are included in the segment. - BEFORE – endpoints with attributes read as ISO_INSTANT datetimes before the value are included in the segment. - AFTER – endpoints with attributes read as ISO_INSTANT datetimes after the value are included in the segment. - BETWEEN – endpoints with attributes read as ISO_INSTANT datetimes between the values are included in the segment. - ON – endpoints with attributes read as ISO_INSTANT dates on the value are included in the segment. Time is ignored in this comparison.

  • values (Optional[Sequence[str]]) – The criteria values to use for the segment dimension. Depending on the value of the AttributeType property, endpoints are included or excluded from the segment if their attribute values match the criteria values.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-attributedimension.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_pinpoint as pinpoint

attribute_dimension_property = pinpoint.CfnSegment.AttributeDimensionProperty(
    attribute_type="attributeType",
    values=["values"]
)

Attributes

attribute_type

.

  • INCLUSIVE – endpoints that have attributes matching the values are included in the segment.

  • EXCLUSIVE – endpoints that have attributes matching the values are excluded from the segment.

  • CONTAINS – endpoints that have attributes’ substrings match the values are included in the segment.

  • BEFORE – endpoints with attributes read as ISO_INSTANT datetimes before the value are included in the segment.

  • AFTER – endpoints with attributes read as ISO_INSTANT datetimes after the value are included in the segment.

  • BETWEEN – endpoints with attributes read as ISO_INSTANT datetimes between the values are included in the segment.

  • ON – endpoints with attributes read as ISO_INSTANT dates on the value are included in the segment. Time is ignored in this comparison.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-attributedimension.html#cfn-pinpoint-segment-attributedimension-attributetype

Type:

The type of segment dimension to use. Valid values are

values

The criteria values to use for the segment dimension.

Depending on the value of the AttributeType property, endpoints are included or excluded from the segment if their attribute values match the criteria values.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-attributedimension.html#cfn-pinpoint-segment-attributedimension-values

BehaviorProperty

class CfnSegment.BehaviorProperty(*, recency=None)

Bases: object

Specifies behavior-based criteria for the segment, such as how recently users have used your app.

Parameters:

recency (Union[IResolvable, RecencyProperty, Dict[str, Any], None]) – Specifies how recently segment members were active.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-behavior.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_pinpoint as pinpoint

behavior_property = pinpoint.CfnSegment.BehaviorProperty(
    recency=pinpoint.CfnSegment.RecencyProperty(
        duration="duration",
        recency_type="recencyType"
    )
)

Attributes

recency

Specifies how recently segment members were active.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-behavior.html#cfn-pinpoint-segment-segmentdimensions-behavior-recency

CoordinatesProperty

class CfnSegment.CoordinatesProperty(*, latitude, longitude)

Bases: object

Specifies the GPS coordinates of a location.

Parameters:
  • latitude (Union[int, float]) – The latitude coordinate of the location.

  • longitude (Union[int, float]) – The longitude coordinate of the location.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-location-gpspoint-coordinates.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_pinpoint as pinpoint

coordinates_property = pinpoint.CfnSegment.CoordinatesProperty(
    latitude=123,
    longitude=123
)

Attributes

latitude

The latitude coordinate of the location.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-location-gpspoint-coordinates.html#cfn-pinpoint-segment-segmentdimensions-location-gpspoint-coordinates-latitude

longitude

The longitude coordinate of the location.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-location-gpspoint-coordinates.html#cfn-pinpoint-segment-segmentdimensions-location-gpspoint-coordinates-longitude

DemographicProperty

class CfnSegment.DemographicProperty(*, app_version=None, channel=None, device_type=None, make=None, model=None, platform=None)

Bases: object

Specifies demographic-based criteria, such as device platform, for the segment.

Parameters:
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-demographic.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_pinpoint as pinpoint

demographic_property = pinpoint.CfnSegment.DemographicProperty(
    app_version=pinpoint.CfnSegment.SetDimensionProperty(
        dimension_type="dimensionType",
        values=["values"]
    ),
    channel=pinpoint.CfnSegment.SetDimensionProperty(
        dimension_type="dimensionType",
        values=["values"]
    ),
    device_type=pinpoint.CfnSegment.SetDimensionProperty(
        dimension_type="dimensionType",
        values=["values"]
    ),
    make=pinpoint.CfnSegment.SetDimensionProperty(
        dimension_type="dimensionType",
        values=["values"]
    ),
    model=pinpoint.CfnSegment.SetDimensionProperty(
        dimension_type="dimensionType",
        values=["values"]
    ),
    platform=pinpoint.CfnSegment.SetDimensionProperty(
        dimension_type="dimensionType",
        values=["values"]
    )
)

Attributes

app_version

The app version criteria for the segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-demographic.html#cfn-pinpoint-segment-segmentdimensions-demographic-appversion

channel

The channel criteria for the segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-demographic.html#cfn-pinpoint-segment-segmentdimensions-demographic-channel

device_type

The device type criteria for the segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-demographic.html#cfn-pinpoint-segment-segmentdimensions-demographic-devicetype

make

The device make criteria for the segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-demographic.html#cfn-pinpoint-segment-segmentdimensions-demographic-make

model

The device model criteria for the segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-demographic.html#cfn-pinpoint-segment-segmentdimensions-demographic-model

platform

The device platform criteria for the segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-demographic.html#cfn-pinpoint-segment-segmentdimensions-demographic-platform

GPSPointProperty

class CfnSegment.GPSPointProperty(*, coordinates, range_in_kilometers)

Bases: object

Specifies the GPS coordinates of the endpoint location.

Parameters:
  • coordinates (Union[IResolvable, CoordinatesProperty, Dict[str, Any]]) – The GPS coordinates to measure distance from.

  • range_in_kilometers (Union[int, float]) – The range, in kilometers, from the GPS coordinates.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-location-gpspoint.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_pinpoint as pinpoint

g_pSPoint_property = pinpoint.CfnSegment.GPSPointProperty(
    coordinates=pinpoint.CfnSegment.CoordinatesProperty(
        latitude=123,
        longitude=123
    ),
    range_in_kilometers=123
)

Attributes

coordinates

The GPS coordinates to measure distance from.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-location-gpspoint.html#cfn-pinpoint-segment-segmentdimensions-location-gpspoint-coordinates

range_in_kilometers

The range, in kilometers, from the GPS coordinates.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-location-gpspoint.html#cfn-pinpoint-segment-segmentdimensions-location-gpspoint-rangeinkilometers

GroupsProperty

class CfnSegment.GroupsProperty(*, dimensions=None, source_segments=None, source_type=None, type=None)

Bases: object

An array that defines the set of segment criteria to evaluate when handling segment groups for the segment.

Parameters:
  • dimensions (Union[IResolvable, Sequence[Union[IResolvable, SegmentDimensionsProperty, Dict[str, Any]]], None]) – An array that defines the dimensions to include or exclude from the segment.

  • source_segments (Union[IResolvable, Sequence[Union[IResolvable, SourceSegmentsProperty, Dict[str, Any]]], None]) – The base segment to build the segment on. A base segment, also called a source segment , defines the initial population of endpoints for a segment. When you add dimensions to the segment, Amazon Pinpoint filters the base segment by using the dimensions that you specify. You can specify more than one dimensional segment or only one imported segment. If you specify an imported segment, the segment size estimate that displays on the Amazon Pinpoint console indicates the size of the imported segment without any filters applied to it.

  • source_type (Optional[str]) – Specifies how to handle multiple base segments for the segment. For example, if you specify three base segments for the segment, whether the resulting segment is based on all, any, or none of the base segments.

  • type (Optional[str]) – Specifies how to handle multiple dimensions for the segment. For example, if you specify three dimensions for the segment, whether the resulting segment includes endpoints that match all, any, or none of the dimensions.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups-groups.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_pinpoint as pinpoint

# attributes: Any
# metrics: Any
# user_attributes: Any

groups_property = pinpoint.CfnSegment.GroupsProperty(
    dimensions=[pinpoint.CfnSegment.SegmentDimensionsProperty(
        attributes=attributes,
        behavior=pinpoint.CfnSegment.BehaviorProperty(
            recency=pinpoint.CfnSegment.RecencyProperty(
                duration="duration",
                recency_type="recencyType"
            )
        ),
        demographic=pinpoint.CfnSegment.DemographicProperty(
            app_version=pinpoint.CfnSegment.SetDimensionProperty(
                dimension_type="dimensionType",
                values=["values"]
            ),
            channel=pinpoint.CfnSegment.SetDimensionProperty(
                dimension_type="dimensionType",
                values=["values"]
            ),
            device_type=pinpoint.CfnSegment.SetDimensionProperty(
                dimension_type="dimensionType",
                values=["values"]
            ),
            make=pinpoint.CfnSegment.SetDimensionProperty(
                dimension_type="dimensionType",
                values=["values"]
            ),
            model=pinpoint.CfnSegment.SetDimensionProperty(
                dimension_type="dimensionType",
                values=["values"]
            ),
            platform=pinpoint.CfnSegment.SetDimensionProperty(
                dimension_type="dimensionType",
                values=["values"]
            )
        ),
        location=pinpoint.CfnSegment.LocationProperty(
            country=pinpoint.CfnSegment.SetDimensionProperty(
                dimension_type="dimensionType",
                values=["values"]
            ),
            gps_point=pinpoint.CfnSegment.GPSPointProperty(
                coordinates=pinpoint.CfnSegment.CoordinatesProperty(
                    latitude=123,
                    longitude=123
                ),
                range_in_kilometers=123
            )
        ),
        metrics=metrics,
        user_attributes=user_attributes
    )],
    source_segments=[pinpoint.CfnSegment.SourceSegmentsProperty(
        id="id",

        # the properties below are optional
        version=123
    )],
    source_type="sourceType",
    type="type"
)

Attributes

dimensions

An array that defines the dimensions to include or exclude from the segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups-groups.html#cfn-pinpoint-segment-segmentgroups-groups-dimensions

source_segments

The base segment to build the segment on.

A base segment, also called a source segment , defines the initial population of endpoints for a segment. When you add dimensions to the segment, Amazon Pinpoint filters the base segment by using the dimensions that you specify.

You can specify more than one dimensional segment or only one imported segment. If you specify an imported segment, the segment size estimate that displays on the Amazon Pinpoint console indicates the size of the imported segment without any filters applied to it.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups-groups.html#cfn-pinpoint-segment-segmentgroups-groups-sourcesegments

source_type

Specifies how to handle multiple base segments for the segment.

For example, if you specify three base segments for the segment, whether the resulting segment is based on all, any, or none of the base segments.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups-groups.html#cfn-pinpoint-segment-segmentgroups-groups-sourcetype

type

Specifies how to handle multiple dimensions for the segment.

For example, if you specify three dimensions for the segment, whether the resulting segment includes endpoints that match all, any, or none of the dimensions.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups-groups.html#cfn-pinpoint-segment-segmentgroups-groups-type

LocationProperty

class CfnSegment.LocationProperty(*, country=None, gps_point=None)

Bases: object

Specifies location-based criteria, such as region or GPS coordinates, for the segment.

Parameters:
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-location.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_pinpoint as pinpoint

location_property = pinpoint.CfnSegment.LocationProperty(
    country=pinpoint.CfnSegment.SetDimensionProperty(
        dimension_type="dimensionType",
        values=["values"]
    ),
    gps_point=pinpoint.CfnSegment.GPSPointProperty(
        coordinates=pinpoint.CfnSegment.CoordinatesProperty(
            latitude=123,
            longitude=123
        ),
        range_in_kilometers=123
    )
)

Attributes

country

The country or region code, in ISO 3166-1 alpha-2 format, for the segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-location.html#cfn-pinpoint-segment-segmentdimensions-location-country

gps_point

The GPS point dimension for the segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-location.html#cfn-pinpoint-segment-segmentdimensions-location-gpspoint

RecencyProperty

class CfnSegment.RecencyProperty(*, duration, recency_type)

Bases: object

Specifies how recently segment members were active.

Parameters:
  • duration (str) – The duration to use when determining which users have been active or inactive with your app. Possible values: HR_24 | DAY_7 | DAY_14 | DAY_30 .

  • recency_type (str) – The type of recency dimension to use for the segment. Valid values are: ACTIVE and INACTIVE . If the value is ACTIVE , the segment includes users who have used your app within the specified duration are included in the segment. If the value is INACTIVE , the segment includes users who haven’t used your app within the specified duration are included in the segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-behavior-recency.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_pinpoint as pinpoint

recency_property = pinpoint.CfnSegment.RecencyProperty(
    duration="duration",
    recency_type="recencyType"
)

Attributes

duration

The duration to use when determining which users have been active or inactive with your app.

Possible values: HR_24 | DAY_7 | DAY_14 | DAY_30 .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-behavior-recency.html#cfn-pinpoint-segment-segmentdimensions-behavior-recency-duration

recency_type

The type of recency dimension to use for the segment.

Valid values are: ACTIVE and INACTIVE . If the value is ACTIVE , the segment includes users who have used your app within the specified duration are included in the segment. If the value is INACTIVE , the segment includes users who haven’t used your app within the specified duration are included in the segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-behavior-recency.html#cfn-pinpoint-segment-segmentdimensions-behavior-recency-recencytype

SegmentDimensionsProperty

class CfnSegment.SegmentDimensionsProperty(*, attributes=None, behavior=None, demographic=None, location=None, metrics=None, user_attributes=None)

Bases: object

Specifies the dimension settings for a segment.

Parameters:
  • attributes (Optional[Any]) – One or more custom attributes to use as criteria for the segment.

  • behavior (Union[IResolvable, BehaviorProperty, Dict[str, Any], None]) – The behavior-based criteria, such as how recently users have used your app, for the segment.

  • demographic (Union[IResolvable, DemographicProperty, Dict[str, Any], None]) – The demographic-based criteria, such as device platform, for the segment.

  • location (Union[IResolvable, LocationProperty, Dict[str, Any], None]) – The location-based criteria, such as region or GPS coordinates, for the segment.

  • metrics (Optional[Any]) – One or more custom metrics to use as criteria for the segment.

  • user_attributes (Optional[Any]) – One or more custom user attributes to use as criteria for the segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_pinpoint as pinpoint

# attributes: Any
# metrics: Any
# user_attributes: Any

segment_dimensions_property = pinpoint.CfnSegment.SegmentDimensionsProperty(
    attributes=attributes,
    behavior=pinpoint.CfnSegment.BehaviorProperty(
        recency=pinpoint.CfnSegment.RecencyProperty(
            duration="duration",
            recency_type="recencyType"
        )
    ),
    demographic=pinpoint.CfnSegment.DemographicProperty(
        app_version=pinpoint.CfnSegment.SetDimensionProperty(
            dimension_type="dimensionType",
            values=["values"]
        ),
        channel=pinpoint.CfnSegment.SetDimensionProperty(
            dimension_type="dimensionType",
            values=["values"]
        ),
        device_type=pinpoint.CfnSegment.SetDimensionProperty(
            dimension_type="dimensionType",
            values=["values"]
        ),
        make=pinpoint.CfnSegment.SetDimensionProperty(
            dimension_type="dimensionType",
            values=["values"]
        ),
        model=pinpoint.CfnSegment.SetDimensionProperty(
            dimension_type="dimensionType",
            values=["values"]
        ),
        platform=pinpoint.CfnSegment.SetDimensionProperty(
            dimension_type="dimensionType",
            values=["values"]
        )
    ),
    location=pinpoint.CfnSegment.LocationProperty(
        country=pinpoint.CfnSegment.SetDimensionProperty(
            dimension_type="dimensionType",
            values=["values"]
        ),
        gps_point=pinpoint.CfnSegment.GPSPointProperty(
            coordinates=pinpoint.CfnSegment.CoordinatesProperty(
                latitude=123,
                longitude=123
            ),
            range_in_kilometers=123
        )
    ),
    metrics=metrics,
    user_attributes=user_attributes
)

Attributes

attributes

One or more custom attributes to use as criteria for the segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions.html#cfn-pinpoint-segment-segmentdimensions-attributes

behavior

The behavior-based criteria, such as how recently users have used your app, for the segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions.html#cfn-pinpoint-segment-segmentdimensions-behavior

demographic

The demographic-based criteria, such as device platform, for the segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions.html#cfn-pinpoint-segment-segmentdimensions-demographic

location

The location-based criteria, such as region or GPS coordinates, for the segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions.html#cfn-pinpoint-segment-segmentdimensions-location

metrics

One or more custom metrics to use as criteria for the segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions.html#cfn-pinpoint-segment-segmentdimensions-metrics

user_attributes

One or more custom user attributes to use as criteria for the segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions.html#cfn-pinpoint-segment-segmentdimensions-userattributes

SegmentGroupsProperty

class CfnSegment.SegmentGroupsProperty(*, groups=None, include=None)

Bases: object

Specifies the set of segment criteria to evaluate when handling segment groups for the segment.

Parameters:
  • groups (Union[IResolvable, Sequence[Union[IResolvable, GroupsProperty, Dict[str, Any]]], None]) – Specifies the set of segment criteria to evaluate when handling segment groups for the segment.

  • include (Optional[str]) – Specifies how to handle multiple segment groups for the segment. For example, if the segment includes three segment groups, whether the resulting segment includes endpoints that match all, any, or none of the segment groups.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_pinpoint as pinpoint

# attributes: Any
# metrics: Any
# user_attributes: Any

segment_groups_property = pinpoint.CfnSegment.SegmentGroupsProperty(
    groups=[pinpoint.CfnSegment.GroupsProperty(
        dimensions=[pinpoint.CfnSegment.SegmentDimensionsProperty(
            attributes=attributes,
            behavior=pinpoint.CfnSegment.BehaviorProperty(
                recency=pinpoint.CfnSegment.RecencyProperty(
                    duration="duration",
                    recency_type="recencyType"
                )
            ),
            demographic=pinpoint.CfnSegment.DemographicProperty(
                app_version=pinpoint.CfnSegment.SetDimensionProperty(
                    dimension_type="dimensionType",
                    values=["values"]
                ),
                channel=pinpoint.CfnSegment.SetDimensionProperty(
                    dimension_type="dimensionType",
                    values=["values"]
                ),
                device_type=pinpoint.CfnSegment.SetDimensionProperty(
                    dimension_type="dimensionType",
                    values=["values"]
                ),
                make=pinpoint.CfnSegment.SetDimensionProperty(
                    dimension_type="dimensionType",
                    values=["values"]
                ),
                model=pinpoint.CfnSegment.SetDimensionProperty(
                    dimension_type="dimensionType",
                    values=["values"]
                ),
                platform=pinpoint.CfnSegment.SetDimensionProperty(
                    dimension_type="dimensionType",
                    values=["values"]
                )
            ),
            location=pinpoint.CfnSegment.LocationProperty(
                country=pinpoint.CfnSegment.SetDimensionProperty(
                    dimension_type="dimensionType",
                    values=["values"]
                ),
                gps_point=pinpoint.CfnSegment.GPSPointProperty(
                    coordinates=pinpoint.CfnSegment.CoordinatesProperty(
                        latitude=123,
                        longitude=123
                    ),
                    range_in_kilometers=123
                )
            ),
            metrics=metrics,
            user_attributes=user_attributes
        )],
        source_segments=[pinpoint.CfnSegment.SourceSegmentsProperty(
            id="id",

            # the properties below are optional
            version=123
        )],
        source_type="sourceType",
        type="type"
    )],
    include="include"
)

Attributes

groups

Specifies the set of segment criteria to evaluate when handling segment groups for the segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups.html#cfn-pinpoint-segment-segmentgroups-groups

include

Specifies how to handle multiple segment groups for the segment.

For example, if the segment includes three segment groups, whether the resulting segment includes endpoints that match all, any, or none of the segment groups.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups.html#cfn-pinpoint-segment-segmentgroups-include

SetDimensionProperty

class CfnSegment.SetDimensionProperty(*, dimension_type=None, values=None)

Bases: object

Specifies the dimension type and values for a segment dimension.

Parameters:
  • dimension_type (Optional[str]) – The type of segment dimension to use. Valid values are: INCLUSIVE , endpoints that match the criteria are included in the segment; and, EXCLUSIVE , endpoints that match the criteria are excluded from the segment.

  • values (Optional[Sequence[str]]) – The criteria values to use for the segment dimension. Depending on the value of the DimensionType property, endpoints are included or excluded from the segment if their values match the criteria values.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-setdimension.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_pinpoint as pinpoint

set_dimension_property = pinpoint.CfnSegment.SetDimensionProperty(
    dimension_type="dimensionType",
    values=["values"]
)

Attributes

dimension_type

The type of segment dimension to use.

Valid values are: INCLUSIVE , endpoints that match the criteria are included in the segment; and, EXCLUSIVE , endpoints that match the criteria are excluded from the segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-setdimension.html#cfn-pinpoint-segment-setdimension-dimensiontype

values

The criteria values to use for the segment dimension.

Depending on the value of the DimensionType property, endpoints are included or excluded from the segment if their values match the criteria values.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-setdimension.html#cfn-pinpoint-segment-setdimension-values

SourceSegmentsProperty

class CfnSegment.SourceSegmentsProperty(*, id, version=None)

Bases: object

Specifies the base segment to build the segment on.

A base segment, also called a source segment , defines the initial population of endpoints for a segment. When you add dimensions to the segment, Amazon Pinpoint filters the base segment by using the dimensions that you specify.

You can specify more than one dimensional segment or only one imported segment. If you specify an imported segment, the segment size estimate that displays on the Amazon Pinpoint console indicates the size of the imported segment without any filters applied to it.

Parameters:
  • id (str) – The unique identifier for the source segment.

  • version (Union[int, float, None]) – The version number of the source segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups-groups-sourcesegments.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_pinpoint as pinpoint

source_segments_property = pinpoint.CfnSegment.SourceSegmentsProperty(
    id="id",

    # the properties below are optional
    version=123
)

Attributes

id

The unique identifier for the source segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups-groups-sourcesegments.html#cfn-pinpoint-segment-segmentgroups-groups-sourcesegments-id

version

The version number of the source segment.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups-groups-sourcesegments.html#cfn-pinpoint-segment-segmentgroups-groups-sourcesegments-version