amazonka-sns-2.0: Amazon Simple Notification Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.SNS.CreatePlatformApplication

Description

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, PlatformPrincipal is client id and PlatformCredential is client secret.
  • For Baidu, PlatformPrincipal is API key and PlatformCredential is secret key.
  • For APNS and APNS_SANDBOX using certificate credentials, PlatformPrincipal is SSL certificate and PlatformCredential is private key.
  • For APNS and APNS_SANDBOX using token credentials, PlatformPrincipal is signing key ID and PlatformCredential is signing key.
  • For GCM (Firebase Cloud Messaging), there is no PlatformPrincipal and the PlatformCredential is API key.
  • For MPNS, PlatformPrincipal is TLS certificate and PlatformCredential is private key.
  • For WNS, PlatformPrincipal is Package Security Identifier and PlatformCredential is secret key.

You can use the returned PlatformApplicationArn as an attribute for the CreatePlatformEndpoint action.

Synopsis

Creating a Request

data CreatePlatformApplication Source #

Input for CreatePlatformApplication action.

See: newCreatePlatformApplication smart constructor.

Constructors

CreatePlatformApplication' 

Fields

  • name :: Text

    Application names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, hyphens, and periods, and must be between 1 and 256 characters long.

  • platform :: Text

    The following platforms are supported: ADM (Amazon Device Messaging), APNS (Apple Push Notification Service), APNS_SANDBOX, and GCM (Firebase Cloud Messaging).

  • attributes :: HashMap Text Text

    For a list of attributes, see SetPlatformApplicationAttributes.

Instances

Instances details
ToHeaders CreatePlatformApplication Source # 
Instance details

Defined in Amazonka.SNS.CreatePlatformApplication

ToPath CreatePlatformApplication Source # 
Instance details

Defined in Amazonka.SNS.CreatePlatformApplication

ToQuery CreatePlatformApplication Source # 
Instance details

Defined in Amazonka.SNS.CreatePlatformApplication

AWSRequest CreatePlatformApplication Source # 
Instance details

Defined in Amazonka.SNS.CreatePlatformApplication

Generic CreatePlatformApplication Source # 
Instance details

Defined in Amazonka.SNS.CreatePlatformApplication

Associated Types

type Rep CreatePlatformApplication :: Type -> Type #

Read CreatePlatformApplication Source # 
Instance details

Defined in Amazonka.SNS.CreatePlatformApplication

Show CreatePlatformApplication Source # 
Instance details

Defined in Amazonka.SNS.CreatePlatformApplication

NFData CreatePlatformApplication Source # 
Instance details

Defined in Amazonka.SNS.CreatePlatformApplication

Eq CreatePlatformApplication Source # 
Instance details

Defined in Amazonka.SNS.CreatePlatformApplication

Hashable CreatePlatformApplication Source # 
Instance details

Defined in Amazonka.SNS.CreatePlatformApplication

type AWSResponse CreatePlatformApplication Source # 
Instance details

Defined in Amazonka.SNS.CreatePlatformApplication

type Rep CreatePlatformApplication Source # 
Instance details

Defined in Amazonka.SNS.CreatePlatformApplication

type Rep CreatePlatformApplication = D1 ('MetaData "CreatePlatformApplication" "Amazonka.SNS.CreatePlatformApplication" "amazonka-sns-2.0-4k7AiJI7DyqhOUy5o4qb9" 'False) (C1 ('MetaCons "CreatePlatformApplication'" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "platform") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "attributes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HashMap Text Text)))))

newCreatePlatformApplication Source #

Create a value of CreatePlatformApplication with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:name:CreatePlatformApplication', createPlatformApplication_name - Application names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, hyphens, and periods, and must be between 1 and 256 characters long.

$sel:platform:CreatePlatformApplication', createPlatformApplication_platform - The following platforms are supported: ADM (Amazon Device Messaging), APNS (Apple Push Notification Service), APNS_SANDBOX, and GCM (Firebase Cloud Messaging).

CreatePlatformApplication, createPlatformApplication_attributes - For a list of attributes, see SetPlatformApplicationAttributes.

Request Lenses

createPlatformApplication_name :: Lens' CreatePlatformApplication Text Source #

Application names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, hyphens, and periods, and must be between 1 and 256 characters long.

createPlatformApplication_platform :: Lens' CreatePlatformApplication Text Source #

The following platforms are supported: ADM (Amazon Device Messaging), APNS (Apple Push Notification Service), APNS_SANDBOX, and GCM (Firebase Cloud Messaging).

Destructuring the Response

data CreatePlatformApplicationResponse Source #

Response from CreatePlatformApplication action.

See: newCreatePlatformApplicationResponse smart constructor.

Constructors

CreatePlatformApplicationResponse' 

Fields

Instances

Instances details
Generic CreatePlatformApplicationResponse Source # 
Instance details

Defined in Amazonka.SNS.CreatePlatformApplication

Associated Types

type Rep CreatePlatformApplicationResponse :: Type -> Type #

Read CreatePlatformApplicationResponse Source # 
Instance details

Defined in Amazonka.SNS.CreatePlatformApplication

Show CreatePlatformApplicationResponse Source # 
Instance details

Defined in Amazonka.SNS.CreatePlatformApplication

NFData CreatePlatformApplicationResponse Source # 
Instance details

Defined in Amazonka.SNS.CreatePlatformApplication

Eq CreatePlatformApplicationResponse Source # 
Instance details

Defined in Amazonka.SNS.CreatePlatformApplication

type Rep CreatePlatformApplicationResponse Source # 
Instance details

Defined in Amazonka.SNS.CreatePlatformApplication

type Rep CreatePlatformApplicationResponse = D1 ('MetaData "CreatePlatformApplicationResponse" "Amazonka.SNS.CreatePlatformApplication" "amazonka-sns-2.0-4k7AiJI7DyqhOUy5o4qb9" 'False) (C1 ('MetaCons "CreatePlatformApplicationResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "platformApplicationArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newCreatePlatformApplicationResponse Source #

Create a value of CreatePlatformApplicationResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

CreatePlatformApplicationResponse, createPlatformApplicationResponse_platformApplicationArn - PlatformApplicationArn is returned.

$sel:httpStatus:CreatePlatformApplicationResponse', createPlatformApplicationResponse_httpStatus - The response's http status code.

Response Lenses