Try AWS Native preview for resources not in the classic version.
aws.pinpoint.ApnsChannel
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Provides a Pinpoint APNs Channel resource.
Example Usage
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var app = new Aws.Pinpoint.App("app");
var apns = new Aws.Pinpoint.ApnsChannel("apns", new()
{
ApplicationId = app.ApplicationId,
Certificate = File.ReadAllText("./certificate.pem"),
PrivateKey = File.ReadAllText("./private_key.key"),
});
});
package main
import (
"os"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/pinpoint"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func readFileOrPanic(path string) pulumi.StringPtrInput {
data, err := os.ReadFile(path)
if err != nil {
panic(err.Error())
}
return pulumi.String(string(data))
}
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
app, err := pinpoint.NewApp(ctx, "app", nil)
if err != nil {
return err
}
_, err = pinpoint.NewApnsChannel(ctx, "apns", &pinpoint.ApnsChannelArgs{
ApplicationId: app.ApplicationId,
Certificate: readFileOrPanic("./certificate.pem"),
PrivateKey: readFileOrPanic("./private_key.key"),
})
if err != nil {
return err
}
return nil
})
}
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 java.util.List;
import java.util.ArrayList;
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(Files.readString(Paths.get("./certificate.pem")))
.privateKey(Files.readString(Paths.get("./private_key.key")))
.build());
}
}
import pulumi
import pulumi_aws as aws
app = aws.pinpoint.App("app")
apns = aws.pinpoint.ApnsChannel("apns",
application_id=app.application_id,
certificate=(lambda path: open(path).read())("./certificate.pem"),
private_key=(lambda path: open(path).read())("./private_key.key"))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as fs from "fs";
const app = new aws.pinpoint.App("app", {});
const apns = new aws.pinpoint.ApnsChannel("apns", {
applicationId: app.applicationId,
certificate: fs.readFileSync("./certificate.pem"),
privateKey: fs.readFileSync("./private_key.key"),
});
resources:
apns:
type: aws:pinpoint:ApnsChannel
properties:
applicationId: ${app.applicationId}
certificate:
fn::readFile: ./certificate.pem
privateKey:
fn::readFile: ./private_key.key
app:
type: aws:pinpoint:App
Create ApnsChannel Resource
new ApnsChannel(name: string, args: ApnsChannelArgs, opts?: CustomResourceOptions);
@overload
def ApnsChannel(resource_name: str,
opts: Optional[ResourceOptions] = None,
application_id: Optional[str] = None,
bundle_id: Optional[str] = None,
certificate: Optional[str] = None,
default_authentication_method: Optional[str] = None,
enabled: Optional[bool] = None,
private_key: Optional[str] = None,
team_id: Optional[str] = None,
token_key: Optional[str] = None,
token_key_id: Optional[str] = None)
@overload
def ApnsChannel(resource_name: str,
args: ApnsChannelArgs,
opts: Optional[ResourceOptions] = None)
func NewApnsChannel(ctx *Context, name string, args ApnsChannelArgs, opts ...ResourceOption) (*ApnsChannel, error)
public ApnsChannel(string name, ApnsChannelArgs args, CustomResourceOptions? opts = null)
public ApnsChannel(String name, ApnsChannelArgs args)
public ApnsChannel(String name, ApnsChannelArgs args, CustomResourceOptions options)
type: aws:pinpoint:ApnsChannel
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApnsChannelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ApnsChannelArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ApnsChannelArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApnsChannelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApnsChannelArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ApnsChannel Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ApnsChannel resource accepts the following input properties:
- Application
Id string The application ID.
- Bundle
Id string 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.
- Certificate string
The pem encoded TLS Certificate from Apple.
- Default
Authentication stringMethod The default authentication method used for APNs. 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.
- Enabled bool
Whether the channel is enabled or disabled. Defaults to
true
.- Private
Key string The Certificate Private Key file (ie.
.key
file).- Team
Id string The ID assigned to your Apple developer account team. This value is provided on the Membership page.
- Token
Key string The
.p8
file that you download from your Apple developer account when you create an authentication key.- Token
Key stringId The ID assigned to your signing key. To find this value, choose Certificates, IDs & Profiles, and choose your key in the Keys section.
- Application
Id string The application ID.
- Bundle
Id string 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.
- Certificate string
The pem encoded TLS Certificate from Apple.
- Default
Authentication stringMethod The default authentication method used for APNs. 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.
- Enabled bool
Whether the channel is enabled or disabled. Defaults to
true
.- Private
Key string The Certificate Private Key file (ie.
.key
file).- Team
Id string The ID assigned to your Apple developer account team. This value is provided on the Membership page.
- Token
Key string The
.p8
file that you download from your Apple developer account when you create an authentication key.- Token
Key stringId The ID assigned to your signing key. To find this value, choose Certificates, IDs & Profiles, and choose your key in the Keys section.
- application
Id String The application ID.
- bundle
Id String 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.
- certificate String
The pem encoded TLS Certificate from Apple.
- default
Authentication StringMethod The default authentication method used for APNs. 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.
- enabled Boolean
Whether the channel is enabled or disabled. Defaults to
true
.- private
Key String The Certificate Private Key file (ie.
.key
file).- team
Id String The ID assigned to your Apple developer account team. This value is provided on the Membership page.
- token
Key String The
.p8
file that you download from your Apple developer account when you create an authentication key.- token
Key StringId The ID assigned to your signing key. To find this value, choose Certificates, IDs & Profiles, and choose your key in the Keys section.
- application
Id string The application ID.
- bundle
Id string 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.
- certificate string
The pem encoded TLS Certificate from Apple.
- default
Authentication stringMethod The default authentication method used for APNs. 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.
- enabled boolean
Whether the channel is enabled or disabled. Defaults to
true
.- private
Key string The Certificate Private Key file (ie.
.key
file).- team
Id string The ID assigned to your Apple developer account team. This value is provided on the Membership page.
- token
Key string The
.p8
file that you download from your Apple developer account when you create an authentication key.- token
Key stringId The ID assigned to your signing key. To find this value, choose Certificates, IDs & Profiles, and choose your key in the Keys section.
- application_
id str The application ID.
- bundle_
id str 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.
- certificate str
The pem encoded TLS Certificate from Apple.
- default_
authentication_ strmethod The default authentication method used for APNs. 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.
- enabled bool
Whether the channel is enabled or disabled. Defaults to
true
.- private_
key str The Certificate Private Key file (ie.
.key
file).- team_
id str The ID assigned to your Apple developer account team. This value is provided on the Membership page.
- token_
key str The
.p8
file that you download from your Apple developer account when you create an authentication key.- token_
key_ strid The ID assigned to your signing key. To find this value, choose Certificates, IDs & Profiles, and choose your key in the Keys section.
- application
Id String The application ID.
- bundle
Id String 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.
- certificate String
The pem encoded TLS Certificate from Apple.
- default
Authentication StringMethod The default authentication method used for APNs. 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.
- enabled Boolean
Whether the channel is enabled or disabled. Defaults to
true
.- private
Key String The Certificate Private Key file (ie.
.key
file).- team
Id String The ID assigned to your Apple developer account team. This value is provided on the Membership page.
- token
Key String The
.p8
file that you download from your Apple developer account when you create an authentication key.- token
Key StringId The ID assigned to your signing key. To find this value, choose Certificates, IDs & Profiles, and choose your key in the Keys section.
Outputs
All input properties are implicitly available as output properties. Additionally, the ApnsChannel resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing ApnsChannel Resource
Get an existing ApnsChannel resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ApnsChannelState, opts?: CustomResourceOptions): ApnsChannel
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
application_id: Optional[str] = None,
bundle_id: Optional[str] = None,
certificate: Optional[str] = None,
default_authentication_method: Optional[str] = None,
enabled: Optional[bool] = None,
private_key: Optional[str] = None,
team_id: Optional[str] = None,
token_key: Optional[str] = None,
token_key_id: Optional[str] = None) -> ApnsChannel
func GetApnsChannel(ctx *Context, name string, id IDInput, state *ApnsChannelState, opts ...ResourceOption) (*ApnsChannel, error)
public static ApnsChannel Get(string name, Input<string> id, ApnsChannelState? state, CustomResourceOptions? opts = null)
public static ApnsChannel get(String name, Output<String> id, ApnsChannelState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Application
Id string The application ID.
- Bundle
Id string 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.
- Certificate string
The pem encoded TLS Certificate from Apple.
- Default
Authentication stringMethod The default authentication method used for APNs. 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.
- Enabled bool
Whether the channel is enabled or disabled. Defaults to
true
.- Private
Key string The Certificate Private Key file (ie.
.key
file).- Team
Id string The ID assigned to your Apple developer account team. This value is provided on the Membership page.
- Token
Key string The
.p8
file that you download from your Apple developer account when you create an authentication key.- Token
Key stringId The ID assigned to your signing key. To find this value, choose Certificates, IDs & Profiles, and choose your key in the Keys section.
- Application
Id string The application ID.
- Bundle
Id string 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.
- Certificate string
The pem encoded TLS Certificate from Apple.
- Default
Authentication stringMethod The default authentication method used for APNs. 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.
- Enabled bool
Whether the channel is enabled or disabled. Defaults to
true
.- Private
Key string The Certificate Private Key file (ie.
.key
file).- Team
Id string The ID assigned to your Apple developer account team. This value is provided on the Membership page.
- Token
Key string The
.p8
file that you download from your Apple developer account when you create an authentication key.- Token
Key stringId The ID assigned to your signing key. To find this value, choose Certificates, IDs & Profiles, and choose your key in the Keys section.
- application
Id String The application ID.
- bundle
Id String 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.
- certificate String
The pem encoded TLS Certificate from Apple.
- default
Authentication StringMethod The default authentication method used for APNs. 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.
- enabled Boolean
Whether the channel is enabled or disabled. Defaults to
true
.- private
Key String The Certificate Private Key file (ie.
.key
file).- team
Id String The ID assigned to your Apple developer account team. This value is provided on the Membership page.
- token
Key String The
.p8
file that you download from your Apple developer account when you create an authentication key.- token
Key StringId The ID assigned to your signing key. To find this value, choose Certificates, IDs & Profiles, and choose your key in the Keys section.
- application
Id string The application ID.
- bundle
Id string 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.
- certificate string
The pem encoded TLS Certificate from Apple.
- default
Authentication stringMethod The default authentication method used for APNs. 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.
- enabled boolean
Whether the channel is enabled or disabled. Defaults to
true
.- private
Key string The Certificate Private Key file (ie.
.key
file).- team
Id string The ID assigned to your Apple developer account team. This value is provided on the Membership page.
- token
Key string The
.p8
file that you download from your Apple developer account when you create an authentication key.- token
Key stringId The ID assigned to your signing key. To find this value, choose Certificates, IDs & Profiles, and choose your key in the Keys section.
- application_
id str The application ID.
- bundle_
id str 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.
- certificate str
The pem encoded TLS Certificate from Apple.
- default_
authentication_ strmethod The default authentication method used for APNs. 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.
- enabled bool
Whether the channel is enabled or disabled. Defaults to
true
.- private_
key str The Certificate Private Key file (ie.
.key
file).- team_
id str The ID assigned to your Apple developer account team. This value is provided on the Membership page.
- token_
key str The
.p8
file that you download from your Apple developer account when you create an authentication key.- token_
key_ strid The ID assigned to your signing key. To find this value, choose Certificates, IDs & Profiles, and choose your key in the Keys section.
- application
Id String The application ID.
- bundle
Id String 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.
- certificate String
The pem encoded TLS Certificate from Apple.
- default
Authentication StringMethod The default authentication method used for APNs. 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.
- enabled Boolean
Whether the channel is enabled or disabled. Defaults to
true
.- private
Key String The Certificate Private Key file (ie.
.key
file).- team
Id String The ID assigned to your Apple developer account team. This value is provided on the Membership page.
- token
Key String The
.p8
file that you download from your Apple developer account when you create an authentication key.- token
Key StringId The ID assigned to your signing key. To find this value, choose Certificates, IDs & Profiles, and choose your key in the Keys section.
Import
Pinpoint APNs Channel can be imported using the application-id
, e.g.,
$ pulumi import aws:pinpoint/apnsChannel:ApnsChannel apns application-id
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.