UNPKG

70.9 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7interface Blob {}
8declare class SNS extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: SNS.Types.ClientConfiguration)
13 config: Config & SNS.Types.ClientConfiguration;
14 /**
15 * Adds a statement to a topic's access control policy, granting access for the specified AWS accounts to the specified actions.
16 */
17 addPermission(params: SNS.Types.AddPermissionInput, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
18 /**
19 * Adds a statement to a topic's access control policy, granting access for the specified AWS accounts to the specified actions.
20 */
21 addPermission(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
22 /**
23 * Accepts a phone number and indicates whether the phone holder has opted out of receiving SMS messages from your account. You cannot send SMS messages to a number that is opted out. To resume sending messages, you can opt in the number by using the OptInPhoneNumber action.
24 */
25 checkIfPhoneNumberIsOptedOut(params: SNS.Types.CheckIfPhoneNumberIsOptedOutInput, callback?: (err: AWSError, data: SNS.Types.CheckIfPhoneNumberIsOptedOutResponse) => void): Request<SNS.Types.CheckIfPhoneNumberIsOptedOutResponse, AWSError>;
26 /**
27 * Accepts a phone number and indicates whether the phone holder has opted out of receiving SMS messages from your account. You cannot send SMS messages to a number that is opted out. To resume sending messages, you can opt in the number by using the OptInPhoneNumber action.
28 */
29 checkIfPhoneNumberIsOptedOut(callback?: (err: AWSError, data: SNS.Types.CheckIfPhoneNumberIsOptedOutResponse) => void): Request<SNS.Types.CheckIfPhoneNumberIsOptedOutResponse, AWSError>;
30 /**
31 * Verifies an endpoint owner's intent to receive messages by validating the token sent to the endpoint by an earlier Subscribe action. If the token is valid, the action creates a new subscription and returns its Amazon Resource Name (ARN). This call requires an AWS signature only when the AuthenticateOnUnsubscribe flag is set to "true".
32 */
33 confirmSubscription(params: SNS.Types.ConfirmSubscriptionInput, callback?: (err: AWSError, data: SNS.Types.ConfirmSubscriptionResponse) => void): Request<SNS.Types.ConfirmSubscriptionResponse, AWSError>;
34 /**
35 * Verifies an endpoint owner's intent to receive messages by validating the token sent to the endpoint by an earlier Subscribe action. If the token is valid, the action creates a new subscription and returns its Amazon Resource Name (ARN). This call requires an AWS signature only when the AuthenticateOnUnsubscribe flag is set to "true".
36 */
37 confirmSubscription(callback?: (err: AWSError, data: SNS.Types.ConfirmSubscriptionResponse) => void): Request<SNS.Types.ConfirmSubscriptionResponse, AWSError>;
38 /**
39 * Creates a platform application object for one of the supported push notification services, such as APNS and FCM, to which devices and mobile apps may register. You must specify PlatformPrincipal and PlatformCredential attributes when using the CreatePlatformApplication action. The PlatformPrincipal is received from the notification service. For APNS/APNS_SANDBOX, PlatformPrincipal is "SSL certificate". For FCM, PlatformPrincipal is not applicable. For ADM, PlatformPrincipal is "client id". The PlatformCredential is also received from the notification service. For WNS, PlatformPrincipal is "Package Security Identifier". For MPNS, PlatformPrincipal is "TLS certificate". For Baidu, PlatformPrincipal is "API key". For APNS/APNS_SANDBOX, PlatformCredential is "private key". For FCM, PlatformCredential is "API key". For ADM, PlatformCredential is "client secret". For WNS, PlatformCredential is "secret key". For MPNS, PlatformCredential is "private key". For Baidu, PlatformCredential is "secret key". The PlatformApplicationArn that is returned when using CreatePlatformApplication is then used as an attribute for the CreatePlatformEndpoint action.
40 */
41 createPlatformApplication(params: SNS.Types.CreatePlatformApplicationInput, callback?: (err: AWSError, data: SNS.Types.CreatePlatformApplicationResponse) => void): Request<SNS.Types.CreatePlatformApplicationResponse, AWSError>;
42 /**
43 * Creates a platform application object for one of the supported push notification services, such as APNS and FCM, to which devices and mobile apps may register. You must specify PlatformPrincipal and PlatformCredential attributes when using the CreatePlatformApplication action. The PlatformPrincipal is received from the notification service. For APNS/APNS_SANDBOX, PlatformPrincipal is "SSL certificate". For FCM, PlatformPrincipal is not applicable. For ADM, PlatformPrincipal is "client id". The PlatformCredential is also received from the notification service. For WNS, PlatformPrincipal is "Package Security Identifier". For MPNS, PlatformPrincipal is "TLS certificate". For Baidu, PlatformPrincipal is "API key". For APNS/APNS_SANDBOX, PlatformCredential is "private key". For FCM, PlatformCredential is "API key". For ADM, PlatformCredential is "client secret". For WNS, PlatformCredential is "secret key". For MPNS, PlatformCredential is "private key". For Baidu, PlatformCredential is "secret key". The PlatformApplicationArn that is returned when using CreatePlatformApplication is then used as an attribute for the CreatePlatformEndpoint action.
44 */
45 createPlatformApplication(callback?: (err: AWSError, data: SNS.Types.CreatePlatformApplicationResponse) => void): Request<SNS.Types.CreatePlatformApplicationResponse, AWSError>;
46 /**
47 * Creates an endpoint for a device and mobile app on one of the supported push notification services, such as FCM and APNS. CreatePlatformEndpoint requires the PlatformApplicationArn that is returned from CreatePlatformApplication. The EndpointArn that is returned when using CreatePlatformEndpoint can then be used by the Publish action 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.
48 */
49 createPlatformEndpoint(params: SNS.Types.CreatePlatformEndpointInput, callback?: (err: AWSError, data: SNS.Types.CreateEndpointResponse) => void): Request<SNS.Types.CreateEndpointResponse, AWSError>;
50 /**
51 * Creates an endpoint for a device and mobile app on one of the supported push notification services, such as FCM and APNS. CreatePlatformEndpoint requires the PlatformApplicationArn that is returned from CreatePlatformApplication. The EndpointArn that is returned when using CreatePlatformEndpoint can then be used by the Publish action 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.
52 */
53 createPlatformEndpoint(callback?: (err: AWSError, data: SNS.Types.CreateEndpointResponse) => void): Request<SNS.Types.CreateEndpointResponse, AWSError>;
54 /**
55 * Creates a topic to which notifications can be published. Users can create at most 100,000 topics. For more information, see https://aws.amazon.com/sns. This action is idempotent, so if the requester already owns a topic with the specified name, that topic's ARN is returned without creating a new topic.
56 */
57 createTopic(params: SNS.Types.CreateTopicInput, callback?: (err: AWSError, data: SNS.Types.CreateTopicResponse) => void): Request<SNS.Types.CreateTopicResponse, AWSError>;
58 /**
59 * Creates a topic to which notifications can be published. Users can create at most 100,000 topics. For more information, see https://aws.amazon.com/sns. This action is idempotent, so if the requester already owns a topic with the specified name, that topic's ARN is returned without creating a new topic.
60 */
61 createTopic(callback?: (err: AWSError, data: SNS.Types.CreateTopicResponse) => void): Request<SNS.Types.CreateTopicResponse, AWSError>;
62 /**
63 * Deletes the endpoint for a device and mobile app from Amazon SNS. This action is idempotent. For more information, see Using Amazon SNS Mobile Push Notifications. When you delete an endpoint that is also subscribed to a topic, then you must also unsubscribe the endpoint from the topic.
64 */
65 deleteEndpoint(params: SNS.Types.DeleteEndpointInput, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
66 /**
67 * Deletes the endpoint for a device and mobile app from Amazon SNS. This action is idempotent. For more information, see Using Amazon SNS Mobile Push Notifications. When you delete an endpoint that is also subscribed to a topic, then you must also unsubscribe the endpoint from the topic.
68 */
69 deleteEndpoint(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
70 /**
71 * Deletes a platform application object for one of the supported push notification services, such as APNS and FCM. For more information, see Using Amazon SNS Mobile Push Notifications.
72 */
73 deletePlatformApplication(params: SNS.Types.DeletePlatformApplicationInput, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
74 /**
75 * Deletes a platform application object for one of the supported push notification services, such as APNS and FCM. For more information, see Using Amazon SNS Mobile Push Notifications.
76 */
77 deletePlatformApplication(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
78 /**
79 * Deletes a topic and all its subscriptions. Deleting a topic might prevent some messages previously sent to the topic from being delivered to subscribers. This action is idempotent, so deleting a topic that does not exist does not result in an error.
80 */
81 deleteTopic(params: SNS.Types.DeleteTopicInput, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
82 /**
83 * Deletes a topic and all its subscriptions. Deleting a topic might prevent some messages previously sent to the topic from being delivered to subscribers. This action is idempotent, so deleting a topic that does not exist does not result in an error.
84 */
85 deleteTopic(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
86 /**
87 * Retrieves the endpoint attributes for a device on one of the supported push notification services, such as FCM and APNS. For more information, see Using Amazon SNS Mobile Push Notifications.
88 */
89 getEndpointAttributes(params: SNS.Types.GetEndpointAttributesInput, callback?: (err: AWSError, data: SNS.Types.GetEndpointAttributesResponse) => void): Request<SNS.Types.GetEndpointAttributesResponse, AWSError>;
90 /**
91 * Retrieves the endpoint attributes for a device on one of the supported push notification services, such as FCM and APNS. For more information, see Using Amazon SNS Mobile Push Notifications.
92 */
93 getEndpointAttributes(callback?: (err: AWSError, data: SNS.Types.GetEndpointAttributesResponse) => void): Request<SNS.Types.GetEndpointAttributesResponse, AWSError>;
94 /**
95 * Retrieves the attributes of the platform application object for the supported push notification services, such as APNS and FCM. For more information, see Using Amazon SNS Mobile Push Notifications.
96 */
97 getPlatformApplicationAttributes(params: SNS.Types.GetPlatformApplicationAttributesInput, callback?: (err: AWSError, data: SNS.Types.GetPlatformApplicationAttributesResponse) => void): Request<SNS.Types.GetPlatformApplicationAttributesResponse, AWSError>;
98 /**
99 * Retrieves the attributes of the platform application object for the supported push notification services, such as APNS and FCM. For more information, see Using Amazon SNS Mobile Push Notifications.
100 */
101 getPlatformApplicationAttributes(callback?: (err: AWSError, data: SNS.Types.GetPlatformApplicationAttributesResponse) => void): Request<SNS.Types.GetPlatformApplicationAttributesResponse, AWSError>;
102 /**
103 * Returns the settings for sending SMS messages from your account. These settings are set with the SetSMSAttributes action.
104 */
105 getSMSAttributes(params: SNS.Types.GetSMSAttributesInput, callback?: (err: AWSError, data: SNS.Types.GetSMSAttributesResponse) => void): Request<SNS.Types.GetSMSAttributesResponse, AWSError>;
106 /**
107 * Returns the settings for sending SMS messages from your account. These settings are set with the SetSMSAttributes action.
108 */
109 getSMSAttributes(callback?: (err: AWSError, data: SNS.Types.GetSMSAttributesResponse) => void): Request<SNS.Types.GetSMSAttributesResponse, AWSError>;
110 /**
111 * Returns all of the properties of a subscription.
112 */
113 getSubscriptionAttributes(params: SNS.Types.GetSubscriptionAttributesInput, callback?: (err: AWSError, data: SNS.Types.GetSubscriptionAttributesResponse) => void): Request<SNS.Types.GetSubscriptionAttributesResponse, AWSError>;
114 /**
115 * Returns all of the properties of a subscription.
116 */
117 getSubscriptionAttributes(callback?: (err: AWSError, data: SNS.Types.GetSubscriptionAttributesResponse) => void): Request<SNS.Types.GetSubscriptionAttributesResponse, AWSError>;
118 /**
119 * Returns all of the properties of a topic. Topic properties returned might differ based on the authorization of the user.
120 */
121 getTopicAttributes(params: SNS.Types.GetTopicAttributesInput, callback?: (err: AWSError, data: SNS.Types.GetTopicAttributesResponse) => void): Request<SNS.Types.GetTopicAttributesResponse, AWSError>;
122 /**
123 * Returns all of the properties of a topic. Topic properties returned might differ based on the authorization of the user.
124 */
125 getTopicAttributes(callback?: (err: AWSError, data: SNS.Types.GetTopicAttributesResponse) => void): Request<SNS.Types.GetTopicAttributesResponse, AWSError>;
126 /**
127 * Lists the endpoints and endpoint attributes for devices in a supported push notification service, such as FCM and APNS. The results for ListEndpointsByPlatformApplication are paginated and return a limited list of endpoints, up to 100. If additional records are available after the first page results, then a NextToken string will be returned. To receive the next page, you call ListEndpointsByPlatformApplication again using the NextToken string received from the previous call. When there are no more records to return, NextToken will be null. For more information, see Using Amazon SNS Mobile Push Notifications. This action is throttled at 30 transactions per second (TPS).
128 */
129 listEndpointsByPlatformApplication(params: SNS.Types.ListEndpointsByPlatformApplicationInput, callback?: (err: AWSError, data: SNS.Types.ListEndpointsByPlatformApplicationResponse) => void): Request<SNS.Types.ListEndpointsByPlatformApplicationResponse, AWSError>;
130 /**
131 * Lists the endpoints and endpoint attributes for devices in a supported push notification service, such as FCM and APNS. The results for ListEndpointsByPlatformApplication are paginated and return a limited list of endpoints, up to 100. If additional records are available after the first page results, then a NextToken string will be returned. To receive the next page, you call ListEndpointsByPlatformApplication again using the NextToken string received from the previous call. When there are no more records to return, NextToken will be null. For more information, see Using Amazon SNS Mobile Push Notifications. This action is throttled at 30 transactions per second (TPS).
132 */
133 listEndpointsByPlatformApplication(callback?: (err: AWSError, data: SNS.Types.ListEndpointsByPlatformApplicationResponse) => void): Request<SNS.Types.ListEndpointsByPlatformApplicationResponse, AWSError>;
134 /**
135 * Returns a list of phone numbers that are opted out, meaning you cannot send SMS messages to them. The results for ListPhoneNumbersOptedOut are paginated, and each page returns up to 100 phone numbers. If additional phone numbers are available after the first page of results, then a NextToken string will be returned. To receive the next page, you call ListPhoneNumbersOptedOut again using the NextToken string received from the previous call. When there are no more records to return, NextToken will be null.
136 */
137 listPhoneNumbersOptedOut(params: SNS.Types.ListPhoneNumbersOptedOutInput, callback?: (err: AWSError, data: SNS.Types.ListPhoneNumbersOptedOutResponse) => void): Request<SNS.Types.ListPhoneNumbersOptedOutResponse, AWSError>;
138 /**
139 * Returns a list of phone numbers that are opted out, meaning you cannot send SMS messages to them. The results for ListPhoneNumbersOptedOut are paginated, and each page returns up to 100 phone numbers. If additional phone numbers are available after the first page of results, then a NextToken string will be returned. To receive the next page, you call ListPhoneNumbersOptedOut again using the NextToken string received from the previous call. When there are no more records to return, NextToken will be null.
140 */
141 listPhoneNumbersOptedOut(callback?: (err: AWSError, data: SNS.Types.ListPhoneNumbersOptedOutResponse) => void): Request<SNS.Types.ListPhoneNumbersOptedOutResponse, AWSError>;
142 /**
143 * Lists the platform application objects for the supported push notification services, such as APNS and FCM. The results for ListPlatformApplications are paginated and return a limited list of applications, up to 100. If additional records are available after the first page results, then a NextToken string will be returned. To receive the next page, you call ListPlatformApplications using the NextToken string received from the previous call. When there are no more records to return, NextToken will be null. For more information, see Using Amazon SNS Mobile Push Notifications. This action is throttled at 15 transactions per second (TPS).
144 */
145 listPlatformApplications(params: SNS.Types.ListPlatformApplicationsInput, callback?: (err: AWSError, data: SNS.Types.ListPlatformApplicationsResponse) => void): Request<SNS.Types.ListPlatformApplicationsResponse, AWSError>;
146 /**
147 * Lists the platform application objects for the supported push notification services, such as APNS and FCM. The results for ListPlatformApplications are paginated and return a limited list of applications, up to 100. If additional records are available after the first page results, then a NextToken string will be returned. To receive the next page, you call ListPlatformApplications using the NextToken string received from the previous call. When there are no more records to return, NextToken will be null. For more information, see Using Amazon SNS Mobile Push Notifications. This action is throttled at 15 transactions per second (TPS).
148 */
149 listPlatformApplications(callback?: (err: AWSError, data: SNS.Types.ListPlatformApplicationsResponse) => void): Request<SNS.Types.ListPlatformApplicationsResponse, AWSError>;
150 /**
151 * Returns a list of the requester's subscriptions. Each call returns a limited list of subscriptions, up to 100. If there are more subscriptions, a NextToken is also returned. Use the NextToken parameter in a new ListSubscriptions call to get further results. This action is throttled at 30 transactions per second (TPS).
152 */
153 listSubscriptions(params: SNS.Types.ListSubscriptionsInput, callback?: (err: AWSError, data: SNS.Types.ListSubscriptionsResponse) => void): Request<SNS.Types.ListSubscriptionsResponse, AWSError>;
154 /**
155 * Returns a list of the requester's subscriptions. Each call returns a limited list of subscriptions, up to 100. If there are more subscriptions, a NextToken is also returned. Use the NextToken parameter in a new ListSubscriptions call to get further results. This action is throttled at 30 transactions per second (TPS).
156 */
157 listSubscriptions(callback?: (err: AWSError, data: SNS.Types.ListSubscriptionsResponse) => void): Request<SNS.Types.ListSubscriptionsResponse, AWSError>;
158 /**
159 * Returns a list of the subscriptions to a specific topic. Each call returns a limited list of subscriptions, up to 100. If there are more subscriptions, a NextToken is also returned. Use the NextToken parameter in a new ListSubscriptionsByTopic call to get further results. This action is throttled at 30 transactions per second (TPS).
160 */
161 listSubscriptionsByTopic(params: SNS.Types.ListSubscriptionsByTopicInput, callback?: (err: AWSError, data: SNS.Types.ListSubscriptionsByTopicResponse) => void): Request<SNS.Types.ListSubscriptionsByTopicResponse, AWSError>;
162 /**
163 * Returns a list of the subscriptions to a specific topic. Each call returns a limited list of subscriptions, up to 100. If there are more subscriptions, a NextToken is also returned. Use the NextToken parameter in a new ListSubscriptionsByTopic call to get further results. This action is throttled at 30 transactions per second (TPS).
164 */
165 listSubscriptionsByTopic(callback?: (err: AWSError, data: SNS.Types.ListSubscriptionsByTopicResponse) => void): Request<SNS.Types.ListSubscriptionsByTopicResponse, AWSError>;
166 /**
167 * List all tags added to the specified Amazon SNS topic. For an overview, see Amazon SNS Tags in the Amazon Simple Notification Service Developer Guide.
168 */
169 listTagsForResource(params: SNS.Types.ListTagsForResourceRequest, callback?: (err: AWSError, data: SNS.Types.ListTagsForResourceResponse) => void): Request<SNS.Types.ListTagsForResourceResponse, AWSError>;
170 /**
171 * List all tags added to the specified Amazon SNS topic. For an overview, see Amazon SNS Tags in the Amazon Simple Notification Service Developer Guide.
172 */
173 listTagsForResource(callback?: (err: AWSError, data: SNS.Types.ListTagsForResourceResponse) => void): Request<SNS.Types.ListTagsForResourceResponse, AWSError>;
174 /**
175 * Returns a list of the requester's topics. Each call returns a limited list of topics, up to 100. If there are more topics, a NextToken is also returned. Use the NextToken parameter in a new ListTopics call to get further results. This action is throttled at 30 transactions per second (TPS).
176 */
177 listTopics(params: SNS.Types.ListTopicsInput, callback?: (err: AWSError, data: SNS.Types.ListTopicsResponse) => void): Request<SNS.Types.ListTopicsResponse, AWSError>;
178 /**
179 * Returns a list of the requester's topics. Each call returns a limited list of topics, up to 100. If there are more topics, a NextToken is also returned. Use the NextToken parameter in a new ListTopics call to get further results. This action is throttled at 30 transactions per second (TPS).
180 */
181 listTopics(callback?: (err: AWSError, data: SNS.Types.ListTopicsResponse) => void): Request<SNS.Types.ListTopicsResponse, AWSError>;
182 /**
183 * Use this request to opt in a phone number that is opted out, which enables you to resume sending SMS messages to the number. You can opt in a phone number only once every 30 days.
184 */
185 optInPhoneNumber(params: SNS.Types.OptInPhoneNumberInput, callback?: (err: AWSError, data: SNS.Types.OptInPhoneNumberResponse) => void): Request<SNS.Types.OptInPhoneNumberResponse, AWSError>;
186 /**
187 * Use this request to opt in a phone number that is opted out, which enables you to resume sending SMS messages to the number. You can opt in a phone number only once every 30 days.
188 */
189 optInPhoneNumber(callback?: (err: AWSError, data: SNS.Types.OptInPhoneNumberResponse) => void): Request<SNS.Types.OptInPhoneNumberResponse, AWSError>;
190 /**
191 * Sends a message to an Amazon SNS topic or sends a text message (SMS message) directly to a phone number. 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 has been saved and Amazon SNS will attempt to deliver it shortly. To use the Publish action for sending 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.
192 */
193 publish(params: SNS.Types.PublishInput, callback?: (err: AWSError, data: SNS.Types.PublishResponse) => void): Request<SNS.Types.PublishResponse, AWSError>;
194 /**
195 * Sends a message to an Amazon SNS topic or sends a text message (SMS message) directly to a phone number. 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 has been saved and Amazon SNS will attempt to deliver it shortly. To use the Publish action for sending 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.
196 */
197 publish(callback?: (err: AWSError, data: SNS.Types.PublishResponse) => void): Request<SNS.Types.PublishResponse, AWSError>;
198 /**
199 * Removes a statement from a topic's access control policy.
200 */
201 removePermission(params: SNS.Types.RemovePermissionInput, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
202 /**
203 * Removes a statement from a topic's access control policy.
204 */
205 removePermission(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
206 /**
207 * Sets the attributes for an endpoint for a device on one of the supported push notification services, such as FCM and APNS. For more information, see Using Amazon SNS Mobile Push Notifications.
208 */
209 setEndpointAttributes(params: SNS.Types.SetEndpointAttributesInput, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
210 /**
211 * Sets the attributes for an endpoint for a device on one of the supported push notification services, such as FCM and APNS. For more information, see Using Amazon SNS Mobile Push Notifications.
212 */
213 setEndpointAttributes(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
214 /**
215 * Sets the attributes of the platform application object for the supported push notification services, such as APNS and FCM. For more information, see Using Amazon SNS Mobile Push Notifications. For information on configuring attributes for message delivery status, see Using Amazon SNS Application Attributes for Message Delivery Status.
216 */
217 setPlatformApplicationAttributes(params: SNS.Types.SetPlatformApplicationAttributesInput, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
218 /**
219 * Sets the attributes of the platform application object for the supported push notification services, such as APNS and FCM. For more information, see Using Amazon SNS Mobile Push Notifications. For information on configuring attributes for message delivery status, see Using Amazon SNS Application Attributes for Message Delivery Status.
220 */
221 setPlatformApplicationAttributes(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
222 /**
223 * Use this request to set the default settings for sending SMS messages and receiving daily SMS usage reports. You can override some of these settings for a single message when you use the Publish action with the MessageAttributes.entry.N parameter. For more information, see Sending an SMS Message in the Amazon SNS Developer Guide.
224 */
225 setSMSAttributes(params: SNS.Types.SetSMSAttributesInput, callback?: (err: AWSError, data: SNS.Types.SetSMSAttributesResponse) => void): Request<SNS.Types.SetSMSAttributesResponse, AWSError>;
226 /**
227 * Use this request to set the default settings for sending SMS messages and receiving daily SMS usage reports. You can override some of these settings for a single message when you use the Publish action with the MessageAttributes.entry.N parameter. For more information, see Sending an SMS Message in the Amazon SNS Developer Guide.
228 */
229 setSMSAttributes(callback?: (err: AWSError, data: SNS.Types.SetSMSAttributesResponse) => void): Request<SNS.Types.SetSMSAttributesResponse, AWSError>;
230 /**
231 * Allows a subscription owner to set an attribute of the subscription to a new value.
232 */
233 setSubscriptionAttributes(params: SNS.Types.SetSubscriptionAttributesInput, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
234 /**
235 * Allows a subscription owner to set an attribute of the subscription to a new value.
236 */
237 setSubscriptionAttributes(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
238 /**
239 * Allows a topic owner to set an attribute of the topic to a new value.
240 */
241 setTopicAttributes(params: SNS.Types.SetTopicAttributesInput, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
242 /**
243 * Allows a topic owner to set an attribute of the topic to a new value.
244 */
245 setTopicAttributes(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
246 /**
247 * Prepares to subscribe an endpoint by sending the endpoint a confirmation message. To actually create a subscription, the endpoint owner must call the ConfirmSubscription action with the token from the confirmation message. Confirmation tokens are valid for three days. This action is throttled at 100 transactions per second (TPS).
248 */
249 subscribe(params: SNS.Types.SubscribeInput, callback?: (err: AWSError, data: SNS.Types.SubscribeResponse) => void): Request<SNS.Types.SubscribeResponse, AWSError>;
250 /**
251 * Prepares to subscribe an endpoint by sending the endpoint a confirmation message. To actually create a subscription, the endpoint owner must call the ConfirmSubscription action with the token from the confirmation message. Confirmation tokens are valid for three days. This action is throttled at 100 transactions per second (TPS).
252 */
253 subscribe(callback?: (err: AWSError, data: SNS.Types.SubscribeResponse) => void): Request<SNS.Types.SubscribeResponse, AWSError>;
254 /**
255 * Add tags to the specified Amazon SNS topic. For an overview, see Amazon SNS Tags in the Amazon SNS Developer Guide. When you use topic tags, keep the following guidelines in mind: Adding more than 50 tags to a topic isn't recommended. Tags don't have any semantic meaning. Amazon SNS interprets tags as character strings. Tags are case-sensitive. A new tag with a key identical to that of an existing tag overwrites the existing tag. Tagging actions are limited to 10 TPS per AWS account, per AWS region. If your application requires a higher throughput, file a technical support request.
256 */
257 tagResource(params: SNS.Types.TagResourceRequest, callback?: (err: AWSError, data: SNS.Types.TagResourceResponse) => void): Request<SNS.Types.TagResourceResponse, AWSError>;
258 /**
259 * Add tags to the specified Amazon SNS topic. For an overview, see Amazon SNS Tags in the Amazon SNS Developer Guide. When you use topic tags, keep the following guidelines in mind: Adding more than 50 tags to a topic isn't recommended. Tags don't have any semantic meaning. Amazon SNS interprets tags as character strings. Tags are case-sensitive. A new tag with a key identical to that of an existing tag overwrites the existing tag. Tagging actions are limited to 10 TPS per AWS account, per AWS region. If your application requires a higher throughput, file a technical support request.
260 */
261 tagResource(callback?: (err: AWSError, data: SNS.Types.TagResourceResponse) => void): Request<SNS.Types.TagResourceResponse, AWSError>;
262 /**
263 * Deletes a subscription. If the subscription requires authentication for deletion, only the owner of the subscription or the topic's owner can unsubscribe, and an AWS signature is required. If the Unsubscribe call does not require authentication and the requester is not the subscription owner, a final cancellation message is delivered to the endpoint, so that the endpoint owner can easily resubscribe to the topic if the Unsubscribe request was unintended. This action is throttled at 100 transactions per second (TPS).
264 */
265 unsubscribe(params: SNS.Types.UnsubscribeInput, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
266 /**
267 * Deletes a subscription. If the subscription requires authentication for deletion, only the owner of the subscription or the topic's owner can unsubscribe, and an AWS signature is required. If the Unsubscribe call does not require authentication and the requester is not the subscription owner, a final cancellation message is delivered to the endpoint, so that the endpoint owner can easily resubscribe to the topic if the Unsubscribe request was unintended. This action is throttled at 100 transactions per second (TPS).
268 */
269 unsubscribe(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
270 /**
271 * Remove tags from the specified Amazon SNS topic. For an overview, see Amazon SNS Tags in the Amazon SNS Developer Guide.
272 */
273 untagResource(params: SNS.Types.UntagResourceRequest, callback?: (err: AWSError, data: SNS.Types.UntagResourceResponse) => void): Request<SNS.Types.UntagResourceResponse, AWSError>;
274 /**
275 * Remove tags from the specified Amazon SNS topic. For an overview, see Amazon SNS Tags in the Amazon SNS Developer Guide.
276 */
277 untagResource(callback?: (err: AWSError, data: SNS.Types.UntagResourceResponse) => void): Request<SNS.Types.UntagResourceResponse, AWSError>;
278}
279declare namespace SNS {
280 export type ActionsList = action[];
281 export interface AddPermissionInput {
282 /**
283 * The ARN of the topic whose access control policy you wish to modify.
284 */
285 TopicArn: topicARN;
286 /**
287 * A unique identifier for the new policy statement.
288 */
289 Label: label;
290 /**
291 * The AWS account IDs of the users (principals) who will be given access to the specified actions. The users must have AWS accounts, but do not need to be signed up for this service.
292 */
293 AWSAccountId: DelegatesList;
294 /**
295 * The action you want to allow for the specified principal(s). Valid values: Any Amazon SNS action name, for example Publish.
296 */
297 ActionName: ActionsList;
298 }
299 export type AmazonResourceName = string;
300 export type Binary = Buffer|Uint8Array|Blob|string;
301 export interface CheckIfPhoneNumberIsOptedOutInput {
302 /**
303 * The phone number for which you want to check the opt out status.
304 */
305 phoneNumber: PhoneNumber;
306 }
307 export interface CheckIfPhoneNumberIsOptedOutResponse {
308 /**
309 * Indicates whether the phone number is opted out: true – The phone number is opted out, meaning you cannot publish SMS messages to it. false – The phone number is opted in, meaning you can publish SMS messages to it.
310 */
311 isOptedOut?: boolean;
312 }
313 export interface ConfirmSubscriptionInput {
314 /**
315 * The ARN of the topic for which you wish to confirm a subscription.
316 */
317 TopicArn: topicARN;
318 /**
319 * Short-lived token sent to an endpoint during the Subscribe action.
320 */
321 Token: token;
322 /**
323 * Disallows unauthenticated unsubscribes of the subscription. If the value of this parameter is true and the request has an AWS signature, then only the topic owner and the subscription owner can unsubscribe the endpoint. The unsubscribe action requires AWS authentication.
324 */
325 AuthenticateOnUnsubscribe?: authenticateOnUnsubscribe;
326 }
327 export interface ConfirmSubscriptionResponse {
328 /**
329 * The ARN of the created subscription.
330 */
331 SubscriptionArn?: subscriptionARN;
332 }
333 export interface CreateEndpointResponse {
334 /**
335 * EndpointArn returned from CreateEndpoint action.
336 */
337 EndpointArn?: String;
338 }
339 export interface CreatePlatformApplicationInput {
340 /**
341 * 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.
342 */
343 Name: String;
344 /**
345 * The following platforms are supported: ADM (Amazon Device Messaging), APNS (Apple Push Notification Service), APNS_SANDBOX, and FCM (Firebase Cloud Messaging).
346 */
347 Platform: String;
348 /**
349 * For a list of attributes, see SetPlatformApplicationAttributes
350 */
351 Attributes: MapStringToString;
352 }
353 export interface CreatePlatformApplicationResponse {
354 /**
355 * PlatformApplicationArn is returned.
356 */
357 PlatformApplicationArn?: String;
358 }
359 export interface CreatePlatformEndpointInput {
360 /**
361 * PlatformApplicationArn returned from CreatePlatformApplication is used to create a an endpoint.
362 */
363 PlatformApplicationArn: String;
364 /**
365 * 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 FCM or ADM, the device token equivalent is called the registration ID.
366 */
367 Token: String;
368 /**
369 * 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.
370 */
371 CustomUserData?: String;
372 /**
373 * For a list of attributes, see SetEndpointAttributes.
374 */
375 Attributes?: MapStringToString;
376 }
377 export interface CreateTopicInput {
378 /**
379 * The name of the topic you want to create. Constraints: Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long.
380 */
381 Name: topicName;
382 /**
383 * A map of attributes with their corresponding values. The following lists the names, descriptions, and values of the special request parameters that the CreateTopic action uses: DeliveryPolicy – The policy that defines how Amazon SNS retries failed deliveries to HTTP/S endpoints. DisplayName – The display name to use for a topic with SMS subscriptions. Policy – The policy that defines who can access your topic. By default, only the topic owner can publish or subscribe to the topic. The following attribute applies only to server-side-encryption: KmsMasterKeyId - The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key Terms. For more examples, see KeyId in the AWS Key Management Service API Reference.
384 */
385 Attributes?: TopicAttributesMap;
386 /**
387 * The list of tags to add to a new topic. To be able to tag a topic on creation, you must have the sns:CreateTopic and sns:TagResource permissions.
388 */
389 Tags?: TagList;
390 }
391 export interface CreateTopicResponse {
392 /**
393 * The Amazon Resource Name (ARN) assigned to the created topic.
394 */
395 TopicArn?: topicARN;
396 }
397 export type DelegatesList = delegate[];
398 export interface DeleteEndpointInput {
399 /**
400 * EndpointArn of endpoint to delete.
401 */
402 EndpointArn: String;
403 }
404 export interface DeletePlatformApplicationInput {
405 /**
406 * PlatformApplicationArn of platform application object to delete.
407 */
408 PlatformApplicationArn: String;
409 }
410 export interface DeleteTopicInput {
411 /**
412 * The ARN of the topic you want to delete.
413 */
414 TopicArn: topicARN;
415 }
416 export interface Endpoint {
417 /**
418 * EndpointArn for mobile app and device.
419 */
420 EndpointArn?: String;
421 /**
422 * Attributes for endpoint.
423 */
424 Attributes?: MapStringToString;
425 }
426 export interface GetEndpointAttributesInput {
427 /**
428 * EndpointArn for GetEndpointAttributes input.
429 */
430 EndpointArn: String;
431 }
432 export interface GetEndpointAttributesResponse {
433 /**
434 * Attributes include the following: CustomUserData – 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. Enabled – flag that enables/disables delivery to the endpoint. Amazon SNS will set this to false when a notification service indicates to Amazon SNS that the endpoint is invalid. Users can set it back to true, typically after updating Token. Token – device token, also referred to as a registration id, for an app and mobile device. This is returned from the notification service when an app and mobile device are registered with the notification service. The device token for the iOS platform is returned in lowercase.
435 */
436 Attributes?: MapStringToString;
437 }
438 export interface GetPlatformApplicationAttributesInput {
439 /**
440 * PlatformApplicationArn for GetPlatformApplicationAttributesInput.
441 */
442 PlatformApplicationArn: String;
443 }
444 export interface GetPlatformApplicationAttributesResponse {
445 /**
446 * Attributes include the following: EventEndpointCreated – Topic ARN to which EndpointCreated event notifications should be sent. EventEndpointDeleted – Topic ARN to which EndpointDeleted event notifications should be sent. EventEndpointUpdated – Topic ARN to which EndpointUpdate event notifications should be sent. EventDeliveryFailure – Topic ARN to which DeliveryFailure event notifications should be sent upon Direct Publish delivery failure (permanent) to one of the application's endpoints.
447 */
448 Attributes?: MapStringToString;
449 }
450 export interface GetSMSAttributesInput {
451 /**
452 * A list of the individual attribute names, such as MonthlySpendLimit, for which you want values. For all attribute names, see SetSMSAttributes. If you don't use this parameter, Amazon SNS returns all SMS attributes.
453 */
454 attributes?: ListString;
455 }
456 export interface GetSMSAttributesResponse {
457 /**
458 * The SMS attribute names and their values.
459 */
460 attributes?: MapStringToString;
461 }
462 export interface GetSubscriptionAttributesInput {
463 /**
464 * The ARN of the subscription whose properties you want to get.
465 */
466 SubscriptionArn: subscriptionARN;
467 }
468 export interface GetSubscriptionAttributesResponse {
469 /**
470 * A map of the subscription's attributes. Attributes in this map include the following: ConfirmationWasAuthenticated – true if the subscription confirmation request was authenticated. DeliveryPolicy – The JSON serialization of the subscription's delivery policy. EffectiveDeliveryPolicy – The JSON serialization of the effective delivery policy that takes into account the topic delivery policy and account system defaults. FilterPolicy – The filter policy JSON that is assigned to the subscription. Owner – The AWS account ID of the subscription's owner. PendingConfirmation – true if the subscription hasn't been confirmed. To confirm a pending subscription, call the ConfirmSubscription action with a confirmation token. RawMessageDelivery – true if raw message delivery is enabled for the subscription. Raw messages are free of JSON formatting and can be sent to HTTP/S and Amazon SQS endpoints. RedrivePolicy – When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. Messages that can't be delivered due to client errors (for example, when the subscribed endpoint is unreachable) or server errors (for example, when the service that powers the subscribed endpoint becomes unavailable) are held in the dead-letter queue for further analysis or reprocessing. SubscriptionArn – The subscription's ARN. TopicArn – The topic ARN that the subscription is associated with.
471 */
472 Attributes?: SubscriptionAttributesMap;
473 }
474 export interface GetTopicAttributesInput {
475 /**
476 * The ARN of the topic whose properties you want to get.
477 */
478 TopicArn: topicARN;
479 }
480 export interface GetTopicAttributesResponse {
481 /**
482 * A map of the topic's attributes. Attributes in this map include the following: DeliveryPolicy – The JSON serialization of the topic's delivery policy. DisplayName – The human-readable name used in the From field for notifications to email and email-json endpoints. Owner – The AWS account ID of the topic's owner. Policy – The JSON serialization of the topic's access control policy. SubscriptionsConfirmed – The number of confirmed subscriptions for the topic. SubscriptionsDeleted – The number of deleted subscriptions for the topic. SubscriptionsPending – The number of subscriptions pending confirmation for the topic. TopicArn – The topic's ARN. EffectiveDeliveryPolicy – Yhe JSON serialization of the effective delivery policy, taking system defaults into account. The following attribute applies only to server-side-encryption: KmsMasterKeyId - The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key Terms. For more examples, see KeyId in the AWS Key Management Service API Reference.
483 */
484 Attributes?: TopicAttributesMap;
485 }
486 export interface ListEndpointsByPlatformApplicationInput {
487 /**
488 * PlatformApplicationArn for ListEndpointsByPlatformApplicationInput action.
489 */
490 PlatformApplicationArn: String;
491 /**
492 * NextToken string is used when calling ListEndpointsByPlatformApplication action to retrieve additional records that are available after the first page results.
493 */
494 NextToken?: String;
495 }
496 export interface ListEndpointsByPlatformApplicationResponse {
497 /**
498 * Endpoints returned for ListEndpointsByPlatformApplication action.
499 */
500 Endpoints?: ListOfEndpoints;
501 /**
502 * NextToken string is returned when calling ListEndpointsByPlatformApplication action if additional records are available after the first page results.
503 */
504 NextToken?: String;
505 }
506 export type ListOfEndpoints = Endpoint[];
507 export type ListOfPlatformApplications = PlatformApplication[];
508 export interface ListPhoneNumbersOptedOutInput {
509 /**
510 * A NextToken string is used when you call the ListPhoneNumbersOptedOut action to retrieve additional records that are available after the first page of results.
511 */
512 nextToken?: string;
513 }
514 export interface ListPhoneNumbersOptedOutResponse {
515 /**
516 * A list of phone numbers that are opted out of receiving SMS messages. The list is paginated, and each page can contain up to 100 phone numbers.
517 */
518 phoneNumbers?: PhoneNumberList;
519 /**
520 * A NextToken string is returned when you call the ListPhoneNumbersOptedOut action if additional records are available after the first page of results.
521 */
522 nextToken?: string;
523 }
524 export interface ListPlatformApplicationsInput {
525 /**
526 * NextToken string is used when calling ListPlatformApplications action to retrieve additional records that are available after the first page results.
527 */
528 NextToken?: String;
529 }
530 export interface ListPlatformApplicationsResponse {
531 /**
532 * Platform applications returned when calling ListPlatformApplications action.
533 */
534 PlatformApplications?: ListOfPlatformApplications;
535 /**
536 * NextToken string is returned when calling ListPlatformApplications action if additional records are available after the first page results.
537 */
538 NextToken?: String;
539 }
540 export type ListString = String[];
541 export interface ListSubscriptionsByTopicInput {
542 /**
543 * The ARN of the topic for which you wish to find subscriptions.
544 */
545 TopicArn: topicARN;
546 /**
547 * Token returned by the previous ListSubscriptionsByTopic request.
548 */
549 NextToken?: nextToken;
550 }
551 export interface ListSubscriptionsByTopicResponse {
552 /**
553 * A list of subscriptions.
554 */
555 Subscriptions?: SubscriptionsList;
556 /**
557 * Token to pass along to the next ListSubscriptionsByTopic request. This element is returned if there are more subscriptions to retrieve.
558 */
559 NextToken?: nextToken;
560 }
561 export interface ListSubscriptionsInput {
562 /**
563 * Token returned by the previous ListSubscriptions request.
564 */
565 NextToken?: nextToken;
566 }
567 export interface ListSubscriptionsResponse {
568 /**
569 * A list of subscriptions.
570 */
571 Subscriptions?: SubscriptionsList;
572 /**
573 * Token to pass along to the next ListSubscriptions request. This element is returned if there are more subscriptions to retrieve.
574 */
575 NextToken?: nextToken;
576 }
577 export interface ListTagsForResourceRequest {
578 /**
579 * The ARN of the topic for which to list tags.
580 */
581 ResourceArn: AmazonResourceName;
582 }
583 export interface ListTagsForResourceResponse {
584 /**
585 * The tags associated with the specified topic.
586 */
587 Tags?: TagList;
588 }
589 export interface ListTopicsInput {
590 /**
591 * Token returned by the previous ListTopics request.
592 */
593 NextToken?: nextToken;
594 }
595 export interface ListTopicsResponse {
596 /**
597 * A list of topic ARNs.
598 */
599 Topics?: TopicsList;
600 /**
601 * Token to pass along to the next ListTopics request. This element is returned if there are additional topics to retrieve.
602 */
603 NextToken?: nextToken;
604 }
605 export type MapStringToString = {[key: string]: String};
606 export type MessageAttributeMap = {[key: string]: MessageAttributeValue};
607 export interface MessageAttributeValue {
608 /**
609 * Amazon SNS supports the following logical data types: String, String.Array, Number, and Binary. For more information, see Message Attribute Data Types.
610 */
611 DataType: String;
612 /**
613 * Strings are Unicode with UTF8 binary encoding. For a list of code values, see ASCII Printable Characters.
614 */
615 StringValue?: String;
616 /**
617 * Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.
618 */
619 BinaryValue?: Binary;
620 }
621 export interface OptInPhoneNumberInput {
622 /**
623 * The phone number to opt in.
624 */
625 phoneNumber: PhoneNumber;
626 }
627 export interface OptInPhoneNumberResponse {
628 }
629 export type PhoneNumber = string;
630 export type PhoneNumberList = PhoneNumber[];
631 export interface PlatformApplication {
632 /**
633 * PlatformApplicationArn for platform application object.
634 */
635 PlatformApplicationArn?: String;
636 /**
637 * Attributes for platform application object.
638 */
639 Attributes?: MapStringToString;
640 }
641 export interface PublishInput {
642 /**
643 * The topic you want to publish to. If you don't specify a value for the TopicArn parameter, you must specify a value for the PhoneNumber or TargetArn parameters.
644 */
645 TopicArn?: topicARN;
646 /**
647 * If you don't specify a value for the TargetArn parameter, you must specify a value for the PhoneNumber or TopicArn parameters.
648 */
649 TargetArn?: String;
650 /**
651 * The phone number to which you want to deliver an SMS message. Use E.164 format. If you don't specify a value for the PhoneNumber parameter, you must specify a value for the TargetArn or TopicArn parameters.
652 */
653 PhoneNumber?: String;
654 /**
655 * The message you want to send. If you are publishing to a topic and you want to send the same message to all transport protocols, include the text of the message as a String value. If you want to send different messages for each transport protocol, set the value of the MessageStructure parameter to json and use a JSON object for the Message parameter. Constraints: With the exception of SMS, messages must be UTF-8 encoded strings and at most 256 KB in size (262,144 bytes, not 262,144 characters). For SMS, each message can contain up to 140 characters. This character limit depends on the encoding schema. For example, an SMS message can contain 160 GSM characters, 140 ASCII characters, or 70 UCS-2 characters. If you publish a message that exceeds this size limit, Amazon SNS sends the message as multiple messages, each fitting within the size limit. Messages aren't truncated mid-word but are cut off at whole-word boundaries. The total size limit for a single SMS Publish action is 1,600 characters. JSON-specific constraints: Keys in the JSON object that correspond to supported transport protocols must have simple JSON string values. The values will be parsed (unescaped) before they are used in outgoing messages. Outbound notifications are JSON encoded (meaning that the characters will be reescaped for sending). Values have a minimum length of 0 (the empty string, "", is allowed). Values have a maximum length bounded by the overall message size (so, including multiple protocols may limit message sizes). Non-string values will cause the key to be ignored. Keys that do not correspond to supported transport protocols are ignored. Duplicate keys are not allowed. Failure to parse or validate any key or value in the message will cause the Publish call to return an error (no partial delivery).
656 */
657 Message: message;
658 /**
659 * Optional parameter to be used as the "Subject" line when the message is delivered to email endpoints. This field will also be included, if present, in the standard JSON messages delivered to other endpoints. Constraints: Subjects must be ASCII text that begins with a letter, number, or punctuation mark; must not include line breaks or control characters; and must be less than 100 characters long.
660 */
661 Subject?: subject;
662 /**
663 * Set MessageStructure to json if you want to send a different message for each protocol. For example, using one publish action, you can send a short message to your SMS subscribers and a longer message to your email subscribers. If you set MessageStructure to json, the value of the Message parameter must: be a syntactically valid JSON object; and contain at least a top-level JSON key of "default" with a value that is a string. You can define other top-level keys that define the message you want to send to a specific transport protocol (e.g., "http"). Valid value: json
664 */
665 MessageStructure?: messageStructure;
666 /**
667 * Message attributes for Publish action.
668 */
669 MessageAttributes?: MessageAttributeMap;
670 }
671 export interface PublishResponse {
672 /**
673 * Unique identifier assigned to the published message. Length Constraint: Maximum 100 characters
674 */
675 MessageId?: messageId;
676 }
677 export interface RemovePermissionInput {
678 /**
679 * The ARN of the topic whose access control policy you wish to modify.
680 */
681 TopicArn: topicARN;
682 /**
683 * The unique label of the statement you want to remove.
684 */
685 Label: label;
686 }
687 export interface SetEndpointAttributesInput {
688 /**
689 * EndpointArn used for SetEndpointAttributes action.
690 */
691 EndpointArn: String;
692 /**
693 * A map of the endpoint attributes. Attributes in this map include the following: CustomUserData – 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. Enabled – flag that enables/disables delivery to the endpoint. Amazon SNS will set this to false when a notification service indicates to Amazon SNS that the endpoint is invalid. Users can set it back to true, typically after updating Token. Token – device token, also referred to as a registration id, for an app and mobile device. This is returned from the notification service when an app and mobile device are registered with the notification service.
694 */
695 Attributes: MapStringToString;
696 }
697 export interface SetPlatformApplicationAttributesInput {
698 /**
699 * PlatformApplicationArn for SetPlatformApplicationAttributes action.
700 */
701 PlatformApplicationArn: String;
702 /**
703 * A map of the platform application attributes. Attributes in this map include the following: PlatformCredential – The credential received from the notification service. For APNS/APNS_SANDBOX, PlatformCredential is private key. For FCM, PlatformCredential is "API key". For ADM, PlatformCredential is "client secret". PlatformPrincipal – The principal received from the notification service. For APNS/APNS_SANDBOX, PlatformPrincipal is SSL certificate. For FCM, PlatformPrincipal is not applicable. For ADM, PlatformPrincipal is "client id". EventEndpointCreated – Topic ARN to which EndpointCreated event notifications should be sent. EventEndpointDeleted – Topic ARN to which EndpointDeleted event notifications should be sent. EventEndpointUpdated – Topic ARN to which EndpointUpdate event notifications should be sent. EventDeliveryFailure – Topic ARN to which DeliveryFailure event notifications should be sent upon Direct Publish delivery failure (permanent) to one of the application's endpoints. SuccessFeedbackRoleArn – IAM role ARN used to give Amazon SNS write access to use CloudWatch Logs on your behalf. FailureFeedbackRoleArn – IAM role ARN used to give Amazon SNS write access to use CloudWatch Logs on your behalf. SuccessFeedbackSampleRate – Sample rate percentage (0-100) of successfully delivered messages.
704 */
705 Attributes: MapStringToString;
706 }
707 export interface SetSMSAttributesInput {
708 /**
709 * The default settings for sending SMS messages from your account. You can set values for the following attribute names: MonthlySpendLimit – The maximum amount in USD that you are willing to spend each month to send SMS messages. When Amazon SNS determines that sending an SMS message would incur a cost that exceeds this limit, it stops sending SMS messages within minutes. Amazon SNS stops sending SMS messages within minutes of the limit being crossed. During that interval, if you continue to send SMS messages, you will incur costs that exceed your limit. By default, the spend limit is set to the maximum allowed by Amazon SNS. If you want to raise the limit, submit an SNS Limit Increase case. For New limit value, enter your desired monthly spend limit. In the Use Case Description field, explain that you are requesting an SMS monthly spend limit increase. DeliveryStatusIAMRole – The ARN of the IAM role that allows Amazon SNS to write logs about SMS deliveries in CloudWatch Logs. For each SMS message that you send, Amazon SNS writes a log that includes the message price, the success or failure status, the reason for failure (if the message failed), the message dwell time, and other information. DeliveryStatusSuccessSamplingRate – The percentage of successful SMS deliveries for which Amazon SNS will write logs in CloudWatch Logs. The value can be an integer from 0 - 100. For example, to write logs only for failed deliveries, set this value to 0. To write logs for 10% of your successful deliveries, set it to 10. DefaultSenderID – A string, such as your business brand, that is displayed as the sender on the receiving device. Support for sender IDs varies by country. The sender ID can be 1 - 11 alphanumeric characters, and it must contain at least one letter. DefaultSMSType – The type of SMS message that you will send by default. You can assign the following values: Promotional – (Default) Noncritical messages, such as marketing messages. Amazon SNS optimizes the message delivery to incur the lowest cost. Transactional – Critical messages that support customer transactions, such as one-time passcodes for multi-factor authentication. Amazon SNS optimizes the message delivery to achieve the highest reliability. UsageReportS3Bucket – The name of the Amazon S3 bucket to receive daily SMS usage reports from Amazon SNS. Each day, Amazon SNS will deliver a usage report as a CSV file to the bucket. The report includes the following information for each SMS message that was successfully delivered by your account: Time that the message was published (in UTC) Message ID Destination phone number Message type Delivery status Message price (in USD) Part number (a message is split into multiple parts if it is too long for a single message) Total number of parts To receive the report, the bucket must have a policy that allows the Amazon SNS service principle to perform the s3:PutObject and s3:GetBucketLocation actions. For an example bucket policy and usage report, see Monitoring SMS Activity in the Amazon SNS Developer Guide.
710 */
711 attributes: MapStringToString;
712 }
713 export interface SetSMSAttributesResponse {
714 }
715 export interface SetSubscriptionAttributesInput {
716 /**
717 * The ARN of the subscription to modify.
718 */
719 SubscriptionArn: subscriptionARN;
720 /**
721 * A map of attributes with their corresponding values. The following lists the names, descriptions, and values of the special request parameters that the SetTopicAttributes action uses: DeliveryPolicy – The policy that defines how Amazon SNS retries failed deliveries to HTTP/S endpoints. FilterPolicy – The simple JSON object that lets your subscriber receive only a subset of messages, rather than receiving every message published to the topic. RawMessageDelivery – When set to true, enables raw message delivery to Amazon SQS or HTTP/S endpoints. This eliminates the need for the endpoints to process JSON formatting, which is otherwise created for Amazon SNS metadata. RedrivePolicy – When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. Messages that can't be delivered due to client errors (for example, when the subscribed endpoint is unreachable) or server errors (for example, when the service that powers the subscribed endpoint becomes unavailable) are held in the dead-letter queue for further analysis or reprocessing.
722 */
723 AttributeName: attributeName;
724 /**
725 * The new value for the attribute in JSON format.
726 */
727 AttributeValue?: attributeValue;
728 }
729 export interface SetTopicAttributesInput {
730 /**
731 * The ARN of the topic to modify.
732 */
733 TopicArn: topicARN;
734 /**
735 * A map of attributes with their corresponding values. The following lists the names, descriptions, and values of the special request parameters that the SetTopicAttributes action uses: DeliveryPolicy – The policy that defines how Amazon SNS retries failed deliveries to HTTP/S endpoints. DisplayName – The display name to use for a topic with SMS subscriptions. Policy – The policy that defines who can access your topic. By default, only the topic owner can publish or subscribe to the topic. The following attribute applies only to server-side-encryption: KmsMasterKeyId - The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key Terms. For more examples, see KeyId in the AWS Key Management Service API Reference.
736 */
737 AttributeName: attributeName;
738 /**
739 * The new value for the attribute.
740 */
741 AttributeValue?: attributeValue;
742 }
743 export type String = string;
744 export interface SubscribeInput {
745 /**
746 * The ARN of the topic you want to subscribe to.
747 */
748 TopicArn: topicARN;
749 /**
750 * The protocol you want to use. Supported protocols include: http – delivery of JSON-encoded message via HTTP POST https – delivery of JSON-encoded message via HTTPS POST email – delivery of message via SMTP email-json – delivery of JSON-encoded message via SMTP sms – delivery of message via SMS sqs – delivery of JSON-encoded message to an Amazon SQS queue application – delivery of JSON-encoded message to an EndpointArn for a mobile app and device. lambda – delivery of JSON-encoded message to an Amazon Lambda function.
751 */
752 Protocol: protocol;
753 /**
754 * The endpoint that you want to receive notifications. Endpoints vary by protocol: For the http protocol, the endpoint is an URL beginning with http:// For the https protocol, the endpoint is a URL beginning with https:// For the email protocol, the endpoint is an email address For the email-json protocol, the endpoint is an email address For the sms protocol, the endpoint is a phone number of an SMS-enabled device For the sqs protocol, the endpoint is the ARN of an Amazon SQS queue For the application protocol, the endpoint is the EndpointArn of a mobile app and device. For the lambda protocol, the endpoint is the ARN of an Amazon Lambda function.
755 */
756 Endpoint?: endpoint;
757 /**
758 * A map of attributes with their corresponding values. The following lists the names, descriptions, and values of the special request parameters that the SetTopicAttributes action uses: DeliveryPolicy – The policy that defines how Amazon SNS retries failed deliveries to HTTP/S endpoints. FilterPolicy – The simple JSON object that lets your subscriber receive only a subset of messages, rather than receiving every message published to the topic. RawMessageDelivery – When set to true, enables raw message delivery to Amazon SQS or HTTP/S endpoints. This eliminates the need for the endpoints to process JSON formatting, which is otherwise created for Amazon SNS metadata. RedrivePolicy – When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. Messages that can't be delivered due to client errors (for example, when the subscribed endpoint is unreachable) or server errors (for example, when the service that powers the subscribed endpoint becomes unavailable) are held in the dead-letter queue for further analysis or reprocessing.
759 */
760 Attributes?: SubscriptionAttributesMap;
761 /**
762 * Sets whether the response from the Subscribe request includes the subscription ARN, even if the subscription is not yet confirmed. If you have the subscription ARN returned, the response includes the ARN in all cases, even if the subscription is not yet confirmed. If you don't have the subscription ARN returned, in addition to the ARN for confirmed subscriptions, the response also includes the pending subscription ARN value for subscriptions that aren't yet confirmed. A subscription becomes confirmed when the subscriber calls the ConfirmSubscription action with a confirmation token. If you set this parameter to true, . The default value is false.
763 */
764 ReturnSubscriptionArn?: boolean;
765 }
766 export interface SubscribeResponse {
767 /**
768 * The ARN of the subscription if it is confirmed, or the string "pending confirmation" if the subscription requires confirmation. However, if the API request parameter ReturnSubscriptionArn is true, then the value is always the subscription ARN, even if the subscription requires confirmation.
769 */
770 SubscriptionArn?: subscriptionARN;
771 }
772 export interface Subscription {
773 /**
774 * The subscription's ARN.
775 */
776 SubscriptionArn?: subscriptionARN;
777 /**
778 * The subscription's owner.
779 */
780 Owner?: account;
781 /**
782 * The subscription's protocol.
783 */
784 Protocol?: protocol;
785 /**
786 * The subscription's endpoint (format depends on the protocol).
787 */
788 Endpoint?: endpoint;
789 /**
790 * The ARN of the subscription's topic.
791 */
792 TopicArn?: topicARN;
793 }
794 export type SubscriptionAttributesMap = {[key: string]: attributeValue};
795 export type SubscriptionsList = Subscription[];
796 export interface Tag {
797 /**
798 * The required key portion of the tag.
799 */
800 Key: TagKey;
801 /**
802 * The optional value portion of the tag.
803 */
804 Value: TagValue;
805 }
806 export type TagKey = string;
807 export type TagKeyList = TagKey[];
808 export type TagList = Tag[];
809 export interface TagResourceRequest {
810 /**
811 * The ARN of the topic to which to add tags.
812 */
813 ResourceArn: AmazonResourceName;
814 /**
815 * The tags to be added to the specified topic. A tag consists of a required key and an optional value.
816 */
817 Tags: TagList;
818 }
819 export interface TagResourceResponse {
820 }
821 export type TagValue = string;
822 export interface Topic {
823 /**
824 * The topic's ARN.
825 */
826 TopicArn?: topicARN;
827 }
828 export type TopicAttributesMap = {[key: string]: attributeValue};
829 export type TopicsList = Topic[];
830 export interface UnsubscribeInput {
831 /**
832 * The ARN of the subscription to be deleted.
833 */
834 SubscriptionArn: subscriptionARN;
835 }
836 export interface UntagResourceRequest {
837 /**
838 * The ARN of the topic from which to remove tags.
839 */
840 ResourceArn: AmazonResourceName;
841 /**
842 * The list of tag keys to remove from the specified topic.
843 */
844 TagKeys: TagKeyList;
845 }
846 export interface UntagResourceResponse {
847 }
848 export type account = string;
849 export type action = string;
850 export type attributeName = string;
851 export type attributeValue = string;
852 export type authenticateOnUnsubscribe = string;
853 export type delegate = string;
854 export type endpoint = string;
855 export type label = string;
856 export type message = string;
857 export type messageId = string;
858 export type messageStructure = string;
859 export type nextToken = string;
860 export type protocol = string;
861 export type subject = string;
862 export type subscriptionARN = string;
863 export type token = string;
864 export type topicARN = string;
865 export type topicName = string;
866 /**
867 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
868 */
869 export type apiVersion = "2010-03-31"|"latest"|string;
870 export interface ClientApiVersions {
871 /**
872 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
873 */
874 apiVersion?: apiVersion;
875 }
876 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
877 /**
878 * Contains interfaces for use with the SNS client.
879 */
880 export import Types = SNS;
881}
882export = SNS;