2018/08/07 - Amazon Pinpoint - 1 new 10 updated api methods
Changes This release includes a new batch API call for Amazon Pinpoint which can be used to update endpoints and submit events. This call will accept events from clients such as mobile devices and AWS SDKs. This call will accept requests which has multiple endpoints and multiple events attached to those endpoints in a single call. This call will update the endpoints attached and will ingest events for those endpoints. The response from this call will be a multipart response per endpoint/per event submitted.
Use to record events for endpoints. This method creates events and creates or updates the endpoints that those events are associated with.
See also: AWS API Documentation
Request Syntax
client.put_events( ApplicationId='string', EventsRequest={ 'BatchItem': { 'string': { 'Endpoint': { 'Address': 'string', 'Attributes': { 'string': [ 'string', ] }, 'ChannelType': 'GCM'|'APNS'|'APNS_SANDBOX'|'APNS_VOIP'|'APNS_VOIP_SANDBOX'|'ADM'|'SMS'|'EMAIL'|'BAIDU'|'CUSTOM', 'Demographic': { 'AppVersion': 'string', 'Locale': 'string', 'Make': 'string', 'Model': 'string', 'ModelVersion': 'string', 'Platform': 'string', 'PlatformVersion': 'string', 'Timezone': 'string' }, 'EffectiveDate': 'string', 'EndpointStatus': 'string', 'Location': { 'City': 'string', 'Country': 'string', 'Latitude': 123.0, 'Longitude': 123.0, 'PostalCode': 'string', 'Region': 'string' }, 'Metrics': { 'string': 123.0 }, 'OptOut': 'string', 'RequestId': 'string', 'User': { 'UserAttributes': { 'string': [ 'string', ] }, 'UserId': 'string' } }, 'Events': { 'string': { 'Attributes': { 'string': 'string' }, 'ClientSdkVersion': 'string', 'EventType': 'string', 'Metrics': { 'string': 123.0 }, 'Session': { 'Duration': 123, 'Id': 'string', 'StartTimestamp': 'string', 'StopTimestamp': 'string' }, 'Timestamp': 'string' } } } } } )
string
[REQUIRED] The unique ID of your Amazon Pinpoint application.
dict
[REQUIRED] Put Events request
BatchItem (dict) -- Batch of events with endpoint id as the key and an object of EventsBatch as value. The EventsBatch object has the PublicEndpoint and a map of event Id's to events
(string) --
(dict) -- Events batch definition
Endpoint (dict) -- Endpoint information
Address (string) -- The unique identifier for the recipient. For example, an address could be a device token or an endpoint ID.
Attributes (dict) -- Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create a segment.
(string) --
(list) --
(string) --
ChannelType (string) -- The channel type. Valid values: APNS, GCM
Demographic (dict) -- The endpoint demographic attributes.
AppVersion (string) -- The version of the application associated with the endpoint.
Locale (string) -- The endpoint locale in the following format: The ISO 639-1 alpha-2 code, followed by an underscore, followed by an ISO 3166-1 alpha-2 value.
Make (string) -- The manufacturer of the endpoint device, such as Apple or Samsung.
Model (string) -- The model name or number of the endpoint device, such as iPhone.
ModelVersion (string) -- The model version of the endpoint device.
Platform (string) -- The platform of the endpoint device, such as iOS or Android.
PlatformVersion (string) -- The platform version of the endpoint device.
Timezone (string) -- The timezone of the endpoint. Specified as a tz database value, such as Americas/Los_Angeles.
EffectiveDate (string) -- The date and time when the endpoint was last updated.
EndpointStatus (string) -- The status of the endpoint. If the update fails, the value is INACTIVE. If the endpoint is updated successfully, the value is ACTIVE.
Location (dict) -- The endpoint location attributes.
City (string) -- The city where the endpoint is located.
Country (string) -- The two-letter code for the country or region of the endpoint. Specified as an ISO 3166-1 Alpha-2 code, such as "US" for the United States.
Latitude (float) -- The latitude of the endpoint location, rounded to one decimal place.
Longitude (float) -- The longitude of the endpoint location, rounded to one decimal place.
PostalCode (string) -- The postal code or zip code of the endpoint.
Region (string) -- The region of the endpoint location. For example, in the United States, this corresponds to a state.
Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint.
(string) --
(float) --
OptOut (string) -- Indicates whether a user has opted out of receiving messages with one of the following values: ALL - User has opted out of all messages. NONE - Users has not opted out and receives all messages.
RequestId (string) -- A unique identifier that is generated each time the endpoint is updated.
User (dict) -- Custom user-specific attributes that your app reports to Amazon Pinpoint.
UserAttributes (dict) -- Custom attributes that describe the user by associating a name with an array of values. For example, an attribute named "interests" might have the following values: ["science", "politics", "travel"]. You can use these attributes as selection criteria when you create segments. The Amazon Pinpoint console can't display attribute names that include the following characters: hash/pound sign (#), colon (:), question mark (?), backslash (), and forward slash (/). For this reason, you should avoid using these characters in the names of custom attributes.
(string) --
(list) --
(string) --
UserId (string) -- The unique ID of the user.
Events (dict) -- Events
(string) --
(dict) -- Model for creating or updating events.
Attributes (dict) -- Custom attributes that are associated with the event you're adding or updating.
(string) --
(string) --
ClientSdkVersion (string) -- The version of the SDK that's running on the client device.
EventType (string) -- The name of the custom event that you're recording.
Metrics (dict) -- Event metrics
(string) --
(float) --
Session (dict) -- The session
Duration (integer) -- Session duration in millis
Id (string) -- A unique identifier for the session.
StartTimestamp (string) -- The date and time when the session began.
StopTimestamp (string) -- The date and time when the session ended.
Timestamp (string) -- The date and time when the event occurred, in ISO 8601 format.
dict
Response Syntax
{ 'EventsResponse': { 'Results': { 'string': { 'EndpointItemResponse': { 'Message': 'string', 'StatusCode': 123 }, 'EventsItemResponse': { 'string': { 'Message': 'string', 'StatusCode': 123 } } } } } }
Response Structure
(dict) -- 202 response
EventsResponse (dict) -- The results from processing a put events request
Results (dict) -- A map containing a multi part response for each endpoint, with the endpoint id as the key and item response as the value
(string) --
(dict) -- The endpoint and events combined response definition
EndpointItemResponse (dict) -- Endpoint item response after endpoint registration
Message (string) -- A custom message associated with the registration of an endpoint when issuing a response.
StatusCode (integer) -- The status code to respond with for a particular endpoint id after endpoint registration
EventsItemResponse (dict) -- Events item response is a multipart response object per event Id, with eventId as the key and EventItemResponse object as the value
(string) --
(dict) -- The responses that are returned after you record an event.
Message (string) -- A custom message that is associated with the processing of an event.
StatusCode (integer) -- The status code to respond with for a particular event id
{'WriteSegmentRequest': {'SegmentGroups': {'Groups': {'SourceType': ['NONE']}}}}Response
{'SegmentResponse': {'SegmentGroups': {'Groups': {'SourceType': ['NONE']}}}}
Used to create or update a segment.
See also: AWS API Documentation
Request Syntax
client.create_segment( ApplicationId='string', WriteSegmentRequest={ 'Dimensions': { 'Attributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE', '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', 'Values': [ 'string', ] } } }, 'Name': 'string', 'SegmentGroups': { 'Groups': [ { 'Dimensions': [ { 'Attributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE', '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', 'Values': [ 'string', ] } } }, ], 'SourceSegments': [ { 'Id': 'string', 'Version': 123 }, ], 'SourceType': 'ALL'|'ANY'|'NONE', 'Type': 'ALL'|'ANY'|'NONE' }, ], 'Include': 'ALL'|'ANY'|'NONE' } } )
string
[REQUIRED] The unique ID of your Amazon Pinpoint application.
dict
[REQUIRED] Segment definition.
Dimensions (dict) -- The segment dimensions attributes.
Attributes (dict) -- Custom segment attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Behavior (dict) -- The segment behaviors attributes.
Recency (dict) -- The recency of use.
Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
Demographic (dict) -- The segment demographics attributes.
AppVersion (dict) -- The app version criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Channel (dict) -- The channel criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
DeviceType (dict) -- The device type criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Make (dict) -- The device make criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Model (dict) -- The device model criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Platform (dict) -- The device platform criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Location (dict) -- The segment location attributes.
Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
GPSPoint (dict) -- The GPS Point dimension.
Coordinates (dict) -- Coordinate to measure distance from.
Latitude (float) -- Latitude
Longitude (float) -- Longitude
RangeInKilometers (float) -- Range in kilometers from the coordinate.
Metrics (dict) -- Custom segment metrics.
(string) --
(dict) -- Custom metric dimension
ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
Value (float) -- Value to be compared.
UserAttributes (dict) -- Custom segment user attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Name (string) -- The name of segment
SegmentGroups (dict) -- A segment group, which consists of zero or more source segments, plus dimensions that are applied to those source segments. Your request can only include one segment group. Your request can include either a SegmentGroups object or a Dimensions object, but not both.
Groups (list) -- A set of segment criteria to evaluate.
(dict) -- Segment group definition.
Dimensions (list) -- List of dimensions to include or exclude.
(dict) -- Segment dimensions
Attributes (dict) -- Custom segment attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Behavior (dict) -- The segment behaviors attributes.
Recency (dict) -- The recency of use.
Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
Demographic (dict) -- The segment demographics attributes.
AppVersion (dict) -- The app version criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Channel (dict) -- The channel criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
DeviceType (dict) -- The device type criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Make (dict) -- The device make criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Model (dict) -- The device model criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Platform (dict) -- The device platform criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Location (dict) -- The segment location attributes.
Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
GPSPoint (dict) -- The GPS Point dimension.
Coordinates (dict) -- Coordinate to measure distance from.
Latitude (float) -- Latitude
Longitude (float) -- Longitude
RangeInKilometers (float) -- Range in kilometers from the coordinate.
Metrics (dict) -- Custom segment metrics.
(string) --
(dict) -- Custom metric dimension
ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
Value (float) -- Value to be compared.
UserAttributes (dict) -- Custom segment user attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
SourceSegments (list) -- The base segment that you build your segment on. The source segment defines the starting "universe" of endpoints. When you add dimensions to the segment, it filters the source segment based on the dimensions that you specify. You can specify more than one dimensional segment. You can only specify one imported segment.
(dict) -- Segment reference.
Id (string) -- A unique identifier for the segment.
Version (integer) -- If specified contains a specific version of the segment included.
SourceType (string) -- Specify how to handle multiple source segments. For example, if you specify three source segments, should the resulting segment be based on any or all of the segments? Acceptable values: ANY or ALL.
Type (string) -- Specify how to handle multiple segment dimensions. For example, if you specify three dimensions, should the resulting segment include endpoints that are matched by all, any, or none of the dimensions? Acceptable values: ALL, ANY, or NONE.
Include (string) -- Specify how to handle multiple segment groups. For example, if the segment includes three segment groups, should the resulting segment include endpoints that are matched by all, any, or none of the segment groups you created. Acceptable values: ALL, ANY, or NONE.
dict
Response Syntax
{ 'SegmentResponse': { 'ApplicationId': 'string', 'CreationDate': 'string', 'Dimensions': { 'Attributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE', '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', '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', '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', 'Values': [ 'string', ] } } }, ], 'SourceSegments': [ { 'Id': 'string', 'Version': 123 }, ], 'SourceType': 'ALL'|'ANY'|'NONE', 'Type': 'ALL'|'ANY'|'NONE' }, ], 'Include': 'ALL'|'ANY'|'NONE' }, 'SegmentType': 'DIMENSIONAL'|'IMPORT', 'Version': 123 } }
Response Structure
(dict) -- 201 response
SegmentResponse (dict) -- Segment definition.
ApplicationId (string) -- The ID of the application that the segment applies to.
CreationDate (string) -- The date and time when the segment was created.
Dimensions (dict) -- The segment dimensions attributes.
Attributes (dict) -- Custom segment attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Behavior (dict) -- The segment behaviors attributes.
Recency (dict) -- The recency of use.
Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
Demographic (dict) -- The segment demographics attributes.
AppVersion (dict) -- The app version criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Channel (dict) -- The channel criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
DeviceType (dict) -- The device type criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Make (dict) -- The device make criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Model (dict) -- The device model criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Platform (dict) -- The device platform criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Location (dict) -- The segment location attributes.
Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
GPSPoint (dict) -- The GPS Point dimension.
Coordinates (dict) -- Coordinate to measure distance from.
Latitude (float) -- Latitude
Longitude (float) -- Longitude
RangeInKilometers (float) -- Range in kilometers from the coordinate.
Metrics (dict) -- Custom segment metrics.
(string) --
(dict) -- Custom metric dimension
ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
Value (float) -- Value to be compared.
UserAttributes (dict) -- Custom segment user attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Id (string) -- The unique segment ID.
ImportDefinition (dict) -- The import job settings.
ChannelCounts (dict) -- The number of channel types in the imported segment.
(string) --
(integer) --
ExternalId (string) -- (Deprecated) Your AWS account ID, which you assigned to the ExternalID key in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This requirement is removed, and external IDs are not recommended for IAM roles assumed by Amazon Pinpoint.
Format (string) -- The format of the endpoint files that were imported to create this segment. Valid values: CSV, JSON
RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the endpoints in Amazon S3.
S3Url (string) -- The URL of the S3 bucket that the segment was imported from.
Size (integer) -- The number of endpoints that were successfully imported to create this segment.
LastModifiedDate (string) -- The date and time when the segment was last modified.
Name (string) -- The name of the segment.
SegmentGroups (dict) -- A segment group, which consists of zero or more source segments, plus dimensions that are applied to those source segments.
Groups (list) -- A set of segment criteria to evaluate.
(dict) -- Segment group definition.
Dimensions (list) -- List of dimensions to include or exclude.
(dict) -- Segment dimensions
Attributes (dict) -- Custom segment attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Behavior (dict) -- The segment behaviors attributes.
Recency (dict) -- The recency of use.
Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
Demographic (dict) -- The segment demographics attributes.
AppVersion (dict) -- The app version criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Channel (dict) -- The channel criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
DeviceType (dict) -- The device type criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Make (dict) -- The device make criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Model (dict) -- The device model criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Platform (dict) -- The device platform criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Location (dict) -- The segment location attributes.
Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
GPSPoint (dict) -- The GPS Point dimension.
Coordinates (dict) -- Coordinate to measure distance from.
Latitude (float) -- Latitude
Longitude (float) -- Longitude
RangeInKilometers (float) -- Range in kilometers from the coordinate.
Metrics (dict) -- Custom segment metrics.
(string) --
(dict) -- Custom metric dimension
ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
Value (float) -- Value to be compared.
UserAttributes (dict) -- Custom segment user attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
SourceSegments (list) -- The base segment that you build your segment on. The source segment defines the starting "universe" of endpoints. When you add dimensions to the segment, it filters the source segment based on the dimensions that you specify. You can specify more than one dimensional segment. You can only specify one imported segment.
(dict) -- Segment reference.
Id (string) -- A unique identifier for the segment.
Version (integer) -- If specified contains a specific version of the segment included.
SourceType (string) -- Specify how to handle multiple source segments. For example, if you specify three source segments, should the resulting segment be based on any or all of the segments? Acceptable values: ANY or ALL.
Type (string) -- Specify how to handle multiple segment dimensions. For example, if you specify three dimensions, should the resulting segment include endpoints that are matched by all, any, or none of the dimensions? Acceptable values: ALL, ANY, or NONE.
Include (string) -- Specify how to handle multiple segment groups. For example, if the segment includes three segment groups, should the resulting segment include endpoints that are matched by all, any, or none of the segment groups you created. Acceptable values: ALL, ANY, or NONE.
SegmentType (string) -- The segment type: DIMENSIONAL - A dynamic segment built from selection criteria based on endpoint data reported by your app. You create this type of segment by using the segment builder in the Amazon Pinpoint console or by making a POST request to the segments resource. IMPORT - A static segment built from an imported set of endpoint definitions. You create this type of segment by importing a segment in the Amazon Pinpoint console or by making a POST request to the jobs/import resource.
Version (integer) -- The segment version number.
{'SegmentResponse': {'SegmentGroups': {'Groups': {'SourceType': ['NONE']}}}}
Deletes a segment.
See also: AWS API Documentation
Request Syntax
client.delete_segment( ApplicationId='string', SegmentId='string' )
string
[REQUIRED] The unique ID of your Amazon Pinpoint application.
string
[REQUIRED] The unique ID of the segment.
dict
Response Syntax
{ 'SegmentResponse': { 'ApplicationId': 'string', 'CreationDate': 'string', 'Dimensions': { 'Attributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE', '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', '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', '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', 'Values': [ 'string', ] } } }, ], 'SourceSegments': [ { 'Id': 'string', 'Version': 123 }, ], 'SourceType': 'ALL'|'ANY'|'NONE', 'Type': 'ALL'|'ANY'|'NONE' }, ], 'Include': 'ALL'|'ANY'|'NONE' }, 'SegmentType': 'DIMENSIONAL'|'IMPORT', 'Version': 123 } }
Response Structure
(dict) -- 200 response
SegmentResponse (dict) -- Segment definition.
ApplicationId (string) -- The ID of the application that the segment applies to.
CreationDate (string) -- The date and time when the segment was created.
Dimensions (dict) -- The segment dimensions attributes.
Attributes (dict) -- Custom segment attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Behavior (dict) -- The segment behaviors attributes.
Recency (dict) -- The recency of use.
Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
Demographic (dict) -- The segment demographics attributes.
AppVersion (dict) -- The app version criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Channel (dict) -- The channel criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
DeviceType (dict) -- The device type criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Make (dict) -- The device make criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Model (dict) -- The device model criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Platform (dict) -- The device platform criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Location (dict) -- The segment location attributes.
Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
GPSPoint (dict) -- The GPS Point dimension.
Coordinates (dict) -- Coordinate to measure distance from.
Latitude (float) -- Latitude
Longitude (float) -- Longitude
RangeInKilometers (float) -- Range in kilometers from the coordinate.
Metrics (dict) -- Custom segment metrics.
(string) --
(dict) -- Custom metric dimension
ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
Value (float) -- Value to be compared.
UserAttributes (dict) -- Custom segment user attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Id (string) -- The unique segment ID.
ImportDefinition (dict) -- The import job settings.
ChannelCounts (dict) -- The number of channel types in the imported segment.
(string) --
(integer) --
ExternalId (string) -- (Deprecated) Your AWS account ID, which you assigned to the ExternalID key in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This requirement is removed, and external IDs are not recommended for IAM roles assumed by Amazon Pinpoint.
Format (string) -- The format of the endpoint files that were imported to create this segment. Valid values: CSV, JSON
RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the endpoints in Amazon S3.
S3Url (string) -- The URL of the S3 bucket that the segment was imported from.
Size (integer) -- The number of endpoints that were successfully imported to create this segment.
LastModifiedDate (string) -- The date and time when the segment was last modified.
Name (string) -- The name of the segment.
SegmentGroups (dict) -- A segment group, which consists of zero or more source segments, plus dimensions that are applied to those source segments.
Groups (list) -- A set of segment criteria to evaluate.
(dict) -- Segment group definition.
Dimensions (list) -- List of dimensions to include or exclude.
(dict) -- Segment dimensions
Attributes (dict) -- Custom segment attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Behavior (dict) -- The segment behaviors attributes.
Recency (dict) -- The recency of use.
Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
Demographic (dict) -- The segment demographics attributes.
AppVersion (dict) -- The app version criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Channel (dict) -- The channel criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
DeviceType (dict) -- The device type criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Make (dict) -- The device make criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Model (dict) -- The device model criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Platform (dict) -- The device platform criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Location (dict) -- The segment location attributes.
Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
GPSPoint (dict) -- The GPS Point dimension.
Coordinates (dict) -- Coordinate to measure distance from.
Latitude (float) -- Latitude
Longitude (float) -- Longitude
RangeInKilometers (float) -- Range in kilometers from the coordinate.
Metrics (dict) -- Custom segment metrics.
(string) --
(dict) -- Custom metric dimension
ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
Value (float) -- Value to be compared.
UserAttributes (dict) -- Custom segment user attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
SourceSegments (list) -- The base segment that you build your segment on. The source segment defines the starting "universe" of endpoints. When you add dimensions to the segment, it filters the source segment based on the dimensions that you specify. You can specify more than one dimensional segment. You can only specify one imported segment.
(dict) -- Segment reference.
Id (string) -- A unique identifier for the segment.
Version (integer) -- If specified contains a specific version of the segment included.
SourceType (string) -- Specify how to handle multiple source segments. For example, if you specify three source segments, should the resulting segment be based on any or all of the segments? Acceptable values: ANY or ALL.
Type (string) -- Specify how to handle multiple segment dimensions. For example, if you specify three dimensions, should the resulting segment include endpoints that are matched by all, any, or none of the dimensions? Acceptable values: ALL, ANY, or NONE.
Include (string) -- Specify how to handle multiple segment groups. For example, if the segment includes three segment groups, should the resulting segment include endpoints that are matched by all, any, or none of the segment groups you created. Acceptable values: ALL, ANY, or NONE.
SegmentType (string) -- The segment type: DIMENSIONAL - A dynamic segment built from selection criteria based on endpoint data reported by your app. You create this type of segment by using the segment builder in the Amazon Pinpoint console or by making a POST request to the segments resource. IMPORT - A static segment built from an imported set of endpoint definitions. You create this type of segment by importing a segment in the Amazon Pinpoint console or by making a POST request to the jobs/import resource.
Version (integer) -- The segment version number.
{'ActivitiesResponse': {'NextToken': 'string'}}
Returns information about the activity performed by a campaign.
See also: AWS API Documentation
Request Syntax
client.get_campaign_activities( ApplicationId='string', CampaignId='string', PageSize='string', Token='string' )
string
[REQUIRED] The unique ID of your Amazon Pinpoint application.
string
[REQUIRED] The unique ID of the campaign.
string
The number of entries you want on each page in the response.
string
The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.
dict
Response Syntax
{ 'ActivitiesResponse': { 'Item': [ { 'ApplicationId': 'string', 'CampaignId': 'string', 'End': 'string', 'Id': 'string', 'Result': 'string', 'ScheduledStart': 'string', 'Start': 'string', 'State': 'string', 'SuccessfulEndpointCount': 123, 'TimezonesCompletedCount': 123, 'TimezonesTotalCount': 123, 'TotalEndpointCount': 123, 'TreatmentId': 'string' }, ], 'NextToken': 'string' } }
Response Structure
(dict) -- 200 response
ActivitiesResponse (dict) -- Activities for campaign.
Item (list) -- List of campaign activities
(dict) -- Activity definition
ApplicationId (string) -- The ID of the application to which the campaign applies.
CampaignId (string) -- The ID of the campaign to which the activity applies.
End (string) -- The actual time the activity was marked CANCELLED or COMPLETED. Provided in ISO 8601 format.
Id (string) -- The unique activity ID.
Result (string) -- Indicates whether the activity succeeded. Valid values: SUCCESS, FAIL
ScheduledStart (string) -- The scheduled start time for the activity in ISO 8601 format.
Start (string) -- The actual start time of the activity in ISO 8601 format.
State (string) -- The state of the activity. Valid values: PENDING, INITIALIZING, RUNNING, PAUSED, CANCELLED, COMPLETED
SuccessfulEndpointCount (integer) -- The total number of endpoints to which the campaign successfully delivered messages.
TimezonesCompletedCount (integer) -- The total number of timezones completed.
TimezonesTotalCount (integer) -- The total number of unique timezones present in the segment.
TotalEndpointCount (integer) -- The total number of endpoints to which the campaign attempts to deliver messages.
TreatmentId (string) -- The ID of a variation of the campaign used for A/B testing.
NextToken (string) -- The string that you use in a subsequent request to get the next page of results in a paginated response.
{'SegmentResponse': {'SegmentGroups': {'Groups': {'SourceType': ['NONE']}}}}
Returns information about a segment.
See also: AWS API Documentation
Request Syntax
client.get_segment( ApplicationId='string', SegmentId='string' )
string
[REQUIRED] The unique ID of your Amazon Pinpoint application.
string
[REQUIRED] The unique ID of the segment.
dict
Response Syntax
{ 'SegmentResponse': { 'ApplicationId': 'string', 'CreationDate': 'string', 'Dimensions': { 'Attributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE', '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', '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', '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', 'Values': [ 'string', ] } } }, ], 'SourceSegments': [ { 'Id': 'string', 'Version': 123 }, ], 'SourceType': 'ALL'|'ANY'|'NONE', 'Type': 'ALL'|'ANY'|'NONE' }, ], 'Include': 'ALL'|'ANY'|'NONE' }, 'SegmentType': 'DIMENSIONAL'|'IMPORT', 'Version': 123 } }
Response Structure
(dict) -- 200 response
SegmentResponse (dict) -- Segment definition.
ApplicationId (string) -- The ID of the application that the segment applies to.
CreationDate (string) -- The date and time when the segment was created.
Dimensions (dict) -- The segment dimensions attributes.
Attributes (dict) -- Custom segment attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Behavior (dict) -- The segment behaviors attributes.
Recency (dict) -- The recency of use.
Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
Demographic (dict) -- The segment demographics attributes.
AppVersion (dict) -- The app version criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Channel (dict) -- The channel criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
DeviceType (dict) -- The device type criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Make (dict) -- The device make criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Model (dict) -- The device model criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Platform (dict) -- The device platform criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Location (dict) -- The segment location attributes.
Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
GPSPoint (dict) -- The GPS Point dimension.
Coordinates (dict) -- Coordinate to measure distance from.
Latitude (float) -- Latitude
Longitude (float) -- Longitude
RangeInKilometers (float) -- Range in kilometers from the coordinate.
Metrics (dict) -- Custom segment metrics.
(string) --
(dict) -- Custom metric dimension
ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
Value (float) -- Value to be compared.
UserAttributes (dict) -- Custom segment user attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Id (string) -- The unique segment ID.
ImportDefinition (dict) -- The import job settings.
ChannelCounts (dict) -- The number of channel types in the imported segment.
(string) --
(integer) --
ExternalId (string) -- (Deprecated) Your AWS account ID, which you assigned to the ExternalID key in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This requirement is removed, and external IDs are not recommended for IAM roles assumed by Amazon Pinpoint.
Format (string) -- The format of the endpoint files that were imported to create this segment. Valid values: CSV, JSON
RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the endpoints in Amazon S3.
S3Url (string) -- The URL of the S3 bucket that the segment was imported from.
Size (integer) -- The number of endpoints that were successfully imported to create this segment.
LastModifiedDate (string) -- The date and time when the segment was last modified.
Name (string) -- The name of the segment.
SegmentGroups (dict) -- A segment group, which consists of zero or more source segments, plus dimensions that are applied to those source segments.
Groups (list) -- A set of segment criteria to evaluate.
(dict) -- Segment group definition.
Dimensions (list) -- List of dimensions to include or exclude.
(dict) -- Segment dimensions
Attributes (dict) -- Custom segment attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Behavior (dict) -- The segment behaviors attributes.
Recency (dict) -- The recency of use.
Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
Demographic (dict) -- The segment demographics attributes.
AppVersion (dict) -- The app version criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Channel (dict) -- The channel criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
DeviceType (dict) -- The device type criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Make (dict) -- The device make criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Model (dict) -- The device model criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Platform (dict) -- The device platform criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Location (dict) -- The segment location attributes.
Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
GPSPoint (dict) -- The GPS Point dimension.
Coordinates (dict) -- Coordinate to measure distance from.
Latitude (float) -- Latitude
Longitude (float) -- Longitude
RangeInKilometers (float) -- Range in kilometers from the coordinate.
Metrics (dict) -- Custom segment metrics.
(string) --
(dict) -- Custom metric dimension
ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
Value (float) -- Value to be compared.
UserAttributes (dict) -- Custom segment user attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
SourceSegments (list) -- The base segment that you build your segment on. The source segment defines the starting "universe" of endpoints. When you add dimensions to the segment, it filters the source segment based on the dimensions that you specify. You can specify more than one dimensional segment. You can only specify one imported segment.
(dict) -- Segment reference.
Id (string) -- A unique identifier for the segment.
Version (integer) -- If specified contains a specific version of the segment included.
SourceType (string) -- Specify how to handle multiple source segments. For example, if you specify three source segments, should the resulting segment be based on any or all of the segments? Acceptable values: ANY or ALL.
Type (string) -- Specify how to handle multiple segment dimensions. For example, if you specify three dimensions, should the resulting segment include endpoints that are matched by all, any, or none of the dimensions? Acceptable values: ALL, ANY, or NONE.
Include (string) -- Specify how to handle multiple segment groups. For example, if the segment includes three segment groups, should the resulting segment include endpoints that are matched by all, any, or none of the segment groups you created. Acceptable values: ALL, ANY, or NONE.
SegmentType (string) -- The segment type: DIMENSIONAL - A dynamic segment built from selection criteria based on endpoint data reported by your app. You create this type of segment by using the segment builder in the Amazon Pinpoint console or by making a POST request to the segments resource. IMPORT - A static segment built from an imported set of endpoint definitions. You create this type of segment by importing a segment in the Amazon Pinpoint console or by making a POST request to the jobs/import resource.
Version (integer) -- The segment version number.
{'SegmentResponse': {'SegmentGroups': {'Groups': {'SourceType': ['NONE']}}}}
Returns information about a segment version.
See also: AWS API Documentation
Request Syntax
client.get_segment_version( ApplicationId='string', SegmentId='string', Version='string' )
string
[REQUIRED] The unique ID of your Amazon Pinpoint application.
string
[REQUIRED] The unique ID of the segment.
string
[REQUIRED] The segment version.
dict
Response Syntax
{ 'SegmentResponse': { 'ApplicationId': 'string', 'CreationDate': 'string', 'Dimensions': { 'Attributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE', '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', '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', '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', 'Values': [ 'string', ] } } }, ], 'SourceSegments': [ { 'Id': 'string', 'Version': 123 }, ], 'SourceType': 'ALL'|'ANY'|'NONE', 'Type': 'ALL'|'ANY'|'NONE' }, ], 'Include': 'ALL'|'ANY'|'NONE' }, 'SegmentType': 'DIMENSIONAL'|'IMPORT', 'Version': 123 } }
Response Structure
(dict) -- 200 response
SegmentResponse (dict) -- Segment definition.
ApplicationId (string) -- The ID of the application that the segment applies to.
CreationDate (string) -- The date and time when the segment was created.
Dimensions (dict) -- The segment dimensions attributes.
Attributes (dict) -- Custom segment attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Behavior (dict) -- The segment behaviors attributes.
Recency (dict) -- The recency of use.
Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
Demographic (dict) -- The segment demographics attributes.
AppVersion (dict) -- The app version criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Channel (dict) -- The channel criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
DeviceType (dict) -- The device type criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Make (dict) -- The device make criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Model (dict) -- The device model criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Platform (dict) -- The device platform criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Location (dict) -- The segment location attributes.
Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
GPSPoint (dict) -- The GPS Point dimension.
Coordinates (dict) -- Coordinate to measure distance from.
Latitude (float) -- Latitude
Longitude (float) -- Longitude
RangeInKilometers (float) -- Range in kilometers from the coordinate.
Metrics (dict) -- Custom segment metrics.
(string) --
(dict) -- Custom metric dimension
ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
Value (float) -- Value to be compared.
UserAttributes (dict) -- Custom segment user attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Id (string) -- The unique segment ID.
ImportDefinition (dict) -- The import job settings.
ChannelCounts (dict) -- The number of channel types in the imported segment.
(string) --
(integer) --
ExternalId (string) -- (Deprecated) Your AWS account ID, which you assigned to the ExternalID key in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This requirement is removed, and external IDs are not recommended for IAM roles assumed by Amazon Pinpoint.
Format (string) -- The format of the endpoint files that were imported to create this segment. Valid values: CSV, JSON
RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the endpoints in Amazon S3.
S3Url (string) -- The URL of the S3 bucket that the segment was imported from.
Size (integer) -- The number of endpoints that were successfully imported to create this segment.
LastModifiedDate (string) -- The date and time when the segment was last modified.
Name (string) -- The name of the segment.
SegmentGroups (dict) -- A segment group, which consists of zero or more source segments, plus dimensions that are applied to those source segments.
Groups (list) -- A set of segment criteria to evaluate.
(dict) -- Segment group definition.
Dimensions (list) -- List of dimensions to include or exclude.
(dict) -- Segment dimensions
Attributes (dict) -- Custom segment attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Behavior (dict) -- The segment behaviors attributes.
Recency (dict) -- The recency of use.
Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
Demographic (dict) -- The segment demographics attributes.
AppVersion (dict) -- The app version criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Channel (dict) -- The channel criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
DeviceType (dict) -- The device type criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Make (dict) -- The device make criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Model (dict) -- The device model criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Platform (dict) -- The device platform criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Location (dict) -- The segment location attributes.
Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
GPSPoint (dict) -- The GPS Point dimension.
Coordinates (dict) -- Coordinate to measure distance from.
Latitude (float) -- Latitude
Longitude (float) -- Longitude
RangeInKilometers (float) -- Range in kilometers from the coordinate.
Metrics (dict) -- Custom segment metrics.
(string) --
(dict) -- Custom metric dimension
ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
Value (float) -- Value to be compared.
UserAttributes (dict) -- Custom segment user attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
SourceSegments (list) -- The base segment that you build your segment on. The source segment defines the starting "universe" of endpoints. When you add dimensions to the segment, it filters the source segment based on the dimensions that you specify. You can specify more than one dimensional segment. You can only specify one imported segment.
(dict) -- Segment reference.
Id (string) -- A unique identifier for the segment.
Version (integer) -- If specified contains a specific version of the segment included.
SourceType (string) -- Specify how to handle multiple source segments. For example, if you specify three source segments, should the resulting segment be based on any or all of the segments? Acceptable values: ANY or ALL.
Type (string) -- Specify how to handle multiple segment dimensions. For example, if you specify three dimensions, should the resulting segment include endpoints that are matched by all, any, or none of the dimensions? Acceptable values: ALL, ANY, or NONE.
Include (string) -- Specify how to handle multiple segment groups. For example, if the segment includes three segment groups, should the resulting segment include endpoints that are matched by all, any, or none of the segment groups you created. Acceptable values: ALL, ANY, or NONE.
SegmentType (string) -- The segment type: DIMENSIONAL - A dynamic segment built from selection criteria based on endpoint data reported by your app. You create this type of segment by using the segment builder in the Amazon Pinpoint console or by making a POST request to the segments resource. IMPORT - A static segment built from an imported set of endpoint definitions. You create this type of segment by importing a segment in the Amazon Pinpoint console or by making a POST request to the jobs/import resource.
Version (integer) -- The segment version number.
{'SegmentsResponse': {'Item': {'SegmentGroups': {'Groups': {'SourceType': ['NONE']}}}}}
Returns information about your segment versions.
See also: AWS API Documentation
Request Syntax
client.get_segment_versions( ApplicationId='string', PageSize='string', SegmentId='string', Token='string' )
string
[REQUIRED] The unique ID of your Amazon Pinpoint application.
string
The number of entries you want on each page in the response.
string
[REQUIRED] The unique ID of the segment.
string
The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.
dict
Response Syntax
{ 'SegmentsResponse': { 'Item': [ { 'ApplicationId': 'string', 'CreationDate': 'string', 'Dimensions': { 'Attributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE', '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', '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', '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', 'Values': [ 'string', ] } } }, ], 'SourceSegments': [ { 'Id': 'string', 'Version': 123 }, ], 'SourceType': 'ALL'|'ANY'|'NONE', 'Type': 'ALL'|'ANY'|'NONE' }, ], 'Include': 'ALL'|'ANY'|'NONE' }, 'SegmentType': 'DIMENSIONAL'|'IMPORT', 'Version': 123 }, ], 'NextToken': 'string' } }
Response Structure
(dict) -- 200 response
SegmentsResponse (dict) -- Segments in your account.
Item (list) -- The list of segments.
(dict) -- Segment definition.
ApplicationId (string) -- The ID of the application that the segment applies to.
CreationDate (string) -- The date and time when the segment was created.
Dimensions (dict) -- The segment dimensions attributes.
Attributes (dict) -- Custom segment attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Behavior (dict) -- The segment behaviors attributes.
Recency (dict) -- The recency of use.
Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
Demographic (dict) -- The segment demographics attributes.
AppVersion (dict) -- The app version criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Channel (dict) -- The channel criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
DeviceType (dict) -- The device type criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Make (dict) -- The device make criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Model (dict) -- The device model criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Platform (dict) -- The device platform criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Location (dict) -- The segment location attributes.
Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
GPSPoint (dict) -- The GPS Point dimension.
Coordinates (dict) -- Coordinate to measure distance from.
Latitude (float) -- Latitude
Longitude (float) -- Longitude
RangeInKilometers (float) -- Range in kilometers from the coordinate.
Metrics (dict) -- Custom segment metrics.
(string) --
(dict) -- Custom metric dimension
ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
Value (float) -- Value to be compared.
UserAttributes (dict) -- Custom segment user attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Id (string) -- The unique segment ID.
ImportDefinition (dict) -- The import job settings.
ChannelCounts (dict) -- The number of channel types in the imported segment.
(string) --
(integer) --
ExternalId (string) -- (Deprecated) Your AWS account ID, which you assigned to the ExternalID key in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This requirement is removed, and external IDs are not recommended for IAM roles assumed by Amazon Pinpoint.
Format (string) -- The format of the endpoint files that were imported to create this segment. Valid values: CSV, JSON
RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the endpoints in Amazon S3.
S3Url (string) -- The URL of the S3 bucket that the segment was imported from.
Size (integer) -- The number of endpoints that were successfully imported to create this segment.
LastModifiedDate (string) -- The date and time when the segment was last modified.
Name (string) -- The name of the segment.
SegmentGroups (dict) -- A segment group, which consists of zero or more source segments, plus dimensions that are applied to those source segments.
Groups (list) -- A set of segment criteria to evaluate.
(dict) -- Segment group definition.
Dimensions (list) -- List of dimensions to include or exclude.
(dict) -- Segment dimensions
Attributes (dict) -- Custom segment attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Behavior (dict) -- The segment behaviors attributes.
Recency (dict) -- The recency of use.
Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
Demographic (dict) -- The segment demographics attributes.
AppVersion (dict) -- The app version criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Channel (dict) -- The channel criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
DeviceType (dict) -- The device type criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Make (dict) -- The device make criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Model (dict) -- The device model criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Platform (dict) -- The device platform criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Location (dict) -- The segment location attributes.
Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
GPSPoint (dict) -- The GPS Point dimension.
Coordinates (dict) -- Coordinate to measure distance from.
Latitude (float) -- Latitude
Longitude (float) -- Longitude
RangeInKilometers (float) -- Range in kilometers from the coordinate.
Metrics (dict) -- Custom segment metrics.
(string) --
(dict) -- Custom metric dimension
ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
Value (float) -- Value to be compared.
UserAttributes (dict) -- Custom segment user attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
SourceSegments (list) -- The base segment that you build your segment on. The source segment defines the starting "universe" of endpoints. When you add dimensions to the segment, it filters the source segment based on the dimensions that you specify. You can specify more than one dimensional segment. You can only specify one imported segment.
(dict) -- Segment reference.
Id (string) -- A unique identifier for the segment.
Version (integer) -- If specified contains a specific version of the segment included.
SourceType (string) -- Specify how to handle multiple source segments. For example, if you specify three source segments, should the resulting segment be based on any or all of the segments? Acceptable values: ANY or ALL.
Type (string) -- Specify how to handle multiple segment dimensions. For example, if you specify three dimensions, should the resulting segment include endpoints that are matched by all, any, or none of the dimensions? Acceptable values: ALL, ANY, or NONE.
Include (string) -- Specify how to handle multiple segment groups. For example, if the segment includes three segment groups, should the resulting segment include endpoints that are matched by all, any, or none of the segment groups you created. Acceptable values: ALL, ANY, or NONE.
SegmentType (string) -- The segment type: DIMENSIONAL - A dynamic segment built from selection criteria based on endpoint data reported by your app. You create this type of segment by using the segment builder in the Amazon Pinpoint console or by making a POST request to the segments resource. IMPORT - A static segment built from an imported set of endpoint definitions. You create this type of segment by importing a segment in the Amazon Pinpoint console or by making a POST request to the jobs/import resource.
Version (integer) -- The segment version number.
NextToken (string) -- An identifier used to retrieve the next page of results. The token is null if no additional pages exist.
{'SegmentsResponse': {'Item': {'SegmentGroups': {'Groups': {'SourceType': ['NONE']}}}}}
Used to get information about your segments.
See also: AWS API Documentation
Request Syntax
client.get_segments( ApplicationId='string', PageSize='string', Token='string' )
string
[REQUIRED] The unique ID of your Amazon Pinpoint application.
string
The number of entries you want on each page in the response.
string
The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.
dict
Response Syntax
{ 'SegmentsResponse': { 'Item': [ { 'ApplicationId': 'string', 'CreationDate': 'string', 'Dimensions': { 'Attributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE', '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', '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', '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', 'Values': [ 'string', ] } } }, ], 'SourceSegments': [ { 'Id': 'string', 'Version': 123 }, ], 'SourceType': 'ALL'|'ANY'|'NONE', 'Type': 'ALL'|'ANY'|'NONE' }, ], 'Include': 'ALL'|'ANY'|'NONE' }, 'SegmentType': 'DIMENSIONAL'|'IMPORT', 'Version': 123 }, ], 'NextToken': 'string' } }
Response Structure
(dict) -- 200 response
SegmentsResponse (dict) -- Segments in your account.
Item (list) -- The list of segments.
(dict) -- Segment definition.
ApplicationId (string) -- The ID of the application that the segment applies to.
CreationDate (string) -- The date and time when the segment was created.
Dimensions (dict) -- The segment dimensions attributes.
Attributes (dict) -- Custom segment attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Behavior (dict) -- The segment behaviors attributes.
Recency (dict) -- The recency of use.
Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
Demographic (dict) -- The segment demographics attributes.
AppVersion (dict) -- The app version criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Channel (dict) -- The channel criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
DeviceType (dict) -- The device type criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Make (dict) -- The device make criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Model (dict) -- The device model criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Platform (dict) -- The device platform criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Location (dict) -- The segment location attributes.
Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
GPSPoint (dict) -- The GPS Point dimension.
Coordinates (dict) -- Coordinate to measure distance from.
Latitude (float) -- Latitude
Longitude (float) -- Longitude
RangeInKilometers (float) -- Range in kilometers from the coordinate.
Metrics (dict) -- Custom segment metrics.
(string) --
(dict) -- Custom metric dimension
ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
Value (float) -- Value to be compared.
UserAttributes (dict) -- Custom segment user attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Id (string) -- The unique segment ID.
ImportDefinition (dict) -- The import job settings.
ChannelCounts (dict) -- The number of channel types in the imported segment.
(string) --
(integer) --
ExternalId (string) -- (Deprecated) Your AWS account ID, which you assigned to the ExternalID key in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This requirement is removed, and external IDs are not recommended for IAM roles assumed by Amazon Pinpoint.
Format (string) -- The format of the endpoint files that were imported to create this segment. Valid values: CSV, JSON
RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the endpoints in Amazon S3.
S3Url (string) -- The URL of the S3 bucket that the segment was imported from.
Size (integer) -- The number of endpoints that were successfully imported to create this segment.
LastModifiedDate (string) -- The date and time when the segment was last modified.
Name (string) -- The name of the segment.
SegmentGroups (dict) -- A segment group, which consists of zero or more source segments, plus dimensions that are applied to those source segments.
Groups (list) -- A set of segment criteria to evaluate.
(dict) -- Segment group definition.
Dimensions (list) -- List of dimensions to include or exclude.
(dict) -- Segment dimensions
Attributes (dict) -- Custom segment attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Behavior (dict) -- The segment behaviors attributes.
Recency (dict) -- The recency of use.
Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
Demographic (dict) -- The segment demographics attributes.
AppVersion (dict) -- The app version criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Channel (dict) -- The channel criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
DeviceType (dict) -- The device type criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Make (dict) -- The device make criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Model (dict) -- The device model criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Platform (dict) -- The device platform criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Location (dict) -- The segment location attributes.
Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
GPSPoint (dict) -- The GPS Point dimension.
Coordinates (dict) -- Coordinate to measure distance from.
Latitude (float) -- Latitude
Longitude (float) -- Longitude
RangeInKilometers (float) -- Range in kilometers from the coordinate.
Metrics (dict) -- Custom segment metrics.
(string) --
(dict) -- Custom metric dimension
ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
Value (float) -- Value to be compared.
UserAttributes (dict) -- Custom segment user attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
SourceSegments (list) -- The base segment that you build your segment on. The source segment defines the starting "universe" of endpoints. When you add dimensions to the segment, it filters the source segment based on the dimensions that you specify. You can specify more than one dimensional segment. You can only specify one imported segment.
(dict) -- Segment reference.
Id (string) -- A unique identifier for the segment.
Version (integer) -- If specified contains a specific version of the segment included.
SourceType (string) -- Specify how to handle multiple source segments. For example, if you specify three source segments, should the resulting segment be based on any or all of the segments? Acceptable values: ANY or ALL.
Type (string) -- Specify how to handle multiple segment dimensions. For example, if you specify three dimensions, should the resulting segment include endpoints that are matched by all, any, or none of the dimensions? Acceptable values: ALL, ANY, or NONE.
Include (string) -- Specify how to handle multiple segment groups. For example, if the segment includes three segment groups, should the resulting segment include endpoints that are matched by all, any, or none of the segment groups you created. Acceptable values: ALL, ANY, or NONE.
SegmentType (string) -- The segment type: DIMENSIONAL - A dynamic segment built from selection criteria based on endpoint data reported by your app. You create this type of segment by using the segment builder in the Amazon Pinpoint console or by making a POST request to the segments resource. IMPORT - A static segment built from an imported set of endpoint definitions. You create this type of segment by importing a segment in the Amazon Pinpoint console or by making a POST request to the jobs/import resource.
Version (integer) -- The segment version number.
NextToken (string) -- An identifier used to retrieve the next page of results. The token is null if no additional pages exist.
{'MessageRequest': {'TraceId': 'string'}}
Used to send a direct message.
See also: AWS API Documentation
Request Syntax
client.send_messages( ApplicationId='string', MessageRequest={ 'Addresses': { 'string': { 'BodyOverride': 'string', 'ChannelType': 'GCM'|'APNS'|'APNS_SANDBOX'|'APNS_VOIP'|'APNS_VOIP_SANDBOX'|'ADM'|'SMS'|'EMAIL'|'BAIDU'|'CUSTOM', 'Context': { 'string': 'string' }, 'RawContent': 'string', 'Substitutions': { 'string': [ 'string', ] }, 'TitleOverride': 'string' } }, 'Context': { 'string': 'string' }, 'Endpoints': { 'string': { 'BodyOverride': 'string', 'Context': { 'string': 'string' }, 'RawContent': 'string', 'Substitutions': { 'string': [ 'string', ] }, 'TitleOverride': 'string' } }, 'MessageConfiguration': { 'ADMMessage': { 'Action': 'OPEN_APP'|'DEEP_LINK'|'URL', 'Body': 'string', 'ConsolidationKey': 'string', 'Data': { 'string': 'string' }, 'ExpiresAfter': 'string', 'IconReference': 'string', 'ImageIconUrl': 'string', 'ImageUrl': 'string', 'MD5': 'string', 'RawContent': 'string', 'SilentPush': True|False, 'SmallImageIconUrl': 'string', 'Sound': 'string', 'Substitutions': { 'string': [ 'string', ] }, 'Title': 'string', 'Url': 'string' }, 'APNSMessage': { 'Action': 'OPEN_APP'|'DEEP_LINK'|'URL', 'Badge': 123, 'Body': 'string', 'Category': 'string', 'CollapseId': 'string', 'Data': { 'string': 'string' }, 'MediaUrl': 'string', 'PreferredAuthenticationMethod': 'string', 'Priority': 'string', 'RawContent': 'string', 'SilentPush': True|False, 'Sound': 'string', 'Substitutions': { 'string': [ 'string', ] }, 'ThreadId': 'string', 'TimeToLive': 123, 'Title': 'string', 'Url': 'string' }, 'BaiduMessage': { 'Action': 'OPEN_APP'|'DEEP_LINK'|'URL', 'Body': 'string', 'Data': { 'string': 'string' }, 'IconReference': 'string', 'ImageIconUrl': 'string', 'ImageUrl': 'string', 'RawContent': 'string', 'SilentPush': True|False, 'SmallImageIconUrl': 'string', 'Sound': 'string', 'Substitutions': { 'string': [ 'string', ] }, 'TimeToLive': 123, 'Title': 'string', 'Url': 'string' }, 'DefaultMessage': { 'Body': 'string', 'Substitutions': { 'string': [ 'string', ] } }, 'DefaultPushNotificationMessage': { 'Action': 'OPEN_APP'|'DEEP_LINK'|'URL', 'Body': 'string', 'Data': { 'string': 'string' }, 'SilentPush': True|False, 'Substitutions': { 'string': [ 'string', ] }, 'Title': 'string', 'Url': 'string' }, 'GCMMessage': { 'Action': 'OPEN_APP'|'DEEP_LINK'|'URL', 'Body': 'string', 'CollapseKey': 'string', 'Data': { 'string': 'string' }, 'IconReference': 'string', 'ImageIconUrl': 'string', 'ImageUrl': 'string', 'Priority': 'string', 'RawContent': 'string', 'RestrictedPackageName': 'string', 'SilentPush': True|False, 'SmallImageIconUrl': 'string', 'Sound': 'string', 'Substitutions': { 'string': [ 'string', ] }, 'TimeToLive': 123, 'Title': 'string', 'Url': 'string' }, 'SMSMessage': { 'Body': 'string', 'Keyword': 'string', 'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL', 'OriginationNumber': 'string', 'SenderId': 'string', 'Substitutions': { 'string': [ 'string', ] } } }, 'TraceId': 'string' } )
string
[REQUIRED] The unique ID of your Amazon Pinpoint application.
dict
[REQUIRED] Send message request.
Addresses (dict) -- A map of key-value pairs, where each key is an address and each value is an AddressConfiguration object. An address can be a push notification token, a phone number, or an email address.
(string) --
(dict) -- Address configuration.
BodyOverride (string) -- Body override. If specified will override default body.
ChannelType (string) -- The channel type. Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX | ADM | SMS | EMAIL | BAIDU
Context (dict) -- A map of custom attributes to attributes to be attached to the message for this address. This payload is added to the push notification's 'data.pinpoint' object or added to the email/sms delivery receipt event attributes.
(string) --
(string) --
RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
Substitutions (dict) -- A map of substitution values for the message to be merged with the DefaultMessage's substitutions. Substitutions on this map take precedence over the all other substitutions.
(string) --
(list) --
(string) --
TitleOverride (string) -- Title override. If specified will override default title if applicable.
Context (dict) -- A map of custom attributes to attributes to be attached to the message. This payload is added to the push notification's 'data.pinpoint' object or added to the email/sms delivery receipt event attributes.
(string) --
(string) --
Endpoints (dict) -- A map of key-value pairs, where each key is an endpoint ID and each value is an EndpointSendConfiguration object. Within an EndpointSendConfiguration object, you can tailor the message for an endpoint by specifying message overrides or substitutions.
(string) --
(dict) -- Endpoint send configuration.
BodyOverride (string) -- Body override. If specified will override default body.
Context (dict) -- A map of custom attributes to attributes to be attached to the message for this address. This payload is added to the push notification's 'data.pinpoint' object or added to the email/sms delivery receipt event attributes.
(string) --
(string) --
RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
Substitutions (dict) -- A map of substitution values for the message to be merged with the DefaultMessage's substitutions. Substitutions on this map take precedence over the all other substitutions.
(string) --
(list) --
(string) --
TitleOverride (string) -- Title override. If specified will override default title if applicable.
MessageConfiguration (dict) -- Message configuration.
ADMMessage (dict) -- The message to ADM channels. Overrides the default push notification message.
Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL
Body (string) -- The message body of the notification.
ConsolidationKey (string) -- Optional. Arbitrary string used to indicate multiple messages are logically the same and that ADM is allowed to drop previously enqueued messages in favor of this one.
Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object
(string) --
(string) --
ExpiresAfter (string) -- Optional. Number of seconds ADM should retain the message if the device is offline
IconReference (string) -- The icon image name of the asset saved in your application.
ImageIconUrl (string) -- The URL that points to an image used as the large icon to the notification content view.
ImageUrl (string) -- The URL that points to an image used in the push notification.
MD5 (string) -- Optional. Base-64-encoded MD5 checksum of the data parameter. Used to verify data integrity
RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
SmallImageIconUrl (string) -- The URL that points to an image used as the small icon for the notification which will be used to represent the notification in the status bar and content view
Sound (string) -- Indicates a sound to play when the device receives the notification. Supports default, or the filename of a sound resource bundled in the app. Android sound files must reside in /res/raw/
Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.
(string) --
(list) --
(string) --
Title (string) -- The message title that displays above the message on the user's device.
Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
APNSMessage (dict) -- The message to APNS channels. Overrides the default push notification message.
Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL
Badge (integer) -- Include this key when you want the system to modify the badge of your app icon. If this key is not included in the dictionary, the badge is not changed. To remove the badge, set the value of this key to 0.
Body (string) -- The message body of the notification.
Category (string) -- Provide this key with a string value that represents the notification's type. This value corresponds to the value in the identifier property of one of your app's registered categories.
CollapseId (string) -- An ID that, if assigned to multiple messages, causes APNs to coalesce the messages into a single push notification instead of delivering each message individually. The value must not exceed 64 bytes. Amazon Pinpoint uses this value to set the apns-collapse-id request header when it sends the message to APNs.
Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object
(string) --
(string) --
MediaUrl (string) -- The URL that points to a video used in the push notification.
PreferredAuthenticationMethod (string) -- The preferred authentication method, either "CERTIFICATE" or "TOKEN"
Priority (string) -- The message priority. Amazon Pinpoint uses this value to set the apns-priority request header when it sends the message to APNs. Accepts the following values: "5" - Low priority. Messages might be delayed, delivered in groups, and throttled. "10" - High priority. Messages are sent immediately. High priority messages must cause an alert, sound, or badge on the receiving device. The default value is "10". The equivalent values for FCM or GCM messages are "normal" and "high". Amazon Pinpoint accepts these values for APNs messages and converts them. For more information about the apns-priority parameter, see Communicating with APNs in the APNs Local and Remote Notification Programming Guide.
RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
Sound (string) -- Include this key when you want the system to play a sound. The value of this key is the name of a sound file in your app's main bundle or in the Library/Sounds folder of your app's data container. If the sound file cannot be found, or if you specify defaultfor the value, the system plays the default alert sound.
Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.
(string) --
(list) --
(string) --
ThreadId (string) -- Provide this key with a string value that represents the app-specific identifier for grouping notifications. If you provide a Notification Content app extension, you can use this value to group your notifications together.
TimeToLive (integer) -- The length of time (in seconds) that APNs stores and attempts to deliver the message. If the value is 0, APNs does not store the message or attempt to deliver it more than once. Amazon Pinpoint uses this value to set the apns-expiration request header when it sends the message to APNs.
Title (string) -- The message title that displays above the message on the user's device.
Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
BaiduMessage (dict) -- The message to Baidu GCM channels. Overrides the default push notification message.
Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL
Body (string) -- The message body of the notification.
Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object
(string) --
(string) --
IconReference (string) -- The icon image name of the asset saved in your application.
ImageIconUrl (string) -- The URL that points to an image used as the large icon to the notification content view.
ImageUrl (string) -- The URL that points to an image used in the push notification.
RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
SmallImageIconUrl (string) -- The URL that points to an image used as the small icon for the notification which will be used to represent the notification in the status bar and content view
Sound (string) -- Indicates a sound to play when the device receives the notification. Supports default, or the filename of a sound resource bundled in the app. Android sound files must reside in /res/raw/
Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.
(string) --
(list) --
(string) --
TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept in Baidu storage if the device is offline. The and the default value and the maximum time to live supported is 7 days (604800 seconds)
Title (string) -- The message title that displays above the message on the user's device.
Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
DefaultMessage (dict) -- The default message for all channels.
Body (string) -- The message body of the notification, the email body or the text message.
Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.
(string) --
(list) --
(string) --
DefaultPushNotificationMessage (dict) -- The default push notification message for all push channels.
Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL
Body (string) -- The message body of the notification.
Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object
(string) --
(string) --
SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.
(string) --
(list) --
(string) --
Title (string) -- The message title that displays above the message on the user's device.
Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
GCMMessage (dict) -- The message to GCM channels. Overrides the default push notification message.
Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL
Body (string) -- The message body of the notification.
CollapseKey (string) -- This parameter identifies a group of messages (e.g., with collapse_key: "Updates Available") that can be collapsed, so that only the last message gets sent when delivery can be resumed. This is intended to avoid sending too many of the same messages when the device comes back online or becomes active.
Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object
(string) --
(string) --
IconReference (string) -- The icon image name of the asset saved in your application.
ImageIconUrl (string) -- The URL that points to an image used as the large icon to the notification content view.
ImageUrl (string) -- The URL that points to an image used in the push notification.
Priority (string) -- The message priority. Amazon Pinpoint uses this value to set the FCM or GCM priority parameter when it sends the message. Accepts the following values: "Normal" - Messages might be delayed. Delivery is optimized for battery usage on the receiving device. Use normal priority unless immediate delivery is required. "High" - Messages are sent immediately and might wake a sleeping device. The equivalent values for APNs messages are "5" and "10". Amazon Pinpoint accepts these values here and converts them. For more information, see About FCM Messages in the Firebase documentation.
RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
RestrictedPackageName (string) -- This parameter specifies the package name of the application where the registration tokens must match in order to receive the message.
SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
SmallImageIconUrl (string) -- The URL that points to an image used as the small icon for the notification which will be used to represent the notification in the status bar and content view
Sound (string) -- Indicates a sound to play when the device receives the notification. Supports default, or the filename of a sound resource bundled in the app. Android sound files must reside in /res/raw/
Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.
(string) --
(list) --
(string) --
TimeToLive (integer) -- The length of time (in seconds) that FCM or GCM stores and attempts to deliver the message. If unspecified, the value defaults to the maximum, which is 2,419,200 seconds (28 days). Amazon Pinpoint uses this value to set the FCM or GCM time_to_live parameter.
Title (string) -- The message title that displays above the message on the user's device.
Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
SMSMessage (dict) -- The message to SMS channels. Overrides the default message.
Body (string) -- The body of the SMS message.
Keyword (string) -- The SMS program name that you provided to AWS Support when you requested your dedicated number.
MessageType (string) -- Is this a transaction priority message or lower priority.
OriginationNumber (string) -- The phone number that the SMS message originates from. Specify one of the dedicated long codes or short codes that you requested from AWS Support and that is assigned to your account. If this attribute is not specified, Amazon Pinpoint randomly assigns a long code.
SenderId (string) -- The sender ID that is shown as the message sender on the recipient's device. Support for sender IDs varies by country or region.
Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.
(string) --
(list) --
(string) --
TraceId (string) -- A unique ID that you can use to trace a message. This ID is visible to recipients.
dict
Response Syntax
{ 'MessageResponse': { 'ApplicationId': 'string', 'EndpointResult': { 'string': { 'Address': 'string', 'DeliveryStatus': 'SUCCESSFUL'|'THROTTLED'|'TEMPORARY_FAILURE'|'PERMANENT_FAILURE'|'UNKNOWN_FAILURE'|'OPT_OUT'|'DUPLICATE', 'MessageId': 'string', 'StatusCode': 123, 'StatusMessage': 'string', 'UpdatedToken': 'string' } }, 'RequestId': 'string', 'Result': { 'string': { 'DeliveryStatus': 'SUCCESSFUL'|'THROTTLED'|'TEMPORARY_FAILURE'|'PERMANENT_FAILURE'|'UNKNOWN_FAILURE'|'OPT_OUT'|'DUPLICATE', 'MessageId': 'string', 'StatusCode': 123, 'StatusMessage': 'string', 'UpdatedToken': 'string' } } } }
Response Structure
(dict) -- 200 response
MessageResponse (dict) -- Send message response.
ApplicationId (string) -- Application id of the message.
EndpointResult (dict) -- A map containing a multi part response for each address, with the endpointId as the key and the result as the value.
(string) --
(dict) -- The result from sending a message to an endpoint.
Address (string) -- Address that endpoint message was delivered to.
DeliveryStatus (string) -- The delivery status of the message. Possible values: SUCCESS - The message was successfully delivered to the endpoint. TRANSIENT_FAILURE - A temporary error occurred. Amazon Pinpoint will attempt to deliver the message again later. FAILURE_PERMANENT - An error occurred when delivering the message to the endpoint. Amazon Pinpoint won't attempt to send the message again. TIMEOUT - The message couldn't be sent within the timeout period. QUIET_TIME - The local time for the endpoint was within the Quiet Hours for the campaign. DAILY_CAP - The endpoint has received the maximum number of messages it can receive within a 24-hour period. HOLDOUT - The endpoint was in a hold out treatment for the campaign. THROTTLED - Amazon Pinpoint throttled sending to this endpoint. EXPIRED - The endpoint address is expired. CAMPAIGN_CAP - The endpoint received the maximum number of messages allowed by the campaign. SERVICE_FAILURE - A service-level failure prevented Amazon Pinpoint from delivering the message. UNKNOWN - An unknown error occurred.
MessageId (string) -- Unique message identifier associated with the message that was sent.
StatusCode (integer) -- Downstream service status code.
StatusMessage (string) -- Status message for message delivery.
UpdatedToken (string) -- If token was updated as part of delivery. (This is GCM Specific)
RequestId (string) -- Original request Id for which this message was delivered.
Result (dict) -- A map containing a multi part response for each address, with the address as the key(Email address, phone number or push token) and the result as the value.
(string) --
(dict) -- The result from sending a message to an address.
DeliveryStatus (string) -- The delivery status of the message. Possible values: SUCCESS - The message was successfully delivered to the endpoint. TRANSIENT_FAILURE - A temporary error occurred. Amazon Pinpoint will attempt to deliver the message again later. FAILURE_PERMANENT - An error occurred when delivering the message to the endpoint. Amazon Pinpoint won't attempt to send the message again. TIMEOUT - The message couldn't be sent within the timeout period. QUIET_TIME - The local time for the endpoint was within the Quiet Hours for the campaign. DAILY_CAP - The endpoint has received the maximum number of messages it can receive within a 24-hour period. HOLDOUT - The endpoint was in a hold out treatment for the campaign. THROTTLED - Amazon Pinpoint throttled sending to this endpoint. EXPIRED - The endpoint address is expired. CAMPAIGN_CAP - The endpoint received the maximum number of messages allowed by the campaign. SERVICE_FAILURE - A service-level failure prevented Amazon Pinpoint from delivering the message. UNKNOWN - An unknown error occurred.
MessageId (string) -- Unique message identifier associated with the message that was sent.
StatusCode (integer) -- Downstream service status code.
StatusMessage (string) -- Status message for message delivery.
UpdatedToken (string) -- If token was updated as part of delivery. (This is GCM Specific)
{'SendUsersMessageRequest': {'TraceId': 'string'}}
Used to send a message to a list of users.
See also: AWS API Documentation
Request Syntax
client.send_users_messages( ApplicationId='string', SendUsersMessageRequest={ 'Context': { 'string': 'string' }, 'MessageConfiguration': { 'ADMMessage': { 'Action': 'OPEN_APP'|'DEEP_LINK'|'URL', 'Body': 'string', 'ConsolidationKey': 'string', 'Data': { 'string': 'string' }, 'ExpiresAfter': 'string', 'IconReference': 'string', 'ImageIconUrl': 'string', 'ImageUrl': 'string', 'MD5': 'string', 'RawContent': 'string', 'SilentPush': True|False, 'SmallImageIconUrl': 'string', 'Sound': 'string', 'Substitutions': { 'string': [ 'string', ] }, 'Title': 'string', 'Url': 'string' }, 'APNSMessage': { 'Action': 'OPEN_APP'|'DEEP_LINK'|'URL', 'Badge': 123, 'Body': 'string', 'Category': 'string', 'CollapseId': 'string', 'Data': { 'string': 'string' }, 'MediaUrl': 'string', 'PreferredAuthenticationMethod': 'string', 'Priority': 'string', 'RawContent': 'string', 'SilentPush': True|False, 'Sound': 'string', 'Substitutions': { 'string': [ 'string', ] }, 'ThreadId': 'string', 'TimeToLive': 123, 'Title': 'string', 'Url': 'string' }, 'BaiduMessage': { 'Action': 'OPEN_APP'|'DEEP_LINK'|'URL', 'Body': 'string', 'Data': { 'string': 'string' }, 'IconReference': 'string', 'ImageIconUrl': 'string', 'ImageUrl': 'string', 'RawContent': 'string', 'SilentPush': True|False, 'SmallImageIconUrl': 'string', 'Sound': 'string', 'Substitutions': { 'string': [ 'string', ] }, 'TimeToLive': 123, 'Title': 'string', 'Url': 'string' }, 'DefaultMessage': { 'Body': 'string', 'Substitutions': { 'string': [ 'string', ] } }, 'DefaultPushNotificationMessage': { 'Action': 'OPEN_APP'|'DEEP_LINK'|'URL', 'Body': 'string', 'Data': { 'string': 'string' }, 'SilentPush': True|False, 'Substitutions': { 'string': [ 'string', ] }, 'Title': 'string', 'Url': 'string' }, 'GCMMessage': { 'Action': 'OPEN_APP'|'DEEP_LINK'|'URL', 'Body': 'string', 'CollapseKey': 'string', 'Data': { 'string': 'string' }, 'IconReference': 'string', 'ImageIconUrl': 'string', 'ImageUrl': 'string', 'Priority': 'string', 'RawContent': 'string', 'RestrictedPackageName': 'string', 'SilentPush': True|False, 'SmallImageIconUrl': 'string', 'Sound': 'string', 'Substitutions': { 'string': [ 'string', ] }, 'TimeToLive': 123, 'Title': 'string', 'Url': 'string' }, 'SMSMessage': { 'Body': 'string', 'Keyword': 'string', 'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL', 'OriginationNumber': 'string', 'SenderId': 'string', 'Substitutions': { 'string': [ 'string', ] } } }, 'TraceId': 'string', 'Users': { 'string': { 'BodyOverride': 'string', 'Context': { 'string': 'string' }, 'RawContent': 'string', 'Substitutions': { 'string': [ 'string', ] }, 'TitleOverride': 'string' } } } )
string
[REQUIRED] The unique ID of your Amazon Pinpoint application.
dict
[REQUIRED] Send message request.
Context (dict) -- A map of custom attribute-value pairs. Amazon Pinpoint adds these attributes to the data.pinpoint object in the body of the push notification payload. Amazon Pinpoint also provides these attributes in the events that it generates for users-messages deliveries.
(string) --
(string) --
MessageConfiguration (dict) -- Message definitions for the default message and any messages that are tailored for specific channels.
ADMMessage (dict) -- The message to ADM channels. Overrides the default push notification message.
Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL
Body (string) -- The message body of the notification.
ConsolidationKey (string) -- Optional. Arbitrary string used to indicate multiple messages are logically the same and that ADM is allowed to drop previously enqueued messages in favor of this one.
Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object
(string) --
(string) --
ExpiresAfter (string) -- Optional. Number of seconds ADM should retain the message if the device is offline
IconReference (string) -- The icon image name of the asset saved in your application.
ImageIconUrl (string) -- The URL that points to an image used as the large icon to the notification content view.
ImageUrl (string) -- The URL that points to an image used in the push notification.
MD5 (string) -- Optional. Base-64-encoded MD5 checksum of the data parameter. Used to verify data integrity
RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
SmallImageIconUrl (string) -- The URL that points to an image used as the small icon for the notification which will be used to represent the notification in the status bar and content view
Sound (string) -- Indicates a sound to play when the device receives the notification. Supports default, or the filename of a sound resource bundled in the app. Android sound files must reside in /res/raw/
Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.
(string) --
(list) --
(string) --
Title (string) -- The message title that displays above the message on the user's device.
Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
APNSMessage (dict) -- The message to APNS channels. Overrides the default push notification message.
Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL
Badge (integer) -- Include this key when you want the system to modify the badge of your app icon. If this key is not included in the dictionary, the badge is not changed. To remove the badge, set the value of this key to 0.
Body (string) -- The message body of the notification.
Category (string) -- Provide this key with a string value that represents the notification's type. This value corresponds to the value in the identifier property of one of your app's registered categories.
CollapseId (string) -- An ID that, if assigned to multiple messages, causes APNs to coalesce the messages into a single push notification instead of delivering each message individually. The value must not exceed 64 bytes. Amazon Pinpoint uses this value to set the apns-collapse-id request header when it sends the message to APNs.
Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object
(string) --
(string) --
MediaUrl (string) -- The URL that points to a video used in the push notification.
PreferredAuthenticationMethod (string) -- The preferred authentication method, either "CERTIFICATE" or "TOKEN"
Priority (string) -- The message priority. Amazon Pinpoint uses this value to set the apns-priority request header when it sends the message to APNs. Accepts the following values: "5" - Low priority. Messages might be delayed, delivered in groups, and throttled. "10" - High priority. Messages are sent immediately. High priority messages must cause an alert, sound, or badge on the receiving device. The default value is "10". The equivalent values for FCM or GCM messages are "normal" and "high". Amazon Pinpoint accepts these values for APNs messages and converts them. For more information about the apns-priority parameter, see Communicating with APNs in the APNs Local and Remote Notification Programming Guide.
RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
Sound (string) -- Include this key when you want the system to play a sound. The value of this key is the name of a sound file in your app's main bundle or in the Library/Sounds folder of your app's data container. If the sound file cannot be found, or if you specify defaultfor the value, the system plays the default alert sound.
Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.
(string) --
(list) --
(string) --
ThreadId (string) -- Provide this key with a string value that represents the app-specific identifier for grouping notifications. If you provide a Notification Content app extension, you can use this value to group your notifications together.
TimeToLive (integer) -- The length of time (in seconds) that APNs stores and attempts to deliver the message. If the value is 0, APNs does not store the message or attempt to deliver it more than once. Amazon Pinpoint uses this value to set the apns-expiration request header when it sends the message to APNs.
Title (string) -- The message title that displays above the message on the user's device.
Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
BaiduMessage (dict) -- The message to Baidu GCM channels. Overrides the default push notification message.
Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL
Body (string) -- The message body of the notification.
Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object
(string) --
(string) --
IconReference (string) -- The icon image name of the asset saved in your application.
ImageIconUrl (string) -- The URL that points to an image used as the large icon to the notification content view.
ImageUrl (string) -- The URL that points to an image used in the push notification.
RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
SmallImageIconUrl (string) -- The URL that points to an image used as the small icon for the notification which will be used to represent the notification in the status bar and content view
Sound (string) -- Indicates a sound to play when the device receives the notification. Supports default, or the filename of a sound resource bundled in the app. Android sound files must reside in /res/raw/
Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.
(string) --
(list) --
(string) --
TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept in Baidu storage if the device is offline. The and the default value and the maximum time to live supported is 7 days (604800 seconds)
Title (string) -- The message title that displays above the message on the user's device.
Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
DefaultMessage (dict) -- The default message for all channels.
Body (string) -- The message body of the notification, the email body or the text message.
Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.
(string) --
(list) --
(string) --
DefaultPushNotificationMessage (dict) -- The default push notification message for all push channels.
Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL
Body (string) -- The message body of the notification.
Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object
(string) --
(string) --
SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.
(string) --
(list) --
(string) --
Title (string) -- The message title that displays above the message on the user's device.
Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
GCMMessage (dict) -- The message to GCM channels. Overrides the default push notification message.
Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL
Body (string) -- The message body of the notification.
CollapseKey (string) -- This parameter identifies a group of messages (e.g., with collapse_key: "Updates Available") that can be collapsed, so that only the last message gets sent when delivery can be resumed. This is intended to avoid sending too many of the same messages when the device comes back online or becomes active.
Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object
(string) --
(string) --
IconReference (string) -- The icon image name of the asset saved in your application.
ImageIconUrl (string) -- The URL that points to an image used as the large icon to the notification content view.
ImageUrl (string) -- The URL that points to an image used in the push notification.
Priority (string) -- The message priority. Amazon Pinpoint uses this value to set the FCM or GCM priority parameter when it sends the message. Accepts the following values: "Normal" - Messages might be delayed. Delivery is optimized for battery usage on the receiving device. Use normal priority unless immediate delivery is required. "High" - Messages are sent immediately and might wake a sleeping device. The equivalent values for APNs messages are "5" and "10". Amazon Pinpoint accepts these values here and converts them. For more information, see About FCM Messages in the Firebase documentation.
RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
RestrictedPackageName (string) -- This parameter specifies the package name of the application where the registration tokens must match in order to receive the message.
SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
SmallImageIconUrl (string) -- The URL that points to an image used as the small icon for the notification which will be used to represent the notification in the status bar and content view
Sound (string) -- Indicates a sound to play when the device receives the notification. Supports default, or the filename of a sound resource bundled in the app. Android sound files must reside in /res/raw/
Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.
(string) --
(list) --
(string) --
TimeToLive (integer) -- The length of time (in seconds) that FCM or GCM stores and attempts to deliver the message. If unspecified, the value defaults to the maximum, which is 2,419,200 seconds (28 days). Amazon Pinpoint uses this value to set the FCM or GCM time_to_live parameter.
Title (string) -- The message title that displays above the message on the user's device.
Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
SMSMessage (dict) -- The message to SMS channels. Overrides the default message.
Body (string) -- The body of the SMS message.
Keyword (string) -- The SMS program name that you provided to AWS Support when you requested your dedicated number.
MessageType (string) -- Is this a transaction priority message or lower priority.
OriginationNumber (string) -- The phone number that the SMS message originates from. Specify one of the dedicated long codes or short codes that you requested from AWS Support and that is assigned to your account. If this attribute is not specified, Amazon Pinpoint randomly assigns a long code.
SenderId (string) -- The sender ID that is shown as the message sender on the recipient's device. Support for sender IDs varies by country or region.
Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.
(string) --
(list) --
(string) --
TraceId (string) -- A unique ID that you can use to trace a message. This ID is visible to recipients.
Users (dict) -- A map that associates user IDs with EndpointSendConfiguration objects. Within an EndpointSendConfiguration object, you can tailor the message for a user by specifying message overrides or substitutions.
(string) --
(dict) -- Endpoint send configuration.
BodyOverride (string) -- Body override. If specified will override default body.
Context (dict) -- A map of custom attributes to attributes to be attached to the message for this address. This payload is added to the push notification's 'data.pinpoint' object or added to the email/sms delivery receipt event attributes.
(string) --
(string) --
RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
Substitutions (dict) -- A map of substitution values for the message to be merged with the DefaultMessage's substitutions. Substitutions on this map take precedence over the all other substitutions.
(string) --
(list) --
(string) --
TitleOverride (string) -- Title override. If specified will override default title if applicable.
dict
Response Syntax
{ 'SendUsersMessageResponse': { 'ApplicationId': 'string', 'RequestId': 'string', 'Result': { 'string': { 'string': { 'Address': 'string', 'DeliveryStatus': 'SUCCESSFUL'|'THROTTLED'|'TEMPORARY_FAILURE'|'PERMANENT_FAILURE'|'UNKNOWN_FAILURE'|'OPT_OUT'|'DUPLICATE', 'MessageId': 'string', 'StatusCode': 123, 'StatusMessage': 'string', 'UpdatedToken': 'string' } } } } }
Response Structure
(dict) -- 200 response
SendUsersMessageResponse (dict) -- User send message response.
ApplicationId (string) -- The unique ID of the Amazon Pinpoint project used to send the message.
RequestId (string) -- The unique ID assigned to the users-messages request.
Result (dict) -- An object that shows the endpoints that were messaged for each user. The object provides a list of user IDs. For each user ID, it provides the endpoint IDs that were messaged. For each endpoint ID, it provides an EndpointMessageResult object.
(string) --
(dict) --
(string) --
(dict) -- The result from sending a message to an endpoint.
Address (string) -- Address that endpoint message was delivered to.
DeliveryStatus (string) -- The delivery status of the message. Possible values: SUCCESS - The message was successfully delivered to the endpoint. TRANSIENT_FAILURE - A temporary error occurred. Amazon Pinpoint will attempt to deliver the message again later. FAILURE_PERMANENT - An error occurred when delivering the message to the endpoint. Amazon Pinpoint won't attempt to send the message again. TIMEOUT - The message couldn't be sent within the timeout period. QUIET_TIME - The local time for the endpoint was within the Quiet Hours for the campaign. DAILY_CAP - The endpoint has received the maximum number of messages it can receive within a 24-hour period. HOLDOUT - The endpoint was in a hold out treatment for the campaign. THROTTLED - Amazon Pinpoint throttled sending to this endpoint. EXPIRED - The endpoint address is expired. CAMPAIGN_CAP - The endpoint received the maximum number of messages allowed by the campaign. SERVICE_FAILURE - A service-level failure prevented Amazon Pinpoint from delivering the message. UNKNOWN - An unknown error occurred.
MessageId (string) -- Unique message identifier associated with the message that was sent.
StatusCode (integer) -- Downstream service status code.
StatusMessage (string) -- Status message for message delivery.
UpdatedToken (string) -- If token was updated as part of delivery. (This is GCM Specific)
{'WriteSegmentRequest': {'SegmentGroups': {'Groups': {'SourceType': ['NONE']}}}}Response
{'SegmentResponse': {'SegmentGroups': {'Groups': {'SourceType': ['NONE']}}}}
Used to update a segment.
See also: AWS API Documentation
Request Syntax
client.update_segment( ApplicationId='string', SegmentId='string', WriteSegmentRequest={ 'Dimensions': { 'Attributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE', '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', 'Values': [ 'string', ] } } }, 'Name': 'string', 'SegmentGroups': { 'Groups': [ { 'Dimensions': [ { 'Attributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE', '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', 'Values': [ 'string', ] } } }, ], 'SourceSegments': [ { 'Id': 'string', 'Version': 123 }, ], 'SourceType': 'ALL'|'ANY'|'NONE', 'Type': 'ALL'|'ANY'|'NONE' }, ], 'Include': 'ALL'|'ANY'|'NONE' } } )
string
[REQUIRED] The unique ID of your Amazon Pinpoint application.
string
[REQUIRED] The unique ID of the segment.
dict
[REQUIRED] Segment definition.
Dimensions (dict) -- The segment dimensions attributes.
Attributes (dict) -- Custom segment attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Behavior (dict) -- The segment behaviors attributes.
Recency (dict) -- The recency of use.
Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
Demographic (dict) -- The segment demographics attributes.
AppVersion (dict) -- The app version criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Channel (dict) -- The channel criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
DeviceType (dict) -- The device type criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Make (dict) -- The device make criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Model (dict) -- The device model criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Platform (dict) -- The device platform criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Location (dict) -- The segment location attributes.
Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
GPSPoint (dict) -- The GPS Point dimension.
Coordinates (dict) -- Coordinate to measure distance from.
Latitude (float) -- Latitude
Longitude (float) -- Longitude
RangeInKilometers (float) -- Range in kilometers from the coordinate.
Metrics (dict) -- Custom segment metrics.
(string) --
(dict) -- Custom metric dimension
ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
Value (float) -- Value to be compared.
UserAttributes (dict) -- Custom segment user attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Name (string) -- The name of segment
SegmentGroups (dict) -- A segment group, which consists of zero or more source segments, plus dimensions that are applied to those source segments. Your request can only include one segment group. Your request can include either a SegmentGroups object or a Dimensions object, but not both.
Groups (list) -- A set of segment criteria to evaluate.
(dict) -- Segment group definition.
Dimensions (list) -- List of dimensions to include or exclude.
(dict) -- Segment dimensions
Attributes (dict) -- Custom segment attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Behavior (dict) -- The segment behaviors attributes.
Recency (dict) -- The recency of use.
Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
Demographic (dict) -- The segment demographics attributes.
AppVersion (dict) -- The app version criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Channel (dict) -- The channel criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
DeviceType (dict) -- The device type criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Make (dict) -- The device make criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Model (dict) -- The device model criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Platform (dict) -- The device platform criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Location (dict) -- The segment location attributes.
Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
GPSPoint (dict) -- The GPS Point dimension.
Coordinates (dict) -- Coordinate to measure distance from.
Latitude (float) -- Latitude
Longitude (float) -- Longitude
RangeInKilometers (float) -- Range in kilometers from the coordinate.
Metrics (dict) -- Custom segment metrics.
(string) --
(dict) -- Custom metric dimension
ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
Value (float) -- Value to be compared.
UserAttributes (dict) -- Custom segment user attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
SourceSegments (list) -- The base segment that you build your segment on. The source segment defines the starting "universe" of endpoints. When you add dimensions to the segment, it filters the source segment based on the dimensions that you specify. You can specify more than one dimensional segment. You can only specify one imported segment.
(dict) -- Segment reference.
Id (string) -- A unique identifier for the segment.
Version (integer) -- If specified contains a specific version of the segment included.
SourceType (string) -- Specify how to handle multiple source segments. For example, if you specify three source segments, should the resulting segment be based on any or all of the segments? Acceptable values: ANY or ALL.
Type (string) -- Specify how to handle multiple segment dimensions. For example, if you specify three dimensions, should the resulting segment include endpoints that are matched by all, any, or none of the dimensions? Acceptable values: ALL, ANY, or NONE.
Include (string) -- Specify how to handle multiple segment groups. For example, if the segment includes three segment groups, should the resulting segment include endpoints that are matched by all, any, or none of the segment groups you created. Acceptable values: ALL, ANY, or NONE.
dict
Response Syntax
{ 'SegmentResponse': { 'ApplicationId': 'string', 'CreationDate': 'string', 'Dimensions': { 'Attributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE', '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', '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', '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', 'Values': [ 'string', ] } } }, ], 'SourceSegments': [ { 'Id': 'string', 'Version': 123 }, ], 'SourceType': 'ALL'|'ANY'|'NONE', 'Type': 'ALL'|'ANY'|'NONE' }, ], 'Include': 'ALL'|'ANY'|'NONE' }, 'SegmentType': 'DIMENSIONAL'|'IMPORT', 'Version': 123 } }
Response Structure
(dict) -- 200 response
SegmentResponse (dict) -- Segment definition.
ApplicationId (string) -- The ID of the application that the segment applies to.
CreationDate (string) -- The date and time when the segment was created.
Dimensions (dict) -- The segment dimensions attributes.
Attributes (dict) -- Custom segment attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Behavior (dict) -- The segment behaviors attributes.
Recency (dict) -- The recency of use.
Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
Demographic (dict) -- The segment demographics attributes.
AppVersion (dict) -- The app version criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Channel (dict) -- The channel criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
DeviceType (dict) -- The device type criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Make (dict) -- The device make criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Model (dict) -- The device model criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Platform (dict) -- The device platform criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Location (dict) -- The segment location attributes.
Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
GPSPoint (dict) -- The GPS Point dimension.
Coordinates (dict) -- Coordinate to measure distance from.
Latitude (float) -- Latitude
Longitude (float) -- Longitude
RangeInKilometers (float) -- Range in kilometers from the coordinate.
Metrics (dict) -- Custom segment metrics.
(string) --
(dict) -- Custom metric dimension
ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
Value (float) -- Value to be compared.
UserAttributes (dict) -- Custom segment user attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Id (string) -- The unique segment ID.
ImportDefinition (dict) -- The import job settings.
ChannelCounts (dict) -- The number of channel types in the imported segment.
(string) --
(integer) --
ExternalId (string) -- (Deprecated) Your AWS account ID, which you assigned to the ExternalID key in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This requirement is removed, and external IDs are not recommended for IAM roles assumed by Amazon Pinpoint.
Format (string) -- The format of the endpoint files that were imported to create this segment. Valid values: CSV, JSON
RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the endpoints in Amazon S3.
S3Url (string) -- The URL of the S3 bucket that the segment was imported from.
Size (integer) -- The number of endpoints that were successfully imported to create this segment.
LastModifiedDate (string) -- The date and time when the segment was last modified.
Name (string) -- The name of the segment.
SegmentGroups (dict) -- A segment group, which consists of zero or more source segments, plus dimensions that are applied to those source segments.
Groups (list) -- A set of segment criteria to evaluate.
(dict) -- Segment group definition.
Dimensions (list) -- List of dimensions to include or exclude.
(dict) -- Segment dimensions
Attributes (dict) -- Custom segment attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Behavior (dict) -- The segment behaviors attributes.
Recency (dict) -- The recency of use.
Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
Demographic (dict) -- The segment demographics attributes.
AppVersion (dict) -- The app version criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Channel (dict) -- The channel criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
DeviceType (dict) -- The device type criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Make (dict) -- The device make criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Model (dict) -- The device model criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Platform (dict) -- The device platform criteria for the segment.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
Location (dict) -- The segment location attributes.
Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
GPSPoint (dict) -- The GPS Point dimension.
Coordinates (dict) -- Coordinate to measure distance from.
Latitude (float) -- Latitude
Longitude (float) -- Longitude
RangeInKilometers (float) -- Range in kilometers from the coordinate.
Metrics (dict) -- Custom segment metrics.
(string) --
(dict) -- Custom metric dimension
ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
Value (float) -- Value to be compared.
UserAttributes (dict) -- Custom segment user attributes.
(string) --
(dict) -- Custom attibute dimension
AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
(string) --
SourceSegments (list) -- The base segment that you build your segment on. The source segment defines the starting "universe" of endpoints. When you add dimensions to the segment, it filters the source segment based on the dimensions that you specify. You can specify more than one dimensional segment. You can only specify one imported segment.
(dict) -- Segment reference.
Id (string) -- A unique identifier for the segment.
Version (integer) -- If specified contains a specific version of the segment included.
SourceType (string) -- Specify how to handle multiple source segments. For example, if you specify three source segments, should the resulting segment be based on any or all of the segments? Acceptable values: ANY or ALL.
Type (string) -- Specify how to handle multiple segment dimensions. For example, if you specify three dimensions, should the resulting segment include endpoints that are matched by all, any, or none of the dimensions? Acceptable values: ALL, ANY, or NONE.
Include (string) -- Specify how to handle multiple segment groups. For example, if the segment includes three segment groups, should the resulting segment include endpoints that are matched by all, any, or none of the segment groups you created. Acceptable values: ALL, ANY, or NONE.
SegmentType (string) -- The segment type: DIMENSIONAL - A dynamic segment built from selection criteria based on endpoint data reported by your app. You create this type of segment by using the segment builder in the Amazon Pinpoint console or by making a POST request to the segments resource. IMPORT - A static segment built from an imported set of endpoint definitions. You create this type of segment by importing a segment in the Amazon Pinpoint console or by making a POST request to the jobs/import resource.
Version (integer) -- The segment version number.