Package com.pulumi.aws.sns
Class PlatformApplication
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.sns.PlatformApplication
-
public class PlatformApplication extends com.pulumi.resources.CustomResourceProvides an SNS platform application resource ## Example Usage ### Apple Push Notification Service (APNS) using certificate-based authentication > **NOTE:** For certificate-based APNS, both `platformCredential` (private key) and `platformPrincipal` (certificate) must be PEM-encoded strings. Terraform string values must be valid UTF-8, so do not pass a binary Apple `.p12` via `base64decode()` — that fails with `the result of decoding the provided string is not valid UTF-8`. Convert the `.p12` to PEM (for example with `openssl`) and load the PEM files instead.
### Apple Push Notification Service (APNS) using token-based authenticationpackage 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 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 apnsApplication = new PlatformApplication("apnsApplication", PlatformApplicationArgs.builder() .name("apns_application") .platform("APNS") .platformCredential(StdFunctions.file(FileArgs.builder() .input("apns-private-key.pem") .build()).result()) .platformPrincipal(StdFunctions.file(FileArgs.builder() .input("apns-certificate.pem") .build()).result()) .build()); } }
### Google Cloud Messaging (GCM)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()); } }
## Import Using `pulumi import`, import SNS platform applications using the ARN. For example: ```sh $ pulumi import aws:sns/platformApplication:PlatformApplication gcm_application arn:aws:sns:us-west-2:123456789012:app/GCM/gcm_application ```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()); } }
-
-
Constructor Summary
Constructors Constructor Description PlatformApplication(java.lang.String name)PlatformApplication(java.lang.String name, PlatformApplicationArgs args)PlatformApplication(java.lang.String name, PlatformApplicationArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.util.Optional<java.lang.String>>applePlatformBundleId()com.pulumi.core.Output<java.util.Optional<java.lang.String>>applePlatformTeamId()com.pulumi.core.Output<java.lang.String>arn()com.pulumi.core.Output<java.util.Optional<java.lang.String>>eventDeliveryFailureTopicArn()com.pulumi.core.Output<java.util.Optional<java.lang.String>>eventEndpointCreatedTopicArn()com.pulumi.core.Output<java.util.Optional<java.lang.String>>eventEndpointDeletedTopicArn()com.pulumi.core.Output<java.util.Optional<java.lang.String>>eventEndpointUpdatedTopicArn()com.pulumi.core.Output<java.util.Optional<java.lang.String>>failureFeedbackRoleArn()static PlatformApplicationget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, PlatformApplicationState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.lang.String>platform()com.pulumi.core.Output<java.lang.String>platformCredential()com.pulumi.core.Output<java.util.Optional<java.lang.String>>platformPrincipal()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<java.lang.String>>successFeedbackRoleArn()com.pulumi.core.Output<java.util.Optional<java.lang.String>>successFeedbackSampleRate()
-
-
-
Constructor Detail
-
PlatformApplication
public PlatformApplication(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
PlatformApplication
public PlatformApplication(java.lang.String name, PlatformApplicationArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
PlatformApplication
public PlatformApplication(java.lang.String name, PlatformApplicationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
applePlatformBundleId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> applePlatformBundleId()
- Returns:
- The bundle identifier that's assigned to your iOS app. May only include alphanumeric characters, hyphens (-), and periods (.).
-
applePlatformTeamId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> applePlatformTeamId()
- Returns:
- The identifier that's assigned to your Apple developer account team. Must be 10 alphanumeric characters.
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- The ARN of the SNS platform application
-
eventDeliveryFailureTopicArn
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> eventDeliveryFailureTopicArn()
- Returns:
- 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.
-
eventEndpointCreatedTopicArn
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> eventEndpointCreatedTopicArn()
- Returns:
- The ARN of the SNS Topic triggered when a new platform endpoint is added to your platform application.
-
eventEndpointDeletedTopicArn
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> eventEndpointDeletedTopicArn()
- Returns:
- The ARN of the SNS Topic triggered when an existing platform endpoint is deleted from your platform application.
-
eventEndpointUpdatedTopicArn
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> eventEndpointUpdatedTopicArn()
- Returns:
- The ARN of the SNS Topic triggered when an existing platform endpoint is changed from your platform application.
-
failureFeedbackRoleArn
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> failureFeedbackRoleArn()
- Returns:
- The IAM role ARN permitted to receive failure feedback for this application and give SNS write access to use CloudWatch logs on your behalf.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- The friendly name for the SNS platform application
-
platform
public com.pulumi.core.Output<java.lang.String> platform()
- Returns:
- The platform that the app is registered with. See [Platform](http://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-register.html) for supported platforms.
-
platformCredential
public com.pulumi.core.Output<java.lang.String> platformCredential()
- Returns:
- Application Platform credential. See [Credential](http://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-register.html) 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.
-
platformPrincipal
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> platformPrincipal()
- Returns:
- Application Platform principal. See [Principal](http://docs.aws.amazon.com/sns/latest/api/API_CreatePlatformApplication.html) 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.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
successFeedbackRoleArn
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> successFeedbackRoleArn()
- Returns:
- The IAM role ARN permitted to receive success feedback for this application and give SNS write access to use CloudWatch logs on your behalf.
-
successFeedbackSampleRate
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> successFeedbackSampleRate()
- Returns:
- The sample rate percentage (0-100) of successfully delivered messages. The following attributes are needed only when using APNS token credentials:
-
get
public static PlatformApplication get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable PlatformApplicationState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-