CfnSegment
- class aws_cdk.aws_pinpoint.CfnSegment(scope, id, *, application_id, name, dimensions=None, segment_groups=None, tags=None)
Bases:
CfnResource
Updates the configuration, dimension, and other settings for an existing segment.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-segment.html
- CloudformationResource:
AWS::Pinpoint::Segment
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import 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 )
- Parameters:
scope (
Construct
) – Scope in which this resource is defined.id (
str
) – Construct identifier for this resource (unique in its scope).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
]) – An array that defines 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 (
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_dependency(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_depends_on(target)
(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
- Parameters:
target (
CfnResource
) –- Deprecated:
use addDependency
- Stability:
deprecated
- 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 prefixpath
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 toaddOverride
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 intermediate 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
). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT
). A list of resources that support this policy can be found in the following link:- Parameters:
policy (
Optional
[RemovalPolicy
]) –apply_to_update_replace_policy (
Optional
[bool
]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: truedefault (
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 resource, please consult that specific resource’s documentation.
- See:
- Return type:
None
- get_att(attribute_name, type_hint=None)
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.type_hint (
Optional
[ResolutionTypeHint
]) –
- Return type:
- 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
- obtain_dependencies()
Retrieves an array of resources this resource depends on.
This assembles dependencies on resources across stacks (including nested stacks) automatically.
- Return type:
List
[Union
[Stack
,CfnResource
]]
- obtain_resource_dependencies()
Get a shallow copy of dependencies between this resource and other resources in the same stack.
- Return type:
List
[CfnResource
]
- 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
- remove_dependency(target)
Indicates that this resource no longer depends on another resource.
This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
- Parameters:
target (
CfnResource
) –- Return type:
None
- replace_dependency(target, new_target)
Replaces one dependency with another.
- Parameters:
target (
CfnResource
) – The dependency to replace.new_target (
CfnResource
) – The new dependency to add.
- 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.
- 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
An array that defines the dimensions for the segment.
- 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.
- node
The tree node.
- 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.
- stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
- tags
Tag Manager which manages the tags for this resource.
- tags_raw
An array of key-value pairs to apply to this resource.
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(x)
Check whether the given object is a CfnResource.
- Parameters:
x (
Any
) –- Return type:
bool
- classmethod is_construct(x)
Checks if
x
is a construct.Use this method instead of
instanceof
to properly detectConstruct
instances, even when the construct library is symlinked.Explanation: in JavaScript, multiple copies of the
constructs
library on disk are seen as independent, completely different libraries. As a consequence, the classConstruct
in each copy of theconstructs
library is seen as a different class, and an instance of one class will not test asinstanceof
the other class.npm install
will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of theconstructs
library can be accidentally installed, andinstanceof
will behave unpredictably. It is safest to avoid usinginstanceof
, and using this type-testing method instead.- Parameters:
x (
Any
) – Any object.- Return type:
bool
- Returns:
true if
x
is an object created from a class which extendsConstruct
.
AttributeDimensionProperty
- class CfnSegment.AttributeDimensionProperty(*, attribute_type=None, values=None)
Bases:
object
- Parameters:
attribute_type (
Optional
[str
]) –values (
Optional
[Sequence
[str
]]) –
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_pinpoint as pinpoint attribute_dimension_property = pinpoint.CfnSegment.AttributeDimensionProperty( attribute_type="attributeType", values=["values"] )
Attributes
- attribute_type
-
- Type:
see
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.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import 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.
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.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_pinpoint as pinpoint coordinates_property = pinpoint.CfnSegment.CoordinatesProperty( latitude=123, longitude=123 )
Attributes
- latitude
The latitude coordinate of the location.
- longitude
The longitude coordinate of the location.
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:
app_version (
Union
[IResolvable
,SetDimensionProperty
,Dict
[str
,Any
],None
]) – The app version criteria for the segment.channel (
Union
[IResolvable
,SetDimensionProperty
,Dict
[str
,Any
],None
]) – The channel criteria for the segment.device_type (
Union
[IResolvable
,SetDimensionProperty
,Dict
[str
,Any
],None
]) – The device type criteria for the segment.make (
Union
[IResolvable
,SetDimensionProperty
,Dict
[str
,Any
],None
]) – The device make criteria for the segment.model (
Union
[IResolvable
,SetDimensionProperty
,Dict
[str
,Any
],None
]) – The device model criteria for the segment.platform (
Union
[IResolvable
,SetDimensionProperty
,Dict
[str
,Any
],None
]) – The device platform criteria for the segment.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import 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.
- channel
The channel criteria for the segment.
- device_type
The device type criteria for the segment.
- make
The device make criteria for the segment.
- model
The device model criteria for the segment.
- platform
The device platform criteria for the segment.
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.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import 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.
- range_in_kilometers
The range, in kilometers, from the GPS coordinates.
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.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import 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.
- 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.
- 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.
- 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.
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:
country (
Union
[IResolvable
,SetDimensionProperty
,Dict
[str
,Any
],None
]) – The country or region code, in ISO 3166-1 alpha-2 format, for the segment.gps_point (
Union
[IResolvable
,GPSPointProperty
,Dict
[str
,Any
],None
]) – The GPS point dimension for the segment.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import 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.
- gps_point
The GPS point dimension for the segment.
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
andINACTIVE
. If the value isACTIVE
, the segment includes users who have used your app within the specified duration are included in the segment. If the value isINACTIVE
, the segment includes users who haven’t used your app within the specified duration are included in the segment.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import 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
.
- recency_type
The type of recency dimension to use for the segment.
Valid values are:
ACTIVE
andINACTIVE
. If the value isACTIVE
, the segment includes users who have used your app within the specified duration are included in the segment. If the value isINACTIVE
, the segment includes users who haven’t used your app within the specified duration are included in the segment.
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 (
Any
) – One or more custom attributes to use as criteria for the segment. For more information see AttributeDimensionbehavior (
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 (
Any
) – One or more custom metrics to use as criteria for the segment.user_attributes (
Any
) – One or more custom user attributes to use as criteria for the segment.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import 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.
For more information see AttributeDimension
- behavior
The behavior-based criteria, such as how recently users have used your app, for the segment.
- demographic
The demographic-based criteria, such as device platform, for the segment.
- location
The location-based criteria, such as region or GPS coordinates, for the segment.
- metrics
One or more custom metrics to use as criteria for the segment.
- user_attributes
One or more custom user attributes to use as criteria for the segment.
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.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import 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.
- 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.
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 theDimensionType
property, endpoints are included or excluded from the segment if their values match the criteria values.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import 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.
- 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.
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.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import 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.
- version
The version number of the source segment.