send_voice_message
¶
send_voice_message(
destination_phone_number: PhoneNumber,
origination_identity: VoiceMessageOriginationIdentity,
*,
config_overrides: Optional[PinpointSMSVoiceV2ClientConfig] = None,
message_body: Optional[VoiceMessageBody] = None,
message_body_text_type: Optional[VoiceMessageBodyTextType] = None,
voice_id: Optional[VoiceId] = None,
configuration_set_name: Optional[ConfigurationSetNameOrArn] = None,
max_price_per_minute: Optional[MaxPrice] = None,
time_to_live: Optional[TimeToLive] = None,
context: Optional[ContextMap] = None,
dry_run: Optional[bool] = None,
protect_configuration_id: Optional[ProtectConfigurationIdOrArn] = None,
message_feedback_enabled: Optional[bool] = None,
) -> SendVoiceMessageResult
Allows you to send a request that sends a voice message. This operation uses Amazon Polly to convert a text script into a voice message.
Parameters:
-
destination_phone_number(PhoneNumber) –The destination phone number in E.164 format.
-
origination_identity(VoiceMessageOriginationIdentity) –The origination identity to use for the voice call. This can be the PhoneNumber, PhoneNumberId, PhoneNumberArn, PoolId, or PoolArn.
If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).
-
message_body(Optional[VoiceMessageBody], default:None) –The text to convert to a voice message.
-
message_body_text_type(Optional[VoiceMessageBodyTextType], default:None) –Specifies if the MessageBody field contains text or speech synthesis markup language (SSML).
-
TEXT: This is the default value. When used the maximum character limit is 3000.
-
SSML: When used the maximum character limit is 6000 including SSML tagging.
-
-
voice_id(Optional[VoiceId], default:None) –The voice for the Amazon Polly service to use. By default this is set to "MATTHEW".
-
configuration_set_name(Optional[ConfigurationSetNameOrArn], default:None) –The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.
-
max_price_per_minute(Optional[MaxPrice], default:None) –The maximum amount to spend per voice message, in US dollars.
-
time_to_live(Optional[TimeToLive], default:None) –How long the voice message is valid for. By default this is 72 hours.
-
context(Optional[ContextMap], default:None) –You can specify custom data in this field. If you do, that data is logged to the event destination.
-
dry_run(Optional[bool], default:None) –When set to true, the message is checked and validated, but isn't sent to the end recipient.
-
protect_configuration_id(Optional[ProtectConfigurationIdOrArn], default:None) –The unique identifier for the protect configuration.
-
message_feedback_enabled(Optional[bool], default:None) –Set to true to enable message feedback for the message. When a user receives the message you need to update the message status using PutMessageFeedback.
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.
Source code in docs_src/capo_pinpoint_sms_voice_v2/_services/pinpoint_sms_voice_v2.py
6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 | |