Struct aws_sdk_sns::operation::create_platform_endpoint::builders::CreatePlatformEndpointFluentBuilder
source · pub struct CreatePlatformEndpointFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to CreatePlatformEndpoint
.
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. CreatePlatformEndpoint
requires the PlatformApplicationArn
that is returned from CreatePlatformApplication
. You can use the returned EndpointArn
to send a message to a mobile app or by the Subscribe
action for subscription to a topic. The CreatePlatformEndpoint
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 Using Amazon SNS Mobile Push Notifications.
When using CreatePlatformEndpoint
with Baidu, two attributes must be provided: ChannelId and UserId. The token field must also contain the ChannelId. For more information, see Creating an Amazon SNS Endpoint for Baidu.
Implementations§
source§impl CreatePlatformEndpointFluentBuilder
impl CreatePlatformEndpointFluentBuilder
sourcepub fn as_input(&self) -> &CreatePlatformEndpointInputBuilder
pub fn as_input(&self) -> &CreatePlatformEndpointInputBuilder
Access the CreatePlatformEndpoint as a reference.
sourcepub async fn send(
self
) -> Result<CreatePlatformEndpointOutput, SdkError<CreatePlatformEndpointError, HttpResponse>>
pub async fn send( self ) -> Result<CreatePlatformEndpointOutput, SdkError<CreatePlatformEndpointError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn customize(
self
) -> CustomizableOperation<CreatePlatformEndpointOutput, CreatePlatformEndpointError, Self>
pub fn customize( self ) -> CustomizableOperation<CreatePlatformEndpointOutput, CreatePlatformEndpointError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn platform_application_arn(self, input: impl Into<String>) -> Self
pub fn platform_application_arn(self, input: impl Into<String>) -> Self
PlatformApplicationArn
returned from CreatePlatformApplication is used to create a an endpoint.
sourcepub fn set_platform_application_arn(self, input: Option<String>) -> Self
pub fn set_platform_application_arn(self, input: Option<String>) -> Self
PlatformApplicationArn
returned from CreatePlatformApplication is used to create a an endpoint.
sourcepub fn get_platform_application_arn(&self) -> &Option<String>
pub fn get_platform_application_arn(&self) -> &Option<String>
PlatformApplicationArn
returned from CreatePlatformApplication is used to create a an endpoint.
sourcepub fn token(self, input: impl Into<String>) -> Self
pub fn token(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_token(self, input: Option<String>) -> Self
pub fn set_token(self, input: Option<String>) -> Self
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.
sourcepub fn get_token(&self) -> &Option<String>
pub fn get_token(&self) -> &Option<String>
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.
sourcepub fn custom_user_data(self, input: impl Into<String>) -> Self
pub fn custom_user_data(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_custom_user_data(self, input: Option<String>) -> Self
pub fn set_custom_user_data(self, input: Option<String>) -> Self
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.
sourcepub fn get_custom_user_data(&self) -> &Option<String>
pub fn get_custom_user_data(&self) -> &Option<String>
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.
sourcepub fn attributes(self, k: impl Into<String>, v: impl Into<String>) -> Self
pub fn attributes(self, k: impl Into<String>, v: impl Into<String>) -> Self
Adds a key-value pair to Attributes
.
To override the contents of this collection use set_attributes
.
For a list of attributes, see SetEndpointAttributes
.
sourcepub fn set_attributes(self, input: Option<HashMap<String, String>>) -> Self
pub fn set_attributes(self, input: Option<HashMap<String, String>>) -> Self
For a list of attributes, see SetEndpointAttributes
.
sourcepub fn get_attributes(&self) -> &Option<HashMap<String, String>>
pub fn get_attributes(&self) -> &Option<HashMap<String, String>>
For a list of attributes, see SetEndpointAttributes
.
Trait Implementations§
source§impl Clone for CreatePlatformEndpointFluentBuilder
impl Clone for CreatePlatformEndpointFluentBuilder
source§fn clone(&self) -> CreatePlatformEndpointFluentBuilder
fn clone(&self) -> CreatePlatformEndpointFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more