aws_sdk_sns/client/
create_platform_endpoint.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`CreatePlatformEndpoint`](crate::operation::create_platform_endpoint::builders::CreatePlatformEndpointFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`platform_application_arn(impl Into<String>)`](crate::operation::create_platform_endpoint::builders::CreatePlatformEndpointFluentBuilder::platform_application_arn) / [`set_platform_application_arn(Option<String>)`](crate::operation::create_platform_endpoint::builders::CreatePlatformEndpointFluentBuilder::set_platform_application_arn):<br>required: **true**<br><p><code>PlatformApplicationArn</code> returned from CreatePlatformApplication is used to create a an endpoint.</p><br>
7    ///   - [`token(impl Into<String>)`](crate::operation::create_platform_endpoint::builders::CreatePlatformEndpointFluentBuilder::token) / [`set_token(Option<String>)`](crate::operation::create_platform_endpoint::builders::CreatePlatformEndpointFluentBuilder::set_token):<br>required: **true**<br><p>Unique identifier created by the notification service for an app on a device. The specific name for Token will vary, depending on which notification service is being used. For example, when using APNS as the notification service, you need the device token. Alternatively, when using GCM (Firebase Cloud Messaging) or ADM, the device token equivalent is called the registration ID.</p><br>
8    ///   - [`custom_user_data(impl Into<String>)`](crate::operation::create_platform_endpoint::builders::CreatePlatformEndpointFluentBuilder::custom_user_data) / [`set_custom_user_data(Option<String>)`](crate::operation::create_platform_endpoint::builders::CreatePlatformEndpointFluentBuilder::set_custom_user_data):<br>required: **false**<br><p>Arbitrary user data to associate with the endpoint. Amazon SNS does not use this data. The data must be in UTF-8 format and less than 2KB.</p><br>
9    ///   - [`attributes(impl Into<String>, impl Into<String>)`](crate::operation::create_platform_endpoint::builders::CreatePlatformEndpointFluentBuilder::attributes) / [`set_attributes(Option<HashMap::<String, String>>)`](crate::operation::create_platform_endpoint::builders::CreatePlatformEndpointFluentBuilder::set_attributes):<br>required: **false**<br><p>For a list of attributes, see <a href="https://docs.aws.amazon.com/sns/latest/api/API_SetEndpointAttributes.html"> <code>SetEndpointAttributes</code> </a>.</p><br>
10    /// - On success, responds with [`CreatePlatformEndpointOutput`](crate::operation::create_platform_endpoint::CreatePlatformEndpointOutput) with field(s):
11    ///   - [`endpoint_arn(Option<String>)`](crate::operation::create_platform_endpoint::CreatePlatformEndpointOutput::endpoint_arn): <p>EndpointArn returned from CreateEndpoint action.</p>
12    /// - On failure, responds with [`SdkError<CreatePlatformEndpointError>`](crate::operation::create_platform_endpoint::CreatePlatformEndpointError)
13    pub fn create_platform_endpoint(&self) -> crate::operation::create_platform_endpoint::builders::CreatePlatformEndpointFluentBuilder {
14        crate::operation::create_platform_endpoint::builders::CreatePlatformEndpointFluentBuilder::new(self.handle.clone())
15    }
16}