Struct aws_sdk_sns::operation::create_platform_application::builders::CreatePlatformApplicationFluentBuilder
source · pub struct CreatePlatformApplicationFluentBuilder { /* private fields */ }Expand description
Fluent builder constructing a request to CreatePlatformApplication.
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,PlatformPrincipalisclient idandPlatformCredentialisclient secret. -
For
Baidu,PlatformPrincipalisAPI keyandPlatformCredentialissecret key. -
For
APNSandAPNS_SANDBOXusing certificate credentials,PlatformPrincipalisSSL certificateandPlatformCredentialisprivate key. -
For
APNSandAPNS_SANDBOXusing token credentials,PlatformPrincipalissigning key IDandPlatformCredentialissigning key. -
For GCM (Firebase Cloud Messaging) using key credentials, there is no
PlatformPrincipal. ThePlatformCredentialisAPI key. -
For GCM (Firebase Cloud Messaging) using token credentials, there is no
PlatformPrincipal. ThePlatformCredentialis a JSON formatted private key file. When using the Amazon Web Services CLI, the file must be in string format and special characters must be ignored. To format the file correctly, Amazon SNS recommends using the following command:SERVICE_JSON=`jq @json <<< cat service.json`. -
For
MPNS,PlatformPrincipalisTLS certificateandPlatformCredentialisprivate key. -
For
WNS,PlatformPrincipalisPackage Security IdentifierandPlatformCredentialissecret key.
You can use the returned PlatformApplicationArn as an attribute for the CreatePlatformEndpoint action.
Implementations§
source§impl CreatePlatformApplicationFluentBuilder
impl CreatePlatformApplicationFluentBuilder
sourcepub fn as_input(&self) -> &CreatePlatformApplicationInputBuilder
pub fn as_input(&self) -> &CreatePlatformApplicationInputBuilder
Access the CreatePlatformApplication as a reference.
sourcepub async fn send(
self
) -> Result<CreatePlatformApplicationOutput, SdkError<CreatePlatformApplicationError, HttpResponse>>
pub async fn send( self ) -> Result<CreatePlatformApplicationOutput, SdkError<CreatePlatformApplicationError, 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<CreatePlatformApplicationOutput, CreatePlatformApplicationError, Self>
pub fn customize( self ) -> CustomizableOperation<CreatePlatformApplicationOutput, CreatePlatformApplicationError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
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.
sourcepub fn get_name(&self) -> &Option<String>
pub fn get_name(&self) -> &Option<String>
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.
sourcepub fn platform(self, input: impl Into<String>) -> Self
pub fn platform(self, input: impl Into<String>) -> Self
The following platforms are supported: ADM (Amazon Device Messaging), APNS (Apple Push Notification Service), APNS_SANDBOX, and GCM (Firebase Cloud Messaging).
sourcepub fn set_platform(self, input: Option<String>) -> Self
pub fn set_platform(self, input: Option<String>) -> Self
The following platforms are supported: ADM (Amazon Device Messaging), APNS (Apple Push Notification Service), APNS_SANDBOX, and GCM (Firebase Cloud Messaging).
sourcepub fn get_platform(&self) -> &Option<String>
pub fn get_platform(&self) -> &Option<String>
The following platforms are supported: ADM (Amazon Device Messaging), APNS (Apple Push Notification Service), APNS_SANDBOX, and GCM (Firebase Cloud Messaging).
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 SetPlatformApplicationAttributes .
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 SetPlatformApplicationAttributes .
sourcepub fn get_attributes(&self) -> &Option<HashMap<String, String>>
pub fn get_attributes(&self) -> &Option<HashMap<String, String>>
For a list of attributes, see SetPlatformApplicationAttributes .
Trait Implementations§
source§impl Clone for CreatePlatformApplicationFluentBuilder
impl Clone for CreatePlatformApplicationFluentBuilder
source§fn clone(&self) -> CreatePlatformApplicationFluentBuilder
fn clone(&self) -> CreatePlatformApplicationFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for CreatePlatformApplicationFluentBuilder
impl !RefUnwindSafe for CreatePlatformApplicationFluentBuilder
impl Send for CreatePlatformApplicationFluentBuilder
impl Sync for CreatePlatformApplicationFluentBuilder
impl Unpin for CreatePlatformApplicationFluentBuilder
impl !UnwindSafe for CreatePlatformApplicationFluentBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more