EndUserMessaging / Client / create_notify_code_configuration
create_notify_code_configuration¶
- EndUserMessaging.Client.create_notify_code_configuration(**kwargs)¶
Creates a notify code configuration. A notify code configuration is a reusable policy that defines how one-time passcodes are generated and rendered, including the code type, length, validity period, maximum number of attempts, and channel templates.
See also: AWS API Documentation
Request Syntax
response = client.create_notify_code_configuration( notifyCodeConfigurationName='string', codeConfigurationParameters={ 'codeType': 'NUMERIC'|'ALPHA'|'ALPHANUMERIC', 'codeLength': 123, 'validityPeriodMinutes': 123, 'maxAttempts': 123 }, channelParameters={ 'text': { 'inlineTemplateBody': 'string', 'destinationCountryParameters': { 'string': 'string' } }, 'voice': { 'inlineTemplateBody': 'string', 'languageCode': 'string', 'voiceId': 'string', 'voiceMessageBodyTextType': 'TEXT'|'SSML' }, 'notify': { 'notifyTemplateId': 'string', 'voiceId': 'string' }, 'whatsApp': { 'whatsAppTemplateName': 'string', 'languageCode': 'string' } }, deletionProtectionEnabled=True|False, clientToken='string', tags=[ { 'key': 'string', 'value': 'string' }, ] )
- Parameters:
notifyCodeConfigurationName (string) –
[REQUIRED]
The name of the notify code configuration.
codeConfigurationParameters (dict) –
The passcode policy parameters, including the code type, length, validity period, and maximum number of attempts. Each member is optional. When you omit a member, no value is applied at create time and the default is applied when a passcode is sent.
codeType (string) –
The character set used to generate the one-time passcode. Valid values are NUMERIC (digits only), ALPHA (uppercase letters only), and ALPHANUMERIC (uppercase letters and digits). When you do not specify a value, the default is applied when a passcode is sent.
codeLength (integer) –
The number of characters in the one-time passcode. Valid values range from 4 through 8. When you do not specify a value, the default is applied when a passcode is sent.
validityPeriodMinutes (integer) –
The length of time, in minutes, that the one-time passcode remains valid. Valid values range from 1 through 60. When you do not specify a value, the default is applied when a passcode is sent.
maxAttempts (integer) –
The maximum number of validation attempts that are allowed before the verification is locked. Valid values range from 1 through 5. When you do not specify a value, the default is applied when a passcode is sent.
channelParameters (dict) –
The channel-specific parameters used to render and deliver the one-time passcode. Provide parameters for any subset of channels. Each member configures one delivery route, and the route that is selected at send time uses the matching channel.
text (dict) –
The parameters for the text channel, which delivers over SMS or RCS.
inlineTemplateBody (string) –
The freeform message template used to render the one-time passcode for the SMS or RCS channels. The template must contain the code placeholder.
destinationCountryParameters (dict) –
A map of country-specific parameters that control one-time passcode delivery.
(string) –
Key of a
DestinationCountryParametersmap entry. Up to 64 non-whitespace characters.(string) –
Value of a
DestinationCountryParametersmap entry. Up to 64 non-whitespace characters.
voice (dict) –
The parameters for the voice channel.
inlineTemplateBody (string) –
The freeform message template used to render the one-time passcode for the voice channel. The template must contain the code placeholder.
languageCode (string) –
The BCP 47 language code used to render the voice message.
voiceId (string) –
The Amazon Polly voice ID used for the voice channel.
voiceMessageBodyTextType (string) –
The format of the voice message body. Valid values are TEXT and SSML.
notify (dict) –
The parameters for the preapproved notify-template route over the SMS or voice channels.
notifyTemplateId (string) –
The identifier of a preapproved notify template for the SMS or voice channels.
voiceId (string) –
The Amazon Polly voice ID used when the notify template is delivered over the voice channel.
whatsApp (dict) –
The parameters for the WhatsApp channel.
whatsAppTemplateName (string) –
The name of the Meta-approved WhatsApp authentication template.
languageCode (string) –
The BCP 47 language code used to render the template. This value is required for the WhatsApp channel.
deletionProtectionEnabled (boolean) – Specifies whether deletion protection is enabled. When enabled, the resource cannot be deleted until deletion protection is turned off.
clientToken (string) –
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you do not specify a client token, the AWS SDK automatically generates one.
This field is autopopulated if not provided.
tags (list) –
An array of key and value pair tags that are associated with the resource.
(dict) –
Describes a tag as a key and value pair that you can associate with a resource.
key (string) – [REQUIRED]
The key of the tag.
value (string) – [REQUIRED]
The value of the tag.
- Return type:
dict
- Returns:
Response Syntax
{ 'notifyCodeConfiguration': { 'notifyCodeConfigurationId': 'string', 'notifyCodeConfigurationArn': 'string', 'notifyCodeConfigurationName': 'string', 'codeConfigurationParameters': { 'codeType': 'NUMERIC'|'ALPHA'|'ALPHANUMERIC', 'codeLength': 123, 'validityPeriodMinutes': 123, 'maxAttempts': 123 }, 'channelParameters': { 'text': { 'inlineTemplateBody': 'string', 'destinationCountryParameters': { 'string': 'string' } }, 'voice': { 'inlineTemplateBody': 'string', 'languageCode': 'string', 'voiceId': 'string', 'voiceMessageBodyTextType': 'TEXT'|'SSML' }, 'notify': { 'notifyTemplateId': 'string', 'voiceId': 'string' }, 'whatsApp': { 'whatsAppTemplateName': 'string', 'languageCode': 'string' } }, 'deletionProtectionEnabled': True|False, 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) } }
Response Structure
(dict) –
notifyCodeConfiguration (dict) –
The notify code configuration resource.
notifyCodeConfigurationId (string) –
The unique identifier of the notify code configuration.
notifyCodeConfigurationArn (string) –
The Amazon Resource Name (ARN) of the notify code configuration.
notifyCodeConfigurationName (string) –
The name of the notify code configuration.
codeConfigurationParameters (dict) –
The passcode policy parameters, including the code type, length, validity period, and maximum number of attempts.
codeType (string) –
The character set used to generate the one-time passcode. Valid values are NUMERIC (digits only), ALPHA (uppercase letters only), and ALPHANUMERIC (uppercase letters and digits). When you do not specify a value, the default is applied when a passcode is sent.
codeLength (integer) –
The number of characters in the one-time passcode. Valid values range from 4 through 8. When you do not specify a value, the default is applied when a passcode is sent.
validityPeriodMinutes (integer) –
The length of time, in minutes, that the one-time passcode remains valid. Valid values range from 1 through 60. When you do not specify a value, the default is applied when a passcode is sent.
maxAttempts (integer) –
The maximum number of validation attempts that are allowed before the verification is locked. Valid values range from 1 through 5. When you do not specify a value, the default is applied when a passcode is sent.
channelParameters (dict) –
The channel-specific parameters used to render and deliver the one-time passcode. A configuration can carry parameters for every channel at once, and the send route selects the matching channel at send time.
text (dict) –
The parameters for the text channel, which delivers over SMS or RCS.
inlineTemplateBody (string) –
The freeform message template used to render the one-time passcode for the SMS or RCS channels. The template must contain the code placeholder.
destinationCountryParameters (dict) –
A map of country-specific parameters that control one-time passcode delivery.
(string) –
Key of a
DestinationCountryParametersmap entry. Up to 64 non-whitespace characters.(string) –
Value of a
DestinationCountryParametersmap entry. Up to 64 non-whitespace characters.
voice (dict) –
The parameters for the voice channel.
inlineTemplateBody (string) –
The freeform message template used to render the one-time passcode for the voice channel. The template must contain the code placeholder.
languageCode (string) –
The BCP 47 language code used to render the voice message.
voiceId (string) –
The Amazon Polly voice ID used for the voice channel.
voiceMessageBodyTextType (string) –
The format of the voice message body. Valid values are TEXT and SSML.
notify (dict) –
The parameters for the preapproved notify-template route over the SMS or voice channels.
notifyTemplateId (string) –
The identifier of a preapproved notify template for the SMS or voice channels.
voiceId (string) –
The Amazon Polly voice ID used when the notify template is delivered over the voice channel.
whatsApp (dict) –
The parameters for the WhatsApp channel.
whatsAppTemplateName (string) –
The name of the Meta-approved WhatsApp authentication template.
languageCode (string) –
The BCP 47 language code used to render the template. This value is required for the WhatsApp channel.
deletionProtectionEnabled (boolean) –
Specifies whether deletion protection is enabled. When enabled, the resource cannot be deleted until deletion protection is turned off.
createdAt (datetime) –
The time when the resource was created, in Unix epoch time.
updatedAt (datetime) –
The time when the resource was last updated, in Unix epoch time.
Exceptions