sendNotifyVoiceMessage
inline suspend fun PinpointSmsVoiceV2Client.sendNotifyVoiceMessage(crossinline block: SendNotifyVoiceMessageRequest.Builder.() -> Unit): SendNotifyVoiceMessageResponse
Sends a templated voice message through a notify configuration to a recipient's phone number.
Samples
import aws.sdk.kotlin.services.pinpointsmsvoicev2.model.VoiceId
fun main() {
//sampleStart
// Send an OTP verification code via voice call using a notify configuration.
val resp = pinpointSmsVoiceV2Client.sendNotifyVoiceMessage {
notifyConfigurationId = "nc-1234567890abcdef0"
destinationPhoneNumber = "+12065550100"
templateVariables = mapOf<String, String>(
"code" to "123456",
"expiry" to "10"
)
voiceId = VoiceId.fromValue("JOANNA")
}
//sampleEnd
}