Amazon Connect Customer Profiles

2026/08/31 - Amazon Connect Customer Profiles - 7 new 6 updated api methods

Changes  This release introduces new APIs for segment membership events allowing segment definition membership events to be exported to a kinesis stream for downstream processing. Additionally, includes new calculated attribute statistic and 2 new segment dimension types.

DisassociateStreamForSegments (new) Link ¶

Disassociates the Amazon Kinesis data stream configured for segment membership events. All active segment subscriptions delivering events to this stream are eventually stopped.

See also: AWS API Documentation

Request Syntax

client.disassociate_stream_for_segments(
    DomainName='string'
)
type DomainName:

string

param DomainName:

[REQUIRED]

The unique name of the domain.

rtype:

dict

returns:

Response Syntax

{
    'Message': 'string'
}

Response Structure

  • (dict) --

    • Message (string) --

      A confirmation message indicating the stream was disassociated successfully.

AssociateStreamForSegments (new) Link ¶

Associates an Amazon Kinesis data stream to receive segment membership events for a given domain. This is a domain-level configuration that applies to all segment subscriptions within the domain. A domain can have only one associated stream at a time.

See also: AWS API Documentation

Request Syntax

client.associate_stream_for_segments(
    DomainName='string',
    DestinationArn='string',
    DestinationRoleArn='string'
)
type DomainName:

string

param DomainName:

[REQUIRED]

The unique name of the domain.

type DestinationArn:

string

param DestinationArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the Amazon Kinesis data stream to deliver segment membership events to. For example, arn:aws:kinesis:region:account-id:stream/stream-name.

type DestinationRoleArn:

string

param DestinationRoleArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the IAM role that allows Customer Profiles service principal to assume the role for conducting AWS Key Management Service (KMS) and Amazon Kinesis operations. The role must grant the following Amazon Kinesis permissions to deliver segment membership events to the stream:

  • kinesis:PutRecord

  • kinesis:PutRecords

  • kinesis:DescribeStream

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

ListSegmentSubscriptionEvents (new) Link ¶

Returns the most recent membership events for a segment. Each event represents a profile that entered or exited the segment.

This operation is paginated.

See also: AWS API Documentation

Request Syntax

client.list_segment_subscription_events(
    DomainName='string',
    SegmentDefinitionName='string',
    MaxResults=123,
    NextToken='string'
)
type DomainName:

string

param DomainName:

[REQUIRED]

The unique name of the domain.

type SegmentDefinitionName:

string

param SegmentDefinitionName:

[REQUIRED]

The unique name of the segment definition.

type MaxResults:

integer

param MaxResults:

The maximum number of events to return per page.

type NextToken:

string

param NextToken:

The pagination token from the previous call to retrieve the next page of results.

rtype:

dict

returns:

Response Syntax

{
    'Events': [
        {
            'ProfileId': 'string',
            'UpdatedAt': datetime(2015, 1, 1),
            'EventType': 'LIVE'|'SCHEDULE',
            'Event': 'JOINED'|'LEFT'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Events (list) --

      A list of segment membership events.

      • (dict) --

        Represents a single segment membership event.

        • ProfileId (string) --

          The unique identifier of a customer profile.

        • UpdatedAt (datetime) --

          The timestamp of when the membership change was detected.

        • EventType (string) --

          The type of event that triggered the membership change. The following are valid values:

          • LIVE: Real-time event triggered by a profile or calculated attribute change (Classic segments only).

          • SCHEDULE: Event generated during a scheduled execution.

        • Event (string) --

          Whether the profile joined or left the segment. The following are valid values:

          • JOINED: The profile joined the segment.

          • LEFT: The profile left the segment.

    • NextToken (string) --

      The pagination token to use to retrieve the next page of results.

DeleteSegmentSubscription (new) Link ¶

Deletes a segment subscription for membership events. All active event notifications for this segment are stopped.

See also: AWS API Documentation

Request Syntax

client.delete_segment_subscription(
    DomainName='string',
    SegmentDefinitionName='string'
)
type DomainName:

string

param DomainName:

[REQUIRED]

The unique name of the domain.

type SegmentDefinitionName:

string

param SegmentDefinitionName:

[REQUIRED]

The unique name of the segment definition.

rtype:

dict

returns:

Response Syntax

{
    'Message': 'string'
}

Response Structure

  • (dict) --

    • Message (string) --

      A confirmation message indicating the subscription was deleted successfully.

GetStreamForSegments (new) Link ¶

Returns information about the segment membership event stream configured for a specific domain, including the stream state and associated segments.

See also: AWS API Documentation

Request Syntax

client.get_stream_for_segments(
    DomainName='string'
)
type DomainName:

string

param DomainName:

[REQUIRED]

The unique name of the domain.

rtype:

dict

returns:

Response Syntax

{
    'AssociatedAt': datetime(2015, 1, 1),
    'AssociatedSegments': [
        {
            'SegmentName': 'string',
            'Status': 'STARTING'|'RUNNING'|'STOPPED'|'FAILED',
            'Message': 'string'
        },
    ],
    'DomainName': 'string',
    'DestinationArn': 'string',
    'DestinationRoleArn': 'string',
    'State': 'RUNNING'|'UNHEALTHY'|'STOPPED',
    'DisassociatedAt': datetime(2015, 1, 1),
    'FailureReason': 'string'
}

Response Structure

  • (dict) --

    • AssociatedAt (datetime) --

      The timestamp of when the stream was associated.

    • AssociatedSegments (list) --

      A list of segments currently associated with the stream and their subscription status.

      • (dict) --

        Represents a segment associated with a membership event stream.

        • SegmentName (string) --

          The unique name of the segment definition.

        • Status (string) --

          The subscription status of the segment. The following are valid values:

          • STARTING: The segment is being prepared to publish membership events.

          • RUNNING: The segment is actively publishing membership events to the stream.

          • STOPPED: The segment has stopped publishing membership events.

          • FAILED: The segment failed to publish membership events.

        • Message (string) --

          An optional message providing context, such as a failure reason.

    • DomainName (string) --

      The unique name of the domain.

    • DestinationArn (string) --

      The Amazon Resource Name (ARN) of the Amazon Kinesis data stream receiving segment membership events.

    • DestinationRoleArn (string) --

      The Amazon Resource Name (ARN) of the IAM role used for Amazon Kinesis and AWS Key Management Service (KMS) operations.

    • State (string) --

      The operational state of the destination stream. The following are valid values:

      • RUNNING: The stream is associated and healthy. Segment membership events are being published.

      • UNHEALTHY: The stream is associated but events cannot currently be published. See FailureReason for details.

      • STOPPED: The stream is no longer publishing segment membership events.

    • DisassociatedAt (datetime) --

      The timestamp of when the stream was disassociated.

    • FailureReason (string) --

      The reason why the stream is in an unhealthy state, if applicable.

PutSegmentSubscription (new) Link ¶

Creates or updates a segment subscription for membership events. When a subscription is created, an initial snapshot is taken and the system begins monitoring for membership changes.

You can optionally set a schedule configuration interval to control how often membership snapshots are run. The interval can be from 1 to 24 hours. If not set, the interval defaults to 24 hours. Scheduled snapshots run on a best-effort basis. If a scheduled snapshot takes longer than the configured interval, the next scheduled run does not start until the in-progress snapshot completes, so a run might be delayed or skipped and is not guaranteed to occur at exactly the requested time.

For Classic segments, membership events are generated from these scheduled snapshots and also in near real-time as profile attribute changes occur. For SQL segments, membership events are generated only from the scheduled snapshots.

See also: AWS API Documentation

Request Syntax

client.put_segment_subscription(
    DomainName='string',
    SegmentDefinitionName='string',
    ScheduleConfiguration={
        'Interval': 123,
        'Unit': 'HOURLY'
    }
)
type DomainName:

string

param DomainName:

[REQUIRED]

The unique name of the domain.

type SegmentDefinitionName:

string

param SegmentDefinitionName:

[REQUIRED]

The unique name of the segment definition.

type ScheduleConfiguration:

dict

param ScheduleConfiguration:

The optional schedule configuration that controls how often membership snapshots are run. If not provided, the subscription defaults to a 24-hour interval.

  • Interval (integer) -- [REQUIRED]

    The interval between scheduled executions.

  • Unit (string) --

    The unit for the interval. The following are valid values:

    • HOURLY: The interval is measured in hours.

rtype:

dict

returns:

Response Syntax

{
    'Status': 'STARTING'|'RUNNING'|'STOPPED'|'FAILED',
    'ScheduleConfiguration': {
        'Interval': 123,
        'Unit': 'HOURLY'
    },
    'StartedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • Status (string) --

      The current lifecycle status of the subscription. The following are valid values:

      • STARTING: Initial snapshot is in progress.

      • RUNNING: Notifications are active and running.

      • STOPPED: Notifications have been stopped.

      • FAILED: Notifications failed (for example, the Amazon Kinesis data stream became inaccessible).

    • ScheduleConfiguration (dict) --

      The schedule configuration for the subscription, if configured.

      • Interval (integer) --

        The interval between scheduled executions.

      • Unit (string) --

        The unit for the interval. The following are valid values:

        • HOURLY: The interval is measured in hours.

    • StartedAt (datetime) --

      The timestamp of when the subscription was started.

GetSegmentSubscription (new) Link ¶

Returns the current subscription configuration, execution schedule, and status for segment membership events.

See also: AWS API Documentation

Request Syntax

client.get_segment_subscription(
    DomainName='string',
    SegmentDefinitionName='string'
)
type DomainName:

string

param DomainName:

[REQUIRED]

The unique name of the domain.

type SegmentDefinitionName:

string

param SegmentDefinitionName:

[REQUIRED]

The unique name of the segment definition.

rtype:

dict

returns:

Response Syntax

{
    'Status': 'STARTING'|'RUNNING'|'STOPPED'|'FAILED',
    'Message': 'string',
    'ScheduleConfiguration': {
        'Interval': 123,
        'Unit': 'HOURLY'
    },
    'ScheduledExecutions': {
        'NextExecutedAt': datetime(2015, 1, 1),
        'LastExecutedAt': datetime(2015, 1, 1)
    },
    'StartedAt': datetime(2015, 1, 1),
    'LastUpdatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • Status (string) --

      The current lifecycle status of the subscription. The following are valid values:

      • STARTING: Initial snapshot is in progress.

      • RUNNING: Notifications are active and running.

      • STOPPED: Notifications have been stopped.

      • FAILED: Notifications failed (for example, the Amazon Kinesis data stream became inaccessible).

    • Message (string) --

      A status message providing additional context, such as a failure reason.

    • ScheduleConfiguration (dict) --

      The schedule configuration for periodic membership event notifications.

      • Interval (integer) --

        The interval between scheduled executions.

      • Unit (string) --

        The unit for the interval. The following are valid values:

        • HOURLY: The interval is measured in hours.

    • ScheduledExecutions (dict) --

      Information about scheduled execution timestamps.

      • NextExecutedAt (datetime) --

        The timestamp of the next scheduled execution.

      • LastExecutedAt (datetime) --

        The timestamp of the last successful scheduled execution.

    • StartedAt (datetime) --

      The timestamp of when the subscription was first started.

    • LastUpdatedAt (datetime) --

      The timestamp of the most recent configuration change.

CreateCalculatedAttributeDefinition (updated) Link ¶
Changes (both)
{'Statistic': {'RECENT_OCCURRENCES'}}

Creates a new calculated attribute definition. After creation, new object data ingested into Customer Profiles will be included in the calculated attribute, which can be retrieved for a profile using the GetCalculatedAttributeForProfile API. Defining a calculated attribute makes it available for all profiles within a domain. Each calculated attribute can only reference one ObjectType and at most, two fields from that ObjectType.

See also: AWS API Documentation

Request Syntax

client.create_calculated_attribute_definition(
    DomainName='string',
    CalculatedAttributeName='string',
    DisplayName='string',
    Description='string',
    AttributeDetails={
        'Attributes': [
            {
                'Name': 'string'
            },
        ],
        'Expression': 'string'
    },
    Conditions={
        'Range': {
            'Value': 123,
            'Unit': 'DAYS',
            'ValueRange': {
                'Start': 123,
                'End': 123
            },
            'TimestampSource': 'string',
            'TimestampFormat': 'string'
        },
        'ObjectCount': 123,
        'Threshold': {
            'Value': 'string',
            'Operator': 'EQUAL_TO'|'GREATER_THAN'|'LESS_THAN'|'NOT_EQUAL_TO'
        }
    },
    Filter={
        'Include': 'ALL'|'ANY'|'NONE',
        'Groups': [
            {
                'Type': 'ALL'|'ANY'|'NONE',
                'Dimensions': [
                    {
                        'Attributes': {
                            'string': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH'|'BEFORE'|'AFTER'|'BETWEEN'|'NOT_BETWEEN'|'ON'|'GREATER_THAN'|'LESS_THAN'|'GREATER_THAN_OR_EQUAL'|'LESS_THAN_OR_EQUAL'|'EQUAL',
                                'Values': [
                                    'string',
                                ]
                            }
                        }
                    },
                ]
            },
        ]
    },
    Statistic='FIRST_OCCURRENCE'|'LAST_OCCURRENCE'|'COUNT'|'SUM'|'MINIMUM'|'MAXIMUM'|'AVERAGE'|'MAX_OCCURRENCE'|'RECENT_OCCURRENCES',
    UseHistoricalData=True|False,
    Tags={
        'string': 'string'
    }
)
type DomainName:

string

param DomainName:

[REQUIRED]

The unique name of the domain.

type CalculatedAttributeName:

string

param CalculatedAttributeName:

[REQUIRED]

The unique name of the calculated attribute.

type DisplayName:

string

param DisplayName:

The display name of the calculated attribute.

type Description:

string

param Description:

The description of the calculated attribute.

type AttributeDetails:

dict

param AttributeDetails:

[REQUIRED]

Mathematical expression and a list of attribute items specified in that expression.

  • Attributes (list) -- [REQUIRED]

    A list of attribute items specified in the mathematical expression.

    • (dict) --

      The details of a single attribute item specified in the mathematical expression.

      • Name (string) -- [REQUIRED]

        The name of an attribute defined in a profile object type.

  • Expression (string) -- [REQUIRED]

    Mathematical expression that is performed on attribute items provided in the attribute list. Each element in the expression should follow the structure of "{ObjectTypeName.AttributeName}".

type Conditions:

dict

param Conditions:

The conditions including range, object count, and threshold for the calculated attribute.

  • Range (dict) --

    The relative time period over which data is included in the aggregation.

    • Value (integer) --

      The amount of time of the specified unit.

    • Unit (string) --

      The unit of time.

    • ValueRange (dict) --

      A structure letting customers specify a relative time window over which over which data is included in the Calculated Attribute. Use positive numbers to indicate that the endpoint is in the past, and negative numbers to indicate it is in the future. ValueRange overrides Value.

      • Start (integer) -- [REQUIRED]

        The start time of when to include objects. Use positive numbers to indicate that the starting point is in the past, and negative numbers to indicate it is in the future.

      • End (integer) -- [REQUIRED]

        The end time of when to include objects. Use positive numbers to indicate that the starting point is in the past, and negative numbers to indicate it is in the future.

    • TimestampSource (string) --

      An expression specifying the field in your JSON object from which the date should be parsed. The expression should follow the structure of "{ObjectTypeName.<Location of timestamp field in JSON pointer format>}". E.g. if your object type is MyType and source JSON is {"generatedAt": {"timestamp": "1737587945945"}}, then TimestampSource should be "{MyType.generatedAt.timestamp}".

    • TimestampFormat (string) --

      The format the timestamp field in your JSON object is specified. This value should be one of EPOCHMILLI (for Unix epoch timestamps with second/millisecond level precision) or ISO_8601 (following ISO_8601 format with second/millisecond level precision, with an optional offset of Z or in the format HH:MM or HHMM.). E.g. if your object type is MyType and source JSON is {"generatedAt": {"timestamp": "2001-07-04T12:08:56.235-0700"}}, then TimestampFormat should be "ISO_8601".

  • ObjectCount (integer) --

    The number of profile objects used for the calculated attribute.

  • Threshold (dict) --

    The threshold for the calculated attribute.

    • Value (string) -- [REQUIRED]

      The value of the threshold.

    • Operator (string) -- [REQUIRED]

      The operator of the threshold.

type Filter:

dict

param Filter:

Defines how to filter incoming objects to include part of the Calculated Attribute.

  • Include (string) -- [REQUIRED]

    Define whether to include or exclude objects for Calculated Attributed calculation that fit the filter groups criteria.

  • Groups (list) -- [REQUIRED]

    Holds the list of Filter groups within the Filter definition.

    • (dict) --

      Object that holds the dimensions to filter on.

      • Type (string) -- [REQUIRED]

        The type of logical relationship between the dimensions of the Filter group.

      • Dimensions (list) -- [REQUIRED]

        Object that holds the attributes to filter on.

        • (dict) --

          Contains the map of attribute names to attribute dimensions.

          • Attributes (dict) -- [REQUIRED]

            Is the attribute within the FilterDimension map

            • (string) --

              • (dict) --

                Object that defines how to filter the incoming objects for the calculated attribute.

                • DimensionType (string) -- [REQUIRED]

                  The action to filter with.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on.

                  • (string) --

type Statistic:

string

param Statistic:

[REQUIRED]

The aggregation operation to perform for the calculated attribute.

type UseHistoricalData:

boolean

param UseHistoricalData:

Whether historical data ingested before the Calculated Attribute was created should be included in calculations.

type Tags:

dict

param Tags:

The tags used to organize, track, or control access for this resource.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'CalculatedAttributeName': 'string',
    'DisplayName': 'string',
    'Description': 'string',
    'AttributeDetails': {
        'Attributes': [
            {
                'Name': 'string'
            },
        ],
        'Expression': 'string'
    },
    'Conditions': {
        'Range': {
            'Value': 123,
            'Unit': 'DAYS',
            'ValueRange': {
                'Start': 123,
                'End': 123
            },
            'TimestampSource': 'string',
            'TimestampFormat': 'string'
        },
        'ObjectCount': 123,
        'Threshold': {
            'Value': 'string',
            'Operator': 'EQUAL_TO'|'GREATER_THAN'|'LESS_THAN'|'NOT_EQUAL_TO'
        }
    },
    'Filter': {
        'Include': 'ALL'|'ANY'|'NONE',
        'Groups': [
            {
                'Type': 'ALL'|'ANY'|'NONE',
                'Dimensions': [
                    {
                        'Attributes': {
                            'string': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH'|'BEFORE'|'AFTER'|'BETWEEN'|'NOT_BETWEEN'|'ON'|'GREATER_THAN'|'LESS_THAN'|'GREATER_THAN_OR_EQUAL'|'LESS_THAN_OR_EQUAL'|'EQUAL',
                                'Values': [
                                    'string',
                                ]
                            }
                        }
                    },
                ]
            },
        ]
    },
    'Statistic': 'FIRST_OCCURRENCE'|'LAST_OCCURRENCE'|'COUNT'|'SUM'|'MINIMUM'|'MAXIMUM'|'AVERAGE'|'MAX_OCCURRENCE'|'RECENT_OCCURRENCES',
    'CreatedAt': datetime(2015, 1, 1),
    'LastUpdatedAt': datetime(2015, 1, 1),
    'UseHistoricalData': True|False,
    'Status': 'PREPARING'|'IN_PROGRESS'|'COMPLETED'|'FAILED',
    'Readiness': {
        'ProgressPercentage': 123,
        'Message': 'string'
    },
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • CalculatedAttributeName (string) --

      The unique name of the calculated attribute.

    • DisplayName (string) --

      The display name of the calculated attribute.

    • Description (string) --

      The description of the calculated attribute.

    • AttributeDetails (dict) --

      Mathematical expression and a list of attribute items specified in that expression.

      • Attributes (list) --

        A list of attribute items specified in the mathematical expression.

        • (dict) --

          The details of a single attribute item specified in the mathematical expression.

          • Name (string) --

            The name of an attribute defined in a profile object type.

      • Expression (string) --

        Mathematical expression that is performed on attribute items provided in the attribute list. Each element in the expression should follow the structure of "{ObjectTypeName.AttributeName}".

    • Conditions (dict) --

      The conditions including range, object count, and threshold for the calculated attribute.

      • Range (dict) --

        The relative time period over which data is included in the aggregation.

        • Value (integer) --

          The amount of time of the specified unit.

        • Unit (string) --

          The unit of time.

        • ValueRange (dict) --

          A structure letting customers specify a relative time window over which over which data is included in the Calculated Attribute. Use positive numbers to indicate that the endpoint is in the past, and negative numbers to indicate it is in the future. ValueRange overrides Value.

          • Start (integer) --

            The start time of when to include objects. Use positive numbers to indicate that the starting point is in the past, and negative numbers to indicate it is in the future.

          • End (integer) --

            The end time of when to include objects. Use positive numbers to indicate that the starting point is in the past, and negative numbers to indicate it is in the future.

        • TimestampSource (string) --

          An expression specifying the field in your JSON object from which the date should be parsed. The expression should follow the structure of "{ObjectTypeName.<Location of timestamp field in JSON pointer format>}". E.g. if your object type is MyType and source JSON is {"generatedAt": {"timestamp": "1737587945945"}}, then TimestampSource should be "{MyType.generatedAt.timestamp}".

        • TimestampFormat (string) --

          The format the timestamp field in your JSON object is specified. This value should be one of EPOCHMILLI (for Unix epoch timestamps with second/millisecond level precision) or ISO_8601 (following ISO_8601 format with second/millisecond level precision, with an optional offset of Z or in the format HH:MM or HHMM.). E.g. if your object type is MyType and source JSON is {"generatedAt": {"timestamp": "2001-07-04T12:08:56.235-0700"}}, then TimestampFormat should be "ISO_8601".

      • ObjectCount (integer) --

        The number of profile objects used for the calculated attribute.

      • Threshold (dict) --

        The threshold for the calculated attribute.

        • Value (string) --

          The value of the threshold.

        • Operator (string) --

          The operator of the threshold.

    • Filter (dict) --

      The filter that was used as part of the request.

      • Include (string) --

        Define whether to include or exclude objects for Calculated Attributed calculation that fit the filter groups criteria.

      • Groups (list) --

        Holds the list of Filter groups within the Filter definition.

        • (dict) --

          Object that holds the dimensions to filter on.

          • Type (string) --

            The type of logical relationship between the dimensions of the Filter group.

          • Dimensions (list) --

            Object that holds the attributes to filter on.

            • (dict) --

              Contains the map of attribute names to attribute dimensions.

              • Attributes (dict) --

                Is the attribute within the FilterDimension map

                • (string) --

                  • (dict) --

                    Object that defines how to filter the incoming objects for the calculated attribute.

                    • DimensionType (string) --

                      The action to filter with.

                    • Values (list) --

                      The values to apply the DimensionType on.

                      • (string) --

    • Statistic (string) --

      The aggregation operation to perform for the calculated attribute.

    • CreatedAt (datetime) --

      The timestamp of when the calculated attribute definition was created.

    • LastUpdatedAt (datetime) --

      The timestamp of when the calculated attribute definition was most recently edited.

    • UseHistoricalData (boolean) --

      Whether historical data ingested before the Calculated Attribute was created should be included in calculations.

    • Status (string) --

      Status of the Calculated Attribute creation (whether all historical data has been indexed.)

    • Readiness (dict) --

      Information indicating if the Calculated Attribute is ready for use by confirming all historical data has been processed and reflected.

      • ProgressPercentage (integer) --

        Approximately how far the Calculated Attribute creation is from completion.

      • Message (string) --

        Any customer messaging.

    • Tags (dict) --

      The tags used to organize, track, or control access for this resource.

      • (string) --

        • (string) --

CreateSegmentDefinition (updated) Link ¶
Changes (request)
{'SegmentGroups': {'Groups': {'Dimensions': {'CalculatedAttributes': {'DimensionType': {'LIST_CONTAINS',
                                                                                        'LIST_CONTAINS_ALL'}},
                                             'ProfileAttributes': {'Attributes': {'DimensionType': {'LIST_CONTAINS',
                                                                                                    'LIST_CONTAINS_ALL'}}}}}}}

Creates a segment definition associated to the given domain.

See also: AWS API Documentation

Request Syntax

client.create_segment_definition(
    DomainName='string',
    SegmentDefinitionName='string',
    DisplayName='string',
    Description='string',
    SegmentGroups={
        'Groups': [
            {
                'Dimensions': [
                    {
                        'ProfileAttributes': {
                            'AccountNumber': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'AdditionalInformation': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'FirstName': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'LastName': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'MiddleName': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'GenderString': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'PartyTypeString': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'BirthDate': {
                                'DimensionType': 'BEFORE'|'AFTER'|'BETWEEN'|'NOT_BETWEEN'|'ON',
                                'Values': [
                                    'string',
                                ]
                            },
                            'PhoneNumber': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'BusinessName': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'BusinessPhoneNumber': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'HomePhoneNumber': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'MobilePhoneNumber': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'EmailAddress': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'PersonalEmailAddress': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'BusinessEmailAddress': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'Address': {
                                'City': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Country': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'County': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'PostalCode': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Province': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'State': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'ShippingAddress': {
                                'City': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Country': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'County': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'PostalCode': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Province': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'State': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'MailingAddress': {
                                'City': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Country': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'County': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'PostalCode': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Province': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'State': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'BillingAddress': {
                                'City': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Country': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'County': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'PostalCode': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Province': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'State': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'Attributes': {
                                'string': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH'|'BEFORE'|'AFTER'|'BETWEEN'|'NOT_BETWEEN'|'ON'|'GREATER_THAN'|'LESS_THAN'|'GREATER_THAN_OR_EQUAL'|'LESS_THAN_OR_EQUAL'|'EQUAL'|'LIST_CONTAINS'|'LIST_CONTAINS_ALL',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'ProfileType': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                'Values': [
                                    'ACCOUNT_PROFILE'|'PROFILE',
                                ]
                            }
                        },
                        'CalculatedAttributes': {
                            'string': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH'|'BEFORE'|'AFTER'|'BETWEEN'|'NOT_BETWEEN'|'ON'|'GREATER_THAN'|'LESS_THAN'|'GREATER_THAN_OR_EQUAL'|'LESS_THAN_OR_EQUAL'|'EQUAL'|'LIST_CONTAINS'|'LIST_CONTAINS_ALL',
                                'Values': [
                                    'string',
                                ],
                                'ConditionOverrides': {
                                    'Range': {
                                        'Start': 123,
                                        'End': 123,
                                        'Unit': 'DAYS'
                                    }
                                }
                            }
                        }
                    },
                ],
                'SourceSegments': [
                    {
                        'SegmentDefinitionName': 'string'
                    },
                ],
                'SourceType': 'ALL'|'ANY'|'NONE',
                'Type': 'ALL'|'ANY'|'NONE'
            },
        ],
        'Include': 'ALL'|'ANY'|'NONE'
    },
    SegmentSqlQuery='string',
    SegmentSort={
        'Attributes': [
            {
                'Name': 'string',
                'DataType': 'STRING'|'NUMBER'|'DATE',
                'Order': 'ASC'|'DESC',
                'Type': 'PROFILE'|'CALCULATED'
            },
        ]
    },
    Tags={
        'string': 'string'
    }
)
type DomainName:

string

param DomainName:

[REQUIRED]

The unique name of the domain.

type SegmentDefinitionName:

string

param SegmentDefinitionName:

[REQUIRED]

The unique name of the segment definition.

type DisplayName:

string

param DisplayName:

[REQUIRED]

The display name of the segment definition.

type Description:

string

param Description:

The description of the segment definition.

type SegmentGroups:

dict

param SegmentGroups:

Specifies the base segments and dimensions for a segment definition along with their respective relationship.

  • Groups (list) --

    Holds the list of groups within the segment definition.

    • (dict) --

      Contains dimensions that determine what to segment on.

      • Dimensions (list) --

        Defines the attributes to segment on.

        • (dict) --

          Object that holds what profile and calculated attributes to segment on.

          • ProfileAttributes (dict) --

            Object that holds the profile attributes to segment on.

            • AccountNumber (dict) --

              A field to describe values to segment on within account number.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • AdditionalInformation (dict) --

              A field to describe values to segment on within additional information.

              • DimensionType (string) -- [REQUIRED]

                The action to segment with.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • FirstName (dict) --

              A field to describe values to segment on within first name.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • LastName (dict) --

              A field to describe values to segment on within last name.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • MiddleName (dict) --

              A field to describe values to segment on within middle name.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • GenderString (dict) --

              A field to describe values to segment on within genderString.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • PartyTypeString (dict) --

              A field to describe values to segment on within partyTypeString.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • BirthDate (dict) --

              A field to describe values to segment on within birthDate.

              • DimensionType (string) -- [REQUIRED]

                The action to segment with.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • PhoneNumber (dict) --

              A field to describe values to segment on within phone number.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • BusinessName (dict) --

              A field to describe values to segment on within business name.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • BusinessPhoneNumber (dict) --

              A field to describe values to segment on within business phone number.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • HomePhoneNumber (dict) --

              A field to describe values to segment on within home phone number.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • MobilePhoneNumber (dict) --

              A field to describe values to segment on within mobile phone number.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • EmailAddress (dict) --

              A field to describe values to segment on within email address.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • PersonalEmailAddress (dict) --

              A field to describe values to segment on within personal email address.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • BusinessEmailAddress (dict) --

              A field to describe values to segment on within business email address.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • Address (dict) --

              A field to describe values to segment on within address.

              • City (dict) --

                The city belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • Country (dict) --

                The country belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • County (dict) --

                The county belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • PostalCode (dict) --

                The postal code belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • Province (dict) --

                The province belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • State (dict) --

                The state belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

            • ShippingAddress (dict) --

              A field to describe values to segment on within shipping address.

              • City (dict) --

                The city belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • Country (dict) --

                The country belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • County (dict) --

                The county belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • PostalCode (dict) --

                The postal code belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • Province (dict) --

                The province belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • State (dict) --

                The state belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

            • MailingAddress (dict) --

              A field to describe values to segment on within mailing address.

              • City (dict) --

                The city belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • Country (dict) --

                The country belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • County (dict) --

                The county belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • PostalCode (dict) --

                The postal code belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • Province (dict) --

                The province belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • State (dict) --

                The state belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

            • BillingAddress (dict) --

              A field to describe values to segment on within billing address.

              • City (dict) --

                The city belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • Country (dict) --

                The country belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • County (dict) --

                The county belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • PostalCode (dict) --

                The postal code belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • Province (dict) --

                The province belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • State (dict) --

                The state belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

            • Attributes (dict) --

              A field to describe values to segment on within attributes.

              • (string) --

                • (dict) --

                  Object that segments on various Customer Profile's fields.

                  • DimensionType (string) -- [REQUIRED]

                    The action to segment with.

                  • Values (list) -- [REQUIRED]

                    The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                    • (string) --

            • ProfileType (dict) --

              A field to describe values to segment on within profile type.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on.

                • (string) --

          • CalculatedAttributes (dict) --

            Object that holds the calculated attributes to segment on.

            • (string) --

              • (dict) --

                Object that segments on Customer Profile's Calculated Attributes.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment with.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType with. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

                • ConditionOverrides (dict) --

                  Applies the given condition over the initial Calculated Attribute's definition.

                  • Range (dict) --

                    The relative time period over which data is included in the aggregation for this override.

                    • Start (integer) -- [REQUIRED]

                      The start time of when to include objects.

                    • End (integer) --

                      The end time of when to include objects.

                    • Unit (string) -- [REQUIRED]

                      The unit for start and end.

      • SourceSegments (list) --

        Defines the starting source of data.

        • (dict) --

          The source segments to build off of.

          • SegmentDefinitionName (string) --

            The unique name of the segment definition.

      • SourceType (string) --

        Defines how to interact with the source data.

      • Type (string) --

        Defines how to interact with the profiles found in the current filtering.

  • Include (string) --

    Defines whether to include or exclude the profiles that fit the segment criteria.

type SegmentSqlQuery:

string

param SegmentSqlQuery:

The segment SQL query.

type SegmentSort:

dict

param SegmentSort:

The segment sort.

  • Attributes (list) -- [REQUIRED]

    A list of attributes used to sort the segments and their ordering preferences.

    • (dict) --

      Defines the characteristics and rules for sorting by a specific attribute.

      • Name (string) -- [REQUIRED]

        The name of the attribute to sort by.

      • DataType (string) --

        The data type of the sort attribute (e.g., string, number, date).

      • Order (string) -- [REQUIRED]

        The sort order for the attribute (ascending or descending).

      • Type (string) --

        The type of attribute (e.g., profile, calculated).

type Tags:

dict

param Tags:

The tags used to organize, track, or control access for this resource.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'SegmentDefinitionName': 'string',
    'DisplayName': 'string',
    'Description': 'string',
    'CreatedAt': datetime(2015, 1, 1),
    'SegmentDefinitionArn': 'string',
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • SegmentDefinitionName (string) --

      The name of the segment definition.

    • DisplayName (string) --

      The display name of the segment definition.

    • Description (string) --

      The description of the segment definition.

    • CreatedAt (datetime) --

      The timestamp of when the segment definition was created.

    • SegmentDefinitionArn (string) --

      The arn of the segment definition.

    • Tags (dict) --

      The tags used to organize, track, or control access for this resource.

      • (string) --

        • (string) --

CreateSegmentEstimate (updated) Link ¶
Changes (request)
{'SegmentQuery': {'Groups': {'Dimensions': {'CalculatedAttributes': {'DimensionType': {'LIST_CONTAINS',
                                                                                       'LIST_CONTAINS_ALL'}},
                                            'ProfileAttributes': {'Attributes': {'DimensionType': {'LIST_CONTAINS',
                                                                                                   'LIST_CONTAINS_ALL'}}}}}}}

Creates a segment estimate query.

See also: AWS API Documentation

Request Syntax

client.create_segment_estimate(
    DomainName='string',
    SegmentQuery={
        'Groups': [
            {
                'Dimensions': [
                    {
                        'ProfileAttributes': {
                            'AccountNumber': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'AdditionalInformation': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'FirstName': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'LastName': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'MiddleName': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'GenderString': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'PartyTypeString': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'BirthDate': {
                                'DimensionType': 'BEFORE'|'AFTER'|'BETWEEN'|'NOT_BETWEEN'|'ON',
                                'Values': [
                                    'string',
                                ]
                            },
                            'PhoneNumber': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'BusinessName': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'BusinessPhoneNumber': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'HomePhoneNumber': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'MobilePhoneNumber': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'EmailAddress': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'PersonalEmailAddress': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'BusinessEmailAddress': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'Address': {
                                'City': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Country': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'County': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'PostalCode': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Province': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'State': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'ShippingAddress': {
                                'City': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Country': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'County': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'PostalCode': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Province': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'State': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'MailingAddress': {
                                'City': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Country': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'County': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'PostalCode': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Province': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'State': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'BillingAddress': {
                                'City': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Country': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'County': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'PostalCode': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Province': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'State': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'Attributes': {
                                'string': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH'|'BEFORE'|'AFTER'|'BETWEEN'|'NOT_BETWEEN'|'ON'|'GREATER_THAN'|'LESS_THAN'|'GREATER_THAN_OR_EQUAL'|'LESS_THAN_OR_EQUAL'|'EQUAL'|'LIST_CONTAINS'|'LIST_CONTAINS_ALL',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'ProfileType': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                'Values': [
                                    'ACCOUNT_PROFILE'|'PROFILE',
                                ]
                            }
                        },
                        'CalculatedAttributes': {
                            'string': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH'|'BEFORE'|'AFTER'|'BETWEEN'|'NOT_BETWEEN'|'ON'|'GREATER_THAN'|'LESS_THAN'|'GREATER_THAN_OR_EQUAL'|'LESS_THAN_OR_EQUAL'|'EQUAL'|'LIST_CONTAINS'|'LIST_CONTAINS_ALL',
                                'Values': [
                                    'string',
                                ],
                                'ConditionOverrides': {
                                    'Range': {
                                        'Start': 123,
                                        'End': 123,
                                        'Unit': 'DAYS'
                                    }
                                }
                            }
                        }
                    },
                ],
                'SourceSegments': [
                    {
                        'SegmentDefinitionName': 'string'
                    },
                ],
                'SourceType': 'ALL'|'ANY'|'NONE',
                'Type': 'ALL'|'ANY'|'NONE'
            },
        ],
        'Include': 'ALL'|'ANY'|'NONE'
    },
    SegmentSqlQuery='string'
)
type DomainName:

string

param DomainName:

[REQUIRED]

The unique name of the domain.

type SegmentQuery:

dict

param SegmentQuery:

The segment query for calculating a segment estimate.

  • Groups (list) --

    Holds the list of groups within the segment definition.

    • (dict) --

      Contains dimensions that determine what to segment on.

      • Dimensions (list) --

        Defines the attributes to segment on.

        • (dict) --

          Object that holds what profile and calculated attributes to segment on.

          • ProfileAttributes (dict) --

            Object that holds the profile attributes to segment on.

            • AccountNumber (dict) --

              A field to describe values to segment on within account number.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • AdditionalInformation (dict) --

              A field to describe values to segment on within additional information.

              • DimensionType (string) -- [REQUIRED]

                The action to segment with.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • FirstName (dict) --

              A field to describe values to segment on within first name.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • LastName (dict) --

              A field to describe values to segment on within last name.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • MiddleName (dict) --

              A field to describe values to segment on within middle name.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • GenderString (dict) --

              A field to describe values to segment on within genderString.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • PartyTypeString (dict) --

              A field to describe values to segment on within partyTypeString.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • BirthDate (dict) --

              A field to describe values to segment on within birthDate.

              • DimensionType (string) -- [REQUIRED]

                The action to segment with.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • PhoneNumber (dict) --

              A field to describe values to segment on within phone number.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • BusinessName (dict) --

              A field to describe values to segment on within business name.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • BusinessPhoneNumber (dict) --

              A field to describe values to segment on within business phone number.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • HomePhoneNumber (dict) --

              A field to describe values to segment on within home phone number.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • MobilePhoneNumber (dict) --

              A field to describe values to segment on within mobile phone number.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • EmailAddress (dict) --

              A field to describe values to segment on within email address.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • PersonalEmailAddress (dict) --

              A field to describe values to segment on within personal email address.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • BusinessEmailAddress (dict) --

              A field to describe values to segment on within business email address.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                • (string) --

            • Address (dict) --

              A field to describe values to segment on within address.

              • City (dict) --

                The city belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • Country (dict) --

                The country belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • County (dict) --

                The county belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • PostalCode (dict) --

                The postal code belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • Province (dict) --

                The province belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • State (dict) --

                The state belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

            • ShippingAddress (dict) --

              A field to describe values to segment on within shipping address.

              • City (dict) --

                The city belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • Country (dict) --

                The country belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • County (dict) --

                The county belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • PostalCode (dict) --

                The postal code belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • Province (dict) --

                The province belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • State (dict) --

                The state belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

            • MailingAddress (dict) --

              A field to describe values to segment on within mailing address.

              • City (dict) --

                The city belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • Country (dict) --

                The country belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • County (dict) --

                The county belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • PostalCode (dict) --

                The postal code belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • Province (dict) --

                The province belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • State (dict) --

                The state belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

            • BillingAddress (dict) --

              A field to describe values to segment on within billing address.

              • City (dict) --

                The city belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • Country (dict) --

                The country belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • County (dict) --

                The county belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • PostalCode (dict) --

                The postal code belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • Province (dict) --

                The province belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

              • State (dict) --

                The state belonging to the address.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment on.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

            • Attributes (dict) --

              A field to describe values to segment on within attributes.

              • (string) --

                • (dict) --

                  Object that segments on various Customer Profile's fields.

                  • DimensionType (string) -- [REQUIRED]

                    The action to segment with.

                  • Values (list) -- [REQUIRED]

                    The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                    • (string) --

            • ProfileType (dict) --

              A field to describe values to segment on within profile type.

              • DimensionType (string) -- [REQUIRED]

                The action to segment on.

              • Values (list) -- [REQUIRED]

                The values to apply the DimensionType on.

                • (string) --

          • CalculatedAttributes (dict) --

            Object that holds the calculated attributes to segment on.

            • (string) --

              • (dict) --

                Object that segments on Customer Profile's Calculated Attributes.

                • DimensionType (string) -- [REQUIRED]

                  The action to segment with.

                • Values (list) -- [REQUIRED]

                  The values to apply the DimensionType with. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                  • (string) --

                • ConditionOverrides (dict) --

                  Applies the given condition over the initial Calculated Attribute's definition.

                  • Range (dict) --

                    The relative time period over which data is included in the aggregation for this override.

                    • Start (integer) -- [REQUIRED]

                      The start time of when to include objects.

                    • End (integer) --

                      The end time of when to include objects.

                    • Unit (string) -- [REQUIRED]

                      The unit for start and end.

      • SourceSegments (list) --

        Defines the starting source of data.

        • (dict) --

          The source segments to build off of.

          • SegmentDefinitionName (string) --

            The unique name of the segment definition.

      • SourceType (string) --

        Defines how to interact with the source data.

      • Type (string) --

        Defines how to interact with the profiles found in the current filtering.

  • Include (string) --

    Define whether to include or exclude the profiles that fit the segment criteria.

type SegmentSqlQuery:

string

param SegmentSqlQuery:

The segment SQL query.

rtype:

dict

returns:

Response Syntax

{
    'DomainName': 'string',
    'EstimateId': 'string',
    'StatusCode': 123
}

Response Structure

  • (dict) --

    • DomainName (string) --

      The unique name of the domain.

    • EstimateId (string) --

      A unique identifier for the resource. The value can be passed to GetSegmentEstimate to retrieve the result of segment estimate status.

    • StatusCode (integer) --

      The status code for the response.

GetCalculatedAttributeDefinition (updated) Link ¶
Changes (response)
{'Statistic': {'RECENT_OCCURRENCES'}}

Provides more information on a calculated attribute definition for Customer Profiles.

See also: AWS API Documentation

Request Syntax

client.get_calculated_attribute_definition(
    DomainName='string',
    CalculatedAttributeName='string'
)
type DomainName:

string

param DomainName:

[REQUIRED]

The unique name of the domain.

type CalculatedAttributeName:

string

param CalculatedAttributeName:

[REQUIRED]

The unique name of the calculated attribute.

rtype:

dict

returns:

Response Syntax

{
    'CalculatedAttributeName': 'string',
    'DisplayName': 'string',
    'Description': 'string',
    'CreatedAt': datetime(2015, 1, 1),
    'LastUpdatedAt': datetime(2015, 1, 1),
    'Statistic': 'FIRST_OCCURRENCE'|'LAST_OCCURRENCE'|'COUNT'|'SUM'|'MINIMUM'|'MAXIMUM'|'AVERAGE'|'MAX_OCCURRENCE'|'RECENT_OCCURRENCES',
    'Filter': {
        'Include': 'ALL'|'ANY'|'NONE',
        'Groups': [
            {
                'Type': 'ALL'|'ANY'|'NONE',
                'Dimensions': [
                    {
                        'Attributes': {
                            'string': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH'|'BEFORE'|'AFTER'|'BETWEEN'|'NOT_BETWEEN'|'ON'|'GREATER_THAN'|'LESS_THAN'|'GREATER_THAN_OR_EQUAL'|'LESS_THAN_OR_EQUAL'|'EQUAL',
                                'Values': [
                                    'string',
                                ]
                            }
                        }
                    },
                ]
            },
        ]
    },
    'Conditions': {
        'Range': {
            'Value': 123,
            'Unit': 'DAYS',
            'ValueRange': {
                'Start': 123,
                'End': 123
            },
            'TimestampSource': 'string',
            'TimestampFormat': 'string'
        },
        'ObjectCount': 123,
        'Threshold': {
            'Value': 'string',
            'Operator': 'EQUAL_TO'|'GREATER_THAN'|'LESS_THAN'|'NOT_EQUAL_TO'
        }
    },
    'AttributeDetails': {
        'Attributes': [
            {
                'Name': 'string'
            },
        ],
        'Expression': 'string'
    },
    'UseHistoricalData': True|False,
    'Status': 'PREPARING'|'IN_PROGRESS'|'COMPLETED'|'FAILED',
    'Readiness': {
        'ProgressPercentage': 123,
        'Message': 'string'
    },
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • CalculatedAttributeName (string) --

      The unique name of the calculated attribute.

    • DisplayName (string) --

      The display name of the calculated attribute.

    • Description (string) --

      The description of the calculated attribute.

    • CreatedAt (datetime) --

      The timestamp of when the calculated attribute definition was created.

    • LastUpdatedAt (datetime) --

      The timestamp of when the calculated attribute definition was most recently edited.

    • Statistic (string) --

      The aggregation operation to perform for the calculated attribute.

    • Filter (dict) --

      The filter assigned to this calculated attribute definition.

      • Include (string) --

        Define whether to include or exclude objects for Calculated Attributed calculation that fit the filter groups criteria.

      • Groups (list) --

        Holds the list of Filter groups within the Filter definition.

        • (dict) --

          Object that holds the dimensions to filter on.

          • Type (string) --

            The type of logical relationship between the dimensions of the Filter group.

          • Dimensions (list) --

            Object that holds the attributes to filter on.

            • (dict) --

              Contains the map of attribute names to attribute dimensions.

              • Attributes (dict) --

                Is the attribute within the FilterDimension map

                • (string) --

                  • (dict) --

                    Object that defines how to filter the incoming objects for the calculated attribute.

                    • DimensionType (string) --

                      The action to filter with.

                    • Values (list) --

                      The values to apply the DimensionType on.

                      • (string) --

    • Conditions (dict) --

      The conditions including range, object count, and threshold for the calculated attribute.

      • Range (dict) --

        The relative time period over which data is included in the aggregation.

        • Value (integer) --

          The amount of time of the specified unit.

        • Unit (string) --

          The unit of time.

        • ValueRange (dict) --

          A structure letting customers specify a relative time window over which over which data is included in the Calculated Attribute. Use positive numbers to indicate that the endpoint is in the past, and negative numbers to indicate it is in the future. ValueRange overrides Value.

          • Start (integer) --

            The start time of when to include objects. Use positive numbers to indicate that the starting point is in the past, and negative numbers to indicate it is in the future.

          • End (integer) --

            The end time of when to include objects. Use positive numbers to indicate that the starting point is in the past, and negative numbers to indicate it is in the future.

        • TimestampSource (string) --

          An expression specifying the field in your JSON object from which the date should be parsed. The expression should follow the structure of "{ObjectTypeName.<Location of timestamp field in JSON pointer format>}". E.g. if your object type is MyType and source JSON is {"generatedAt": {"timestamp": "1737587945945"}}, then TimestampSource should be "{MyType.generatedAt.timestamp}".

        • TimestampFormat (string) --

          The format the timestamp field in your JSON object is specified. This value should be one of EPOCHMILLI (for Unix epoch timestamps with second/millisecond level precision) or ISO_8601 (following ISO_8601 format with second/millisecond level precision, with an optional offset of Z or in the format HH:MM or HHMM.). E.g. if your object type is MyType and source JSON is {"generatedAt": {"timestamp": "2001-07-04T12:08:56.235-0700"}}, then TimestampFormat should be "ISO_8601".

      • ObjectCount (integer) --

        The number of profile objects used for the calculated attribute.

      • Threshold (dict) --

        The threshold for the calculated attribute.

        • Value (string) --

          The value of the threshold.

        • Operator (string) --

          The operator of the threshold.

    • AttributeDetails (dict) --

      Mathematical expression and a list of attribute items specified in that expression.

      • Attributes (list) --

        A list of attribute items specified in the mathematical expression.

        • (dict) --

          The details of a single attribute item specified in the mathematical expression.

          • Name (string) --

            The name of an attribute defined in a profile object type.

      • Expression (string) --

        Mathematical expression that is performed on attribute items provided in the attribute list. Each element in the expression should follow the structure of "{ObjectTypeName.AttributeName}".

    • UseHistoricalData (boolean) --

      Whether historical data ingested before the Calculated Attribute was created should be included in calculations.

    • Status (string) --

      Status of the Calculated Attribute creation (whether all historical data has been indexed).

    • Readiness (dict) --

      Information indicating if the Calculated Attribute is ready for use by confirming all historical data has been processed and reflected.

      • ProgressPercentage (integer) --

        Approximately how far the Calculated Attribute creation is from completion.

      • Message (string) --

        Any customer messaging.

    • Tags (dict) --

      The tags used to organize, track, or control access for this resource.

      • (string) --

        • (string) --

GetSegmentDefinition (updated) Link ¶
Changes (response)
{'SegmentGroups': {'Groups': {'Dimensions': {'CalculatedAttributes': {'DimensionType': {'LIST_CONTAINS',
                                                                                        'LIST_CONTAINS_ALL'}},
                                             'ProfileAttributes': {'Attributes': {'DimensionType': {'LIST_CONTAINS',
                                                                                                    'LIST_CONTAINS_ALL'}}}}}}}

Gets a segment definition from the domain.

See also: AWS API Documentation

Request Syntax

client.get_segment_definition(
    DomainName='string',
    SegmentDefinitionName='string'
)
type DomainName:

string

param DomainName:

[REQUIRED]

The unique name of the domain.

type SegmentDefinitionName:

string

param SegmentDefinitionName:

[REQUIRED]

The unique name of the segment definition.

rtype:

dict

returns:

Response Syntax

{
    'SegmentDefinitionName': 'string',
    'DisplayName': 'string',
    'Description': 'string',
    'SegmentGroups': {
        'Groups': [
            {
                'Dimensions': [
                    {
                        'ProfileAttributes': {
                            'AccountNumber': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'AdditionalInformation': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'FirstName': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'LastName': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'MiddleName': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'GenderString': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'PartyTypeString': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'BirthDate': {
                                'DimensionType': 'BEFORE'|'AFTER'|'BETWEEN'|'NOT_BETWEEN'|'ON',
                                'Values': [
                                    'string',
                                ]
                            },
                            'PhoneNumber': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'BusinessName': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'BusinessPhoneNumber': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'HomePhoneNumber': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'MobilePhoneNumber': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'EmailAddress': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'PersonalEmailAddress': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'BusinessEmailAddress': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                'Values': [
                                    'string',
                                ]
                            },
                            'Address': {
                                'City': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Country': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'County': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'PostalCode': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Province': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'State': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'ShippingAddress': {
                                'City': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Country': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'County': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'PostalCode': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Province': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'State': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'MailingAddress': {
                                'City': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Country': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'County': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'PostalCode': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Province': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'State': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'BillingAddress': {
                                'City': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Country': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'County': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'PostalCode': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Province': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'State': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'Attributes': {
                                'string': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH'|'BEFORE'|'AFTER'|'BETWEEN'|'NOT_BETWEEN'|'ON'|'GREATER_THAN'|'LESS_THAN'|'GREATER_THAN_OR_EQUAL'|'LESS_THAN_OR_EQUAL'|'EQUAL'|'LIST_CONTAINS'|'LIST_CONTAINS_ALL',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'ProfileType': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                'Values': [
                                    'ACCOUNT_PROFILE'|'PROFILE',
                                ]
                            }
                        },
                        'CalculatedAttributes': {
                            'string': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE'|'CONTAINS'|'BEGINS_WITH'|'ENDS_WITH'|'BEFORE'|'AFTER'|'BETWEEN'|'NOT_BETWEEN'|'ON'|'GREATER_THAN'|'LESS_THAN'|'GREATER_THAN_OR_EQUAL'|'LESS_THAN_OR_EQUAL'|'EQUAL'|'LIST_CONTAINS'|'LIST_CONTAINS_ALL',
                                'Values': [
                                    'string',
                                ],
                                'ConditionOverrides': {
                                    'Range': {
                                        'Start': 123,
                                        'End': 123,
                                        'Unit': 'DAYS'
                                    }
                                }
                            }
                        }
                    },
                ],
                'SourceSegments': [
                    {
                        'SegmentDefinitionName': 'string'
                    },
                ],
                'SourceType': 'ALL'|'ANY'|'NONE',
                'Type': 'ALL'|'ANY'|'NONE'
            },
        ],
        'Include': 'ALL'|'ANY'|'NONE'
    },
    'SegmentSort': {
        'Attributes': [
            {
                'Name': 'string',
                'DataType': 'STRING'|'NUMBER'|'DATE',
                'Order': 'ASC'|'DESC',
                'Type': 'PROFILE'|'CALCULATED'
            },
        ]
    },
    'SegmentDefinitionArn': 'string',
    'CreatedAt': datetime(2015, 1, 1),
    'Tags': {
        'string': 'string'
    },
    'SegmentSqlQuery': 'string',
    'SegmentType': 'CLASSIC'|'ENHANCED'
}

Response Structure

  • (dict) --

    • SegmentDefinitionName (string) --

      The name of the segment definition.

    • DisplayName (string) --

      The display name of the segment definition.

    • Description (string) --

      The description of the segment definition.

    • SegmentGroups (dict) --

      The segment criteria associated with this definition.

      • Groups (list) --

        Holds the list of groups within the segment definition.

        • (dict) --

          Contains dimensions that determine what to segment on.

          • Dimensions (list) --

            Defines the attributes to segment on.

            • (dict) --

              Object that holds what profile and calculated attributes to segment on.

              • ProfileAttributes (dict) --

                Object that holds the profile attributes to segment on.

                • AccountNumber (dict) --

                  A field to describe values to segment on within account number.

                  • DimensionType (string) --

                    The action to segment on.

                  • Values (list) --

                    The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                    • (string) --

                • AdditionalInformation (dict) --

                  A field to describe values to segment on within additional information.

                  • DimensionType (string) --

                    The action to segment with.

                  • Values (list) --

                    The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                    • (string) --

                • FirstName (dict) --

                  A field to describe values to segment on within first name.

                  • DimensionType (string) --

                    The action to segment on.

                  • Values (list) --

                    The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                    • (string) --

                • LastName (dict) --

                  A field to describe values to segment on within last name.

                  • DimensionType (string) --

                    The action to segment on.

                  • Values (list) --

                    The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                    • (string) --

                • MiddleName (dict) --

                  A field to describe values to segment on within middle name.

                  • DimensionType (string) --

                    The action to segment on.

                  • Values (list) --

                    The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                    • (string) --

                • GenderString (dict) --

                  A field to describe values to segment on within genderString.

                  • DimensionType (string) --

                    The action to segment on.

                  • Values (list) --

                    The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                    • (string) --

                • PartyTypeString (dict) --

                  A field to describe values to segment on within partyTypeString.

                  • DimensionType (string) --

                    The action to segment on.

                  • Values (list) --

                    The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                    • (string) --

                • BirthDate (dict) --

                  A field to describe values to segment on within birthDate.

                  • DimensionType (string) --

                    The action to segment with.

                  • Values (list) --

                    The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                    • (string) --

                • PhoneNumber (dict) --

                  A field to describe values to segment on within phone number.

                  • DimensionType (string) --

                    The action to segment on.

                  • Values (list) --

                    The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                    • (string) --

                • BusinessName (dict) --

                  A field to describe values to segment on within business name.

                  • DimensionType (string) --

                    The action to segment on.

                  • Values (list) --

                    The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                    • (string) --

                • BusinessPhoneNumber (dict) --

                  A field to describe values to segment on within business phone number.

                  • DimensionType (string) --

                    The action to segment on.

                  • Values (list) --

                    The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                    • (string) --

                • HomePhoneNumber (dict) --

                  A field to describe values to segment on within home phone number.

                  • DimensionType (string) --

                    The action to segment on.

                  • Values (list) --

                    The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                    • (string) --

                • MobilePhoneNumber (dict) --

                  A field to describe values to segment on within mobile phone number.

                  • DimensionType (string) --

                    The action to segment on.

                  • Values (list) --

                    The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                    • (string) --

                • EmailAddress (dict) --

                  A field to describe values to segment on within email address.

                  • DimensionType (string) --

                    The action to segment on.

                  • Values (list) --

                    The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                    • (string) --

                • PersonalEmailAddress (dict) --

                  A field to describe values to segment on within personal email address.

                  • DimensionType (string) --

                    The action to segment on.

                  • Values (list) --

                    The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                    • (string) --

                • BusinessEmailAddress (dict) --

                  A field to describe values to segment on within business email address.

                  • DimensionType (string) --

                    The action to segment on.

                  • Values (list) --

                    The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                    • (string) --

                • Address (dict) --

                  A field to describe values to segment on within address.

                  • City (dict) --

                    The city belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                  • Country (dict) --

                    The country belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                  • County (dict) --

                    The county belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                  • PostalCode (dict) --

                    The postal code belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                  • Province (dict) --

                    The province belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                  • State (dict) --

                    The state belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                • ShippingAddress (dict) --

                  A field to describe values to segment on within shipping address.

                  • City (dict) --

                    The city belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                  • Country (dict) --

                    The country belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                  • County (dict) --

                    The county belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                  • PostalCode (dict) --

                    The postal code belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                  • Province (dict) --

                    The province belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                  • State (dict) --

                    The state belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                • MailingAddress (dict) --

                  A field to describe values to segment on within mailing address.

                  • City (dict) --

                    The city belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                  • Country (dict) --

                    The country belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                  • County (dict) --

                    The county belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                  • PostalCode (dict) --

                    The postal code belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                  • Province (dict) --

                    The province belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                  • State (dict) --

                    The state belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                • BillingAddress (dict) --

                  A field to describe values to segment on within billing address.

                  • City (dict) --

                    The city belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                  • Country (dict) --

                    The country belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                  • County (dict) --

                    The county belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                  • PostalCode (dict) --

                    The postal code belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                  • Province (dict) --

                    The province belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                  • State (dict) --

                    The state belonging to the address.

                    • DimensionType (string) --

                      The action to segment on.

                    • Values (list) --

                      The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                • Attributes (dict) --

                  A field to describe values to segment on within attributes.

                  • (string) --

                    • (dict) --

                      Object that segments on various Customer Profile's fields.

                      • DimensionType (string) --

                        The action to segment with.

                      • Values (list) --

                        The values to apply the DimensionType on. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                        • (string) --

                • ProfileType (dict) --

                  A field to describe values to segment on within profile type.

                  • DimensionType (string) --

                    The action to segment on.

                  • Values (list) --

                    The values to apply the DimensionType on.

                    • (string) --

              • CalculatedAttributes (dict) --

                Object that holds the calculated attributes to segment on.

                • (string) --

                  • (dict) --

                    Object that segments on Customer Profile's Calculated Attributes.

                    • DimensionType (string) --

                      The action to segment with.

                    • Values (list) --

                      The values to apply the DimensionType with. To reference a calculated attribute or profile attribute as a dynamic value, use handlebar notation: {{_profile.ProfileAttributeName}} or {{_calculated_attribute.CalculatedAttributeName}}.

                      • (string) --

                    • ConditionOverrides (dict) --

                      Applies the given condition over the initial Calculated Attribute's definition.

                      • Range (dict) --

                        The relative time period over which data is included in the aggregation for this override.

                        • Start (integer) --

                          The start time of when to include objects.

                        • End (integer) --

                          The end time of when to include objects.

                        • Unit (string) --

                          The unit for start and end.

          • SourceSegments (list) --

            Defines the starting source of data.

            • (dict) --

              The source segments to build off of.

              • SegmentDefinitionName (string) --

                The unique name of the segment definition.

          • SourceType (string) --

            Defines how to interact with the source data.

          • Type (string) --

            Defines how to interact with the profiles found in the current filtering.

      • Include (string) --

        Defines whether to include or exclude the profiles that fit the segment criteria.

    • SegmentSort (dict) --

      The segment sort.

      • Attributes (list) --

        A list of attributes used to sort the segments and their ordering preferences.

        • (dict) --

          Defines the characteristics and rules for sorting by a specific attribute.

          • Name (string) --

            The name of the attribute to sort by.

          • DataType (string) --

            The data type of the sort attribute (e.g., string, number, date).

          • Order (string) --

            The sort order for the attribute (ascending or descending).

          • Type (string) --

            The type of attribute (e.g., profile, calculated).

    • SegmentDefinitionArn (string) --

      The arn of the segment definition.

    • CreatedAt (datetime) --

      The timestamp of when the segment definition was created.

    • Tags (dict) --

      The tags used to organize, track, or control access for this resource.

      • (string) --

        • (string) --

    • SegmentSqlQuery (string) --

      The segment SQL query.

    • SegmentType (string) --

      The segment type.

      Classic : Segments created using traditional SegmentGroup structure

      Enhanced : Segments created using SQL queries

UpdateCalculatedAttributeDefinition (updated) Link ¶
Changes (response)
{'Statistic': {'RECENT_OCCURRENCES'}}

Updates an existing calculated attribute definition. When updating the Conditions, note that increasing the date range of a calculated attribute will not trigger inclusion of historical data greater than the current date range.

See also: AWS API Documentation

Request Syntax

client.update_calculated_attribute_definition(
    DomainName='string',
    CalculatedAttributeName='string',
    DisplayName='string',
    Description='string',
    Conditions={
        'Range': {
            'Value': 123,
            'Unit': 'DAYS',
            'ValueRange': {
                'Start': 123,
                'End': 123
            },
            'TimestampSource': 'string',
            'TimestampFormat': 'string'
        },
        'ObjectCount': 123,
        'Threshold': {
            'Value': 'string',
            'Operator': 'EQUAL_TO'|'GREATER_THAN'|'LESS_THAN'|'NOT_EQUAL_TO'
        }
    }
)
type DomainName:

string

param DomainName:

[REQUIRED]

The unique name of the domain.

type CalculatedAttributeName:

string

param CalculatedAttributeName:

[REQUIRED]

The unique name of the calculated attribute.

type DisplayName:

string

param DisplayName:

The display name of the calculated attribute.

type Description:

string

param Description:

The description of the calculated attribute.

type Conditions:

dict

param Conditions:

The conditions including range, object count, and threshold for the calculated attribute.

  • Range (dict) --

    The relative time period over which data is included in the aggregation.

    • Value (integer) --

      The amount of time of the specified unit.

    • Unit (string) --

      The unit of time.

    • ValueRange (dict) --

      A structure letting customers specify a relative time window over which over which data is included in the Calculated Attribute. Use positive numbers to indicate that the endpoint is in the past, and negative numbers to indicate it is in the future. ValueRange overrides Value.

      • Start (integer) -- [REQUIRED]

        The start time of when to include objects. Use positive numbers to indicate that the starting point is in the past, and negative numbers to indicate it is in the future.

      • End (integer) -- [REQUIRED]

        The end time of when to include objects. Use positive numbers to indicate that the starting point is in the past, and negative numbers to indicate it is in the future.

    • TimestampSource (string) --

      An expression specifying the field in your JSON object from which the date should be parsed. The expression should follow the structure of "{ObjectTypeName.<Location of timestamp field in JSON pointer format>}". E.g. if your object type is MyType and source JSON is {"generatedAt": {"timestamp": "1737587945945"}}, then TimestampSource should be "{MyType.generatedAt.timestamp}".

    • TimestampFormat (string) --

      The format the timestamp field in your JSON object is specified. This value should be one of EPOCHMILLI (for Unix epoch timestamps with second/millisecond level precision) or ISO_8601 (following ISO_8601 format with second/millisecond level precision, with an optional offset of Z or in the format HH:MM or HHMM.). E.g. if your object type is MyType and source JSON is {"generatedAt": {"timestamp": "2001-07-04T12:08:56.235-0700"}}, then TimestampFormat should be "ISO_8601".

  • ObjectCount (integer) --

    The number of profile objects used for the calculated attribute.

  • Threshold (dict) --

    The threshold for the calculated attribute.

    • Value (string) -- [REQUIRED]

      The value of the threshold.

    • Operator (string) -- [REQUIRED]

      The operator of the threshold.

rtype:

dict

returns:

Response Syntax

{
    'CalculatedAttributeName': 'string',
    'DisplayName': 'string',
    'Description': 'string',
    'CreatedAt': datetime(2015, 1, 1),
    'LastUpdatedAt': datetime(2015, 1, 1),
    'Statistic': 'FIRST_OCCURRENCE'|'LAST_OCCURRENCE'|'COUNT'|'SUM'|'MINIMUM'|'MAXIMUM'|'AVERAGE'|'MAX_OCCURRENCE'|'RECENT_OCCURRENCES',
    'Conditions': {
        'Range': {
            'Value': 123,
            'Unit': 'DAYS',
            'ValueRange': {
                'Start': 123,
                'End': 123
            },
            'TimestampSource': 'string',
            'TimestampFormat': 'string'
        },
        'ObjectCount': 123,
        'Threshold': {
            'Value': 'string',
            'Operator': 'EQUAL_TO'|'GREATER_THAN'|'LESS_THAN'|'NOT_EQUAL_TO'
        }
    },
    'AttributeDetails': {
        'Attributes': [
            {
                'Name': 'string'
            },
        ],
        'Expression': 'string'
    },
    'UseHistoricalData': True|False,
    'Status': 'PREPARING'|'IN_PROGRESS'|'COMPLETED'|'FAILED',
    'Readiness': {
        'ProgressPercentage': 123,
        'Message': 'string'
    },
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • CalculatedAttributeName (string) --

      The unique name of the calculated attribute.

    • DisplayName (string) --

      The display name of the calculated attribute.

    • Description (string) --

      The description of the calculated attribute.

    • CreatedAt (datetime) --

      The timestamp of when the calculated attribute definition was created.

    • LastUpdatedAt (datetime) --

      The timestamp of when the calculated attribute definition was most recently edited.

    • Statistic (string) --

      The aggregation operation to perform for the calculated attribute.

    • Conditions (dict) --

      The conditions including range, object count, and threshold for the calculated attribute.

      • Range (dict) --

        The relative time period over which data is included in the aggregation.

        • Value (integer) --

          The amount of time of the specified unit.

        • Unit (string) --

          The unit of time.

        • ValueRange (dict) --

          A structure letting customers specify a relative time window over which over which data is included in the Calculated Attribute. Use positive numbers to indicate that the endpoint is in the past, and negative numbers to indicate it is in the future. ValueRange overrides Value.

          • Start (integer) --

            The start time of when to include objects. Use positive numbers to indicate that the starting point is in the past, and negative numbers to indicate it is in the future.

          • End (integer) --

            The end time of when to include objects. Use positive numbers to indicate that the starting point is in the past, and negative numbers to indicate it is in the future.

        • TimestampSource (string) --

          An expression specifying the field in your JSON object from which the date should be parsed. The expression should follow the structure of "{ObjectTypeName.<Location of timestamp field in JSON pointer format>}". E.g. if your object type is MyType and source JSON is {"generatedAt": {"timestamp": "1737587945945"}}, then TimestampSource should be "{MyType.generatedAt.timestamp}".

        • TimestampFormat (string) --

          The format the timestamp field in your JSON object is specified. This value should be one of EPOCHMILLI (for Unix epoch timestamps with second/millisecond level precision) or ISO_8601 (following ISO_8601 format with second/millisecond level precision, with an optional offset of Z or in the format HH:MM or HHMM.). E.g. if your object type is MyType and source JSON is {"generatedAt": {"timestamp": "2001-07-04T12:08:56.235-0700"}}, then TimestampFormat should be "ISO_8601".

      • ObjectCount (integer) --

        The number of profile objects used for the calculated attribute.

      • Threshold (dict) --

        The threshold for the calculated attribute.

        • Value (string) --

          The value of the threshold.

        • Operator (string) --

          The operator of the threshold.

    • AttributeDetails (dict) --

      The mathematical expression and a list of attribute items specified in that expression.

      • Attributes (list) --

        A list of attribute items specified in the mathematical expression.

        • (dict) --

          The details of a single attribute item specified in the mathematical expression.

          • Name (string) --

            The name of an attribute defined in a profile object type.

      • Expression (string) --

        Mathematical expression that is performed on attribute items provided in the attribute list. Each element in the expression should follow the structure of "{ObjectTypeName.AttributeName}".

    • UseHistoricalData (boolean) --

      Whether historical data ingested before the Calculated Attribute was created should be included in calculations.

    • Status (string) --

      Status of the Calculated Attribute creation (whether all historical data has been indexed.)

    • Readiness (dict) --

      Information indicating if the Calculated Attribute is ready for use by confirming all historical data has been processed and reflected.

      • ProgressPercentage (integer) --

        Approximately how far the Calculated Attribute creation is from completion.

      • Message (string) --

        Any customer messaging.

    • Tags (dict) --

      The tags used to organize, track, or control access for this resource.

      • (string) --

        • (string) --