Method: Aws::SNS::Client#create_platform_application
- Defined in:
- lib/aws-sdk-sns/client.rb
#create_platform_application(params = {}) ⇒ Types::CreatePlatformApplicationResponse
Creates a platform application object for one of the supported push notification services, such as APNS and GCM (Firebase Cloud Messaging), to which devices and mobile apps may register. You must specify PlatformPrincipal and PlatformCredential attributes when using the CreatePlatformApplication action.
PlatformPrincipal and PlatformCredential are received from the notification service.
-
For ADM,
PlatformPrincipalis ‘client id` andPlatformCredentialis `client secret`. -
For APNS and
APNS_SANDBOXusing certificate credentials,PlatformPrincipalis ‘SSL certificate` andPlatformCredentialis `private key`. -
For APNS and
APNS_SANDBOXusing token credentials,PlatformPrincipalis ‘signing key ID` andPlatformCredentialis `signing key`. -
For Baidu,
PlatformPrincipalis ‘API key` andPlatformCredentialis `secret key`. -
For GCM (Firebase Cloud Messaging) using key credentials, there is no
PlatformPrincipal. ThePlatformCredentialis ‘API key`. -
For GCM (Firebase Cloud Messaging) using token credentials, there is no
PlatformPrincipal. ThePlatformCredentialis a JSON formatted private key file. When using the Amazon Web Services CLI or Amazon Web Services SDKs, the file must be in string format and special characters must be ignored. To format the file correctly, Amazon SNS recommends using the following command: ‘SERVICE_JSON=$(jq @json < service.json)`. -
For MPNS,
PlatformPrincipalis ‘TLS certificate` andPlatformCredentialis `private key`. -
For WNS,
PlatformPrincipalis ‘Package Security Identifier` andPlatformCredentialis `secret key`.
You can use the returned PlatformApplicationArn as an attribute for the CreatePlatformEndpoint action.
686 687 688 689 |
# File 'lib/aws-sdk-sns/client.rb', line 686 def create_platform_application(params = {}, = {}) req = build_request(:create_platform_application, params) req.send_request() end |