fn create_platform_application(
        &self,
        input: CreatePlatformApplicationInput,
    ) -> RusotoFuture<CreatePlatformApplicationResponse, CreatePlatformApplicationError> {
        let mut request = SignedRequest::new("POST", "sns", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreatePlatformApplication");
        params.put("Version", "2010-03-31");
        CreatePlatformApplicationInputSerializer::serialize(&mut params, "", &input);
        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
        request.set_content_type("application/x-www-form-urlencoded".to_owned());

        self.client.sign_and_dispatch(request, |response| {
            if !response.status.is_success() {
                return Box::new(response.buffer().from_err().and_then(|response| {
                    Err(CreatePlatformApplicationError::from_response(response))
                }));
            }

            Box::new(response.buffer().from_err().and_then(move |response| {
                let result;

                if response.body.is_empty() {
                    result = CreatePlatformApplicationResponse::default();
                } else {
                    let reader = EventReader::new_with_config(
                        response.body.as_ref(),
                        ParserConfig::new().trim_whitespace(true),
                    );
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = peek_at_name(&mut stack)?;
                    start_element(&actual_tag_name, &mut stack)?;
                    result = CreatePlatformApplicationResponseDeserializer::deserialize(
                        "CreatePlatformApplicationResult",
                        &mut stack,
                    )?;
                    skip_tree(&mut stack);
                    end_element(&actual_tag_name, &mut stack)?;
                }
                // parse non-payload
                Ok(result)
            }))
        })
    }
/// <p>Creates a platform application object for one of the supported push notification services, such as APNS and FCM, to which devices and mobile apps may register. You must specify PlatformPrincipal and PlatformCredential attributes when using the <code>CreatePlatformApplication</code> action. The PlatformPrincipal is received from the notification service. For APNS/APNS_SANDBOX, PlatformPrincipal is "SSL certificate". For GCM, PlatformPrincipal is not applicable. For ADM, PlatformPrincipal is "client id". The PlatformCredential is also received from the notification service. For WNS, PlatformPrincipal is "Package Security Identifier". For MPNS, PlatformPrincipal is "TLS certificate". For Baidu, PlatformPrincipal is "API key".</p> <p>For APNS/APNS_SANDBOX, PlatformCredential is "private key". For GCM, PlatformCredential is "API key". For ADM, PlatformCredential is "client secret". For WNS, PlatformCredential is "secret key". For MPNS, PlatformCredential is "private key". For Baidu, PlatformCredential is "secret key". The PlatformApplicationArn that is returned when using <code>CreatePlatformApplication</code> is then used as an attribute for the <code>CreatePlatformEndpoint</code> action. For more information, see <a href="https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. For more information about obtaining the PlatformPrincipal and PlatformCredential for each of the supported push notification services, see <a href="https://docs.aws.amazon.com/sns/latest/dg/mobile-push-apns.html">Getting Started with Apple Push Notification Service</a>, <a href="https://docs.aws.amazon.com/sns/latest/dg/mobile-push-adm.html">Getting Started with Amazon Device Messaging</a>, <a href="https://docs.aws.amazon.com/sns/latest/dg/mobile-push-baidu.html">Getting Started with Baidu Cloud Push</a>, <a href="https://docs.aws.amazon.com/sns/latest/dg/mobile-push-gcm.html">Getting Started with Google Cloud Messaging for Android</a>, <a href="https://docs.aws.amazon.com/sns/latest/dg/mobile-push-mpns.html">Getting Started with MPNS</a>, or <a href="https://docs.aws.amazon.com/sns/latest/dg/mobile-push-wns.html">Getting Started with WNS</a>. </p>
Creates a platform application object for one of the supported push notification services, such as APNS and FCM, to which devices and mobile apps may register. You must specify PlatformPrincipal and PlatformCredential attributes when using the CreatePlatformApplication action. The PlatformPrincipal is received from the notification service.
Creates a platform application object for one of the supported push notification services such as APNS and FCM to which devices and mobile apps may register . You must specify PlatformPrincipal and PlatformCredential attributes when using the CreatePlatformApplication action . The PlatformPrincipal is received from the notification service .
fn create_platform_application(
        &self,
        input: CreatePlatformApplicationInput,
    ) -> RusotoFuture<CreatePlatformApplicationResponse, CreatePlatformApplicationError> {
        let mut request = SignedRequest::new("POST", "sns", &self.region, "/");
        let mut params = Params::new();
        params.put("Action", "CreatePlatformApplication");
        params.put("Version", "2010-03-31");
        CreatePlatformApplicationInputSerializer::serialize(&mut params, "", &input);
        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
        request.set_content_type("application/x-www-form-urlencoded".to_owned());
        self.client.sign_and_dispatch(request, |response| {
            if !response.status.is_success() {
                return Box::new(response.buffer().from_err().and_then(|response| {
                    Err(CreatePlatformApplicationError::from_response(response))
                }));
            }
            Box::new(response.buffer().from_err().and_then(move |response| {
                let result;
                if response.body.is_empty() {
                    result = CreatePlatformApplicationResponse::default();
                } else {
                    let reader = EventReader::new_with_config(
                        response.body.as_ref(),
                        ParserConfig::new().trim_whitespace(true),
                    );
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = peek_at_name(&mut stack)?;
                    start_element(&actual_tag_name, &mut stack)?;
                    result = CreatePlatformApplicationResponseDeserializer::deserialize(
                        "CreatePlatformApplicationResult",
                        &mut stack,
                    )?;
                    skip_tree(&mut stack);
                    end_element(&actual_tag_name, &mut stack)?;
                }
                // parse non-payload
                Ok(result)
            }))
        })
    }
fn create_platform_application ( & self , input : CreatePlatformApplicationInput , ) -> RusotoFuture < CreatePlatformApplicationResponse , CreatePlatformApplicationError > { let mut request = SignedRequest :: new ( " " , " " , & self . region , " " ) ; let mut params = Params :: new ( ) ; params . put ( " " , " " ) ; params . put ( " " , " " ) ; CreatePlatformApplicationInputSerializer :: serialize ( & mut params , " " , & input ) ; request . set_payload ( Some ( serde_urlencoded :: to_string ( & params ) . unwrap ( ) ) ) ; request . set_content_type ( " " . to_owned ( ) ) ; self . client . sign_and_dispatch ( request , | response | { if ! response . status . is_success ( ) { return Box :: new ( response . buffer ( ) . from_err ( ) . and_then ( | response | { Err ( CreatePlatformApplicationError :: from_response ( response ) ) } ) ) ; } Box :: new ( response . buffer ( ) . from_err ( ) . and_then ( move | response | { let result ; if response . body . is_empty ( ) { result = CreatePlatformApplicationResponse :: default ( ) ; } else { let reader = EventReader :: new_with_config ( response . body . as_ref ( ) , ParserConfig :: new ( ) . trim_whitespace ( true ) , ) ; let mut stack = XmlResponse :: new ( reader . into_iter ( ) . peekable ( ) ) ; let _start_document = stack . next ( ) ; let actual_tag_name = peek_at_name ( & mut stack ) ? ; start_element ( & actual_tag_name , & mut stack ) ? ; result = CreatePlatformApplicationResponseDeserializer :: deserialize ( " " , & mut stack , ) ? ; skip_tree ( & mut stack ) ; end_element ( & actual_tag_name , & mut stack ) ? ; } // parse non-payload Ok ( result ) } ) ) } ) }
<p>Creates a platform application object for one of the supported push notification services, such as APNS and FCM, to which devices and mobile apps may register.
<p > Creates a platform application object for one of the supported push notification services such as APNS and FCM to which devices and mobile apps may register .
&self
input
CreatePlatformApplicationInput