2017/03/20 - Amazon Pinpoint - 3 new 8 updated api methods
Changes Added ability to segment endpoints by user attributes in addition to endpoint attributes. Added functionality to publish raw app analytics and campaign events data as events streams to Kinesis and Kinesis Firehose.
Returns the event stream for an app.
Request Syntax
client.get_event_stream( ApplicationId='string' )
string
[REQUIRED] ApplicationId
dict
Response Syntax
{ 'EventStream': { 'ApplicationId': 'string', 'DestinationStreamArn': 'string', 'ExternalId': 'string', 'LastModifiedDate': 'string', 'LastUpdatedBy': 'string', 'RoleArn': 'string' } }
Response Structure
(dict) -- GetEventStream Response
EventStream (dict) -- Model for an event publishing subscription export.
ApplicationId (string) -- The ID of the application from which events should be published.
DestinationStreamArn (string) -- The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery stream to which you want to publish events. Firehose ARN: arn:aws:firehose:REGION:ACCOUNT_ID:deliverystream/STREAM_NAME Kinesis ARN: arn:aws:kinesis:REGION:ACCOUNT_ID:stream/STREAM_NAME
ExternalId (string) -- The external ID assigned the IAM role that authorizes Amazon Pinpoint to publish to the stream.
LastModifiedDate (string) -- The date the event stream was last updated in ISO 8601 format.
LastUpdatedBy (string) -- The IAM user who last modified the event stream.
RoleArn (string) -- The IAM role that authorizes Amazon Pinpoint to publish events to the stream in your account.
Deletes the event stream for an app.
Request Syntax
client.delete_event_stream( ApplicationId='string' )
string
[REQUIRED] ApplicationId
dict
Response Syntax
{ 'EventStream': { 'ApplicationId': 'string', 'DestinationStreamArn': 'string', 'ExternalId': 'string', 'LastModifiedDate': 'string', 'LastUpdatedBy': 'string', 'RoleArn': 'string' } }
Response Structure
(dict) -- DeleteEventStream Response
EventStream (dict) -- Model for an event publishing subscription export.
ApplicationId (string) -- The ID of the application from which events should be published.
DestinationStreamArn (string) -- The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery stream to which you want to publish events. Firehose ARN: arn:aws:firehose:REGION:ACCOUNT_ID:deliverystream/STREAM_NAME Kinesis ARN: arn:aws:kinesis:REGION:ACCOUNT_ID:stream/STREAM_NAME
ExternalId (string) -- The external ID assigned the IAM role that authorizes Amazon Pinpoint to publish to the stream.
LastModifiedDate (string) -- The date the event stream was last updated in ISO 8601 format.
LastUpdatedBy (string) -- The IAM user who last modified the event stream.
RoleArn (string) -- The IAM role that authorizes Amazon Pinpoint to publish events to the stream in your account.
Use to create or update the event stream for an app.
Request Syntax
client.put_event_stream( ApplicationId='string', WriteEventStream={ 'DestinationStreamArn': 'string', 'ExternalId': 'string', 'RoleArn': 'string' } )
string
[REQUIRED] ApplicationId
dict
[REQUIRED] EventStream to write.
DestinationStreamArn (string) -- The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery stream to which you want to publish events. Firehose ARN: arn:aws:firehose:REGION:ACCOUNT_ID:deliverystream/STREAM_NAME Kinesis ARN: arn:aws:kinesis:REGION:ACCOUNT_ID:stream/STREAM_NAME
ExternalId (string) -- The external ID assigned the IAM role that authorizes Amazon Pinpoint to publish to the stream.
RoleArn (string) -- The IAM role that authorizes Amazon Pinpoint to publish events to the stream in your account.
dict
Response Syntax
{ 'EventStream': { 'ApplicationId': 'string', 'DestinationStreamArn': 'string', 'ExternalId': 'string', 'LastModifiedDate': 'string', 'LastUpdatedBy': 'string', 'RoleArn': 'string' } }
Response Structure
(dict) -- PutEventStream Response
EventStream (dict) -- Model for an event publishing subscription export.
ApplicationId (string) -- The ID of the application from which events should be published.
DestinationStreamArn (string) -- The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery stream to which you want to publish events. Firehose ARN: arn:aws:firehose:REGION:ACCOUNT_ID:deliverystream/STREAM_NAME Kinesis ARN: arn:aws:kinesis:REGION:ACCOUNT_ID:stream/STREAM_NAME
ExternalId (string) -- The external ID assigned the IAM role that authorizes Amazon Pinpoint to publish to the stream.
LastModifiedDate (string) -- The date the event stream was last updated in ISO 8601 format.
LastUpdatedBy (string) -- The IAM user who last modified the event stream.
RoleArn (string) -- The IAM role that authorizes Amazon Pinpoint to publish events to the stream in your account.
{'WriteSegmentRequest': {'Dimensions': {'UserAttributes': {'string': {'AttributeType': 'INCLUSIVE ' '| ' 'EXCLUSIVE', 'Values': ['string']}}}}}Response
{'SegmentResponse': {'Dimensions': {'UserAttributes': {'string': {'AttributeType': 'INCLUSIVE ' '| ' 'EXCLUSIVE', 'Values': ['string']}}}}}
Used to create or update a segment.
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', ] }, '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', ] } }, 'UserAttributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] } } }, 'Name': 'string' } )
string
[REQUIRED]
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) --
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) --
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
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', ] }, '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', ] } }, 'UserAttributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] } } }, 'Id': 'string', 'ImportDefinition': { 'ExternalId': 'string', 'Format': 'CSV'|'JSON', 'RoleArn': 'string', 'S3Url': 'string', 'Size': 123 }, 'LastModifiedDate': 'string', 'Name': 'string', 'SegmentType': 'DIMENSIONAL'|'IMPORT', 'Version': 123 } }
Response Structure
(dict) -- 201 response
SegmentResponse (dict) -- Segment definition.
ApplicationId (string) -- The ID of the application to which the segment applies.
CreationDate (string) -- The date the segment was created in ISO 8601 format.
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) --
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) --
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.
ExternalId (string) -- A unique, custom ID assigned to the IAM role that restricts who can assume the role.
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) -- A URL that points to the Amazon S3 location from which the endpoints for this segment were imported.
Size (integer) -- The number of endpoints that were successfully imported to create this segment.
LastModifiedDate (string) -- The date the segment was last updated in ISO 8601 format.
Name (string) -- The name of segment
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': {'Dimensions': {'UserAttributes': {'string': {'AttributeType': 'INCLUSIVE ' '| ' 'EXCLUSIVE', 'Values': ['string']}}}}}
Deletes a segment.
Request Syntax
client.delete_segment( ApplicationId='string', SegmentId='string' )
string
[REQUIRED]
string
[REQUIRED]
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', ] }, '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', ] } }, 'UserAttributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] } } }, 'Id': 'string', 'ImportDefinition': { 'ExternalId': 'string', 'Format': 'CSV'|'JSON', 'RoleArn': 'string', 'S3Url': 'string', 'Size': 123 }, 'LastModifiedDate': 'string', 'Name': 'string', 'SegmentType': 'DIMENSIONAL'|'IMPORT', 'Version': 123 } }
Response Structure
(dict) -- 200 response
SegmentResponse (dict) -- Segment definition.
ApplicationId (string) -- The ID of the application to which the segment applies.
CreationDate (string) -- The date the segment was created in ISO 8601 format.
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) --
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) --
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.
ExternalId (string) -- A unique, custom ID assigned to the IAM role that restricts who can assume the role.
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) -- A URL that points to the Amazon S3 location from which the endpoints for this segment were imported.
Size (integer) -- The number of endpoints that were successfully imported to create this segment.
LastModifiedDate (string) -- The date the segment was last updated in ISO 8601 format.
Name (string) -- The name of segment
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': {'Item': {'TimezonesCompletedCount': 'integer', 'TimezonesTotalCount': 'integer'}}}
Returns information about the activity performed by a campaign.
Request Syntax
client.get_campaign_activities( ApplicationId='string', CampaignId='string', PageSize='string', Token='string' )
string
[REQUIRED]
string
[REQUIRED]
string
string
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' }, ] } }
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.
{'SegmentResponse': {'Dimensions': {'UserAttributes': {'string': {'AttributeType': 'INCLUSIVE ' '| ' 'EXCLUSIVE', 'Values': ['string']}}}}}
Returns information about a segment.
Request Syntax
client.get_segment( ApplicationId='string', SegmentId='string' )
string
[REQUIRED]
string
[REQUIRED]
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', ] }, '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', ] } }, 'UserAttributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] } } }, 'Id': 'string', 'ImportDefinition': { 'ExternalId': 'string', 'Format': 'CSV'|'JSON', 'RoleArn': 'string', 'S3Url': 'string', 'Size': 123 }, 'LastModifiedDate': 'string', 'Name': 'string', 'SegmentType': 'DIMENSIONAL'|'IMPORT', 'Version': 123 } }
Response Structure
(dict) -- 200 response
SegmentResponse (dict) -- Segment definition.
ApplicationId (string) -- The ID of the application to which the segment applies.
CreationDate (string) -- The date the segment was created in ISO 8601 format.
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) --
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) --
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.
ExternalId (string) -- A unique, custom ID assigned to the IAM role that restricts who can assume the role.
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) -- A URL that points to the Amazon S3 location from which the endpoints for this segment were imported.
Size (integer) -- The number of endpoints that were successfully imported to create this segment.
LastModifiedDate (string) -- The date the segment was last updated in ISO 8601 format.
Name (string) -- The name of segment
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': {'Dimensions': {'UserAttributes': {'string': {'AttributeType': 'INCLUSIVE ' '| ' 'EXCLUSIVE', 'Values': ['string']}}}}}
Returns information about a segment version.
Request Syntax
client.get_segment_version( ApplicationId='string', SegmentId='string', Version='string' )
string
[REQUIRED]
string
[REQUIRED]
string
[REQUIRED]
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', ] }, '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', ] } }, 'UserAttributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] } } }, 'Id': 'string', 'ImportDefinition': { 'ExternalId': 'string', 'Format': 'CSV'|'JSON', 'RoleArn': 'string', 'S3Url': 'string', 'Size': 123 }, 'LastModifiedDate': 'string', 'Name': 'string', 'SegmentType': 'DIMENSIONAL'|'IMPORT', 'Version': 123 } }
Response Structure
(dict) -- 200 response
SegmentResponse (dict) -- Segment definition.
ApplicationId (string) -- The ID of the application to which the segment applies.
CreationDate (string) -- The date the segment was created in ISO 8601 format.
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) --
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) --
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.
ExternalId (string) -- A unique, custom ID assigned to the IAM role that restricts who can assume the role.
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) -- A URL that points to the Amazon S3 location from which the endpoints for this segment were imported.
Size (integer) -- The number of endpoints that were successfully imported to create this segment.
LastModifiedDate (string) -- The date the segment was last updated in ISO 8601 format.
Name (string) -- The name of segment
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': {'Dimensions': {'UserAttributes': {'string': {'AttributeType': 'INCLUSIVE ' '| ' 'EXCLUSIVE', 'Values': ['string']}}}}}}
Returns information about your segment versions.
Request Syntax
client.get_segment_versions( ApplicationId='string', PageSize='string', SegmentId='string', Token='string' )
string
[REQUIRED]
string
string
[REQUIRED]
string
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', ] }, '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', ] } }, 'UserAttributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] } } }, 'Id': 'string', 'ImportDefinition': { 'ExternalId': 'string', 'Format': 'CSV'|'JSON', 'RoleArn': 'string', 'S3Url': 'string', 'Size': 123 }, 'LastModifiedDate': 'string', 'Name': 'string', '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 to which the segment applies.
CreationDate (string) -- The date the segment was created in ISO 8601 format.
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) --
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) --
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.
ExternalId (string) -- A unique, custom ID assigned to the IAM role that restricts who can assume the role.
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) -- A URL that points to the Amazon S3 location from which the endpoints for this segment were imported.
Size (integer) -- The number of endpoints that were successfully imported to create this segment.
LastModifiedDate (string) -- The date the segment was last updated in ISO 8601 format.
Name (string) -- The name of segment
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': {'Dimensions': {'UserAttributes': {'string': {'AttributeType': 'INCLUSIVE ' '| ' 'EXCLUSIVE', 'Values': ['string']}}}}}}
Used to get information about your segments.
Request Syntax
client.get_segments( ApplicationId='string', PageSize='string', Token='string' )
string
[REQUIRED]
string
string
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', ] }, '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', ] } }, 'UserAttributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] } } }, 'Id': 'string', 'ImportDefinition': { 'ExternalId': 'string', 'Format': 'CSV'|'JSON', 'RoleArn': 'string', 'S3Url': 'string', 'Size': 123 }, 'LastModifiedDate': 'string', 'Name': 'string', '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 to which the segment applies.
CreationDate (string) -- The date the segment was created in ISO 8601 format.
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) --
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) --
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.
ExternalId (string) -- A unique, custom ID assigned to the IAM role that restricts who can assume the role.
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) -- A URL that points to the Amazon S3 location from which the endpoints for this segment were imported.
Size (integer) -- The number of endpoints that were successfully imported to create this segment.
LastModifiedDate (string) -- The date the segment was last updated in ISO 8601 format.
Name (string) -- The name of segment
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.
{'WriteSegmentRequest': {'Dimensions': {'UserAttributes': {'string': {'AttributeType': 'INCLUSIVE ' '| ' 'EXCLUSIVE', 'Values': ['string']}}}}}Response
{'SegmentResponse': {'Dimensions': {'UserAttributes': {'string': {'AttributeType': 'INCLUSIVE ' '| ' 'EXCLUSIVE', 'Values': ['string']}}}}}
Use to update a segment.
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', ] }, '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', ] } }, 'UserAttributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] } } }, 'Name': 'string' } )
string
[REQUIRED]
string
[REQUIRED]
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) --
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) --
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
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', ] }, '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', ] } }, 'UserAttributes': { 'string': { 'AttributeType': 'INCLUSIVE'|'EXCLUSIVE', 'Values': [ 'string', ] } } }, 'Id': 'string', 'ImportDefinition': { 'ExternalId': 'string', 'Format': 'CSV'|'JSON', 'RoleArn': 'string', 'S3Url': 'string', 'Size': 123 }, 'LastModifiedDate': 'string', 'Name': 'string', 'SegmentType': 'DIMENSIONAL'|'IMPORT', 'Version': 123 } }
Response Structure
(dict) -- 200 response
SegmentResponse (dict) -- Segment definition.
ApplicationId (string) -- The ID of the application to which the segment applies.
CreationDate (string) -- The date the segment was created in ISO 8601 format.
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) --
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) --
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.
ExternalId (string) -- A unique, custom ID assigned to the IAM role that restricts who can assume the role.
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) -- A URL that points to the Amazon S3 location from which the endpoints for this segment were imported.
Size (integer) -- The number of endpoints that were successfully imported to create this segment.
LastModifiedDate (string) -- The date the segment was last updated in ISO 8601 format.
Name (string) -- The name of segment
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.