PlatformApplication class
Provides an SNS platform application resource
Example Usage
Apple Push Notification Service (APNS) using certificate-based authentication
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const apnsApplication = new aws.sns.PlatformApplication("apns_application", {
name: "apns_application",
platform: "APNS",
platformCredential: "<APNS PRIVATE KEY>",
platformPrincipal: "<APNS CERTIFICATE>",
});
import pulumi
import pulumi_aws as aws
apns_application = aws.sns.PlatformApplication("apns_application",
name="apns_application",
platform="APNS",
platform_credential="<APNS PRIVATE KEY>",
platform_principal="<APNS CERTIFICATE>")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var apnsApplication = new Aws.Sns.PlatformApplication("apns_application", new()
{
Name = "apns_application",
Platform = "APNS",
PlatformCredential = "<APNS PRIVATE KEY>",
PlatformPrincipal = "<APNS CERTIFICATE>",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/sns"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sns.NewPlatformApplication(ctx, "apns_application", &sns.PlatformApplicationArgs{
Name: pulumi.String("apns_application"),
Platform: pulumi.String("APNS"),
PlatformCredential: pulumi.String("<APNS PRIVATE KEY>"),
PlatformPrincipal: pulumi.String("<APNS CERTIFICATE>"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_sns_platformapplication" "apns_application" {
name = "apns_application"
platform = "APNS"
platform_credential = "<APNS PRIVATE KEY>"
platform_principal = "<APNS CERTIFICATE>"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.sns.PlatformApplication;
import com.pulumi.aws.sns.PlatformApplicationArgs;
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 apnsApplication = new PlatformApplication("apnsApplication", PlatformApplicationArgs.builder()
.name("apns_application")
.platform("APNS")
.platformCredential("<APNS PRIVATE KEY>")
.platformPrincipal("<APNS CERTIFICATE>")
.build());
}
}
resources:
apnsApplication:
type: aws:sns:PlatformApplication
name: apns_application
properties:
name: apns_application
platform: APNS
platformCredential: <APNS PRIVATE KEY>
platformPrincipal: <APNS CERTIFICATE>
Apple Push Notification Service (APNS) using token-based authentication
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const apnsApplication = new aws.sns.PlatformApplication("apns_application", {
name: "apns_application",
platform: "APNS",
platformCredential: "<APNS SIGNING KEY>",
platformPrincipal: "<APNS SIGNING KEY ID>",
applePlatformTeamId: "<APPLE TEAM ID>",
applePlatformBundleId: "<APPLE BUNDLE ID>",
});
import pulumi
import pulumi_aws as aws
apns_application = aws.sns.PlatformApplication("apns_application",
name="apns_application",
platform="APNS",
platform_credential="<APNS SIGNING KEY>",
platform_principal="<APNS SIGNING KEY ID>",
apple_platform_team_id="<APPLE TEAM ID>",
apple_platform_bundle_id="<APPLE BUNDLE ID>")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var apnsApplication = new Aws.Sns.PlatformApplication("apns_application", new()
{
Name = "apns_application",
Platform = "APNS",
PlatformCredential = "<APNS SIGNING KEY>",
PlatformPrincipal = "<APNS SIGNING KEY ID>",
ApplePlatformTeamId = "<APPLE TEAM ID>",
ApplePlatformBundleId = "<APPLE BUNDLE ID>",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/sns"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sns.NewPlatformApplication(ctx, "apns_application", &sns.PlatformApplicationArgs{
Name: pulumi.String("apns_application"),
Platform: pulumi.String("APNS"),
PlatformCredential: pulumi.String("<APNS SIGNING KEY>"),
PlatformPrincipal: pulumi.String("<APNS SIGNING KEY ID>"),
ApplePlatformTeamId: pulumi.String("<APPLE TEAM ID>"),
ApplePlatformBundleId: pulumi.String("<APPLE BUNDLE ID>"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_sns_platformapplication" "apns_application" {
name = "apns_application"
platform = "APNS"
platform_credential = "<APNS SIGNING KEY>"
platform_principal = "<APNS SIGNING KEY ID>"
apple_platform_team_id = "<APPLE TEAM ID>"
apple_platform_bundle_id = "<APPLE BUNDLE ID>"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.sns.PlatformApplication;
import com.pulumi.aws.sns.PlatformApplicationArgs;
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 apnsApplication = new PlatformApplication("apnsApplication", PlatformApplicationArgs.builder()
.name("apns_application")
.platform("APNS")
.platformCredential("<APNS SIGNING KEY>")
.platformPrincipal("<APNS SIGNING KEY ID>")
.applePlatformTeamId("<APPLE TEAM ID>")
.applePlatformBundleId("<APPLE BUNDLE ID>")
.build());
}
}
resources:
apnsApplication:
type: aws:sns:PlatformApplication
name: apns_application
properties:
name: apns_application
platform: APNS
platformCredential: <APNS SIGNING KEY>
platformPrincipal: <APNS SIGNING KEY ID>
applePlatformTeamId: <APPLE TEAM ID>
applePlatformBundleId: <APPLE BUNDLE ID>
Google Cloud Messaging (GCM)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const gcmApplication = new aws.sns.PlatformApplication("gcm_application", {
name: "gcm_application",
platform: "GCM",
platformCredential: "<GCM API KEY>",
});
import pulumi
import pulumi_aws as aws
gcm_application = aws.sns.PlatformApplication("gcm_application",
name="gcm_application",
platform="GCM",
platform_credential="<GCM API KEY>")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var gcmApplication = new Aws.Sns.PlatformApplication("gcm_application", new()
{
Name = "gcm_application",
Platform = "GCM",
PlatformCredential = "<GCM API KEY>",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/sns"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sns.NewPlatformApplication(ctx, "gcm_application", &sns.PlatformApplicationArgs{
Name: pulumi.String("gcm_application"),
Platform: pulumi.String("GCM"),
PlatformCredential: pulumi.String("<GCM API KEY>"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_sns_platformapplication" "gcm_application" {
name = "gcm_application"
platform = "GCM"
platform_credential = "<GCM API KEY>"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.sns.PlatformApplication;
import com.pulumi.aws.sns.PlatformApplicationArgs;
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 gcmApplication = new PlatformApplication("gcmApplication", PlatformApplicationArgs.builder()
.name("gcm_application")
.platform("GCM")
.platformCredential("<GCM API KEY>")
.build());
}
}
resources:
gcmApplication:
type: aws:sns:PlatformApplication
name: gcm_application
properties:
name: gcm_application
platform: GCM
platformCredential: <GCM API KEY>
Import
Using pulumi import, import SNS platform applications using the ARN. For example:
$ pulumi import aws:sns/platformApplication:PlatformApplication gcm_application arn:aws:sns:us-west-2:123456789012:app/GCM/gcm_application
Constructors
- PlatformApplication(String name, {PlatformApplicationArgs? args, CustomResourceOptions? options})
-
Creates a new PlatformApplication.
nameThe Pulumi resource name.argsArguments used to configure this PlatformApplication. The set of arguments for PlatformApplication.optionsResource options controlling this resource's behavior. - PlatformApplication.reference(String urn)
- Creates a typed reference to an existing PlatformApplication resource.
Properties
-
applePlatformBundleId
↔ Output<
String?> -
The bundle identifier that's assigned to your iOS app. May only include alphanumeric characters, hyphens (-), and periods (.).
latefinal
-
applePlatformTeamId
↔ Output<
String?> -
The identifier that's assigned to your Apple developer account team. Must be 10 alphanumeric characters.
latefinal
-
arn
↔ Output<
String> -
The ARN of the SNS platform application
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
eventDeliveryFailureTopicArn
↔ Output<
String?> -
The ARN of the SNS Topic triggered when a delivery to any of the platform endpoints associated with your platform application encounters a permanent failure.
latefinal
-
eventEndpointCreatedTopicArn
↔ Output<
String?> -
The ARN of the SNS Topic triggered when a new platform endpoint is added to your platform application.
latefinal
-
eventEndpointDeletedTopicArn
↔ Output<
String?> -
The ARN of the SNS Topic triggered when an existing platform endpoint is deleted from your platform application.
latefinal
-
eventEndpointUpdatedTopicArn
↔ Output<
String?> -
The ARN of the SNS Topic triggered when an existing platform endpoint is changed from your platform application.
latefinal
-
failureFeedbackRoleArn
↔ Output<
String?> -
The IAM role ARN permitted to receive failure feedback for this application and give SNS write access to use CloudWatch logs on your behalf.
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
-
name
↔ Output<
String> -
The friendly name for the SNS platform application
latefinal
-
platform
↔ Output<
String> -
The platform that the app is registered with. See Platform for supported platforms.
latefinal
-
platformCredential
↔ Output<
String> -
Application Platform credential. See Credential for type of credential required for platform. The value of this attribute when stored into the Terraform state is only a hash of the real value, so therefore it is not practical to use this as an attribute for other resources.
latefinal
-
platformPrincipal
↔ Output<
String?> -
Application Platform principal. See Principal for type of principal required for platform. The value of this attribute when stored into the Terraform state is only a hash of the real value, so therefore it is not practical to use this as an attribute for other resources.
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
-
successFeedbackRoleArn
↔ Output<
String?> -
The IAM role ARN permitted to receive success feedback for this application and give SNS write access to use CloudWatch logs on your behalf.
latefinal
-
successFeedbackSampleRate
↔ Output<
String?> -
The sample rate percentage (0-100) of successfully delivered messages.
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, {PlatformApplicationState? state, CustomResourceOptions? options}) → PlatformApplication -
Gets an existing PlatformApplication resource's state with the given
nameandid.