VoiceChannel
The VoiceChannel resource allows you to manage AWS Pinpoint VoiceChannels for sending voice messages to your users through Amazon Pinpoint.
Minimal Example
Section titled “Minimal Example”Create a basic VoiceChannel with the required properties.
import AWS from "alchemy/aws/control";
const voiceChannel = await AWS.Pinpoint.VoiceChannel("basicVoiceChannel", { ApplicationId: "my-pinpoint-app-id", Enabled: true // Optional: enable the voice channel});
Advanced Configuration
Section titled “Advanced Configuration”Configure a VoiceChannel with additional properties such as enabling or disabling the channel.
const advancedVoiceChannel = await AWS.Pinpoint.VoiceChannel("advancedVoiceChannel", { ApplicationId: "my-pinpoint-app-id", Enabled: false // Optional: disable the voice channel});
Adoption of Existing Resource
Section titled “Adoption of Existing Resource”If you want to adopt an existing VoiceChannel instead of failing when it already exists, you can use the adopt property.
const adoptVoiceChannel = await AWS.Pinpoint.VoiceChannel("adoptVoiceChannel", { ApplicationId: "my-pinpoint-app-id", Enabled: true, adopt: true // Optional: adopt existing resource});
Resource Properties Overview
Section titled “Resource Properties Overview”You can access properties such as the ARN and creation time of the voice channel after creation.
const voiceChannelDetails = await AWS.Pinpoint.VoiceChannel("detailsVoiceChannel", { ApplicationId: "my-pinpoint-app-id", Enabled: true});
// Accessing properties after creationconsole.log("Voice Channel ARN:", voiceChannelDetails.Arn);console.log("Creation Time:", voiceChannelDetails.CreationTime);