ApnsChannel class

Provides an End User Messaging APNs Channel resource.

> Note: All arguments, including certificates and tokens, will be stored in the raw state as plain-text.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as std from "@pulumi/std";

const app = new aws.pinpoint.App("app", {});
const apns = new aws.pinpoint.ApnsChannel("apns", {
    applicationId: app.applicationId,
    certificate: std.file({
        input: "./certificate.pem",
    }).then(invoke => invoke.result),
    privateKey: std.file({
        input: "./private_key.key",
    }).then(invoke => invoke.result),
});
import pulumi
import pulumi_aws as aws
import pulumi_std as std

app = aws.pinpoint.App("app")
apns = aws.pinpoint.ApnsChannel("apns",
    application_id=app.application_id,
    certificate=std.file(input="./certificate.pem").result,
    private_key=std.file(input="./private_key.key").result)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
using Std = Pulumi.Std;

return await Deployment.RunAsync(() =>
{
    var app = new Aws.Pinpoint.App("app");

    var apns = new Aws.Pinpoint.ApnsChannel("apns", new()
    {
        ApplicationId = app.ApplicationId,
        Certificate = Std.File.Invoke(new()
        {
            Input = "./certificate.pem",
        }).Apply(invoke => invoke.Result),
        PrivateKey = Std.File.Invoke(new()
        {
            Input = "./private_key.key",
        }).Apply(invoke => invoke.Result),
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/pinpoint"
	"github.com/pulumi/pulumi-std/sdk/go/std"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		app, err := pinpoint.NewApp(ctx, "app", nil)
		if err != nil {
			return err
		}
		invokeFile, err := std.File(ctx, &std.FileArgs{
			Input: "./certificate.pem",
		}, nil)
		if err != nil {
			return err
		}
		invokeFile1, err := std.File(ctx, &std.FileArgs{
			Input: "./private_key.key",
		}, nil)
		if err != nil {
			return err
		}
		_, err = pinpoint.NewApnsChannel(ctx, "apns", &pinpoint.ApnsChannelArgs{
			ApplicationId: app.ApplicationId,
			Certificate:   pulumi.String(invokeFile.Result),
			PrivateKey:    pulumi.String(invokeFile1.Result),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
    std = {
      source = "pulumi/std"
    }
  }
}

resource "aws_pinpoint_apnschannel" "apns" {
  application_id = aws_pinpoint_app.app.application_id
  certificate    = file("./certificate.pem")
  private_key    = file("./private_key.key")
}
resource "aws_pinpoint_app" "app" {
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.pinpoint.App;
import com.pulumi.aws.pinpoint.ApnsChannel;
import com.pulumi.aws.pinpoint.ApnsChannelArgs;
import com.pulumi.std.StdFunctions;
import com.pulumi.std.inputs.FileArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var app = new App("app");

        var apns = new ApnsChannel("apns", ApnsChannelArgs.builder()
            .applicationId(app.applicationId())
            .certificate(StdFunctions.file(FileArgs.builder()
                .input("./certificate.pem")
                .build()).result())
            .privateKey(StdFunctions.file(FileArgs.builder()
                .input("./private_key.key")
                .build()).result())
            .build());

    }
}
resources:
  apns:
    type: aws:pinpoint:ApnsChannel
    properties:
      applicationId: ${app.applicationId}
      certificate:
        fn::invoke:
          function: std:file
          arguments:
            input: ./certificate.pem
          return: result
      privateKey:
        fn::invoke:
          function: std:file
          arguments:
            input: ./private_key.key
          return: result
  app:
    type: aws:pinpoint:App

Import

Using pulumi import, import End User Messaging APNs Channel using the application-id. For example:

$ pulumi import aws:pinpoint/apnsChannel:ApnsChannel apns application-id

Constructors

ApnsChannel(String name, {ApnsChannelArgs? args, CustomResourceOptions? options})
Creates a new ApnsChannel. name The Pulumi resource name. args Arguments used to configure this ApnsChannel. The set of arguments for ApnsChannel. options Resource options controlling this resource's behavior.
ApnsChannel.reference(String urn)
Creates a typed reference to an existing ApnsChannel resource.

Properties

applicationId ↔ Output<String>
Application ID.
latefinal
bundleId ↔ Output<String?>
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. Required if using Key credentials.
latefinal
certificate ↔ Output<String?>
Pem encoded TLS Certificate from Apple. Required if using Certificate credentials.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
defaultAuthenticationMethod ↔ Output<String?>
Default authentication method used for APNs. NOTE: AWS End User Messaging 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 AWS End User Messaging API, the AWS CLI, or an AWS SDK. If your default authentication type fails, AWS End User Messaging doesn't attempt to use the other authentication type.
latefinal
enabled ↔ Output<bool?>
Whether the channel is enabled or disabled. Defaults to true.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
privateKey ↔ Output<String?>
Certificate Private Key file (ie. .key file). Required if using Certificate credentials.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
teamId ↔ Output<String?>
ID assigned to your Apple developer account team. This value is provided on the Membership page. Required if using Key credentials.
latefinal
tokenKey ↔ Output<String?>
.p8 file that you download from your Apple developer account when you create an authentication key. Required if using Key credentials.
latefinal
tokenKeyId ↔ Output<String?>
ID assigned to your signing key. To find this value, choose Certificates, IDs & Profiles, and choose your key in the Keys section. Required if using Key credentials.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {ApnsChannelState? state, CustomResourceOptions? options}) → ApnsChannel
Gets an existing ApnsChannel resource's state with the given name and id.