Skip to content
GitHubXDiscord

APNSVoipChannel

The APNSVoipChannel resource enables you to manage the Apple Push Notification service (APNs) VOIP channel for AWS Pinpoint. This service allows you to send notifications to iOS devices for VoIP applications. For more detailed information, you can refer to the AWS Pinpoint APNSVoipChannels documentation.

Create a basic APNSVoipChannel with required properties and a common optional property.

import AWS from "alchemy/aws/control";
const apnsVoipChannel = await AWS.Pinpoint.APNSVoipChannel("myAPNSVoipChannel", {
ApplicationId: "myApplicationId",
BundleId: "com.mycompany.myapp",
PrivateKey: "myPrivateKey",
Enabled: true
});

Configure an APNSVoipChannel with additional authentication methods and team ID.

const advancedApnsVoipChannel = await AWS.Pinpoint.APNSVoipChannel("advancedAPNSVoipChannel", {
ApplicationId: "myApplicationId",
BundleId: "com.mycompany.myapp",
PrivateKey: "myPrivateKey",
Enabled: true,
DefaultAuthenticationMethod: "key",
TokenKey: "myTokenKey",
TokenKeyId: "myTokenKeyId",
TeamId: "myTeamId"
});

Demonstrate how to enable and disable the APNSVoipChannel.

const toggleApnsVoipChannel = await AWS.Pinpoint.APNSVoipChannel("toggleAPNSVoipChannel", {
ApplicationId: "myApplicationId",
BundleId: "com.mycompany.myapp",
PrivateKey: "myPrivateKey",
Enabled: false // Initially disabled
});
// Later on, enable the channel
toggleApnsVoipChannel.props.Enabled = true;

Show how to create an APNSVoipChannel while adopting an existing resource.

const adoptApnsVoipChannel = await AWS.Pinpoint.APNSVoipChannel("adoptAPNSVoipChannel", {
ApplicationId: "myApplicationId",
BundleId: "com.mycompany.myapp",
PrivateKey: "myPrivateKey",
adopt: true // Adopt existing resource instead of failing
});