Pinpoint / Client / get_segment_version
get_segment_version#
- Pinpoint.Client.get_segment_version(**kwargs)#
Retrieves information about the configuration, dimension, and other settings for a specific version of a segment that’s associated with an application.
See also: AWS API Documentation
Request Syntax
response = client.get_segment_version( ApplicationId='string', SegmentId='string', Version='string' )
- Parameters:
ApplicationId (string) –
[REQUIRED]
The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console.
SegmentId (string) –
[REQUIRED]
The unique identifier for the segment.
Version (string) –
[REQUIRED]
The unique version number (Version property) for the campaign version.
- Return type:
dict
- Returns:
Response Syntax
{ 'SegmentResponse': { 'ApplicationId': 'string', 'Arn': 'string', 'CreationDate': 'string', 'Dimensions': { 'Attributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEFORE'|'AFTER'|'ON'|'BETWEEN', 'Values': [ 'string', ] } }, 'Behavior': { 'Recency': { 'Duration': 'HR_24'|'DAY_7'|'DAY_14'|'DAY_30', 'RecencyType': 'ACTIVE'|'INACTIVE' } }, 'Demographic': { 'AppVersion': { 'DimensionType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] }, 'Channel': { 'DimensionType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] }, 'DeviceType': { 'DimensionType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] }, 'Make': { 'DimensionType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] }, 'Model': { 'DimensionType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] }, 'Platform': { 'DimensionType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] } }, 'Location': { 'Country': { 'DimensionType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] }, 'GPSPoint': { 'Coordinates': { 'Latitude': 123.0, 'Longitude': 123.0 }, 'RangeInKilometers': 123.0 } }, 'Metrics': { 'string': { 'ComparisonOperator': 'string', 'Value': 123.0 } }, 'UserAttributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEFORE'|'AFTER'|'ON'|'BETWEEN', 'Values': [ 'string', ] } } }, 'Id': 'string', 'ImportDefinition': { 'ChannelCounts': { 'string': 123 }, 'ExternalId': 'string', 'Format': 'CSV'|'JSON', 'RoleArn': 'string', 'S3Url': 'string', 'Size': 123 }, 'LastModifiedDate': 'string', 'Name': 'string', 'SegmentGroups': { 'Groups': [ { 'Dimensions': [ { 'Attributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEFORE'|'AFTER'|'ON'|'BETWEEN', 'Values': [ 'string', ] } }, 'Behavior': { 'Recency': { 'Duration': 'HR_24'|'DAY_7'|'DAY_14'|'DAY_30', 'RecencyType': 'ACTIVE'|'INACTIVE' } }, 'Demographic': { 'AppVersion': { 'DimensionType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] }, 'Channel': { 'DimensionType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] }, 'DeviceType': { 'DimensionType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] }, 'Make': { 'DimensionType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] }, 'Model': { 'DimensionType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] }, 'Platform': { 'DimensionType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] } }, 'Location': { 'Country': { 'DimensionType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] }, 'GPSPoint': { 'Coordinates': { 'Latitude': 123.0, 'Longitude': 123.0 }, 'RangeInKilometers': 123.0 } }, 'Metrics': { 'string': { 'ComparisonOperator': 'string', 'Value': 123.0 } }, 'UserAttributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEFORE'|'AFTER'|'ON'|'BETWEEN', 'Values': [ 'string', ] } } }, ], 'SourceSegments': [ { 'Id': 'string', 'Version': 123 }, ], 'SourceType': 'ALL'|'ANY'|'NONE', 'Type': 'ALL'|'ANY'|'NONE' }, ], 'Include': 'ALL'|'ANY'|'NONE' }, 'SegmentType': 'DIMENSIONAL'|'IMPORT', 'tags': { 'string': 'string' }, 'Version': 123 } }
Response Structure
(dict) –
The request succeeded.
SegmentResponse (dict) –
Provides information about the configuration, dimension, and other settings for a segment.
ApplicationId (string) –
The unique identifier for the application that the segment is associated with.
Arn (string) –
The Amazon Resource Name (ARN) of the segment.
CreationDate (string) –
The date and time when the segment was created.
Dimensions (dict) –
The dimension settings for the segment.
Attributes (dict) –
One or more custom attributes to use as criteria for the segment.
(string) –
(dict) –
Specifies attribute-based criteria for including or excluding endpoints from a segment.
AttributeType (string) –
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 in 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.
ON - endpoints with attributes read as ISO_INSTANT dates on the value are included in the segment. Time is ignored in this comparison.
BETWEEN - endpoints with attributes read as ISO_INSTANT datetimes between the values are included in the segment.
Values (list) –
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.
(string) –
Behavior (dict) –
The behavior-based criteria, such as how recently users have used your app, for the segment.
Recency (dict) –
The dimension settings that are based on how recently an endpoint was active.
Duration (string) –
The duration to use when determining whether an endpoint is active or inactive.
RecencyType (string) –
The type of recency dimension to use for the segment. Valid values are: ACTIVE, endpoints that were active within the specified duration are included in the segment; and, INACTIVE, endpoints that weren’t active within the specified duration are included in the segment.
Demographic (dict) –
The demographic-based criteria, such as device platform, for the segment.
AppVersion (dict) –
The app version criteria for the segment.
DimensionType (string) –
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 (list) –
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.
(string) –
Channel (dict) –
The channel criteria for the segment.
DimensionType (string) –
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 (list) –
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.
(string) –
DeviceType (dict) –
The device type criteria for the segment.
DimensionType (string) –
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 (list) –
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.
(string) –
Make (dict) –
The device make criteria for the segment.
DimensionType (string) –
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 (list) –
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.
(string) –
Model (dict) –
The device model criteria for the segment.
DimensionType (string) –
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 (list) –
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.
(string) –
Platform (dict) –
The device platform criteria for the segment.
DimensionType (string) –
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 (list) –
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.
(string) –
Location (dict) –
The location-based criteria, such as region or GPS coordinates, for the segment.
Country (dict) –
The country or region code, in ISO 3166-1 alpha-2 format, for the segment.
DimensionType (string) –
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 (list) –
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.
(string) –
GPSPoint (dict) –
The GPS location and range for the segment.
Coordinates (dict) –
The GPS coordinates to measure distance from.
Latitude (float) –
The latitude coordinate of the location.
Longitude (float) –
The longitude coordinate of the location.
RangeInKilometers (float) –
The range, in kilometers, from the GPS coordinates.
Metrics (dict) –
One or more custom metrics to use as criteria for the segment.
(string) –
(dict) –
Specifies metric-based criteria for including or excluding endpoints from a segment. These criteria derive from custom metrics that you define for endpoints.
ComparisonOperator (string) –
The operator to use when comparing metric values. Valid values are: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, and EQUAL.
Value (float) –
The value to compare.
UserAttributes (dict) –
One or more custom user attributes to use as criteria for the segment.
(string) –
(dict) –
Specifies attribute-based criteria for including or excluding endpoints from a segment.
AttributeType (string) –
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 in 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.
ON - endpoints with attributes read as ISO_INSTANT dates on the value are included in the segment. Time is ignored in this comparison.
BETWEEN - endpoints with attributes read as ISO_INSTANT datetimes between the values are included in the segment.
Values (list) –
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.
(string) –
Id (string) –
The unique identifier for the segment.
ImportDefinition (dict) –
The settings for the import job that’s associated with the segment.
ChannelCounts (dict) –
The number of channel types in the endpoint definitions that were imported to create the segment.
(string) –
(integer) –
ExternalId (string) –
(Deprecated) Your AWS account ID, which you assigned to an external ID key in an IAM trust policy. Amazon Pinpoint previously used this value to assume an IAM role when importing endpoint definitions, but we removed this requirement. We don’t recommend use of external IDs for IAM roles that are assumed by Amazon Pinpoint.
Format (string) –
The format of the files that were imported to create the segment. Valid values are: CSV, for comma-separated values format; and, JSON, for newline-delimited JSON format.
RoleArn (string) –
The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorized Amazon Pinpoint to access the Amazon S3 location to import endpoint definitions from.
S3Url (string) –
The URL of the Amazon Simple Storage Service (Amazon S3) bucket that the endpoint definitions were imported from to create the segment.
Size (integer) –
The number of endpoint definitions that were imported successfully to create the segment.
LastModifiedDate (string) –
The date and time when the segment was last modified.
Name (string) –
The name of the segment.
SegmentGroups (dict) –
A list of one or more segment groups that apply to the segment. Each segment group consists of zero or more base segments and the dimensions that are applied to those base segments.
Groups (list) –
An array that defines the set of segment criteria to evaluate when handling segment groups for the segment.
(dict) –
Specifies the base segments and dimensions for a segment, and the relationships between these base segments and dimensions.
Dimensions (list) –
An array that defines the dimensions for the segment.
(dict) –
Specifies the dimension settings for a segment.
Attributes (dict) –
One or more custom attributes to use as criteria for the segment.
(string) –
(dict) –
Specifies attribute-based criteria for including or excluding endpoints from a segment.
AttributeType (string) –
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 in 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.
ON - endpoints with attributes read as ISO_INSTANT dates on the value are included in the segment. Time is ignored in this comparison.
BETWEEN - endpoints with attributes read as ISO_INSTANT datetimes between the values are included in the segment.
Values (list) –
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.
(string) –
Behavior (dict) –
The behavior-based criteria, such as how recently users have used your app, for the segment.
Recency (dict) –
The dimension settings that are based on how recently an endpoint was active.
Duration (string) –
The duration to use when determining whether an endpoint is active or inactive.
RecencyType (string) –
The type of recency dimension to use for the segment. Valid values are: ACTIVE, endpoints that were active within the specified duration are included in the segment; and, INACTIVE, endpoints that weren’t active within the specified duration are included in the segment.
Demographic (dict) –
The demographic-based criteria, such as device platform, for the segment.
AppVersion (dict) –
The app version criteria for the segment.
DimensionType (string) –
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 (list) –
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.
(string) –
Channel (dict) –
The channel criteria for the segment.
DimensionType (string) –
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 (list) –
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.
(string) –
DeviceType (dict) –
The device type criteria for the segment.
DimensionType (string) –
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 (list) –
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.
(string) –
Make (dict) –
The device make criteria for the segment.
DimensionType (string) –
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 (list) –
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.
(string) –
Model (dict) –
The device model criteria for the segment.
DimensionType (string) –
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 (list) –
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.
(string) –
Platform (dict) –
The device platform criteria for the segment.
DimensionType (string) –
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 (list) –
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.
(string) –
Location (dict) –
The location-based criteria, such as region or GPS coordinates, for the segment.
Country (dict) –
The country or region code, in ISO 3166-1 alpha-2 format, for the segment.
DimensionType (string) –
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 (list) –
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.
(string) –
GPSPoint (dict) –
The GPS location and range for the segment.
Coordinates (dict) –
The GPS coordinates to measure distance from.
Latitude (float) –
The latitude coordinate of the location.
Longitude (float) –
The longitude coordinate of the location.
RangeInKilometers (float) –
The range, in kilometers, from the GPS coordinates.
Metrics (dict) –
One or more custom metrics to use as criteria for the segment.
(string) –
(dict) –
Specifies metric-based criteria for including or excluding endpoints from a segment. These criteria derive from custom metrics that you define for endpoints.
ComparisonOperator (string) –
The operator to use when comparing metric values. Valid values are: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, and EQUAL.
Value (float) –
The value to compare.
UserAttributes (dict) –
One or more custom user attributes to use as criteria for the segment.
(string) –
(dict) –
Specifies attribute-based criteria for including or excluding endpoints from a segment.
AttributeType (string) –
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 in 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.
ON - endpoints with attributes read as ISO_INSTANT dates on the value are included in the segment. Time is ignored in this comparison.
BETWEEN - endpoints with attributes read as ISO_INSTANT datetimes between the values are included in the segment.
Values (list) –
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.
(string) –
SourceSegments (list) –
The base segment to build the segment on. A base segment, also referred to as a source segment, defines the initial population of endpoints for a segment. When you add dimensions to a 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 Amazon Pinpoint console displays a segment size estimate that indicates the size of the imported segment without any filters applied to it.
(dict) –
Specifies the segment identifier and version of a segment.
Id (string) –
The unique identifier for the segment.
Version (integer) –
The version number of the segment.
SourceType (string) –
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 (string) –
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.
Include (string) –
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.
SegmentType (string) –
The segment type. Valid values are:
DIMENSIONAL - A dynamic segment, which is a segment that uses selection criteria that you specify and is based on endpoint data that’s reported by your app. Dynamic segments can change over time.
IMPORT - A static segment, which is a segment that uses selection criteria that you specify and is based on endpoint definitions that you import from a file. Imported segments are static; they don’t change over time.
tags (dict) –
A string-to-string map of key-value pairs that identifies the tags that are associated with the segment. Each tag consists of a required tag key and an associated tag value.
(string) –
(string) –
Version (integer) –
The version number of the segment.
Exceptions
Pinpoint.Client.exceptions.BadRequestException
Pinpoint.Client.exceptions.InternalServerErrorException
Pinpoint.Client.exceptions.PayloadTooLargeException
Pinpoint.Client.exceptions.ForbiddenException
Pinpoint.Client.exceptions.NotFoundException
Pinpoint.Client.exceptions.MethodNotAllowedException
Pinpoint.Client.exceptions.TooManyRequestsException