Polly.Client.
list_lexicons
(**kwargs)¶Returns a list of pronunciation lexicons stored in an Amazon Web Services Region. For more information, see Managing Lexicons.
See also: AWS API Documentation
Request Syntax
response = client.list_lexicons(
NextToken='string'
)
ListLexicons
operation. If present, indicates where to continue the list of lexicons.{
'Lexicons': [
{
'Name': 'string',
'Attributes': {
'Alphabet': 'string',
'LanguageCode': 'arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR'|'en-NZ'|'en-ZA'|'ca-ES'|'de-AT'|'yue-CN'|'ar-AE'|'fi-FI',
'LastModified': datetime(2015, 1, 1),
'LexiconArn': 'string',
'LexemesCount': 123,
'Size': 123
}
},
],
'NextToken': 'string'
}
Response Structure
A list of lexicon names and attributes.
Describes the content of the lexicon.
Name of the lexicon.
Provides lexicon metadata.
Phonetic alphabet used in the lexicon. Valid values are ipa
and x-sampa
.
Language code that the lexicon applies to. A lexicon with a language code such as "en" would be applied to all English languages (en-GB, en-US, en-AUS, en-WLS, and so on.
Date lexicon was last modified (a timestamp value).
Amazon Resource Name (ARN) of the lexicon.
Number of lexemes in the lexicon.
Total size of the lexicon, in characters.
The pagination token to use in the next request to continue the listing of lexicons. NextToken
is returned only if the response is truncated.
Exceptions
Polly.Client.exceptions.InvalidNextTokenException
Polly.Client.exceptions.ServiceFailureException
Examples
Returns a list of pronunciation lexicons stored in an AWS Region.
response = client.list_lexicons(
)
print(response)
Expected Output:
{
'Lexicons': [
{
'Attributes': {
'Alphabet': 'ipa',
'LanguageCode': 'en-US',
'LastModified': 1478542980.117,
'LexemesCount': 1,
'LexiconArn': 'arn:aws:polly:us-east-1:123456789012:lexicon/example',
'Size': 503,
},
'Name': 'example',
},
],
'ResponseMetadata': {
'...': '...',
},
}