@Override
    public CreatePlatformEndpointResult createPlatformEndpoint(CreatePlatformEndpointRequest request) {
        request = beforeClientExecution(request);
        return executeCreatePlatformEndpoint(request);
    }
<p>
Creates an endpoint for a device and mobile app on one of the supported push notification services, such as GCM
(Firebase Cloud Messaging) and APNS. <code>CreatePlatformEndpoint</code> requires the
<code>PlatformApplicationArn</code> that is returned from <code>CreatePlatformApplication</code>. You can use the
returned <code>EndpointArn</code> to send a message to a mobile app or by the <code>Subscribe</code> action for
subscription to a topic. The <code>CreatePlatformEndpoint</code> action is idempotent, so if the requester
already owns an endpoint with the same device token and attributes, that endpoint's ARN is returned without
creating a new endpoint. For more information, see <a
href="https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push
Notifications</a>.
</p>
<p>
When using <code>CreatePlatformEndpoint</code> with Baidu, two attributes must be provided: ChannelId and UserId.
The token field must also contain the ChannelId. For more information, see <a
href="https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePushBaiduEndpoint.html">Creating an Amazon SNS Endpoint
for Baidu</a>.
</p>

@param createPlatformEndpointRequest
       Input for CreatePlatformEndpoint action.
@return Result of the CreatePlatformEndpoint operation returned by the service.
@throws InvalidParameterException
        Indicates that a request parameter does not comply with the associated constraints.
@throws InternalErrorException
        Indicates an internal service error.
@throws AuthorizationErrorException
        Indicates that the user has been denied access to the requested resource.
@throws NotFoundException
        Indicates that the requested resource does not exist.
@sample AmazonSNS.CreatePlatformEndpoint
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CreatePlatformEndpoint" target="_top">AWS API
     Documentation</a>
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/AmazonSNSClient.java