Module Smaws_Client_SNS.Publish

Sends a message to an Amazon SNS topic, a text message (SMS message) directly to a phone number, or a message to a mobile platform endpoint (when you specify the TargetArn).

If you send a message to a topic, Amazon SNS delivers the message to each endpoint that is subscribed to the topic. The format of the message depends on the notification protocol for each subscribed endpoint.

When a messageId is returned, the message is saved and Amazon SNS immediately delivers it to subscribers.

To use the Publish action for publishing a message to a mobile endpoint, such as an app on a Kindle device or mobile phone, you must specify the EndpointArn for the TargetArn parameter. The EndpointArn is returned when making a call with the CreatePlatformEndpoint action.

For more information about formatting messages, see Send Custom Platform-Specific Payloads in Messages to Mobile Devices.

You can publish messages only to topics and endpoints in the same Amazon Web Services Region.

val error_to_string : [ Smaws_Lib.Protocols.AwsQuery.error | `AuthorizationErrorException of Types.authorization_error_exception | `EndpointDisabledException of Types.endpoint_disabled_exception | `InternalErrorException of Types.internal_error_exception | `InvalidParameterException of Types.invalid_parameter_exception | `InvalidParameterValueException of Types.invalid_parameter_value_exception | `InvalidSecurityException of Types.invalid_security_exception | `KMSAccessDeniedException of Types.kms_access_denied_exception | `KMSDisabledException of Types.kms_disabled_exception | `KMSInvalidStateException of Types.kms_invalid_state_exception | `KMSNotFoundException of Types.kms_not_found_exception | `KMSOptInRequired of Types.kms_opt_in_required | `KMSThrottlingException of Types.kms_throttling_exception | `NotFoundException of Types.not_found_exception | `PlatformApplicationDisabledException of Types.platform_application_disabled_exception | `ValidationException of Types.validation_exception ] -> string
val request : 'http_type Smaws_Lib.Context.t -> Types.publish_input -> (Types.publish_response, [> Smaws_Lib.Protocols.AwsQuery.error | `AuthorizationErrorException of Types.authorization_error_exception | `EndpointDisabledException of Types.endpoint_disabled_exception | `InternalErrorException of Types.internal_error_exception | `InvalidParameterException of Types.invalid_parameter_exception | `InvalidParameterValueException of Types.invalid_parameter_value_exception | `InvalidSecurityException of Types.invalid_security_exception | `KMSAccessDeniedException of Types.kms_access_denied_exception | `KMSDisabledException of Types.kms_disabled_exception | `KMSInvalidStateException of Types.kms_invalid_state_exception | `KMSNotFoundException of Types.kms_not_found_exception | `KMSOptInRequired of Types.kms_opt_in_required | `KMSThrottlingException of Types.kms_throttling_exception | `NotFoundException of Types.not_found_exception | `PlatformApplicationDisabledException of Types.platform_application_disabled_exception | `ValidationException of Types.validation_exception ]) Stdlib.result
val request_with_metadata : 'http_type Smaws_Lib.Context.t -> Types.publish_input -> (Types.publish_response Smaws_Lib.Response.t, [> Smaws_Lib.Protocols.AwsQuery.error | `AuthorizationErrorException of Types.authorization_error_exception | `EndpointDisabledException of Types.endpoint_disabled_exception | `InternalErrorException of Types.internal_error_exception | `InvalidParameterException of Types.invalid_parameter_exception | `InvalidParameterValueException of Types.invalid_parameter_value_exception | `InvalidSecurityException of Types.invalid_security_exception | `KMSAccessDeniedException of Types.kms_access_denied_exception | `KMSDisabledException of Types.kms_disabled_exception | `KMSInvalidStateException of Types.kms_invalid_state_exception | `KMSNotFoundException of Types.kms_not_found_exception | `KMSOptInRequired of Types.kms_opt_in_required | `KMSThrottlingException of Types.kms_throttling_exception | `NotFoundException of Types.not_found_exception | `PlatformApplicationDisabledException of Types.platform_application_disabled_exception | `ValidationException of Types.validation_exception ] * Smaws_Lib.Response.metadata) Stdlib.result