list_templates

list_templates(**kwargs)

Retrieves information about all the message templates that are associated with your Amazon Pinpoint account.

See also: AWS API Documentation

Request Syntax

response = client.list_templates(
    NextToken='string',
    PageSize='string',
    Prefix='string',
    TemplateType='string'
)
Parameters
  • NextToken (string) -- The string that specifies which page of results to return in a paginated response. This parameter is not supported for application, campaign, and journey metrics.
  • PageSize (string) -- The maximum number of items to include in each page of a paginated response. This parameter is not supported for application, campaign, and journey metrics.
  • Prefix (string) -- The substring to match in the names of the message templates to include in the results. If you specify this value, Amazon Pinpoint returns only those templates whose names begin with the value that you specify.
  • TemplateType (string) -- The type of message template to include in the results. Valid values are: EMAIL, PUSH, SMS, and VOICE. To include all types of templates in the results, don't include this parameter in your request.
Return type

dict

Returns

Response Syntax

{
    'TemplatesResponse': {
        'Item': [
            {
                'Arn': 'string',
                'CreationDate': 'string',
                'DefaultSubstitutions': 'string',
                'LastModifiedDate': 'string',
                'tags': {
                    'string': 'string'
                },
                'TemplateDescription': 'string',
                'TemplateName': 'string',
                'TemplateType': 'EMAIL'|'SMS'|'VOICE'|'PUSH'|'INAPP',
                'Version': 'string'
            },
        ],
        'NextToken': 'string'
    }
}

Response Structure

  • (dict) --

    The request succeeded.

    • TemplatesResponse (dict) --

      Provides information about all the message templates that are associated with your Amazon Pinpoint account.

      • Item (list) --

        An array of responses, one for each message template that's associated with your Amazon Pinpoint account and meets any filter criteria that you specified in the request.

        • (dict) --

          Provides information about a message template that's associated with your Amazon Pinpoint account.

          • Arn (string) --

            The Amazon Resource Name (ARN) of the message template. This value isn't included in a TemplateResponse object. To retrieve the ARN of a template, use the GetEmailTemplate, GetPushTemplate, GetSmsTemplate, or GetVoiceTemplate operation, depending on the type of template that you want to retrieve the ARN for.

          • 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 isn't included in a TemplateResponse object. To retrieve this object for a template, use the GetEmailTemplate, GetPushTemplate, GetSmsTemplate, or GetVoiceTemplate operation, depending on the type of template that you want to retrieve the object for.

          • LastModifiedDate (string) --

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

          • tags (dict) --

            A map of key-value pairs that identifies the tags that are associated with the message template. This object isn't included in a TemplateResponse object. To retrieve this object for a template, use the GetEmailTemplate, GetPushTemplate, GetSmsTemplate, or GetVoiceTemplate operation, depending on the type of template that you want to retrieve the object for.

            • (string) --
              • (string) --
          • TemplateDescription (string) --

            The custom description of the message template. This value isn't included in a TemplateResponse object. To retrieve the description of a template, use the GetEmailTemplate, GetPushTemplate, GetSmsTemplate, or GetVoiceTemplate operation, depending on the type of template that you want to retrieve the description for.

          • TemplateName (string) --

            The name of the message template.

          • TemplateType (string) --

            The type of channel that the message template is designed for. Possible values are: EMAIL, PUSH, SMS, and VOICE.

          • Version (string) --

            The unique identifier, as an integer, for the active version of the message template.

      • 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.

Exceptions

  • Pinpoint.Client.exceptions.MethodNotAllowedException
  • Pinpoint.Client.exceptions.TooManyRequestsException
  • Pinpoint.Client.exceptions.BadRequestException
  • Pinpoint.Client.exceptions.InternalServerErrorException
  • Pinpoint.Client.exceptions.ForbiddenException