Amazon Pinpoint

2020/03/04 - Amazon Pinpoint - 5 new 9 updated api methods

Changes  This release of the Amazon Pinpoint API introduces support for integrating recommender models with email, push notification, and SMS message templates. You can now use these types of templates to connect to recommender models and add personalized recommendations to messages that you send from campaigns and journeys.

GetRecommenderConfigurations (new) Link ¶

Retrieves information about all the recommender model configurations that are associated with your Amazon Pinpoint account.

See also: AWS API Documentation

Request Syntax

client.get_recommender_configurations(
    PageSize='string',
    Token='string'
)
type PageSize

string

param PageSize

The maximum number of items to include in each page of a paginated response. This parameter is currently not supported for application, campaign, and journey metrics.

type Token

string

param Token

The NextToken string that specifies which page of results to return in a paginated response.

rtype

dict

returns

Response Syntax

{
    'ListRecommenderConfigurationsResponse': {
        'Item': [
            {
                'Attributes': {
                    'string': 'string'
                },
                'CreationDate': 'string',
                'Description': 'string',
                'Id': 'string',
                'LastModifiedDate': 'string',
                'Name': 'string',
                'RecommendationProviderIdType': 'string',
                'RecommendationProviderRoleArn': 'string',
                'RecommendationProviderUri': 'string',
                'RecommendationTransformerUri': 'string',
                'RecommendationsDisplayName': 'string',
                'RecommendationsPerMessage': 123
            },
        ],
        'NextToken': 'string'
    }
}

Response Structure

  • (dict) --

    The request succeeded.

    • ListRecommenderConfigurationsResponse (dict) --

      Provides information about all the recommender model configurations that are associated with your Amazon Pinpoint account.

      • Item (list) --

        An array of responses, one for each recommender model configuration that's associated with your Amazon Pinpoint account.

        • (dict) --

          Provides information about Amazon Pinpoint configuration settings for retrieving and processing data from a recommender model.

          • Attributes (dict) --

            A map that defines 1-10 custom endpoint or user attributes, depending on the value for the RecommenderUserIdType property. Each of these attributes temporarily stores a recommended item that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute can be used as a message variable in a message template.

            This value is null if the configuration doesn't invoke an AWS Lambda function (LambdaFunctionArn) to perform additional processing of recommendation data.

            • (string) --

              • (string) --

          • CreationDate (string) --

            The date, in extended ISO 8601 format, when the configuration was created for the recommender model.

          • Description (string) --

            The custom description of the configuration for the recommender model.

          • Id (string) --

            The unique identifier for the recommender model configuration.

          • LastModifiedDate (string) --

            The date, in extended ISO 8601 format, when the configuration for the recommender model was last modified.

          • Name (string) --

            The custom name of the configuration for the recommender model.

          • RecommendationProviderIdType (string) --

            The type of Amazon Pinpoint ID that's associated with unique user IDs in the recommender model. This value enables the model to use attribute and event data that’s specific to a particular endpoint or user in an Amazon Pinpoint application. Possible values are:

            • PINPOINT_ENDPOINT_ID - Each user in the model is associated with a particular endpoint in Amazon Pinpoint. The data is correlated based on endpoint IDs in Amazon Pinpoint. This is the default value.

            • PINPOINT_USER_ID - Each user in the model is associated with a particular user and endpoint in Amazon Pinpoint. The data is correlated based on user IDs in Amazon Pinpoint. If this value is specified, an endpoint definition in Amazon Pinpoint has to specify both a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be sent to the user's endpoint.

          • RecommendationProviderRoleArn (string) --

            The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to retrieve recommendation data from the recommender model.

          • RecommendationProviderUri (string) --

            The Amazon Resource Name (ARN) of the recommender model that Amazon Pinpoint retrieves the recommendation data from. This value is the ARN of an Amazon Personalize campaign.

          • RecommendationTransformerUri (string) --

            The name or Amazon Resource Name (ARN) of the AWS Lambda function that Amazon Pinpoint invokes to perform additional processing of recommendation data that it retrieves from the recommender model.

          • RecommendationsDisplayName (string) --

            The custom display name for the standard endpoint or user attribute (RecommendationItems) that temporarily stores a recommended item for each endpoint or user, depending on the value for the RecommenderUserIdType property. This name appears in the Attribute finder pane of the template editor on the Amazon Pinpoint console.

            This value is null if the configuration doesn't invoke an AWS Lambda function (LambdaFunctionArn) to perform additional processing of recommendation data.

          • RecommendationsPerMessage (integer) --

            The number of recommended items that are retrieved from the model for each endpoint or user, depending on the value for the RecommenderUserIdType property. This number determines how many recommended attributes are available for use as message variables in message templates.

      • NextToken (string) --

        The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.

DeleteRecommenderConfiguration (new) Link ¶

Deletes an Amazon Pinpoint configuration for a recommender model.

See also: AWS API Documentation

Request Syntax

client.delete_recommender_configuration(
    RecommenderId='string'
)
type RecommenderId

string

param RecommenderId

[REQUIRED]

The unique identifier for the recommender model configuration. This identifier is displayed as the Recommender ID on the Amazon Pinpoint console.

rtype

dict

returns

Response Syntax

{
    'RecommenderConfigurationResponse': {
        'Attributes': {
            'string': 'string'
        },
        'CreationDate': 'string',
        'Description': 'string',
        'Id': 'string',
        'LastModifiedDate': 'string',
        'Name': 'string',
        'RecommendationProviderIdType': 'string',
        'RecommendationProviderRoleArn': 'string',
        'RecommendationProviderUri': 'string',
        'RecommendationTransformerUri': 'string',
        'RecommendationsDisplayName': 'string',
        'RecommendationsPerMessage': 123
    }
}

Response Structure

  • (dict) --

    The request succeeded.

    • RecommenderConfigurationResponse (dict) --

      Provides information about Amazon Pinpoint configuration settings for retrieving and processing data from a recommender model.

      • Attributes (dict) --

        A map that defines 1-10 custom endpoint or user attributes, depending on the value for the RecommenderUserIdType property. Each of these attributes temporarily stores a recommended item that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute can be used as a message variable in a message template.

        This value is null if the configuration doesn't invoke an AWS Lambda function (LambdaFunctionArn) to perform additional processing of recommendation data.

        • (string) --

          • (string) --

      • CreationDate (string) --

        The date, in extended ISO 8601 format, when the configuration was created for the recommender model.

      • Description (string) --

        The custom description of the configuration for the recommender model.

      • Id (string) --

        The unique identifier for the recommender model configuration.

      • LastModifiedDate (string) --

        The date, in extended ISO 8601 format, when the configuration for the recommender model was last modified.

      • Name (string) --

        The custom name of the configuration for the recommender model.

      • RecommendationProviderIdType (string) --

        The type of Amazon Pinpoint ID that's associated with unique user IDs in the recommender model. This value enables the model to use attribute and event data that’s specific to a particular endpoint or user in an Amazon Pinpoint application. Possible values are:

        • PINPOINT_ENDPOINT_ID - Each user in the model is associated with a particular endpoint in Amazon Pinpoint. The data is correlated based on endpoint IDs in Amazon Pinpoint. This is the default value.

        • PINPOINT_USER_ID - Each user in the model is associated with a particular user and endpoint in Amazon Pinpoint. The data is correlated based on user IDs in Amazon Pinpoint. If this value is specified, an endpoint definition in Amazon Pinpoint has to specify both a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be sent to the user's endpoint.

      • RecommendationProviderRoleArn (string) --

        The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to retrieve recommendation data from the recommender model.

      • RecommendationProviderUri (string) --

        The Amazon Resource Name (ARN) of the recommender model that Amazon Pinpoint retrieves the recommendation data from. This value is the ARN of an Amazon Personalize campaign.

      • RecommendationTransformerUri (string) --

        The name or Amazon Resource Name (ARN) of the AWS Lambda function that Amazon Pinpoint invokes to perform additional processing of recommendation data that it retrieves from the recommender model.

      • RecommendationsDisplayName (string) --

        The custom display name for the standard endpoint or user attribute (RecommendationItems) that temporarily stores a recommended item for each endpoint or user, depending on the value for the RecommenderUserIdType property. This name appears in the Attribute finder pane of the template editor on the Amazon Pinpoint console.

        This value is null if the configuration doesn't invoke an AWS Lambda function (LambdaFunctionArn) to perform additional processing of recommendation data.

      • RecommendationsPerMessage (integer) --

        The number of recommended items that are retrieved from the model for each endpoint or user, depending on the value for the RecommenderUserIdType property. This number determines how many recommended attributes are available for use as message variables in message templates.

CreateRecommenderConfiguration (new) Link ¶

Creates an Amazon Pinpoint configuration for a recommender model.

See also: AWS API Documentation

Request Syntax

client.create_recommender_configuration(
    CreateRecommenderConfiguration={
        'Attributes': {
            'string': 'string'
        },
        'Description': 'string',
        'Name': 'string',
        'RecommendationProviderIdType': 'string',
        'RecommendationProviderRoleArn': 'string',
        'RecommendationProviderUri': 'string',
        'RecommendationTransformerUri': 'string',
        'RecommendationsDisplayName': 'string',
        'RecommendationsPerMessage': 123
    }
)
type CreateRecommenderConfiguration

dict

param CreateRecommenderConfiguration

[REQUIRED]

Specifies Amazon Pinpoint configuration settings for retrieving and processing recommendation data from a recommender model.

  • Attributes (dict) --

    A map of key-value pairs that defines 1-10 custom endpoint or user attributes, depending on the value for the RecommenderUserIdType property. Each of these attributes temporarily stores a recommended item that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute can be used as a message variable in a message template.

    In the map, the key is the name of a custom attribute and the value is a custom display name for that attribute. The display name appears in the Attribute finder pane of the template editor on the Amazon Pinpoint console. The following restrictions apply to these names:

    • An attribute name must start with a letter or number and it can contain up to 50 characters. The characters can be letters, numbers, underscores (_), or hyphens (-). Attribute names are case sensitive and must be unique.

    • An attribute display name must start with a letter or number and it can contain up to 25 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-).

    This object is required if the configuration invokes an AWS Lambda function (LambdaFunctionArn) to process recommendation data. Otherwise, don't include this object in your request.

    • (string) --

      • (string) --

  • Description (string) --

    A custom description of the configuration for the recommender model. The description can contain up to 128 characters.

  • Name (string) --

    A custom name of the configuration for the recommender model. The name must start with a letter or number and it can contain up to 128 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-).

  • RecommendationProviderIdType (string) --

    The type of Amazon Pinpoint ID to associate with unique user IDs in the recommender model. This value enables the model to use attribute and event data that’s specific to a particular endpoint or user in an Amazon Pinpoint application. Valid values are:

    • PINPOINT_ENDPOINT_ID - Associate each user in the model with a particular endpoint in Amazon Pinpoint. The data is correlated based on endpoint IDs in Amazon Pinpoint. This is the default value.

    • PINPOINT_USER_ID - Associate each user in the model with a particular user and endpoint in Amazon Pinpoint. The data is correlated based on user IDs in Amazon Pinpoint. If you specify this value, an endpoint definition in Amazon Pinpoint has to specify a both a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be sent to the user's endpoint.

  • RecommendationProviderRoleArn (string) -- [REQUIRED]

    The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to retrieve recommendation data from the recommender model.

  • RecommendationProviderUri (string) -- [REQUIRED]

    The Amazon Resource Name (ARN) of the recommender model to retrieve recommendation data from. This value must match the ARN of an Amazon Personalize campaign.

  • RecommendationTransformerUri (string) --

    The name or Amazon Resource Name (ARN) of the AWS Lambda function to invoke for additional processing of recommendation data that's retrieved from the recommender model.

  • RecommendationsDisplayName (string) --

    A custom display name for the standard endpoint or user attribute (RecommendationItems) that temporarily stores a recommended item for each endpoint or user, depending on the value for the RecommenderUserIdType property. This value is required if the configuration doesn't invoke an AWS Lambda function (LambdaFunctionArn) to perform additional processing of recommendation data.

    This name appears in the Attribute finder pane of the template editor on the Amazon Pinpoint console. The name can contain up to 25 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-). These restrictions don't apply to attribute values.

  • RecommendationsPerMessage (integer) --

    The number of recommended items to retrieve from the model for each endpoint or user, depending on the value for the RecommenderUserIdType property. This number determines how many recommended attributes are available for use as message variables in message templates. The minimum value is 1. The maximum value is 5. The default value is 5.

    To use multiple recommended items and custom attributes with message variables, you have to use an AWS Lambda function (LambdaFunctionArn) to perform additional processing of recommendation data.

rtype

dict

returns

Response Syntax

{
    'RecommenderConfigurationResponse': {
        'Attributes': {
            'string': 'string'
        },
        'CreationDate': 'string',
        'Description': 'string',
        'Id': 'string',
        'LastModifiedDate': 'string',
        'Name': 'string',
        'RecommendationProviderIdType': 'string',
        'RecommendationProviderRoleArn': 'string',
        'RecommendationProviderUri': 'string',
        'RecommendationTransformerUri': 'string',
        'RecommendationsDisplayName': 'string',
        'RecommendationsPerMessage': 123
    }
}

Response Structure

  • (dict) --

    The request succeeded and the specified resource was created.

    • RecommenderConfigurationResponse (dict) --

      Provides information about Amazon Pinpoint configuration settings for retrieving and processing data from a recommender model.

      • Attributes (dict) --

        A map that defines 1-10 custom endpoint or user attributes, depending on the value for the RecommenderUserIdType property. Each of these attributes temporarily stores a recommended item that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute can be used as a message variable in a message template.

        This value is null if the configuration doesn't invoke an AWS Lambda function (LambdaFunctionArn) to perform additional processing of recommendation data.

        • (string) --

          • (string) --

      • CreationDate (string) --

        The date, in extended ISO 8601 format, when the configuration was created for the recommender model.

      • Description (string) --

        The custom description of the configuration for the recommender model.

      • Id (string) --

        The unique identifier for the recommender model configuration.

      • LastModifiedDate (string) --

        The date, in extended ISO 8601 format, when the configuration for the recommender model was last modified.

      • Name (string) --

        The custom name of the configuration for the recommender model.

      • RecommendationProviderIdType (string) --

        The type of Amazon Pinpoint ID that's associated with unique user IDs in the recommender model. This value enables the model to use attribute and event data that’s specific to a particular endpoint or user in an Amazon Pinpoint application. Possible values are:

        • PINPOINT_ENDPOINT_ID - Each user in the model is associated with a particular endpoint in Amazon Pinpoint. The data is correlated based on endpoint IDs in Amazon Pinpoint. This is the default value.

        • PINPOINT_USER_ID - Each user in the model is associated with a particular user and endpoint in Amazon Pinpoint. The data is correlated based on user IDs in Amazon Pinpoint. If this value is specified, an endpoint definition in Amazon Pinpoint has to specify both a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be sent to the user's endpoint.

      • RecommendationProviderRoleArn (string) --

        The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to retrieve recommendation data from the recommender model.

      • RecommendationProviderUri (string) --

        The Amazon Resource Name (ARN) of the recommender model that Amazon Pinpoint retrieves the recommendation data from. This value is the ARN of an Amazon Personalize campaign.

      • RecommendationTransformerUri (string) --

        The name or Amazon Resource Name (ARN) of the AWS Lambda function that Amazon Pinpoint invokes to perform additional processing of recommendation data that it retrieves from the recommender model.

      • RecommendationsDisplayName (string) --

        The custom display name for the standard endpoint or user attribute (RecommendationItems) that temporarily stores a recommended item for each endpoint or user, depending on the value for the RecommenderUserIdType property. This name appears in the Attribute finder pane of the template editor on the Amazon Pinpoint console.

        This value is null if the configuration doesn't invoke an AWS Lambda function (LambdaFunctionArn) to perform additional processing of recommendation data.

      • RecommendationsPerMessage (integer) --

        The number of recommended items that are retrieved from the model for each endpoint or user, depending on the value for the RecommenderUserIdType property. This number determines how many recommended attributes are available for use as message variables in message templates.

UpdateRecommenderConfiguration (new) Link ¶

Updates an Amazon Pinpoint configuration for a recommender model.

See also: AWS API Documentation

Request Syntax

client.update_recommender_configuration(
    RecommenderId='string',
    UpdateRecommenderConfiguration={
        'Attributes': {
            'string': 'string'
        },
        'Description': 'string',
        'Name': 'string',
        'RecommendationProviderIdType': 'string',
        'RecommendationProviderRoleArn': 'string',
        'RecommendationProviderUri': 'string',
        'RecommendationTransformerUri': 'string',
        'RecommendationsDisplayName': 'string',
        'RecommendationsPerMessage': 123
    }
)
type RecommenderId

string

param RecommenderId

[REQUIRED]

The unique identifier for the recommender model configuration. This identifier is displayed as the Recommender ID on the Amazon Pinpoint console.

type UpdateRecommenderConfiguration

dict

param UpdateRecommenderConfiguration

[REQUIRED]

Specifies Amazon Pinpoint configuration settings for retrieving and processing recommendation data from a recommender model.

  • Attributes (dict) --

    A map of key-value pairs that defines 1-10 custom endpoint or user attributes, depending on the value for the RecommenderUserIdType property. Each of these attributes temporarily stores a recommended item that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute can be used as a message variable in a message template.

    In the map, the key is the name of a custom attribute and the value is a custom display name for that attribute. The display name appears in the Attribute finder pane of the template editor on the Amazon Pinpoint console. The following restrictions apply to these names:

    • An attribute name must start with a letter or number and it can contain up to 50 characters. The characters can be letters, numbers, underscores (_), or hyphens (-). Attribute names are case sensitive and must be unique.

    • An attribute display name must start with a letter or number and it can contain up to 25 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-).

    This object is required if the configuration invokes an AWS Lambda function (LambdaFunctionArn) to process recommendation data. Otherwise, don't include this object in your request.

    • (string) --

      • (string) --

  • Description (string) --

    A custom description of the configuration for the recommender model. The description can contain up to 128 characters.

  • Name (string) --

    A custom name of the configuration for the recommender model. The name must start with a letter or number and it can contain up to 128 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-).

  • RecommendationProviderIdType (string) --

    The type of Amazon Pinpoint ID to associate with unique user IDs in the recommender model. This value enables the model to use attribute and event data that’s specific to a particular endpoint or user in an Amazon Pinpoint application. Valid values are:

    • PINPOINT_ENDPOINT_ID - Associate each user in the model with a particular endpoint in Amazon Pinpoint. The data is correlated based on endpoint IDs in Amazon Pinpoint. This is the default value.

    • PINPOINT_USER_ID - Associate each user in the model with a particular user and endpoint in Amazon Pinpoint. The data is correlated based on user IDs in Amazon Pinpoint. If you specify this value, an endpoint definition in Amazon Pinpoint has to specify a both a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be sent to the user's endpoint.

  • RecommendationProviderRoleArn (string) -- [REQUIRED]

    The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to retrieve recommendation data from the recommender model.

  • RecommendationProviderUri (string) -- [REQUIRED]

    The Amazon Resource Name (ARN) of the recommender model to retrieve recommendation data from. This value must match the ARN of an Amazon Personalize campaign.

  • RecommendationTransformerUri (string) --

    The name or Amazon Resource Name (ARN) of the AWS Lambda function to invoke for additional processing of recommendation data that's retrieved from the recommender model.

  • RecommendationsDisplayName (string) --

    A custom display name for the standard endpoint or user attribute (RecommendationItems) that temporarily stores a recommended item for each endpoint or user, depending on the value for the RecommenderUserIdType property. This value is required if the configuration doesn't invoke an AWS Lambda function (LambdaFunctionArn) to perform additional processing of recommendation data.

    This name appears in the Attribute finder pane of the template editor on the Amazon Pinpoint console. The name can contain up to 25 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-). These restrictions don't apply to attribute values.

  • RecommendationsPerMessage (integer) --

    The number of recommended items to retrieve from the model for each endpoint or user, depending on the value for the RecommenderUserIdType property. This number determines how many recommended attributes are available for use as message variables in message templates. The minimum value is 1. The maximum value is 5. The default value is 5.

    To use multiple recommended items and custom attributes with message variables, you have to use an AWS Lambda function (LambdaFunctionArn) to perform additional processing of recommendation data.

rtype

dict

returns

Response Syntax

{
    'RecommenderConfigurationResponse': {
        'Attributes': {
            'string': 'string'
        },
        'CreationDate': 'string',
        'Description': 'string',
        'Id': 'string',
        'LastModifiedDate': 'string',
        'Name': 'string',
        'RecommendationProviderIdType': 'string',
        'RecommendationProviderRoleArn': 'string',
        'RecommendationProviderUri': 'string',
        'RecommendationTransformerUri': 'string',
        'RecommendationsDisplayName': 'string',
        'RecommendationsPerMessage': 123
    }
}

Response Structure

  • (dict) --

    The request succeeded.

    • RecommenderConfigurationResponse (dict) --

      Provides information about Amazon Pinpoint configuration settings for retrieving and processing data from a recommender model.

      • Attributes (dict) --

        A map that defines 1-10 custom endpoint or user attributes, depending on the value for the RecommenderUserIdType property. Each of these attributes temporarily stores a recommended item that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute can be used as a message variable in a message template.

        This value is null if the configuration doesn't invoke an AWS Lambda function (LambdaFunctionArn) to perform additional processing of recommendation data.

        • (string) --

          • (string) --

      • CreationDate (string) --

        The date, in extended ISO 8601 format, when the configuration was created for the recommender model.

      • Description (string) --

        The custom description of the configuration for the recommender model.

      • Id (string) --

        The unique identifier for the recommender model configuration.

      • LastModifiedDate (string) --

        The date, in extended ISO 8601 format, when the configuration for the recommender model was last modified.

      • Name (string) --

        The custom name of the configuration for the recommender model.

      • RecommendationProviderIdType (string) --

        The type of Amazon Pinpoint ID that's associated with unique user IDs in the recommender model. This value enables the model to use attribute and event data that’s specific to a particular endpoint or user in an Amazon Pinpoint application. Possible values are:

        • PINPOINT_ENDPOINT_ID - Each user in the model is associated with a particular endpoint in Amazon Pinpoint. The data is correlated based on endpoint IDs in Amazon Pinpoint. This is the default value.

        • PINPOINT_USER_ID - Each user in the model is associated with a particular user and endpoint in Amazon Pinpoint. The data is correlated based on user IDs in Amazon Pinpoint. If this value is specified, an endpoint definition in Amazon Pinpoint has to specify both a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be sent to the user's endpoint.

      • RecommendationProviderRoleArn (string) --

        The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to retrieve recommendation data from the recommender model.

      • RecommendationProviderUri (string) --

        The Amazon Resource Name (ARN) of the recommender model that Amazon Pinpoint retrieves the recommendation data from. This value is the ARN of an Amazon Personalize campaign.

      • RecommendationTransformerUri (string) --

        The name or Amazon Resource Name (ARN) of the AWS Lambda function that Amazon Pinpoint invokes to perform additional processing of recommendation data that it retrieves from the recommender model.

      • RecommendationsDisplayName (string) --

        The custom display name for the standard endpoint or user attribute (RecommendationItems) that temporarily stores a recommended item for each endpoint or user, depending on the value for the RecommenderUserIdType property. This name appears in the Attribute finder pane of the template editor on the Amazon Pinpoint console.

        This value is null if the configuration doesn't invoke an AWS Lambda function (LambdaFunctionArn) to perform additional processing of recommendation data.

      • RecommendationsPerMessage (integer) --

        The number of recommended items that are retrieved from the model for each endpoint or user, depending on the value for the RecommenderUserIdType property. This number determines how many recommended attributes are available for use as message variables in message templates.

GetRecommenderConfiguration (new) Link ¶

Retrieves information about an Amazon Pinpoint configuration for a recommender model.

See also: AWS API Documentation

Request Syntax

client.get_recommender_configuration(
    RecommenderId='string'
)
type RecommenderId

string

param RecommenderId

[REQUIRED]

The unique identifier for the recommender model configuration. This identifier is displayed as the Recommender ID on the Amazon Pinpoint console.

rtype

dict

returns

Response Syntax

{
    'RecommenderConfigurationResponse': {
        'Attributes': {
            'string': 'string'
        },
        'CreationDate': 'string',
        'Description': 'string',
        'Id': 'string',
        'LastModifiedDate': 'string',
        'Name': 'string',
        'RecommendationProviderIdType': 'string',
        'RecommendationProviderRoleArn': 'string',
        'RecommendationProviderUri': 'string',
        'RecommendationTransformerUri': 'string',
        'RecommendationsDisplayName': 'string',
        'RecommendationsPerMessage': 123
    }
}

Response Structure

  • (dict) --

    The request succeeded.

    • RecommenderConfigurationResponse (dict) --

      Provides information about Amazon Pinpoint configuration settings for retrieving and processing data from a recommender model.

      • Attributes (dict) --

        A map that defines 1-10 custom endpoint or user attributes, depending on the value for the RecommenderUserIdType property. Each of these attributes temporarily stores a recommended item that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute can be used as a message variable in a message template.

        This value is null if the configuration doesn't invoke an AWS Lambda function (LambdaFunctionArn) to perform additional processing of recommendation data.

        • (string) --

          • (string) --

      • CreationDate (string) --

        The date, in extended ISO 8601 format, when the configuration was created for the recommender model.

      • Description (string) --

        The custom description of the configuration for the recommender model.

      • Id (string) --

        The unique identifier for the recommender model configuration.

      • LastModifiedDate (string) --

        The date, in extended ISO 8601 format, when the configuration for the recommender model was last modified.

      • Name (string) --

        The custom name of the configuration for the recommender model.

      • RecommendationProviderIdType (string) --

        The type of Amazon Pinpoint ID that's associated with unique user IDs in the recommender model. This value enables the model to use attribute and event data that’s specific to a particular endpoint or user in an Amazon Pinpoint application. Possible values are:

        • PINPOINT_ENDPOINT_ID - Each user in the model is associated with a particular endpoint in Amazon Pinpoint. The data is correlated based on endpoint IDs in Amazon Pinpoint. This is the default value.

        • PINPOINT_USER_ID - Each user in the model is associated with a particular user and endpoint in Amazon Pinpoint. The data is correlated based on user IDs in Amazon Pinpoint. If this value is specified, an endpoint definition in Amazon Pinpoint has to specify both a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be sent to the user's endpoint.

      • RecommendationProviderRoleArn (string) --

        The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to retrieve recommendation data from the recommender model.

      • RecommendationProviderUri (string) --

        The Amazon Resource Name (ARN) of the recommender model that Amazon Pinpoint retrieves the recommendation data from. This value is the ARN of an Amazon Personalize campaign.

      • RecommendationTransformerUri (string) --

        The name or Amazon Resource Name (ARN) of the AWS Lambda function that Amazon Pinpoint invokes to perform additional processing of recommendation data that it retrieves from the recommender model.

      • RecommendationsDisplayName (string) --

        The custom display name for the standard endpoint or user attribute (RecommendationItems) that temporarily stores a recommended item for each endpoint or user, depending on the value for the RecommenderUserIdType property. This name appears in the Attribute finder pane of the template editor on the Amazon Pinpoint console.

        This value is null if the configuration doesn't invoke an AWS Lambda function (LambdaFunctionArn) to perform additional processing of recommendation data.

      • RecommendationsPerMessage (integer) --

        The number of recommended items that are retrieved from the model for each endpoint or user, depending on the value for the RecommenderUserIdType property. This number determines how many recommended attributes are available for use as message variables in message templates.

CreateEmailTemplate (updated) Link ¶
Changes (request)
{'EmailTemplateRequest': {'RecommenderId': 'string'}}

Creates a message template for messages that are sent through the email channel.

See also: AWS API Documentation

Request Syntax

client.create_email_template(
    EmailTemplateRequest={
        'DefaultSubstitutions': 'string',
        'HtmlPart': 'string',
        'RecommenderId': 'string',
        'Subject': 'string',
        'tags': {
            'string': 'string'
        },
        'TemplateDescription': 'string',
        'TextPart': 'string'
    },
    TemplateName='string'
)
type EmailTemplateRequest

dict

param EmailTemplateRequest

[REQUIRED]

Specifies the content and settings for a message template that can be used in messages that are sent through the email channel.

  • DefaultSubstitutions (string) --

    A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.

  • HtmlPart (string) --

    The message body, in HTML format, to use in email messages that are based on the message template. We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.

  • RecommenderId (string) --

    The unique identifier for the recommender model to use for the message template. Amazon Pinpoint uses this value to determine how to retrieve and process data from a recommender model when it sends messages that use the template, if the template contains message variables for recommendation data.

  • Subject (string) --

    The subject line, or title, to use in email messages that are based on the message template.

  • tags (dict) --

    A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.

    • (string) --

      • (string) --

  • TemplateDescription (string) --

    A custom description of the message template.

  • TextPart (string) --

    The message body, in plain text format, to use in email messages that are based on the message template. We recommend using plain text format for email clients that don't render HTML content and clients that are connected to high-latency networks, such as mobile devices.

type TemplateName

string

param TemplateName

[REQUIRED]

The name of the message template. A template name must start with an alphanumeric character and can contain a maximum of 128 characters. The characters can be alphanumeric characters, underscores (_), or hyphens (-). Template names are case sensitive.

rtype

dict

returns

Response Syntax

{
    'CreateTemplateMessageBody': {
        'Arn': 'string',
        'Message': 'string',
        'RequestID': 'string'
    }
}

Response Structure

  • (dict) --

    The request succeeded and the specified resource was created.

    • CreateTemplateMessageBody (dict) --

      Provides information about a request to create a message template.

      • Arn (string) --

        The Amazon Resource Name (ARN) of the message template that was created.

      • Message (string) --

        The message that's returned from the API for the request to create the message template.

      • RequestID (string) --

        The unique identifier for the request to create the message template.

CreatePushTemplate (updated) Link ¶
Changes (request)
{'PushNotificationTemplateRequest': {'RecommenderId': 'string'}}

Creates a message template for messages that are sent through a push notification channel.

See also: AWS API Documentation

Request Syntax

client.create_push_template(
    PushNotificationTemplateRequest={
        'ADM': {
            'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
            'Body': 'string',
            'ImageIconUrl': 'string',
            'ImageUrl': 'string',
            'RawContent': 'string',
            'SmallImageIconUrl': 'string',
            'Sound': 'string',
            'Title': 'string',
            'Url': 'string'
        },
        'APNS': {
            'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
            'Body': 'string',
            'MediaUrl': 'string',
            'RawContent': 'string',
            'Sound': 'string',
            'Title': 'string',
            'Url': 'string'
        },
        'Baidu': {
            'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
            'Body': 'string',
            'ImageIconUrl': 'string',
            'ImageUrl': 'string',
            'RawContent': 'string',
            'SmallImageIconUrl': 'string',
            'Sound': 'string',
            'Title': 'string',
            'Url': 'string'
        },
        'Default': {
            'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
            'Body': 'string',
            'Sound': 'string',
            'Title': 'string',
            'Url': 'string'
        },
        'DefaultSubstitutions': 'string',
        'GCM': {
            'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
            'Body': 'string',
            'ImageIconUrl': 'string',
            'ImageUrl': 'string',
            'RawContent': 'string',
            'SmallImageIconUrl': 'string',
            'Sound': 'string',
            'Title': 'string',
            'Url': 'string'
        },
        'RecommenderId': 'string',
        'tags': {
            'string': 'string'
        },
        'TemplateDescription': 'string'
    },
    TemplateName='string'
)
type PushNotificationTemplateRequest

dict

param PushNotificationTemplateRequest

[REQUIRED]

Specifies the content and settings for a message template that can be used in messages that are sent through a push notification channel.

  • ADM (dict) --

    The message template to use for the ADM (Amazon Device Messaging) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).

    • Action (string) --

      The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:

      • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

      • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

      • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

    • Body (string) --

      The message body to use in a push notification that's based on the message template.

    • ImageIconUrl (string) --

      The URL of the large icon image to display in the content view of a push notification that's based on the message template.

    • ImageUrl (string) --

      The URL of an image to display in a push notification that's based on the message template.

    • RawContent (string) --

      The raw, JSON-formatted string to use as the payload for a push notification that's based on the message template. If specified, this value overrides all other content for the message template.

    • SmallImageIconUrl (string) --

      The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

    • Sound (string) --

      The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

    • Title (string) --

      The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

    • Url (string) --

      The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.

  • APNS (dict) --

    The message template to use for the APNs (Apple Push Notification service) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).

    • Action (string) --

      The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:

      • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

      • DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS platform.

      • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

    • Body (string) --

      The message body to use in push notifications that are based on the message template.

    • MediaUrl (string) --

      The URL of an image or video to display in push notifications that are based on the message template.

    • RawContent (string) --

      The raw, JSON-formatted string to use as the payload for push notifications that are based on the message template. If specified, this value overrides all other content for the message template.

    • Sound (string) --

      The key for the sound to play when the recipient receives a push notification that's based on the message template. The value for this key is the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.

    • Title (string) --

      The title to use in push notifications that are based on the message template. This title appears above the notification message on a recipient's device.

    • Url (string) --

      The URL to open in the recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.

  • Baidu (dict) --

    The message template to use for the Baidu (Baidu Cloud Push) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).

    • Action (string) --

      The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:

      • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

      • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

      • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

    • Body (string) --

      The message body to use in a push notification that's based on the message template.

    • ImageIconUrl (string) --

      The URL of the large icon image to display in the content view of a push notification that's based on the message template.

    • ImageUrl (string) --

      The URL of an image to display in a push notification that's based on the message template.

    • RawContent (string) --

      The raw, JSON-formatted string to use as the payload for a push notification that's based on the message template. If specified, this value overrides all other content for the message template.

    • SmallImageIconUrl (string) --

      The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

    • Sound (string) --

      The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

    • Title (string) --

      The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

    • Url (string) --

      The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.

  • Default (dict) --

    The default message template to use for push notification channels.

    • Action (string) --

      The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:

      • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

      • DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS and Android platforms.

      • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

    • Body (string) --

      The message body to use in push notifications that are based on the message template.

    • Sound (string) --

      The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

      For an iOS platform, this value is the key for the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.

    • Title (string) --

      The title to use in push notifications that are based on the message template. This title appears above the notification message on a recipient's device.

    • Url (string) --

      The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.

  • DefaultSubstitutions (string) --

    A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.

  • GCM (dict) --

    The message template to use for the GCM channel, which is used to send notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).

    • Action (string) --

      The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:

      • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

      • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

      • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

    • Body (string) --

      The message body to use in a push notification that's based on the message template.

    • ImageIconUrl (string) --

      The URL of the large icon image to display in the content view of a push notification that's based on the message template.

    • ImageUrl (string) --

      The URL of an image to display in a push notification that's based on the message template.

    • RawContent (string) --

      The raw, JSON-formatted string to use as the payload for a push notification that's based on the message template. If specified, this value overrides all other content for the message template.

    • SmallImageIconUrl (string) --

      The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

    • Sound (string) --

      The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

    • Title (string) --

      The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

    • Url (string) --

      The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.

  • RecommenderId (string) --

    The unique identifier for the recommender model to use for the message template. Amazon Pinpoint uses this value to determine how to retrieve and process data from a recommender model when it sends messages that use the template, if the template contains message variables for recommendation data.

  • tags (dict) --

    A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.

    • (string) --

      • (string) --

  • TemplateDescription (string) --

    A custom description of the message template.

type TemplateName

string

param TemplateName

[REQUIRED]

The name of the message template. A template name must start with an alphanumeric character and can contain a maximum of 128 characters. The characters can be alphanumeric characters, underscores (_), or hyphens (-). Template names are case sensitive.

rtype

dict

returns

Response Syntax

{
    'CreateTemplateMessageBody': {
        'Arn': 'string',
        'Message': 'string',
        'RequestID': 'string'
    }
}

Response Structure

  • (dict) --

    The request succeeded and the specified resource was created.

    • CreateTemplateMessageBody (dict) --

      Provides information about a request to create a message template.

      • Arn (string) --

        The Amazon Resource Name (ARN) of the message template that was created.

      • Message (string) --

        The message that's returned from the API for the request to create the message template.

      • RequestID (string) --

        The unique identifier for the request to create the message template.

CreateSmsTemplate (updated) Link ¶
Changes (request)
{'SMSTemplateRequest': {'RecommenderId': 'string'}}

Creates a message template for messages that are sent through the SMS channel.

See also: AWS API Documentation

Request Syntax

client.create_sms_template(
    SMSTemplateRequest={
        'Body': 'string',
        'DefaultSubstitutions': 'string',
        'RecommenderId': 'string',
        'tags': {
            'string': 'string'
        },
        'TemplateDescription': 'string'
    },
    TemplateName='string'
)
type SMSTemplateRequest

dict

param SMSTemplateRequest

[REQUIRED]

Specifies the content and settings for a message template that can be used in text messages that are sent through the SMS channel.

  • Body (string) --

    The message body to use in text messages that are based on the message template.

  • DefaultSubstitutions (string) --

    A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.

  • RecommenderId (string) --

    The unique identifier for the recommender model to use for the message template. Amazon Pinpoint uses this value to determine how to retrieve and process data from a recommender model when it sends messages that use the template, if the template contains message variables for recommendation data.

  • tags (dict) --

    A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.

    • (string) --

      • (string) --

  • TemplateDescription (string) --

    A custom description of the message template.

type TemplateName

string

param TemplateName

[REQUIRED]

The name of the message template. A template name must start with an alphanumeric character and can contain a maximum of 128 characters. The characters can be alphanumeric characters, underscores (_), or hyphens (-). Template names are case sensitive.

rtype

dict

returns

Response Syntax

{
    'CreateTemplateMessageBody': {
        'Arn': 'string',
        'Message': 'string',
        'RequestID': 'string'
    }
}

Response Structure

  • (dict) --

    The request succeeded and the specified resource was created.

    • CreateTemplateMessageBody (dict) --

      Provides information about a request to create a message template.

      • Arn (string) --

        The Amazon Resource Name (ARN) of the message template that was created.

      • Message (string) --

        The message that's returned from the API for the request to create the message template.

      • RequestID (string) --

        The unique identifier for the request to create the message template.

GetEmailTemplate (updated) Link ¶
Changes (response)
{'EmailTemplateResponse': {'RecommenderId': 'string'}}

Retrieves the content and settings of a message template for messages that are sent through the email channel.

See also: AWS API Documentation

Request Syntax

client.get_email_template(
    TemplateName='string',
    Version='string'
)
type TemplateName

string

param TemplateName

[REQUIRED]

The name of the message template. A template name must start with an alphanumeric character and can contain a maximum of 128 characters. The characters can be alphanumeric characters, underscores (_), or hyphens (-). Template names are case sensitive.

type Version

string

param Version

The unique identifier for the version of the message template to update, retrieve information about, or delete. To retrieve identifiers and other information for all the versions of a template, use the Template Versionsresource.

If specified, this value must match the identifier for an existing template version. If specified for an update operation, this value must match the identifier for the latest existing version of the template. This restriction helps ensure that race conditions don't occur.

If you don't specify a value for this parameter, Amazon Pinpoint does the following:

  • For a get operation, retrieves information about the active version of the template.

  • For an update operation, saves the updates to (overwrites) the latest existing version of the template, if the create-new-version parameter isn't used or is set to false.

  • For a delete operation, deletes the template, including all versions of the template.

rtype

dict

returns

Response Syntax

{
    'EmailTemplateResponse': {
        'Arn': 'string',
        'CreationDate': 'string',
        'DefaultSubstitutions': 'string',
        'HtmlPart': 'string',
        'LastModifiedDate': 'string',
        'RecommenderId': 'string',
        'Subject': 'string',
        'tags': {
            'string': 'string'
        },
        'TemplateDescription': 'string',
        'TemplateName': 'string',
        'TemplateType': 'EMAIL'|'SMS'|'VOICE'|'PUSH',
        'TextPart': 'string',
        'Version': 'string'
    }
}

Response Structure

  • (dict) --

    The request succeeded.

    • EmailTemplateResponse (dict) --

      Provides information about the content and settings for a message template that can be used in messages that are sent through the email channel.

      • Arn (string) --

        The Amazon Resource Name (ARN) of the message template.

      • CreationDate (string) --

        The date, in ISO 8601 format, when the message template was created.

      • DefaultSubstitutions (string) --

        The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.

      • HtmlPart (string) --

        The message body, in HTML format, that's used in email messages that are based on the message template.

      • LastModifiedDate (string) --

        The date, in ISO 8601 format, when the message template was last modified.

      • RecommenderId (string) --

        The unique identifier for the recommender model that's used by the message template.

      • Subject (string) --

        The subject line, or title, that's used in email messages that are based on the message template.

      • tags (dict) --

        A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.

        • (string) --

          • (string) --

      • TemplateDescription (string) --

        The custom description of the message template.

      • TemplateName (string) --

        The name of the message template.

      • TemplateType (string) --

        The type of channel that the message template is designed for. For an email template, this value is EMAIL.

      • TextPart (string) --

        The message body, in plain text format, that's used in email messages that are based on the message template.

      • Version (string) --

        The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.

GetPushTemplate (updated) Link ¶
Changes (response)
{'PushNotificationTemplateResponse': {'RecommenderId': 'string'}}

Retrieves the content and settings of a message template for messages that are sent through a push notification channel.

See also: AWS API Documentation

Request Syntax

client.get_push_template(
    TemplateName='string',
    Version='string'
)
type TemplateName

string

param TemplateName

[REQUIRED]

The name of the message template. A template name must start with an alphanumeric character and can contain a maximum of 128 characters. The characters can be alphanumeric characters, underscores (_), or hyphens (-). Template names are case sensitive.

type Version

string

param Version

The unique identifier for the version of the message template to update, retrieve information about, or delete. To retrieve identifiers and other information for all the versions of a template, use the Template Versionsresource.

If specified, this value must match the identifier for an existing template version. If specified for an update operation, this value must match the identifier for the latest existing version of the template. This restriction helps ensure that race conditions don't occur.

If you don't specify a value for this parameter, Amazon Pinpoint does the following:

  • For a get operation, retrieves information about the active version of the template.

  • For an update operation, saves the updates to (overwrites) the latest existing version of the template, if the create-new-version parameter isn't used or is set to false.

  • For a delete operation, deletes the template, including all versions of the template.

rtype

dict

returns

Response Syntax

{
    'PushNotificationTemplateResponse': {
        'ADM': {
            'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
            'Body': 'string',
            'ImageIconUrl': 'string',
            'ImageUrl': 'string',
            'RawContent': 'string',
            'SmallImageIconUrl': 'string',
            'Sound': 'string',
            'Title': 'string',
            'Url': 'string'
        },
        'APNS': {
            'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
            'Body': 'string',
            'MediaUrl': 'string',
            'RawContent': 'string',
            'Sound': 'string',
            'Title': 'string',
            'Url': 'string'
        },
        'Arn': 'string',
        'Baidu': {
            'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
            'Body': 'string',
            'ImageIconUrl': 'string',
            'ImageUrl': 'string',
            'RawContent': 'string',
            'SmallImageIconUrl': 'string',
            'Sound': 'string',
            'Title': 'string',
            'Url': 'string'
        },
        'CreationDate': 'string',
        'Default': {
            'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
            'Body': 'string',
            'Sound': 'string',
            'Title': 'string',
            'Url': 'string'
        },
        'DefaultSubstitutions': 'string',
        'GCM': {
            'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
            'Body': 'string',
            'ImageIconUrl': 'string',
            'ImageUrl': 'string',
            'RawContent': 'string',
            'SmallImageIconUrl': 'string',
            'Sound': 'string',
            'Title': 'string',
            'Url': 'string'
        },
        'LastModifiedDate': 'string',
        'RecommenderId': 'string',
        'tags': {
            'string': 'string'
        },
        'TemplateDescription': 'string',
        'TemplateName': 'string',
        'TemplateType': 'EMAIL'|'SMS'|'VOICE'|'PUSH',
        'Version': 'string'
    }
}

Response Structure

  • (dict) --

    The request succeeded.

    • PushNotificationTemplateResponse (dict) --

      Provides information about the content and settings for a message template that can be used in messages that are sent through a push notification channel.

      • ADM (dict) --

        The message template that's used for the ADM (Amazon Device Messaging) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).

        • Action (string) --

          The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:

          • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

          • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

          • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

        • Body (string) --

          The message body to use in a push notification that's based on the message template.

        • ImageIconUrl (string) --

          The URL of the large icon image to display in the content view of a push notification that's based on the message template.

        • ImageUrl (string) --

          The URL of an image to display in a push notification that's based on the message template.

        • RawContent (string) --

          The raw, JSON-formatted string to use as the payload for a push notification that's based on the message template. If specified, this value overrides all other content for the message template.

        • SmallImageIconUrl (string) --

          The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

        • Sound (string) --

          The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

        • Title (string) --

          The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

        • Url (string) --

          The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.

      • APNS (dict) --

        The message template that's used for the APNs (Apple Push Notification service) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).

        • Action (string) --

          The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:

          • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

          • DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS platform.

          • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

        • Body (string) --

          The message body to use in push notifications that are based on the message template.

        • MediaUrl (string) --

          The URL of an image or video to display in push notifications that are based on the message template.

        • RawContent (string) --

          The raw, JSON-formatted string to use as the payload for push notifications that are based on the message template. If specified, this value overrides all other content for the message template.

        • Sound (string) --

          The key for the sound to play when the recipient receives a push notification that's based on the message template. The value for this key is the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.

        • Title (string) --

          The title to use in push notifications that are based on the message template. This title appears above the notification message on a recipient's device.

        • Url (string) --

          The URL to open in the recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.

      • Arn (string) --

        The Amazon Resource Name (ARN) of the message template.

      • Baidu (dict) --

        The message template that's used for the Baidu (Baidu Cloud Push) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).

        • Action (string) --

          The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:

          • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

          • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

          • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

        • Body (string) --

          The message body to use in a push notification that's based on the message template.

        • ImageIconUrl (string) --

          The URL of the large icon image to display in the content view of a push notification that's based on the message template.

        • ImageUrl (string) --

          The URL of an image to display in a push notification that's based on the message template.

        • RawContent (string) --

          The raw, JSON-formatted string to use as the payload for a push notification that's based on the message template. If specified, this value overrides all other content for the message template.

        • SmallImageIconUrl (string) --

          The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

        • Sound (string) --

          The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

        • Title (string) --

          The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

        • Url (string) --

          The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.

      • CreationDate (string) --

        The date, in ISO 8601 format, when the message template was created.

      • Default (dict) --

        The default message template that's used for push notification channels.

        • Action (string) --

          The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:

          • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

          • DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS and Android platforms.

          • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

        • Body (string) --

          The message body to use in push notifications that are based on the message template.

        • Sound (string) --

          The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

          For an iOS platform, this value is the key for the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.

        • Title (string) --

          The title to use in push notifications that are based on the message template. This title appears above the notification message on a recipient's device.

        • Url (string) --

          The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.

      • DefaultSubstitutions (string) --

        The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.

      • GCM (dict) --

        The message template that's used for the GCM channel, which is used to send notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).

        • Action (string) --

          The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:

          • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

          • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

          • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

        • Body (string) --

          The message body to use in a push notification that's based on the message template.

        • ImageIconUrl (string) --

          The URL of the large icon image to display in the content view of a push notification that's based on the message template.

        • ImageUrl (string) --

          The URL of an image to display in a push notification that's based on the message template.

        • RawContent (string) --

          The raw, JSON-formatted string to use as the payload for a push notification that's based on the message template. If specified, this value overrides all other content for the message template.

        • SmallImageIconUrl (string) --

          The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

        • Sound (string) --

          The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

        • Title (string) --

          The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

        • Url (string) --

          The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.

      • LastModifiedDate (string) --

        The date, in ISO 8601 format, when the message template was last modified.

      • RecommenderId (string) --

        The unique identifier for the recommender model that's used by the message template.

      • tags (dict) --

        A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.

        • (string) --

          • (string) --

      • TemplateDescription (string) --

        The custom description of the message template.

      • TemplateName (string) --

        The name of the message template.

      • TemplateType (string) --

        The type of channel that the message template is designed for. For a push notification template, this value is PUSH.

      • Version (string) --

        The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.

GetSmsTemplate (updated) Link ¶
Changes (response)
{'SMSTemplateResponse': {'RecommenderId': 'string'}}

Retrieves the content and settings of a message template for messages that are sent through the SMS channel.

See also: AWS API Documentation

Request Syntax

client.get_sms_template(
    TemplateName='string',
    Version='string'
)
type TemplateName

string

param TemplateName

[REQUIRED]

The name of the message template. A template name must start with an alphanumeric character and can contain a maximum of 128 characters. The characters can be alphanumeric characters, underscores (_), or hyphens (-). Template names are case sensitive.

type Version

string

param Version

The unique identifier for the version of the message template to update, retrieve information about, or delete. To retrieve identifiers and other information for all the versions of a template, use the Template Versionsresource.

If specified, this value must match the identifier for an existing template version. If specified for an update operation, this value must match the identifier for the latest existing version of the template. This restriction helps ensure that race conditions don't occur.

If you don't specify a value for this parameter, Amazon Pinpoint does the following:

  • For a get operation, retrieves information about the active version of the template.

  • For an update operation, saves the updates to (overwrites) the latest existing version of the template, if the create-new-version parameter isn't used or is set to false.

  • For a delete operation, deletes the template, including all versions of the template.

rtype

dict

returns

Response Syntax

{
    'SMSTemplateResponse': {
        'Arn': 'string',
        'Body': 'string',
        'CreationDate': 'string',
        'DefaultSubstitutions': 'string',
        'LastModifiedDate': 'string',
        'RecommenderId': 'string',
        'tags': {
            'string': 'string'
        },
        'TemplateDescription': 'string',
        'TemplateName': 'string',
        'TemplateType': 'EMAIL'|'SMS'|'VOICE'|'PUSH',
        'Version': 'string'
    }
}

Response Structure

  • (dict) --

    The request succeeded.

    • SMSTemplateResponse (dict) --

      Provides information about the content and settings for a message template that can be used in text messages that are sent through the SMS channel.

      • Arn (string) --

        The Amazon Resource Name (ARN) of the message template.

      • Body (string) --

        The message body that's used in text messages that are based on the message template.

      • CreationDate (string) --

        The date, in ISO 8601 format, when the message template was created.

      • DefaultSubstitutions (string) --

        The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.

      • LastModifiedDate (string) --

        The date, in ISO 8601 format, when the message template was last modified.

      • RecommenderId (string) --

        The unique identifier for the recommender model that's used by the message template.

      • tags (dict) --

        A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.

        • (string) --

          • (string) --

      • TemplateDescription (string) --

        The custom description of the message template.

      • TemplateName (string) --

        The name of the message template.

      • TemplateType (string) --

        The type of channel that the message template is designed for. For an SMS template, this value is SMS.

      • Version (string) --

        The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.

UpdateEmailTemplate (updated) Link ¶
Changes (request)
{'EmailTemplateRequest': {'RecommenderId': 'string'}}

Updates an existing message template for messages that are sent through the email channel.

See also: AWS API Documentation

Request Syntax

client.update_email_template(
    CreateNewVersion=True|False,
    EmailTemplateRequest={
        'DefaultSubstitutions': 'string',
        'HtmlPart': 'string',
        'RecommenderId': 'string',
        'Subject': 'string',
        'tags': {
            'string': 'string'
        },
        'TemplateDescription': 'string',
        'TextPart': 'string'
    },
    TemplateName='string',
    Version='string'
)
type CreateNewVersion

boolean

param CreateNewVersion

Specifies whether to save the updates as a new version of the message template. Valid values are: true, save the updates as a new version; and, false, save the updates to (overwrite) the latest existing version of the template.

If you don't specify a value for this parameter, Amazon Pinpoint saves the updates to (overwrites) the latest existing version of the template. If you specify a value of true for this parameter, don't specify a value for the version parameter. Otherwise, an error will occur.

type EmailTemplateRequest

dict

param EmailTemplateRequest

[REQUIRED]

Specifies the content and settings for a message template that can be used in messages that are sent through the email channel.

  • DefaultSubstitutions (string) --

    A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.

  • HtmlPart (string) --

    The message body, in HTML format, to use in email messages that are based on the message template. We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.

  • RecommenderId (string) --

    The unique identifier for the recommender model to use for the message template. Amazon Pinpoint uses this value to determine how to retrieve and process data from a recommender model when it sends messages that use the template, if the template contains message variables for recommendation data.

  • Subject (string) --

    The subject line, or title, to use in email messages that are based on the message template.

  • tags (dict) --

    A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.

    • (string) --

      • (string) --

  • TemplateDescription (string) --

    A custom description of the message template.

  • TextPart (string) --

    The message body, in plain text format, to use in email messages that are based on the message template. We recommend using plain text format for email clients that don't render HTML content and clients that are connected to high-latency networks, such as mobile devices.

type TemplateName

string

param TemplateName

[REQUIRED]

The name of the message template. A template name must start with an alphanumeric character and can contain a maximum of 128 characters. The characters can be alphanumeric characters, underscores (_), or hyphens (-). Template names are case sensitive.

type Version

string

param Version

The unique identifier for the version of the message template to update, retrieve information about, or delete. To retrieve identifiers and other information for all the versions of a template, use the Template Versionsresource.

If specified, this value must match the identifier for an existing template version. If specified for an update operation, this value must match the identifier for the latest existing version of the template. This restriction helps ensure that race conditions don't occur.

If you don't specify a value for this parameter, Amazon Pinpoint does the following:

  • For a get operation, retrieves information about the active version of the template.

  • For an update operation, saves the updates to (overwrites) the latest existing version of the template, if the create-new-version parameter isn't used or is set to false.

  • For a delete operation, deletes the template, including all versions of the template.

rtype

dict

returns

Response Syntax

{
    'MessageBody': {
        'Message': 'string',
        'RequestID': 'string'
    }
}

Response Structure

  • (dict) --

    The request was accepted for processing. Processing may not be complete.

    • MessageBody (dict) --

      Provides information about an API request or response.

      • Message (string) --

        The message that's returned from the API.

      • RequestID (string) --

        The unique identifier for the request or response.

UpdatePushTemplate (updated) Link ¶
Changes (request)
{'PushNotificationTemplateRequest': {'RecommenderId': 'string'}}

Updates an existing message template for messages that are sent through a push notification channel.

See also: AWS API Documentation

Request Syntax

client.update_push_template(
    CreateNewVersion=True|False,
    PushNotificationTemplateRequest={
        'ADM': {
            'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
            'Body': 'string',
            'ImageIconUrl': 'string',
            'ImageUrl': 'string',
            'RawContent': 'string',
            'SmallImageIconUrl': 'string',
            'Sound': 'string',
            'Title': 'string',
            'Url': 'string'
        },
        'APNS': {
            'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
            'Body': 'string',
            'MediaUrl': 'string',
            'RawContent': 'string',
            'Sound': 'string',
            'Title': 'string',
            'Url': 'string'
        },
        'Baidu': {
            'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
            'Body': 'string',
            'ImageIconUrl': 'string',
            'ImageUrl': 'string',
            'RawContent': 'string',
            'SmallImageIconUrl': 'string',
            'Sound': 'string',
            'Title': 'string',
            'Url': 'string'
        },
        'Default': {
            'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
            'Body': 'string',
            'Sound': 'string',
            'Title': 'string',
            'Url': 'string'
        },
        'DefaultSubstitutions': 'string',
        'GCM': {
            'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
            'Body': 'string',
            'ImageIconUrl': 'string',
            'ImageUrl': 'string',
            'RawContent': 'string',
            'SmallImageIconUrl': 'string',
            'Sound': 'string',
            'Title': 'string',
            'Url': 'string'
        },
        'RecommenderId': 'string',
        'tags': {
            'string': 'string'
        },
        'TemplateDescription': 'string'
    },
    TemplateName='string',
    Version='string'
)
type CreateNewVersion

boolean

param CreateNewVersion

Specifies whether to save the updates as a new version of the message template. Valid values are: true, save the updates as a new version; and, false, save the updates to (overwrite) the latest existing version of the template.

If you don't specify a value for this parameter, Amazon Pinpoint saves the updates to (overwrites) the latest existing version of the template. If you specify a value of true for this parameter, don't specify a value for the version parameter. Otherwise, an error will occur.

type PushNotificationTemplateRequest

dict

param PushNotificationTemplateRequest

[REQUIRED]

Specifies the content and settings for a message template that can be used in messages that are sent through a push notification channel.

  • ADM (dict) --

    The message template to use for the ADM (Amazon Device Messaging) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).

    • Action (string) --

      The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:

      • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

      • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

      • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

    • Body (string) --

      The message body to use in a push notification that's based on the message template.

    • ImageIconUrl (string) --

      The URL of the large icon image to display in the content view of a push notification that's based on the message template.

    • ImageUrl (string) --

      The URL of an image to display in a push notification that's based on the message template.

    • RawContent (string) --

      The raw, JSON-formatted string to use as the payload for a push notification that's based on the message template. If specified, this value overrides all other content for the message template.

    • SmallImageIconUrl (string) --

      The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

    • Sound (string) --

      The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

    • Title (string) --

      The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

    • Url (string) --

      The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.

  • APNS (dict) --

    The message template to use for the APNs (Apple Push Notification service) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).

    • Action (string) --

      The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:

      • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

      • DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS platform.

      • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

    • Body (string) --

      The message body to use in push notifications that are based on the message template.

    • MediaUrl (string) --

      The URL of an image or video to display in push notifications that are based on the message template.

    • RawContent (string) --

      The raw, JSON-formatted string to use as the payload for push notifications that are based on the message template. If specified, this value overrides all other content for the message template.

    • Sound (string) --

      The key for the sound to play when the recipient receives a push notification that's based on the message template. The value for this key is the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.

    • Title (string) --

      The title to use in push notifications that are based on the message template. This title appears above the notification message on a recipient's device.

    • Url (string) --

      The URL to open in the recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.

  • Baidu (dict) --

    The message template to use for the Baidu (Baidu Cloud Push) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).

    • Action (string) --

      The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:

      • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

      • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

      • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

    • Body (string) --

      The message body to use in a push notification that's based on the message template.

    • ImageIconUrl (string) --

      The URL of the large icon image to display in the content view of a push notification that's based on the message template.

    • ImageUrl (string) --

      The URL of an image to display in a push notification that's based on the message template.

    • RawContent (string) --

      The raw, JSON-formatted string to use as the payload for a push notification that's based on the message template. If specified, this value overrides all other content for the message template.

    • SmallImageIconUrl (string) --

      The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

    • Sound (string) --

      The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

    • Title (string) --

      The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

    • Url (string) --

      The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.

  • Default (dict) --

    The default message template to use for push notification channels.

    • Action (string) --

      The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:

      • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

      • DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS and Android platforms.

      • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

    • Body (string) --

      The message body to use in push notifications that are based on the message template.

    • Sound (string) --

      The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

      For an iOS platform, this value is the key for the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.

    • Title (string) --

      The title to use in push notifications that are based on the message template. This title appears above the notification message on a recipient's device.

    • Url (string) --

      The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.

  • DefaultSubstitutions (string) --

    A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.

  • GCM (dict) --

    The message template to use for the GCM channel, which is used to send notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).

    • Action (string) --

      The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:

      • OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.

      • DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.

      • URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.

    • Body (string) --

      The message body to use in a push notification that's based on the message template.

    • ImageIconUrl (string) --

      The URL of the large icon image to display in the content view of a push notification that's based on the message template.

    • ImageUrl (string) --

      The URL of an image to display in a push notification that's based on the message template.

    • RawContent (string) --

      The raw, JSON-formatted string to use as the payload for a push notification that's based on the message template. If specified, this value overrides all other content for the message template.

    • SmallImageIconUrl (string) --

      The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.

    • Sound (string) --

      The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.

    • Title (string) --

      The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.

    • Url (string) --

      The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.

  • RecommenderId (string) --

    The unique identifier for the recommender model to use for the message template. Amazon Pinpoint uses this value to determine how to retrieve and process data from a recommender model when it sends messages that use the template, if the template contains message variables for recommendation data.

  • tags (dict) --

    A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.

    • (string) --

      • (string) --

  • TemplateDescription (string) --

    A custom description of the message template.

type TemplateName

string

param TemplateName

[REQUIRED]

The name of the message template. A template name must start with an alphanumeric character and can contain a maximum of 128 characters. The characters can be alphanumeric characters, underscores (_), or hyphens (-). Template names are case sensitive.

type Version

string

param Version

The unique identifier for the version of the message template to update, retrieve information about, or delete. To retrieve identifiers and other information for all the versions of a template, use the Template Versionsresource.

If specified, this value must match the identifier for an existing template version. If specified for an update operation, this value must match the identifier for the latest existing version of the template. This restriction helps ensure that race conditions don't occur.

If you don't specify a value for this parameter, Amazon Pinpoint does the following:

  • For a get operation, retrieves information about the active version of the template.

  • For an update operation, saves the updates to (overwrites) the latest existing version of the template, if the create-new-version parameter isn't used or is set to false.

  • For a delete operation, deletes the template, including all versions of the template.

rtype

dict

returns

Response Syntax

{
    'MessageBody': {
        'Message': 'string',
        'RequestID': 'string'
    }
}

Response Structure

  • (dict) --

    The request was accepted for processing. Processing may not be complete.

    • MessageBody (dict) --

      Provides information about an API request or response.

      • Message (string) --

        The message that's returned from the API.

      • RequestID (string) --

        The unique identifier for the request or response.

UpdateSmsTemplate (updated) Link ¶
Changes (request)
{'SMSTemplateRequest': {'RecommenderId': 'string'}}

Updates an existing message template for messages that are sent through the SMS channel.

See also: AWS API Documentation

Request Syntax

client.update_sms_template(
    CreateNewVersion=True|False,
    SMSTemplateRequest={
        'Body': 'string',
        'DefaultSubstitutions': 'string',
        'RecommenderId': 'string',
        'tags': {
            'string': 'string'
        },
        'TemplateDescription': 'string'
    },
    TemplateName='string',
    Version='string'
)
type CreateNewVersion

boolean

param CreateNewVersion

Specifies whether to save the updates as a new version of the message template. Valid values are: true, save the updates as a new version; and, false, save the updates to (overwrite) the latest existing version of the template.

If you don't specify a value for this parameter, Amazon Pinpoint saves the updates to (overwrites) the latest existing version of the template. If you specify a value of true for this parameter, don't specify a value for the version parameter. Otherwise, an error will occur.

type SMSTemplateRequest

dict

param SMSTemplateRequest

[REQUIRED]

Specifies the content and settings for a message template that can be used in text messages that are sent through the SMS channel.

  • Body (string) --

    The message body to use in text messages that are based on the message template.

  • DefaultSubstitutions (string) --

    A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.

  • RecommenderId (string) --

    The unique identifier for the recommender model to use for the message template. Amazon Pinpoint uses this value to determine how to retrieve and process data from a recommender model when it sends messages that use the template, if the template contains message variables for recommendation data.

  • tags (dict) --

    A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.

    • (string) --

      • (string) --

  • TemplateDescription (string) --

    A custom description of the message template.

type TemplateName

string

param TemplateName

[REQUIRED]

The name of the message template. A template name must start with an alphanumeric character and can contain a maximum of 128 characters. The characters can be alphanumeric characters, underscores (_), or hyphens (-). Template names are case sensitive.

type Version

string

param Version

The unique identifier for the version of the message template to update, retrieve information about, or delete. To retrieve identifiers and other information for all the versions of a template, use the Template Versionsresource.

If specified, this value must match the identifier for an existing template version. If specified for an update operation, this value must match the identifier for the latest existing version of the template. This restriction helps ensure that race conditions don't occur.

If you don't specify a value for this parameter, Amazon Pinpoint does the following:

  • For a get operation, retrieves information about the active version of the template.

  • For an update operation, saves the updates to (overwrites) the latest existing version of the template, if the create-new-version parameter isn't used or is set to false.

  • For a delete operation, deletes the template, including all versions of the template.

rtype

dict

returns

Response Syntax

{
    'MessageBody': {
        'Message': 'string',
        'RequestID': 'string'
    }
}

Response Structure

  • (dict) --

    The request was accepted for processing. Processing may not be complete.

    • MessageBody (dict) --

      Provides information about an API request or response.

      • Message (string) --

        The message that's returned from the API.

      • RequestID (string) --

        The unique identifier for the request or response.