Skip to content

Resource: awsPinpointApnsSandboxChannel

Provides a Pinpoint APNs Sandbox Channel resource.

\~> Note: All arguments, including certificates and tokens, will be stored in the raw state as plain-text. Read more about sensitive data in state.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsPinpointAppApp = new aws.pinpointApp.PinpointApp(this, "app", {});
new aws.pinpointApnsSandboxChannel.PinpointApnsSandboxChannel(
  this,
  "apns_sandbox",
  {
    applicationId: awsPinpointAppApp.applicationId,
    certificate: '${file("./certificate.pem")}',
    privateKey: '${file("./private_key.key")}',
  }
);

Argument Reference

The following arguments are supported:

  • applicationId - (Required) The application ID.
  • enabled - (Optional) Whether the channel is enabled or disabled. Defaults to true.
  • defaultAuthenticationMethod - (Optional) The default authentication method used for APNs Sandbox. NOTE: Amazon Pinpoint uses this default for every APNs push notification that you send using the console. You can override the default when you send a message programmatically using the Amazon Pinpoint API, the AWS CLI, or an AWS SDK. If your default authentication type fails, Amazon Pinpoint doesn't attempt to use the other authentication type.

One of the following sets of credentials is also required.

If you choose to use Certificate credentials you will have to provide:

  • certificate - (Required) The pem encoded TLS Certificate from Apple.
  • privateKey - (Required) The Certificate Private Key file (ie. key file).

If you choose to use Key credentials you will have to provide:

  • bundleId - (Required) The ID assigned to your iOS app. To find this value, choose Certificates, IDs & Profiles, choose App IDs in the Identifiers section, and choose your app.
  • teamId - (Required) The ID assigned to your Apple developer account team. This value is provided on the Membership page.
  • tokenKey - (Required) The p8 file that you download from your Apple developer account when you create an authentication key.
  • tokenKeyId - (Required) The ID assigned to your signing key. To find this value, choose Certificates, IDs & Profiles, and choose your key in the Keys section.

Attributes Reference

No additional attributes are exported.

Import

Pinpoint APNs Sandbox Channel can be imported using the applicationId, e.g.,

$ terraform import aws_pinpoint_apns_sandbox_channel.apns_sandbox application-id