create_notify_configuration
async
¶
create_notify_configuration(
display_name: NotifyConfigurationDisplayName,
use_case: NotifyConfigurationUseCase,
enabled_channels: NotifyEnabledChannelsList,
*,
config_overrides: Optional[AsyncPinpointSMSVoiceV2ClientConfig] = None,
default_template_id: Optional[NotifyTemplateId] = None,
pool_id: Optional[PoolIdOrArn] = None,
enabled_countries: Optional[IsoCountryCodeList] = None,
deletion_protection_enabled: Optional[bool] = None,
client_token: Optional[ClientToken] = None,
tags: Optional[TagList] = None,
) -> CreateNotifyConfigurationResult
Creates a new notify configuration for managed messaging. A notify configuration defines the settings for sending templated messages, including the display name, use case, enabled channels, and enabled countries.
Parameters:
-
display_name(NotifyConfigurationDisplayName) –The display name to associate with the notify configuration.
-
use_case(NotifyConfigurationUseCase) –The use case for the notify configuration.
-
default_template_id(Optional[NotifyTemplateId], default:None) –The default template identifier to associate with the notify configuration. If specified, this template is used when sending messages without an explicit template identifier.
-
pool_id(Optional[PoolIdOrArn], default:None) –The identifier of the pool to associate with the notify configuration.
-
enabled_countries(Optional[IsoCountryCodeList], default:None) –An array of two-character ISO country codes, in ISO 3166-1 alpha-2 format, that are enabled for the notify configuration.
-
enabled_channels(NotifyEnabledChannelsList) –An array of channels to enable for the notify configuration. Supported values include
SMSandVOICE. -
deletion_protection_enabled(Optional[bool], default:None) –By default this is set to false. When set to true the notify configuration can't be deleted. You can change this value using the UpdateNotifyConfiguration action.
-
client_token(Optional[ClientToken], default:None) –Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.
-
tags(Optional[TagList], default:None) –An array of tags (key and value pairs) associated with the notify configuration.
Raises:
-
AccessDeniedException–The request was denied because you don't have sufficient permissions to access the resource.
-
ConflictException–Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time or it could be that the requested action isn't valid for the current state or configuration of the resource.
-
InternalServerException–The API encountered an unexpected error and couldn't complete the request. You might be able to successfully issue the request again in the future.
-
ResourceNotFoundException–A requested resource couldn't be found.
-
ServiceQuotaExceededException–The request would cause a service quota to be exceeded.
-
ThrottlingException–An error that occurred because too many requests were sent during a certain amount of time.
-
ValidationException–A validation exception for a field.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
CreateNotifyConfiguration Create a notify configuration for OTP code verification over SMS.
>>> await client.create_notify_configuration(display_name='MyOTPConfig', use_case='CODE_VERIFICATION', enabled_channels=['SMS'], enabled_countries=['US', 'CA'], deletion_protection_enabled=False, tags=[{'Key': 'Environment', 'Value': 'Production'}])
Source code in docs_src/capo_pinpoint_sms_voice_v2/_services/async_pinpoint_sms_voice_v2.py
824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 | |