GCMChannel
The GCMChannel resource lets you manage AWS Pinpoint GCMChannels for sending push notifications to Android devices.
Minimal Example
Section titled “Minimal Example”Create a basic GCMChannel with required properties and one optional property.
import AWS from "alchemy/aws/control";
const gcmChannel = await AWS.Pinpoint.GCMChannel("MyGCMChannel", { ApplicationId: "my-pinpoint-application-id", ApiKey: "my-gcm-api-key", Enabled: true});
Advanced Configuration
Section titled “Advanced Configuration”Configure a GCMChannel with more advanced options such as service JSON and authentication method.
const advancedGcmChannel = await AWS.Pinpoint.GCMChannel("AdvancedGCMChannel", { ApplicationId: "my-pinpoint-application-id", ApiKey: "my-gcm-api-key", Enabled: true, ServiceJson: JSON.stringify({ project_number: "123456789012", api_key: "my-api-key" }), DefaultAuthenticationMethod: "API_KEY"});
Adoption of Existing Resource
Section titled “Adoption of Existing Resource”If you want to adopt an existing GCMChannel instead of creating a new one, you can set the adopt property to true.
const adoptedGcmChannel = await AWS.Pinpoint.GCMChannel("AdoptedGCMChannel", { ApplicationId: "my-pinpoint-application-id", ApiKey: "my-gcm-api-key", Enabled: true, adopt: true // Adopts existing resource});