api.go 74 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package sns provides a client for Amazon Simple Notification Service.
  3. package sns
  4. import (
  5. "github.com/aws/aws-sdk-go/aws/awsutil"
  6. "github.com/aws/aws-sdk-go/aws/request"
  7. )
  8. const opAddPermission = "AddPermission"
  9. // AddPermissionRequest generates a request for the AddPermission operation.
  10. func (c *SNS) AddPermissionRequest(input *AddPermissionInput) (req *request.Request, output *AddPermissionOutput) {
  11. op := &request.Operation{
  12. Name: opAddPermission,
  13. HTTPMethod: "POST",
  14. HTTPPath: "/",
  15. }
  16. if input == nil {
  17. input = &AddPermissionInput{}
  18. }
  19. req = c.newRequest(op, input, output)
  20. output = &AddPermissionOutput{}
  21. req.Data = output
  22. return
  23. }
  24. // Adds a statement to a topic's access control policy, granting access for
  25. // the specified AWS accounts to the specified actions.
  26. func (c *SNS) AddPermission(input *AddPermissionInput) (*AddPermissionOutput, error) {
  27. req, out := c.AddPermissionRequest(input)
  28. err := req.Send()
  29. return out, err
  30. }
  31. const opConfirmSubscription = "ConfirmSubscription"
  32. // ConfirmSubscriptionRequest generates a request for the ConfirmSubscription operation.
  33. func (c *SNS) ConfirmSubscriptionRequest(input *ConfirmSubscriptionInput) (req *request.Request, output *ConfirmSubscriptionOutput) {
  34. op := &request.Operation{
  35. Name: opConfirmSubscription,
  36. HTTPMethod: "POST",
  37. HTTPPath: "/",
  38. }
  39. if input == nil {
  40. input = &ConfirmSubscriptionInput{}
  41. }
  42. req = c.newRequest(op, input, output)
  43. output = &ConfirmSubscriptionOutput{}
  44. req.Data = output
  45. return
  46. }
  47. // Verifies an endpoint owner's intent to receive messages by validating the
  48. // token sent to the endpoint by an earlier Subscribe action. If the token is
  49. // valid, the action creates a new subscription and returns its Amazon Resource
  50. // Name (ARN). This call requires an AWS signature only when the AuthenticateOnUnsubscribe
  51. // flag is set to "true".
  52. func (c *SNS) ConfirmSubscription(input *ConfirmSubscriptionInput) (*ConfirmSubscriptionOutput, error) {
  53. req, out := c.ConfirmSubscriptionRequest(input)
  54. err := req.Send()
  55. return out, err
  56. }
  57. const opCreatePlatformApplication = "CreatePlatformApplication"
  58. // CreatePlatformApplicationRequest generates a request for the CreatePlatformApplication operation.
  59. func (c *SNS) CreatePlatformApplicationRequest(input *CreatePlatformApplicationInput) (req *request.Request, output *CreatePlatformApplicationOutput) {
  60. op := &request.Operation{
  61. Name: opCreatePlatformApplication,
  62. HTTPMethod: "POST",
  63. HTTPPath: "/",
  64. }
  65. if input == nil {
  66. input = &CreatePlatformApplicationInput{}
  67. }
  68. req = c.newRequest(op, input, output)
  69. output = &CreatePlatformApplicationOutput{}
  70. req.Data = output
  71. return
  72. }
  73. // Creates a platform application object for one of the supported push notification
  74. // services, such as APNS and GCM, to which devices and mobile apps may register.
  75. // You must specify PlatformPrincipal and PlatformCredential attributes when
  76. // using the CreatePlatformApplication action. The PlatformPrincipal is received
  77. // from the notification service. For APNS/APNS_SANDBOX, PlatformPrincipal is
  78. // "SSL certificate". For GCM, PlatformPrincipal is not applicable. For ADM,
  79. // PlatformPrincipal is "client id". The PlatformCredential is also received
  80. // from the notification service. For APNS/APNS_SANDBOX, PlatformCredential
  81. // is "private key". For GCM, PlatformCredential is "API key". For ADM, PlatformCredential
  82. // is "client secret". The PlatformApplicationArn that is returned when using
  83. // CreatePlatformApplication is then used as an attribute for the CreatePlatformEndpoint
  84. // action. For more information, see Using Amazon SNS Mobile Push Notifications
  85. // (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html).
  86. func (c *SNS) CreatePlatformApplication(input *CreatePlatformApplicationInput) (*CreatePlatformApplicationOutput, error) {
  87. req, out := c.CreatePlatformApplicationRequest(input)
  88. err := req.Send()
  89. return out, err
  90. }
  91. const opCreatePlatformEndpoint = "CreatePlatformEndpoint"
  92. // CreatePlatformEndpointRequest generates a request for the CreatePlatformEndpoint operation.
  93. func (c *SNS) CreatePlatformEndpointRequest(input *CreatePlatformEndpointInput) (req *request.Request, output *CreatePlatformEndpointOutput) {
  94. op := &request.Operation{
  95. Name: opCreatePlatformEndpoint,
  96. HTTPMethod: "POST",
  97. HTTPPath: "/",
  98. }
  99. if input == nil {
  100. input = &CreatePlatformEndpointInput{}
  101. }
  102. req = c.newRequest(op, input, output)
  103. output = &CreatePlatformEndpointOutput{}
  104. req.Data = output
  105. return
  106. }
  107. // Creates an endpoint for a device and mobile app on one of the supported push
  108. // notification services, such as GCM and APNS. CreatePlatformEndpoint requires
  109. // the PlatformApplicationArn that is returned from CreatePlatformApplication.
  110. // The EndpointArn that is returned when using CreatePlatformEndpoint can then
  111. // be used by the Publish action to send a message to a mobile app or by the
  112. // Subscribe action for subscription to a topic. The CreatePlatformEndpoint
  113. // action is idempotent, so if the requester already owns an endpoint with the
  114. // same device token and attributes, that endpoint's ARN is returned without
  115. // creating a new endpoint. For more information, see Using Amazon SNS Mobile
  116. // Push Notifications (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html).
  117. //
  118. // When using CreatePlatformEndpoint with Baidu, two attributes must be provided:
  119. // ChannelId and UserId. The token field must also contain the ChannelId. For
  120. // more information, see Creating an Amazon SNS Endpoint for Baidu (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePushBaiduEndpoint.html).
  121. func (c *SNS) CreatePlatformEndpoint(input *CreatePlatformEndpointInput) (*CreatePlatformEndpointOutput, error) {
  122. req, out := c.CreatePlatformEndpointRequest(input)
  123. err := req.Send()
  124. return out, err
  125. }
  126. const opCreateTopic = "CreateTopic"
  127. // CreateTopicRequest generates a request for the CreateTopic operation.
  128. func (c *SNS) CreateTopicRequest(input *CreateTopicInput) (req *request.Request, output *CreateTopicOutput) {
  129. op := &request.Operation{
  130. Name: opCreateTopic,
  131. HTTPMethod: "POST",
  132. HTTPPath: "/",
  133. }
  134. if input == nil {
  135. input = &CreateTopicInput{}
  136. }
  137. req = c.newRequest(op, input, output)
  138. output = &CreateTopicOutput{}
  139. req.Data = output
  140. return
  141. }
  142. // Creates a topic to which notifications can be published. Users can create
  143. // at most 3000 topics. For more information, see http://aws.amazon.com/sns
  144. // (http://aws.amazon.com/sns/). This action is idempotent, so if the requester
  145. // already owns a topic with the specified name, that topic's ARN is returned
  146. // without creating a new topic.
  147. func (c *SNS) CreateTopic(input *CreateTopicInput) (*CreateTopicOutput, error) {
  148. req, out := c.CreateTopicRequest(input)
  149. err := req.Send()
  150. return out, err
  151. }
  152. const opDeleteEndpoint = "DeleteEndpoint"
  153. // DeleteEndpointRequest generates a request for the DeleteEndpoint operation.
  154. func (c *SNS) DeleteEndpointRequest(input *DeleteEndpointInput) (req *request.Request, output *DeleteEndpointOutput) {
  155. op := &request.Operation{
  156. Name: opDeleteEndpoint,
  157. HTTPMethod: "POST",
  158. HTTPPath: "/",
  159. }
  160. if input == nil {
  161. input = &DeleteEndpointInput{}
  162. }
  163. req = c.newRequest(op, input, output)
  164. output = &DeleteEndpointOutput{}
  165. req.Data = output
  166. return
  167. }
  168. // Deletes the endpoint from Amazon SNS. This action is idempotent. For more
  169. // information, see Using Amazon SNS Mobile Push Notifications (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html).
  170. func (c *SNS) DeleteEndpoint(input *DeleteEndpointInput) (*DeleteEndpointOutput, error) {
  171. req, out := c.DeleteEndpointRequest(input)
  172. err := req.Send()
  173. return out, err
  174. }
  175. const opDeletePlatformApplication = "DeletePlatformApplication"
  176. // DeletePlatformApplicationRequest generates a request for the DeletePlatformApplication operation.
  177. func (c *SNS) DeletePlatformApplicationRequest(input *DeletePlatformApplicationInput) (req *request.Request, output *DeletePlatformApplicationOutput) {
  178. op := &request.Operation{
  179. Name: opDeletePlatformApplication,
  180. HTTPMethod: "POST",
  181. HTTPPath: "/",
  182. }
  183. if input == nil {
  184. input = &DeletePlatformApplicationInput{}
  185. }
  186. req = c.newRequest(op, input, output)
  187. output = &DeletePlatformApplicationOutput{}
  188. req.Data = output
  189. return
  190. }
  191. // Deletes a platform application object for one of the supported push notification
  192. // services, such as APNS and GCM. For more information, see Using Amazon SNS
  193. // Mobile Push Notifications (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html).
  194. func (c *SNS) DeletePlatformApplication(input *DeletePlatformApplicationInput) (*DeletePlatformApplicationOutput, error) {
  195. req, out := c.DeletePlatformApplicationRequest(input)
  196. err := req.Send()
  197. return out, err
  198. }
  199. const opDeleteTopic = "DeleteTopic"
  200. // DeleteTopicRequest generates a request for the DeleteTopic operation.
  201. func (c *SNS) DeleteTopicRequest(input *DeleteTopicInput) (req *request.Request, output *DeleteTopicOutput) {
  202. op := &request.Operation{
  203. Name: opDeleteTopic,
  204. HTTPMethod: "POST",
  205. HTTPPath: "/",
  206. }
  207. if input == nil {
  208. input = &DeleteTopicInput{}
  209. }
  210. req = c.newRequest(op, input, output)
  211. output = &DeleteTopicOutput{}
  212. req.Data = output
  213. return
  214. }
  215. // Deletes a topic and all its subscriptions. Deleting a topic might prevent
  216. // some messages previously sent to the topic from being delivered to subscribers.
  217. // This action is idempotent, so deleting a topic that does not exist does not
  218. // result in an error.
  219. func (c *SNS) DeleteTopic(input *DeleteTopicInput) (*DeleteTopicOutput, error) {
  220. req, out := c.DeleteTopicRequest(input)
  221. err := req.Send()
  222. return out, err
  223. }
  224. const opGetEndpointAttributes = "GetEndpointAttributes"
  225. // GetEndpointAttributesRequest generates a request for the GetEndpointAttributes operation.
  226. func (c *SNS) GetEndpointAttributesRequest(input *GetEndpointAttributesInput) (req *request.Request, output *GetEndpointAttributesOutput) {
  227. op := &request.Operation{
  228. Name: opGetEndpointAttributes,
  229. HTTPMethod: "POST",
  230. HTTPPath: "/",
  231. }
  232. if input == nil {
  233. input = &GetEndpointAttributesInput{}
  234. }
  235. req = c.newRequest(op, input, output)
  236. output = &GetEndpointAttributesOutput{}
  237. req.Data = output
  238. return
  239. }
  240. // Retrieves the endpoint attributes for a device on one of the supported push
  241. // notification services, such as GCM and APNS. For more information, see Using
  242. // Amazon SNS Mobile Push Notifications (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html).
  243. func (c *SNS) GetEndpointAttributes(input *GetEndpointAttributesInput) (*GetEndpointAttributesOutput, error) {
  244. req, out := c.GetEndpointAttributesRequest(input)
  245. err := req.Send()
  246. return out, err
  247. }
  248. const opGetPlatformApplicationAttributes = "GetPlatformApplicationAttributes"
  249. // GetPlatformApplicationAttributesRequest generates a request for the GetPlatformApplicationAttributes operation.
  250. func (c *SNS) GetPlatformApplicationAttributesRequest(input *GetPlatformApplicationAttributesInput) (req *request.Request, output *GetPlatformApplicationAttributesOutput) {
  251. op := &request.Operation{
  252. Name: opGetPlatformApplicationAttributes,
  253. HTTPMethod: "POST",
  254. HTTPPath: "/",
  255. }
  256. if input == nil {
  257. input = &GetPlatformApplicationAttributesInput{}
  258. }
  259. req = c.newRequest(op, input, output)
  260. output = &GetPlatformApplicationAttributesOutput{}
  261. req.Data = output
  262. return
  263. }
  264. // Retrieves the attributes of the platform application object for the supported
  265. // push notification services, such as APNS and GCM. For more information, see
  266. // Using Amazon SNS Mobile Push Notifications (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html).
  267. func (c *SNS) GetPlatformApplicationAttributes(input *GetPlatformApplicationAttributesInput) (*GetPlatformApplicationAttributesOutput, error) {
  268. req, out := c.GetPlatformApplicationAttributesRequest(input)
  269. err := req.Send()
  270. return out, err
  271. }
  272. const opGetSubscriptionAttributes = "GetSubscriptionAttributes"
  273. // GetSubscriptionAttributesRequest generates a request for the GetSubscriptionAttributes operation.
  274. func (c *SNS) GetSubscriptionAttributesRequest(input *GetSubscriptionAttributesInput) (req *request.Request, output *GetSubscriptionAttributesOutput) {
  275. op := &request.Operation{
  276. Name: opGetSubscriptionAttributes,
  277. HTTPMethod: "POST",
  278. HTTPPath: "/",
  279. }
  280. if input == nil {
  281. input = &GetSubscriptionAttributesInput{}
  282. }
  283. req = c.newRequest(op, input, output)
  284. output = &GetSubscriptionAttributesOutput{}
  285. req.Data = output
  286. return
  287. }
  288. // Returns all of the properties of a subscription.
  289. func (c *SNS) GetSubscriptionAttributes(input *GetSubscriptionAttributesInput) (*GetSubscriptionAttributesOutput, error) {
  290. req, out := c.GetSubscriptionAttributesRequest(input)
  291. err := req.Send()
  292. return out, err
  293. }
  294. const opGetTopicAttributes = "GetTopicAttributes"
  295. // GetTopicAttributesRequest generates a request for the GetTopicAttributes operation.
  296. func (c *SNS) GetTopicAttributesRequest(input *GetTopicAttributesInput) (req *request.Request, output *GetTopicAttributesOutput) {
  297. op := &request.Operation{
  298. Name: opGetTopicAttributes,
  299. HTTPMethod: "POST",
  300. HTTPPath: "/",
  301. }
  302. if input == nil {
  303. input = &GetTopicAttributesInput{}
  304. }
  305. req = c.newRequest(op, input, output)
  306. output = &GetTopicAttributesOutput{}
  307. req.Data = output
  308. return
  309. }
  310. // Returns all of the properties of a topic. Topic properties returned might
  311. // differ based on the authorization of the user.
  312. func (c *SNS) GetTopicAttributes(input *GetTopicAttributesInput) (*GetTopicAttributesOutput, error) {
  313. req, out := c.GetTopicAttributesRequest(input)
  314. err := req.Send()
  315. return out, err
  316. }
  317. const opListEndpointsByPlatformApplication = "ListEndpointsByPlatformApplication"
  318. // ListEndpointsByPlatformApplicationRequest generates a request for the ListEndpointsByPlatformApplication operation.
  319. func (c *SNS) ListEndpointsByPlatformApplicationRequest(input *ListEndpointsByPlatformApplicationInput) (req *request.Request, output *ListEndpointsByPlatformApplicationOutput) {
  320. op := &request.Operation{
  321. Name: opListEndpointsByPlatformApplication,
  322. HTTPMethod: "POST",
  323. HTTPPath: "/",
  324. Paginator: &request.Paginator{
  325. InputTokens: []string{"NextToken"},
  326. OutputTokens: []string{"NextToken"},
  327. LimitToken: "",
  328. TruncationToken: "",
  329. },
  330. }
  331. if input == nil {
  332. input = &ListEndpointsByPlatformApplicationInput{}
  333. }
  334. req = c.newRequest(op, input, output)
  335. output = &ListEndpointsByPlatformApplicationOutput{}
  336. req.Data = output
  337. return
  338. }
  339. // Lists the endpoints and endpoint attributes for devices in a supported push
  340. // notification service, such as GCM and APNS. The results for ListEndpointsByPlatformApplication
  341. // are paginated and return a limited list of endpoints, up to 100. If additional
  342. // records are available after the first page results, then a NextToken string
  343. // will be returned. To receive the next page, you call ListEndpointsByPlatformApplication
  344. // again using the NextToken string received from the previous call. When there
  345. // are no more records to return, NextToken will be null. For more information,
  346. // see Using Amazon SNS Mobile Push Notifications (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html).
  347. func (c *SNS) ListEndpointsByPlatformApplication(input *ListEndpointsByPlatformApplicationInput) (*ListEndpointsByPlatformApplicationOutput, error) {
  348. req, out := c.ListEndpointsByPlatformApplicationRequest(input)
  349. err := req.Send()
  350. return out, err
  351. }
  352. func (c *SNS) ListEndpointsByPlatformApplicationPages(input *ListEndpointsByPlatformApplicationInput, fn func(p *ListEndpointsByPlatformApplicationOutput, lastPage bool) (shouldContinue bool)) error {
  353. page, _ := c.ListEndpointsByPlatformApplicationRequest(input)
  354. return page.EachPage(func(p interface{}, lastPage bool) bool {
  355. return fn(p.(*ListEndpointsByPlatformApplicationOutput), lastPage)
  356. })
  357. }
  358. const opListPlatformApplications = "ListPlatformApplications"
  359. // ListPlatformApplicationsRequest generates a request for the ListPlatformApplications operation.
  360. func (c *SNS) ListPlatformApplicationsRequest(input *ListPlatformApplicationsInput) (req *request.Request, output *ListPlatformApplicationsOutput) {
  361. op := &request.Operation{
  362. Name: opListPlatformApplications,
  363. HTTPMethod: "POST",
  364. HTTPPath: "/",
  365. Paginator: &request.Paginator{
  366. InputTokens: []string{"NextToken"},
  367. OutputTokens: []string{"NextToken"},
  368. LimitToken: "",
  369. TruncationToken: "",
  370. },
  371. }
  372. if input == nil {
  373. input = &ListPlatformApplicationsInput{}
  374. }
  375. req = c.newRequest(op, input, output)
  376. output = &ListPlatformApplicationsOutput{}
  377. req.Data = output
  378. return
  379. }
  380. // Lists the platform application objects for the supported push notification
  381. // services, such as APNS and GCM. The results for ListPlatformApplications
  382. // are paginated and return a limited list of applications, up to 100. If additional
  383. // records are available after the first page results, then a NextToken string
  384. // will be returned. To receive the next page, you call ListPlatformApplications
  385. // using the NextToken string received from the previous call. When there are
  386. // no more records to return, NextToken will be null. For more information,
  387. // see Using Amazon SNS Mobile Push Notifications (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html).
  388. func (c *SNS) ListPlatformApplications(input *ListPlatformApplicationsInput) (*ListPlatformApplicationsOutput, error) {
  389. req, out := c.ListPlatformApplicationsRequest(input)
  390. err := req.Send()
  391. return out, err
  392. }
  393. func (c *SNS) ListPlatformApplicationsPages(input *ListPlatformApplicationsInput, fn func(p *ListPlatformApplicationsOutput, lastPage bool) (shouldContinue bool)) error {
  394. page, _ := c.ListPlatformApplicationsRequest(input)
  395. return page.EachPage(func(p interface{}, lastPage bool) bool {
  396. return fn(p.(*ListPlatformApplicationsOutput), lastPage)
  397. })
  398. }
  399. const opListSubscriptions = "ListSubscriptions"
  400. // ListSubscriptionsRequest generates a request for the ListSubscriptions operation.
  401. func (c *SNS) ListSubscriptionsRequest(input *ListSubscriptionsInput) (req *request.Request, output *ListSubscriptionsOutput) {
  402. op := &request.Operation{
  403. Name: opListSubscriptions,
  404. HTTPMethod: "POST",
  405. HTTPPath: "/",
  406. Paginator: &request.Paginator{
  407. InputTokens: []string{"NextToken"},
  408. OutputTokens: []string{"NextToken"},
  409. LimitToken: "",
  410. TruncationToken: "",
  411. },
  412. }
  413. if input == nil {
  414. input = &ListSubscriptionsInput{}
  415. }
  416. req = c.newRequest(op, input, output)
  417. output = &ListSubscriptionsOutput{}
  418. req.Data = output
  419. return
  420. }
  421. // Returns a list of the requester's subscriptions. Each call returns a limited
  422. // list of subscriptions, up to 100. If there are more subscriptions, a NextToken
  423. // is also returned. Use the NextToken parameter in a new ListSubscriptions
  424. // call to get further results.
  425. func (c *SNS) ListSubscriptions(input *ListSubscriptionsInput) (*ListSubscriptionsOutput, error) {
  426. req, out := c.ListSubscriptionsRequest(input)
  427. err := req.Send()
  428. return out, err
  429. }
  430. func (c *SNS) ListSubscriptionsPages(input *ListSubscriptionsInput, fn func(p *ListSubscriptionsOutput, lastPage bool) (shouldContinue bool)) error {
  431. page, _ := c.ListSubscriptionsRequest(input)
  432. return page.EachPage(func(p interface{}, lastPage bool) bool {
  433. return fn(p.(*ListSubscriptionsOutput), lastPage)
  434. })
  435. }
  436. const opListSubscriptionsByTopic = "ListSubscriptionsByTopic"
  437. // ListSubscriptionsByTopicRequest generates a request for the ListSubscriptionsByTopic operation.
  438. func (c *SNS) ListSubscriptionsByTopicRequest(input *ListSubscriptionsByTopicInput) (req *request.Request, output *ListSubscriptionsByTopicOutput) {
  439. op := &request.Operation{
  440. Name: opListSubscriptionsByTopic,
  441. HTTPMethod: "POST",
  442. HTTPPath: "/",
  443. Paginator: &request.Paginator{
  444. InputTokens: []string{"NextToken"},
  445. OutputTokens: []string{"NextToken"},
  446. LimitToken: "",
  447. TruncationToken: "",
  448. },
  449. }
  450. if input == nil {
  451. input = &ListSubscriptionsByTopicInput{}
  452. }
  453. req = c.newRequest(op, input, output)
  454. output = &ListSubscriptionsByTopicOutput{}
  455. req.Data = output
  456. return
  457. }
  458. // Returns a list of the subscriptions to a specific topic. Each call returns
  459. // a limited list of subscriptions, up to 100. If there are more subscriptions,
  460. // a NextToken is also returned. Use the NextToken parameter in a new ListSubscriptionsByTopic
  461. // call to get further results.
  462. func (c *SNS) ListSubscriptionsByTopic(input *ListSubscriptionsByTopicInput) (*ListSubscriptionsByTopicOutput, error) {
  463. req, out := c.ListSubscriptionsByTopicRequest(input)
  464. err := req.Send()
  465. return out, err
  466. }
  467. func (c *SNS) ListSubscriptionsByTopicPages(input *ListSubscriptionsByTopicInput, fn func(p *ListSubscriptionsByTopicOutput, lastPage bool) (shouldContinue bool)) error {
  468. page, _ := c.ListSubscriptionsByTopicRequest(input)
  469. return page.EachPage(func(p interface{}, lastPage bool) bool {
  470. return fn(p.(*ListSubscriptionsByTopicOutput), lastPage)
  471. })
  472. }
  473. const opListTopics = "ListTopics"
  474. // ListTopicsRequest generates a request for the ListTopics operation.
  475. func (c *SNS) ListTopicsRequest(input *ListTopicsInput) (req *request.Request, output *ListTopicsOutput) {
  476. op := &request.Operation{
  477. Name: opListTopics,
  478. HTTPMethod: "POST",
  479. HTTPPath: "/",
  480. Paginator: &request.Paginator{
  481. InputTokens: []string{"NextToken"},
  482. OutputTokens: []string{"NextToken"},
  483. LimitToken: "",
  484. TruncationToken: "",
  485. },
  486. }
  487. if input == nil {
  488. input = &ListTopicsInput{}
  489. }
  490. req = c.newRequest(op, input, output)
  491. output = &ListTopicsOutput{}
  492. req.Data = output
  493. return
  494. }
  495. // Returns a list of the requester's topics. Each call returns a limited list
  496. // of topics, up to 100. If there are more topics, a NextToken is also returned.
  497. // Use the NextToken parameter in a new ListTopics call to get further results.
  498. func (c *SNS) ListTopics(input *ListTopicsInput) (*ListTopicsOutput, error) {
  499. req, out := c.ListTopicsRequest(input)
  500. err := req.Send()
  501. return out, err
  502. }
  503. func (c *SNS) ListTopicsPages(input *ListTopicsInput, fn func(p *ListTopicsOutput, lastPage bool) (shouldContinue bool)) error {
  504. page, _ := c.ListTopicsRequest(input)
  505. return page.EachPage(func(p interface{}, lastPage bool) bool {
  506. return fn(p.(*ListTopicsOutput), lastPage)
  507. })
  508. }
  509. const opPublish = "Publish"
  510. // PublishRequest generates a request for the Publish operation.
  511. func (c *SNS) PublishRequest(input *PublishInput) (req *request.Request, output *PublishOutput) {
  512. op := &request.Operation{
  513. Name: opPublish,
  514. HTTPMethod: "POST",
  515. HTTPPath: "/",
  516. }
  517. if input == nil {
  518. input = &PublishInput{}
  519. }
  520. req = c.newRequest(op, input, output)
  521. output = &PublishOutput{}
  522. req.Data = output
  523. return
  524. }
  525. // Sends a message to all of a topic's subscribed endpoints. When a messageId
  526. // is returned, the message has been saved and Amazon SNS will attempt to deliver
  527. // it to the topic's subscribers shortly. The format of the outgoing message
  528. // to each subscribed endpoint depends on the notification protocol selected.
  529. //
  530. // To use the Publish action for sending a message to a mobile endpoint, such
  531. // as an app on a Kindle device or mobile phone, you must specify the EndpointArn.
  532. // The EndpointArn is returned when making a call with the CreatePlatformEndpoint
  533. // action. The second example below shows a request and response for publishing
  534. // to a mobile endpoint.
  535. func (c *SNS) Publish(input *PublishInput) (*PublishOutput, error) {
  536. req, out := c.PublishRequest(input)
  537. err := req.Send()
  538. return out, err
  539. }
  540. const opRemovePermission = "RemovePermission"
  541. // RemovePermissionRequest generates a request for the RemovePermission operation.
  542. func (c *SNS) RemovePermissionRequest(input *RemovePermissionInput) (req *request.Request, output *RemovePermissionOutput) {
  543. op := &request.Operation{
  544. Name: opRemovePermission,
  545. HTTPMethod: "POST",
  546. HTTPPath: "/",
  547. }
  548. if input == nil {
  549. input = &RemovePermissionInput{}
  550. }
  551. req = c.newRequest(op, input, output)
  552. output = &RemovePermissionOutput{}
  553. req.Data = output
  554. return
  555. }
  556. // Removes a statement from a topic's access control policy.
  557. func (c *SNS) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error) {
  558. req, out := c.RemovePermissionRequest(input)
  559. err := req.Send()
  560. return out, err
  561. }
  562. const opSetEndpointAttributes = "SetEndpointAttributes"
  563. // SetEndpointAttributesRequest generates a request for the SetEndpointAttributes operation.
  564. func (c *SNS) SetEndpointAttributesRequest(input *SetEndpointAttributesInput) (req *request.Request, output *SetEndpointAttributesOutput) {
  565. op := &request.Operation{
  566. Name: opSetEndpointAttributes,
  567. HTTPMethod: "POST",
  568. HTTPPath: "/",
  569. }
  570. if input == nil {
  571. input = &SetEndpointAttributesInput{}
  572. }
  573. req = c.newRequest(op, input, output)
  574. output = &SetEndpointAttributesOutput{}
  575. req.Data = output
  576. return
  577. }
  578. // Sets the attributes for an endpoint for a device on one of the supported
  579. // push notification services, such as GCM and APNS. For more information, see
  580. // Using Amazon SNS Mobile Push Notifications (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html).
  581. func (c *SNS) SetEndpointAttributes(input *SetEndpointAttributesInput) (*SetEndpointAttributesOutput, error) {
  582. req, out := c.SetEndpointAttributesRequest(input)
  583. err := req.Send()
  584. return out, err
  585. }
  586. const opSetPlatformApplicationAttributes = "SetPlatformApplicationAttributes"
  587. // SetPlatformApplicationAttributesRequest generates a request for the SetPlatformApplicationAttributes operation.
  588. func (c *SNS) SetPlatformApplicationAttributesRequest(input *SetPlatformApplicationAttributesInput) (req *request.Request, output *SetPlatformApplicationAttributesOutput) {
  589. op := &request.Operation{
  590. Name: opSetPlatformApplicationAttributes,
  591. HTTPMethod: "POST",
  592. HTTPPath: "/",
  593. }
  594. if input == nil {
  595. input = &SetPlatformApplicationAttributesInput{}
  596. }
  597. req = c.newRequest(op, input, output)
  598. output = &SetPlatformApplicationAttributesOutput{}
  599. req.Data = output
  600. return
  601. }
  602. // Sets the attributes of the platform application object for the supported
  603. // push notification services, such as APNS and GCM. For more information, see
  604. // Using Amazon SNS Mobile Push Notifications (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html).
  605. func (c *SNS) SetPlatformApplicationAttributes(input *SetPlatformApplicationAttributesInput) (*SetPlatformApplicationAttributesOutput, error) {
  606. req, out := c.SetPlatformApplicationAttributesRequest(input)
  607. err := req.Send()
  608. return out, err
  609. }
  610. const opSetSubscriptionAttributes = "SetSubscriptionAttributes"
  611. // SetSubscriptionAttributesRequest generates a request for the SetSubscriptionAttributes operation.
  612. func (c *SNS) SetSubscriptionAttributesRequest(input *SetSubscriptionAttributesInput) (req *request.Request, output *SetSubscriptionAttributesOutput) {
  613. op := &request.Operation{
  614. Name: opSetSubscriptionAttributes,
  615. HTTPMethod: "POST",
  616. HTTPPath: "/",
  617. }
  618. if input == nil {
  619. input = &SetSubscriptionAttributesInput{}
  620. }
  621. req = c.newRequest(op, input, output)
  622. output = &SetSubscriptionAttributesOutput{}
  623. req.Data = output
  624. return
  625. }
  626. // Allows a subscription owner to set an attribute of the topic to a new value.
  627. func (c *SNS) SetSubscriptionAttributes(input *SetSubscriptionAttributesInput) (*SetSubscriptionAttributesOutput, error) {
  628. req, out := c.SetSubscriptionAttributesRequest(input)
  629. err := req.Send()
  630. return out, err
  631. }
  632. const opSetTopicAttributes = "SetTopicAttributes"
  633. // SetTopicAttributesRequest generates a request for the SetTopicAttributes operation.
  634. func (c *SNS) SetTopicAttributesRequest(input *SetTopicAttributesInput) (req *request.Request, output *SetTopicAttributesOutput) {
  635. op := &request.Operation{
  636. Name: opSetTopicAttributes,
  637. HTTPMethod: "POST",
  638. HTTPPath: "/",
  639. }
  640. if input == nil {
  641. input = &SetTopicAttributesInput{}
  642. }
  643. req = c.newRequest(op, input, output)
  644. output = &SetTopicAttributesOutput{}
  645. req.Data = output
  646. return
  647. }
  648. // Allows a topic owner to set an attribute of the topic to a new value.
  649. func (c *SNS) SetTopicAttributes(input *SetTopicAttributesInput) (*SetTopicAttributesOutput, error) {
  650. req, out := c.SetTopicAttributesRequest(input)
  651. err := req.Send()
  652. return out, err
  653. }
  654. const opSubscribe = "Subscribe"
  655. // SubscribeRequest generates a request for the Subscribe operation.
  656. func (c *SNS) SubscribeRequest(input *SubscribeInput) (req *request.Request, output *SubscribeOutput) {
  657. op := &request.Operation{
  658. Name: opSubscribe,
  659. HTTPMethod: "POST",
  660. HTTPPath: "/",
  661. }
  662. if input == nil {
  663. input = &SubscribeInput{}
  664. }
  665. req = c.newRequest(op, input, output)
  666. output = &SubscribeOutput{}
  667. req.Data = output
  668. return
  669. }
  670. // Prepares to subscribe an endpoint by sending the endpoint a confirmation
  671. // message. To actually create a subscription, the endpoint owner must call
  672. // the ConfirmSubscription action with the token from the confirmation message.
  673. // Confirmation tokens are valid for three days.
  674. func (c *SNS) Subscribe(input *SubscribeInput) (*SubscribeOutput, error) {
  675. req, out := c.SubscribeRequest(input)
  676. err := req.Send()
  677. return out, err
  678. }
  679. const opUnsubscribe = "Unsubscribe"
  680. // UnsubscribeRequest generates a request for the Unsubscribe operation.
  681. func (c *SNS) UnsubscribeRequest(input *UnsubscribeInput) (req *request.Request, output *UnsubscribeOutput) {
  682. op := &request.Operation{
  683. Name: opUnsubscribe,
  684. HTTPMethod: "POST",
  685. HTTPPath: "/",
  686. }
  687. if input == nil {
  688. input = &UnsubscribeInput{}
  689. }
  690. req = c.newRequest(op, input, output)
  691. output = &UnsubscribeOutput{}
  692. req.Data = output
  693. return
  694. }
  695. // Deletes a subscription. If the subscription requires authentication for deletion,
  696. // only the owner of the subscription or the topic's owner can unsubscribe,
  697. // and an AWS signature is required. If the Unsubscribe call does not require
  698. // authentication and the requester is not the subscription owner, a final cancellation
  699. // message is delivered to the endpoint, so that the endpoint owner can easily
  700. // resubscribe to the topic if the Unsubscribe request was unintended.
  701. func (c *SNS) Unsubscribe(input *UnsubscribeInput) (*UnsubscribeOutput, error) {
  702. req, out := c.UnsubscribeRequest(input)
  703. err := req.Send()
  704. return out, err
  705. }
  706. type AddPermissionInput struct {
  707. // The AWS account IDs of the users (principals) who will be given access to
  708. // the specified actions. The users must have AWS accounts, but do not need
  709. // to be signed up for this service.
  710. AWSAccountId []*string `type:"list" required:"true"`
  711. // The action you want to allow for the specified principal(s).
  712. //
  713. // Valid values: any Amazon SNS action name.
  714. ActionName []*string `type:"list" required:"true"`
  715. // A unique identifier for the new policy statement.
  716. Label *string `type:"string" required:"true"`
  717. // The ARN of the topic whose access control policy you wish to modify.
  718. TopicArn *string `type:"string" required:"true"`
  719. metadataAddPermissionInput `json:"-" xml:"-"`
  720. }
  721. type metadataAddPermissionInput struct {
  722. SDKShapeTraits bool `type:"structure"`
  723. }
  724. // String returns the string representation
  725. func (s AddPermissionInput) String() string {
  726. return awsutil.Prettify(s)
  727. }
  728. // GoString returns the string representation
  729. func (s AddPermissionInput) GoString() string {
  730. return s.String()
  731. }
  732. type AddPermissionOutput struct {
  733. metadataAddPermissionOutput `json:"-" xml:"-"`
  734. }
  735. type metadataAddPermissionOutput struct {
  736. SDKShapeTraits bool `type:"structure"`
  737. }
  738. // String returns the string representation
  739. func (s AddPermissionOutput) String() string {
  740. return awsutil.Prettify(s)
  741. }
  742. // GoString returns the string representation
  743. func (s AddPermissionOutput) GoString() string {
  744. return s.String()
  745. }
  746. // Input for ConfirmSubscription action.
  747. type ConfirmSubscriptionInput struct {
  748. // Disallows unauthenticated unsubscribes of the subscription. If the value
  749. // of this parameter is true and the request has an AWS signature, then only
  750. // the topic owner and the subscription owner can unsubscribe the endpoint.
  751. // The unsubscribe action requires AWS authentication.
  752. AuthenticateOnUnsubscribe *string `type:"string"`
  753. // Short-lived token sent to an endpoint during the Subscribe action.
  754. Token *string `type:"string" required:"true"`
  755. // The ARN of the topic for which you wish to confirm a subscription.
  756. TopicArn *string `type:"string" required:"true"`
  757. metadataConfirmSubscriptionInput `json:"-" xml:"-"`
  758. }
  759. type metadataConfirmSubscriptionInput struct {
  760. SDKShapeTraits bool `type:"structure"`
  761. }
  762. // String returns the string representation
  763. func (s ConfirmSubscriptionInput) String() string {
  764. return awsutil.Prettify(s)
  765. }
  766. // GoString returns the string representation
  767. func (s ConfirmSubscriptionInput) GoString() string {
  768. return s.String()
  769. }
  770. // Response for ConfirmSubscriptions action.
  771. type ConfirmSubscriptionOutput struct {
  772. // The ARN of the created subscription.
  773. SubscriptionArn *string `type:"string"`
  774. metadataConfirmSubscriptionOutput `json:"-" xml:"-"`
  775. }
  776. type metadataConfirmSubscriptionOutput struct {
  777. SDKShapeTraits bool `type:"structure"`
  778. }
  779. // String returns the string representation
  780. func (s ConfirmSubscriptionOutput) String() string {
  781. return awsutil.Prettify(s)
  782. }
  783. // GoString returns the string representation
  784. func (s ConfirmSubscriptionOutput) GoString() string {
  785. return s.String()
  786. }
  787. // Input for CreatePlatformApplication action.
  788. type CreatePlatformApplicationInput struct {
  789. // For a list of attributes, see SetPlatformApplicationAttributes (http://docs.aws.amazon.com/sns/latest/api/API_SetPlatformApplicationAttributes.html)
  790. Attributes map[string]*string `type:"map" required:"true"`
  791. // Application names must be made up of only uppercase and lowercase ASCII letters,
  792. // numbers, underscores, hyphens, and periods, and must be between 1 and 256
  793. // characters long.
  794. Name *string `type:"string" required:"true"`
  795. // The following platforms are supported: ADM (Amazon Device Messaging), APNS
  796. // (Apple Push Notification Service), APNS_SANDBOX, and GCM (Google Cloud Messaging).
  797. Platform *string `type:"string" required:"true"`
  798. metadataCreatePlatformApplicationInput `json:"-" xml:"-"`
  799. }
  800. type metadataCreatePlatformApplicationInput struct {
  801. SDKShapeTraits bool `type:"structure"`
  802. }
  803. // String returns the string representation
  804. func (s CreatePlatformApplicationInput) String() string {
  805. return awsutil.Prettify(s)
  806. }
  807. // GoString returns the string representation
  808. func (s CreatePlatformApplicationInput) GoString() string {
  809. return s.String()
  810. }
  811. // Response from CreatePlatformApplication action.
  812. type CreatePlatformApplicationOutput struct {
  813. // PlatformApplicationArn is returned.
  814. PlatformApplicationArn *string `type:"string"`
  815. metadataCreatePlatformApplicationOutput `json:"-" xml:"-"`
  816. }
  817. type metadataCreatePlatformApplicationOutput struct {
  818. SDKShapeTraits bool `type:"structure"`
  819. }
  820. // String returns the string representation
  821. func (s CreatePlatformApplicationOutput) String() string {
  822. return awsutil.Prettify(s)
  823. }
  824. // GoString returns the string representation
  825. func (s CreatePlatformApplicationOutput) GoString() string {
  826. return s.String()
  827. }
  828. // Input for CreatePlatformEndpoint action.
  829. type CreatePlatformEndpointInput struct {
  830. // For a list of attributes, see SetEndpointAttributes (http://docs.aws.amazon.com/sns/latest/api/API_SetEndpointAttributes.html).
  831. Attributes map[string]*string `type:"map"`
  832. // Arbitrary user data to associate with the endpoint. Amazon SNS does not use
  833. // this data. The data must be in UTF-8 format and less than 2KB.
  834. CustomUserData *string `type:"string"`
  835. // PlatformApplicationArn returned from CreatePlatformApplication is used to
  836. // create a an endpoint.
  837. PlatformApplicationArn *string `type:"string" required:"true"`
  838. // Unique identifier created by the notification service for an app on a device.
  839. // The specific name for Token will vary, depending on which notification service
  840. // is being used. For example, when using APNS as the notification service,
  841. // you need the device token. Alternatively, when using GCM or ADM, the device
  842. // token equivalent is called the registration ID.
  843. Token *string `type:"string" required:"true"`
  844. metadataCreatePlatformEndpointInput `json:"-" xml:"-"`
  845. }
  846. type metadataCreatePlatformEndpointInput struct {
  847. SDKShapeTraits bool `type:"structure"`
  848. }
  849. // String returns the string representation
  850. func (s CreatePlatformEndpointInput) String() string {
  851. return awsutil.Prettify(s)
  852. }
  853. // GoString returns the string representation
  854. func (s CreatePlatformEndpointInput) GoString() string {
  855. return s.String()
  856. }
  857. // Response from CreateEndpoint action.
  858. type CreatePlatformEndpointOutput struct {
  859. // EndpointArn returned from CreateEndpoint action.
  860. EndpointArn *string `type:"string"`
  861. metadataCreatePlatformEndpointOutput `json:"-" xml:"-"`
  862. }
  863. type metadataCreatePlatformEndpointOutput struct {
  864. SDKShapeTraits bool `type:"structure"`
  865. }
  866. // String returns the string representation
  867. func (s CreatePlatformEndpointOutput) String() string {
  868. return awsutil.Prettify(s)
  869. }
  870. // GoString returns the string representation
  871. func (s CreatePlatformEndpointOutput) GoString() string {
  872. return s.String()
  873. }
  874. // Input for CreateTopic action.
  875. type CreateTopicInput struct {
  876. // The name of the topic you want to create.
  877. //
  878. // Constraints: Topic names must be made up of only uppercase and lowercase
  879. // ASCII letters, numbers, underscores, and hyphens, and must be between 1 and
  880. // 256 characters long.
  881. Name *string `type:"string" required:"true"`
  882. metadataCreateTopicInput `json:"-" xml:"-"`
  883. }
  884. type metadataCreateTopicInput struct {
  885. SDKShapeTraits bool `type:"structure"`
  886. }
  887. // String returns the string representation
  888. func (s CreateTopicInput) String() string {
  889. return awsutil.Prettify(s)
  890. }
  891. // GoString returns the string representation
  892. func (s CreateTopicInput) GoString() string {
  893. return s.String()
  894. }
  895. // Response from CreateTopic action.
  896. type CreateTopicOutput struct {
  897. // The Amazon Resource Name (ARN) assigned to the created topic.
  898. TopicArn *string `type:"string"`
  899. metadataCreateTopicOutput `json:"-" xml:"-"`
  900. }
  901. type metadataCreateTopicOutput struct {
  902. SDKShapeTraits bool `type:"structure"`
  903. }
  904. // String returns the string representation
  905. func (s CreateTopicOutput) String() string {
  906. return awsutil.Prettify(s)
  907. }
  908. // GoString returns the string representation
  909. func (s CreateTopicOutput) GoString() string {
  910. return s.String()
  911. }
  912. // Input for DeleteEndpoint action.
  913. type DeleteEndpointInput struct {
  914. // EndpointArn of endpoint to delete.
  915. EndpointArn *string `type:"string" required:"true"`
  916. metadataDeleteEndpointInput `json:"-" xml:"-"`
  917. }
  918. type metadataDeleteEndpointInput struct {
  919. SDKShapeTraits bool `type:"structure"`
  920. }
  921. // String returns the string representation
  922. func (s DeleteEndpointInput) String() string {
  923. return awsutil.Prettify(s)
  924. }
  925. // GoString returns the string representation
  926. func (s DeleteEndpointInput) GoString() string {
  927. return s.String()
  928. }
  929. type DeleteEndpointOutput struct {
  930. metadataDeleteEndpointOutput `json:"-" xml:"-"`
  931. }
  932. type metadataDeleteEndpointOutput struct {
  933. SDKShapeTraits bool `type:"structure"`
  934. }
  935. // String returns the string representation
  936. func (s DeleteEndpointOutput) String() string {
  937. return awsutil.Prettify(s)
  938. }
  939. // GoString returns the string representation
  940. func (s DeleteEndpointOutput) GoString() string {
  941. return s.String()
  942. }
  943. // Input for DeletePlatformApplication action.
  944. type DeletePlatformApplicationInput struct {
  945. // PlatformApplicationArn of platform application object to delete.
  946. PlatformApplicationArn *string `type:"string" required:"true"`
  947. metadataDeletePlatformApplicationInput `json:"-" xml:"-"`
  948. }
  949. type metadataDeletePlatformApplicationInput struct {
  950. SDKShapeTraits bool `type:"structure"`
  951. }
  952. // String returns the string representation
  953. func (s DeletePlatformApplicationInput) String() string {
  954. return awsutil.Prettify(s)
  955. }
  956. // GoString returns the string representation
  957. func (s DeletePlatformApplicationInput) GoString() string {
  958. return s.String()
  959. }
  960. type DeletePlatformApplicationOutput struct {
  961. metadataDeletePlatformApplicationOutput `json:"-" xml:"-"`
  962. }
  963. type metadataDeletePlatformApplicationOutput struct {
  964. SDKShapeTraits bool `type:"structure"`
  965. }
  966. // String returns the string representation
  967. func (s DeletePlatformApplicationOutput) String() string {
  968. return awsutil.Prettify(s)
  969. }
  970. // GoString returns the string representation
  971. func (s DeletePlatformApplicationOutput) GoString() string {
  972. return s.String()
  973. }
  974. type DeleteTopicInput struct {
  975. // The ARN of the topic you want to delete.
  976. TopicArn *string `type:"string" required:"true"`
  977. metadataDeleteTopicInput `json:"-" xml:"-"`
  978. }
  979. type metadataDeleteTopicInput struct {
  980. SDKShapeTraits bool `type:"structure"`
  981. }
  982. // String returns the string representation
  983. func (s DeleteTopicInput) String() string {
  984. return awsutil.Prettify(s)
  985. }
  986. // GoString returns the string representation
  987. func (s DeleteTopicInput) GoString() string {
  988. return s.String()
  989. }
  990. type DeleteTopicOutput struct {
  991. metadataDeleteTopicOutput `json:"-" xml:"-"`
  992. }
  993. type metadataDeleteTopicOutput struct {
  994. SDKShapeTraits bool `type:"structure"`
  995. }
  996. // String returns the string representation
  997. func (s DeleteTopicOutput) String() string {
  998. return awsutil.Prettify(s)
  999. }
  1000. // GoString returns the string representation
  1001. func (s DeleteTopicOutput) GoString() string {
  1002. return s.String()
  1003. }
  1004. // Endpoint for mobile app and device.
  1005. type Endpoint struct {
  1006. // Attributes for endpoint.
  1007. Attributes map[string]*string `type:"map"`
  1008. // EndpointArn for mobile app and device.
  1009. EndpointArn *string `type:"string"`
  1010. metadataEndpoint `json:"-" xml:"-"`
  1011. }
  1012. type metadataEndpoint struct {
  1013. SDKShapeTraits bool `type:"structure"`
  1014. }
  1015. // String returns the string representation
  1016. func (s Endpoint) String() string {
  1017. return awsutil.Prettify(s)
  1018. }
  1019. // GoString returns the string representation
  1020. func (s Endpoint) GoString() string {
  1021. return s.String()
  1022. }
  1023. // Input for GetEndpointAttributes action.
  1024. type GetEndpointAttributesInput struct {
  1025. // EndpointArn for GetEndpointAttributes input.
  1026. EndpointArn *string `type:"string" required:"true"`
  1027. metadataGetEndpointAttributesInput `json:"-" xml:"-"`
  1028. }
  1029. type metadataGetEndpointAttributesInput struct {
  1030. SDKShapeTraits bool `type:"structure"`
  1031. }
  1032. // String returns the string representation
  1033. func (s GetEndpointAttributesInput) String() string {
  1034. return awsutil.Prettify(s)
  1035. }
  1036. // GoString returns the string representation
  1037. func (s GetEndpointAttributesInput) GoString() string {
  1038. return s.String()
  1039. }
  1040. // Response from GetEndpointAttributes of the EndpointArn.
  1041. type GetEndpointAttributesOutput struct {
  1042. // Attributes include the following:
  1043. //
  1044. // CustomUserData -- arbitrary user data to associate with the endpoint.
  1045. // Amazon SNS does not use this data. The data must be in UTF-8 format and less
  1046. // than 2KB. Enabled -- flag that enables/disables delivery to the endpoint.
  1047. // Amazon SNS will set this to false when a notification service indicates to
  1048. // Amazon SNS that the endpoint is invalid. Users can set it back to true, typically
  1049. // after updating Token. Token -- device token, also referred to as a registration
  1050. // id, for an app and mobile device. This is returned from the notification
  1051. // service when an app and mobile device are registered with the notification
  1052. // service.
  1053. Attributes map[string]*string `type:"map"`
  1054. metadataGetEndpointAttributesOutput `json:"-" xml:"-"`
  1055. }
  1056. type metadataGetEndpointAttributesOutput struct {
  1057. SDKShapeTraits bool `type:"structure"`
  1058. }
  1059. // String returns the string representation
  1060. func (s GetEndpointAttributesOutput) String() string {
  1061. return awsutil.Prettify(s)
  1062. }
  1063. // GoString returns the string representation
  1064. func (s GetEndpointAttributesOutput) GoString() string {
  1065. return s.String()
  1066. }
  1067. // Input for GetPlatformApplicationAttributes action.
  1068. type GetPlatformApplicationAttributesInput struct {
  1069. // PlatformApplicationArn for GetPlatformApplicationAttributesInput.
  1070. PlatformApplicationArn *string `type:"string" required:"true"`
  1071. metadataGetPlatformApplicationAttributesInput `json:"-" xml:"-"`
  1072. }
  1073. type metadataGetPlatformApplicationAttributesInput struct {
  1074. SDKShapeTraits bool `type:"structure"`
  1075. }
  1076. // String returns the string representation
  1077. func (s GetPlatformApplicationAttributesInput) String() string {
  1078. return awsutil.Prettify(s)
  1079. }
  1080. // GoString returns the string representation
  1081. func (s GetPlatformApplicationAttributesInput) GoString() string {
  1082. return s.String()
  1083. }
  1084. // Response for GetPlatformApplicationAttributes action.
  1085. type GetPlatformApplicationAttributesOutput struct {
  1086. // Attributes include the following:
  1087. //
  1088. // EventEndpointCreated -- Topic ARN to which EndpointCreated event notifications
  1089. // should be sent. EventEndpointDeleted -- Topic ARN to which EndpointDeleted
  1090. // event notifications should be sent. EventEndpointUpdated -- Topic ARN to
  1091. // which EndpointUpdate event notifications should be sent. EventDeliveryFailure
  1092. // -- Topic ARN to which DeliveryFailure event notifications should be sent
  1093. // upon Direct Publish delivery failure (permanent) to one of the application's
  1094. // endpoints.
  1095. Attributes map[string]*string `type:"map"`
  1096. metadataGetPlatformApplicationAttributesOutput `json:"-" xml:"-"`
  1097. }
  1098. type metadataGetPlatformApplicationAttributesOutput struct {
  1099. SDKShapeTraits bool `type:"structure"`
  1100. }
  1101. // String returns the string representation
  1102. func (s GetPlatformApplicationAttributesOutput) String() string {
  1103. return awsutil.Prettify(s)
  1104. }
  1105. // GoString returns the string representation
  1106. func (s GetPlatformApplicationAttributesOutput) GoString() string {
  1107. return s.String()
  1108. }
  1109. // Input for GetSubscriptionAttributes.
  1110. type GetSubscriptionAttributesInput struct {
  1111. // The ARN of the subscription whose properties you want to get.
  1112. SubscriptionArn *string `type:"string" required:"true"`
  1113. metadataGetSubscriptionAttributesInput `json:"-" xml:"-"`
  1114. }
  1115. type metadataGetSubscriptionAttributesInput struct {
  1116. SDKShapeTraits bool `type:"structure"`
  1117. }
  1118. // String returns the string representation
  1119. func (s GetSubscriptionAttributesInput) String() string {
  1120. return awsutil.Prettify(s)
  1121. }
  1122. // GoString returns the string representation
  1123. func (s GetSubscriptionAttributesInput) GoString() string {
  1124. return s.String()
  1125. }
  1126. // Response for GetSubscriptionAttributes action.
  1127. type GetSubscriptionAttributesOutput struct {
  1128. // A map of the subscription's attributes. Attributes in this map include the
  1129. // following:
  1130. //
  1131. // SubscriptionArn -- the subscription's ARN TopicArn -- the topic ARN that
  1132. // the subscription is associated with Owner -- the AWS account ID of the subscription's
  1133. // owner ConfirmationWasAuthenticated -- true if the subscription confirmation
  1134. // request was authenticated DeliveryPolicy -- the JSON serialization of the
  1135. // subscription's delivery policy EffectiveDeliveryPolicy -- the JSON serialization
  1136. // of the effective delivery policy that takes into account the topic delivery
  1137. // policy and account system defaults
  1138. Attributes map[string]*string `type:"map"`
  1139. metadataGetSubscriptionAttributesOutput `json:"-" xml:"-"`
  1140. }
  1141. type metadataGetSubscriptionAttributesOutput struct {
  1142. SDKShapeTraits bool `type:"structure"`
  1143. }
  1144. // String returns the string representation
  1145. func (s GetSubscriptionAttributesOutput) String() string {
  1146. return awsutil.Prettify(s)
  1147. }
  1148. // GoString returns the string representation
  1149. func (s GetSubscriptionAttributesOutput) GoString() string {
  1150. return s.String()
  1151. }
  1152. // Input for GetTopicAttributes action.
  1153. type GetTopicAttributesInput struct {
  1154. // The ARN of the topic whose properties you want to get.
  1155. TopicArn *string `type:"string" required:"true"`
  1156. metadataGetTopicAttributesInput `json:"-" xml:"-"`
  1157. }
  1158. type metadataGetTopicAttributesInput struct {
  1159. SDKShapeTraits bool `type:"structure"`
  1160. }
  1161. // String returns the string representation
  1162. func (s GetTopicAttributesInput) String() string {
  1163. return awsutil.Prettify(s)
  1164. }
  1165. // GoString returns the string representation
  1166. func (s GetTopicAttributesInput) GoString() string {
  1167. return s.String()
  1168. }
  1169. // Response for GetTopicAttributes action.
  1170. type GetTopicAttributesOutput struct {
  1171. // A map of the topic's attributes. Attributes in this map include the following:
  1172. //
  1173. // TopicArn -- the topic's ARN Owner -- the AWS account ID of the topic's
  1174. // owner Policy -- the JSON serialization of the topic's access control policy
  1175. // DisplayName -- the human-readable name used in the "From" field for notifications
  1176. // to email and email-json endpoints SubscriptionsPending -- the number of
  1177. // subscriptions pending confirmation on this topic SubscriptionsConfirmed
  1178. // -- the number of confirmed subscriptions on this topic SubscriptionsDeleted
  1179. // -- the number of deleted subscriptions on this topic DeliveryPolicy -- the
  1180. // JSON serialization of the topic's delivery policy EffectiveDeliveryPolicy
  1181. // -- the JSON serialization of the effective delivery policy that takes into
  1182. // account system defaults
  1183. Attributes map[string]*string `type:"map"`
  1184. metadataGetTopicAttributesOutput `json:"-" xml:"-"`
  1185. }
  1186. type metadataGetTopicAttributesOutput struct {
  1187. SDKShapeTraits bool `type:"structure"`
  1188. }
  1189. // String returns the string representation
  1190. func (s GetTopicAttributesOutput) String() string {
  1191. return awsutil.Prettify(s)
  1192. }
  1193. // GoString returns the string representation
  1194. func (s GetTopicAttributesOutput) GoString() string {
  1195. return s.String()
  1196. }
  1197. // Input for ListEndpointsByPlatformApplication action.
  1198. type ListEndpointsByPlatformApplicationInput struct {
  1199. // NextToken string is used when calling ListEndpointsByPlatformApplication
  1200. // action to retrieve additional records that are available after the first
  1201. // page results.
  1202. NextToken *string `type:"string"`
  1203. // PlatformApplicationArn for ListEndpointsByPlatformApplicationInput action.
  1204. PlatformApplicationArn *string `type:"string" required:"true"`
  1205. metadataListEndpointsByPlatformApplicationInput `json:"-" xml:"-"`
  1206. }
  1207. type metadataListEndpointsByPlatformApplicationInput struct {
  1208. SDKShapeTraits bool `type:"structure"`
  1209. }
  1210. // String returns the string representation
  1211. func (s ListEndpointsByPlatformApplicationInput) String() string {
  1212. return awsutil.Prettify(s)
  1213. }
  1214. // GoString returns the string representation
  1215. func (s ListEndpointsByPlatformApplicationInput) GoString() string {
  1216. return s.String()
  1217. }
  1218. // Response for ListEndpointsByPlatformApplication action.
  1219. type ListEndpointsByPlatformApplicationOutput struct {
  1220. // Endpoints returned for ListEndpointsByPlatformApplication action.
  1221. Endpoints []*Endpoint `type:"list"`
  1222. // NextToken string is returned when calling ListEndpointsByPlatformApplication
  1223. // action if additional records are available after the first page results.
  1224. NextToken *string `type:"string"`
  1225. metadataListEndpointsByPlatformApplicationOutput `json:"-" xml:"-"`
  1226. }
  1227. type metadataListEndpointsByPlatformApplicationOutput struct {
  1228. SDKShapeTraits bool `type:"structure"`
  1229. }
  1230. // String returns the string representation
  1231. func (s ListEndpointsByPlatformApplicationOutput) String() string {
  1232. return awsutil.Prettify(s)
  1233. }
  1234. // GoString returns the string representation
  1235. func (s ListEndpointsByPlatformApplicationOutput) GoString() string {
  1236. return s.String()
  1237. }
  1238. // Input for ListPlatformApplications action.
  1239. type ListPlatformApplicationsInput struct {
  1240. // NextToken string is used when calling ListPlatformApplications action to
  1241. // retrieve additional records that are available after the first page results.
  1242. NextToken *string `type:"string"`
  1243. metadataListPlatformApplicationsInput `json:"-" xml:"-"`
  1244. }
  1245. type metadataListPlatformApplicationsInput struct {
  1246. SDKShapeTraits bool `type:"structure"`
  1247. }
  1248. // String returns the string representation
  1249. func (s ListPlatformApplicationsInput) String() string {
  1250. return awsutil.Prettify(s)
  1251. }
  1252. // GoString returns the string representation
  1253. func (s ListPlatformApplicationsInput) GoString() string {
  1254. return s.String()
  1255. }
  1256. // Response for ListPlatformApplications action.
  1257. type ListPlatformApplicationsOutput struct {
  1258. // NextToken string is returned when calling ListPlatformApplications action
  1259. // if additional records are available after the first page results.
  1260. NextToken *string `type:"string"`
  1261. // Platform applications returned when calling ListPlatformApplications action.
  1262. PlatformApplications []*PlatformApplication `type:"list"`
  1263. metadataListPlatformApplicationsOutput `json:"-" xml:"-"`
  1264. }
  1265. type metadataListPlatformApplicationsOutput struct {
  1266. SDKShapeTraits bool `type:"structure"`
  1267. }
  1268. // String returns the string representation
  1269. func (s ListPlatformApplicationsOutput) String() string {
  1270. return awsutil.Prettify(s)
  1271. }
  1272. // GoString returns the string representation
  1273. func (s ListPlatformApplicationsOutput) GoString() string {
  1274. return s.String()
  1275. }
  1276. // Input for ListSubscriptionsByTopic action.
  1277. type ListSubscriptionsByTopicInput struct {
  1278. // Token returned by the previous ListSubscriptionsByTopic request.
  1279. NextToken *string `type:"string"`
  1280. // The ARN of the topic for which you wish to find subscriptions.
  1281. TopicArn *string `type:"string" required:"true"`
  1282. metadataListSubscriptionsByTopicInput `json:"-" xml:"-"`
  1283. }
  1284. type metadataListSubscriptionsByTopicInput struct {
  1285. SDKShapeTraits bool `type:"structure"`
  1286. }
  1287. // String returns the string representation
  1288. func (s ListSubscriptionsByTopicInput) String() string {
  1289. return awsutil.Prettify(s)
  1290. }
  1291. // GoString returns the string representation
  1292. func (s ListSubscriptionsByTopicInput) GoString() string {
  1293. return s.String()
  1294. }
  1295. // Response for ListSubscriptionsByTopic action.
  1296. type ListSubscriptionsByTopicOutput struct {
  1297. // Token to pass along to the next ListSubscriptionsByTopic request. This element
  1298. // is returned if there are more subscriptions to retrieve.
  1299. NextToken *string `type:"string"`
  1300. // A list of subscriptions.
  1301. Subscriptions []*Subscription `type:"list"`
  1302. metadataListSubscriptionsByTopicOutput `json:"-" xml:"-"`
  1303. }
  1304. type metadataListSubscriptionsByTopicOutput struct {
  1305. SDKShapeTraits bool `type:"structure"`
  1306. }
  1307. // String returns the string representation
  1308. func (s ListSubscriptionsByTopicOutput) String() string {
  1309. return awsutil.Prettify(s)
  1310. }
  1311. // GoString returns the string representation
  1312. func (s ListSubscriptionsByTopicOutput) GoString() string {
  1313. return s.String()
  1314. }
  1315. // Input for ListSubscriptions action.
  1316. type ListSubscriptionsInput struct {
  1317. // Token returned by the previous ListSubscriptions request.
  1318. NextToken *string `type:"string"`
  1319. metadataListSubscriptionsInput `json:"-" xml:"-"`
  1320. }
  1321. type metadataListSubscriptionsInput struct {
  1322. SDKShapeTraits bool `type:"structure"`
  1323. }
  1324. // String returns the string representation
  1325. func (s ListSubscriptionsInput) String() string {
  1326. return awsutil.Prettify(s)
  1327. }
  1328. // GoString returns the string representation
  1329. func (s ListSubscriptionsInput) GoString() string {
  1330. return s.String()
  1331. }
  1332. // Response for ListSubscriptions action
  1333. type ListSubscriptionsOutput struct {
  1334. // Token to pass along to the next ListSubscriptions request. This element is
  1335. // returned if there are more subscriptions to retrieve.
  1336. NextToken *string `type:"string"`
  1337. // A list of subscriptions.
  1338. Subscriptions []*Subscription `type:"list"`
  1339. metadataListSubscriptionsOutput `json:"-" xml:"-"`
  1340. }
  1341. type metadataListSubscriptionsOutput struct {
  1342. SDKShapeTraits bool `type:"structure"`
  1343. }
  1344. // String returns the string representation
  1345. func (s ListSubscriptionsOutput) String() string {
  1346. return awsutil.Prettify(s)
  1347. }
  1348. // GoString returns the string representation
  1349. func (s ListSubscriptionsOutput) GoString() string {
  1350. return s.String()
  1351. }
  1352. type ListTopicsInput struct {
  1353. // Token returned by the previous ListTopics request.
  1354. NextToken *string `type:"string"`
  1355. metadataListTopicsInput `json:"-" xml:"-"`
  1356. }
  1357. type metadataListTopicsInput struct {
  1358. SDKShapeTraits bool `type:"structure"`
  1359. }
  1360. // String returns the string representation
  1361. func (s ListTopicsInput) String() string {
  1362. return awsutil.Prettify(s)
  1363. }
  1364. // GoString returns the string representation
  1365. func (s ListTopicsInput) GoString() string {
  1366. return s.String()
  1367. }
  1368. // Response for ListTopics action.
  1369. type ListTopicsOutput struct {
  1370. // Token to pass along to the next ListTopics request. This element is returned
  1371. // if there are additional topics to retrieve.
  1372. NextToken *string `type:"string"`
  1373. // A list of topic ARNs.
  1374. Topics []*Topic `type:"list"`
  1375. metadataListTopicsOutput `json:"-" xml:"-"`
  1376. }
  1377. type metadataListTopicsOutput struct {
  1378. SDKShapeTraits bool `type:"structure"`
  1379. }
  1380. // String returns the string representation
  1381. func (s ListTopicsOutput) String() string {
  1382. return awsutil.Prettify(s)
  1383. }
  1384. // GoString returns the string representation
  1385. func (s ListTopicsOutput) GoString() string {
  1386. return s.String()
  1387. }
  1388. // The user-specified message attribute value. For string data types, the value
  1389. // attribute has the same restrictions on the content as the message body. For
  1390. // more information, see Publish (http://docs.aws.amazon.com/sns/latest/api/API_Publish.html).
  1391. //
  1392. // Name, type, and value must not be empty or null. In addition, the message
  1393. // body should not be empty or null. All parts of the message attribute, including
  1394. // name, type, and value, are included in the message size restriction, which
  1395. // is currently 256 KB (262,144 bytes). For more information, see Using Amazon
  1396. // SNS Message Attributes (http://docs.aws.amazon.com/sns/latest/dg/SNSMessageAttributes.html).
  1397. type MessageAttributeValue struct {
  1398. // Binary type attributes can store any binary data, for example, compressed
  1399. // data, encrypted data, or images.
  1400. BinaryValue []byte `type:"blob"`
  1401. // Amazon SNS supports the following logical data types: String, Number, and
  1402. // Binary. For more information, see Message Attribute Data Types (http://docs.aws.amazon.com/sns/latest/dg/SNSMessageAttributes.html#SNSMessageAttributes.DataTypes).
  1403. DataType *string `type:"string" required:"true"`
  1404. // Strings are Unicode with UTF8 binary encoding. For a list of code values,
  1405. // see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters (http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters).
  1406. StringValue *string `type:"string"`
  1407. metadataMessageAttributeValue `json:"-" xml:"-"`
  1408. }
  1409. type metadataMessageAttributeValue struct {
  1410. SDKShapeTraits bool `type:"structure"`
  1411. }
  1412. // String returns the string representation
  1413. func (s MessageAttributeValue) String() string {
  1414. return awsutil.Prettify(s)
  1415. }
  1416. // GoString returns the string representation
  1417. func (s MessageAttributeValue) GoString() string {
  1418. return s.String()
  1419. }
  1420. // Platform application object.
  1421. type PlatformApplication struct {
  1422. // Attributes for platform application object.
  1423. Attributes map[string]*string `type:"map"`
  1424. // PlatformApplicationArn for platform application object.
  1425. PlatformApplicationArn *string `type:"string"`
  1426. metadataPlatformApplication `json:"-" xml:"-"`
  1427. }
  1428. type metadataPlatformApplication struct {
  1429. SDKShapeTraits bool `type:"structure"`
  1430. }
  1431. // String returns the string representation
  1432. func (s PlatformApplication) String() string {
  1433. return awsutil.Prettify(s)
  1434. }
  1435. // GoString returns the string representation
  1436. func (s PlatformApplication) GoString() string {
  1437. return s.String()
  1438. }
  1439. // Input for Publish action.
  1440. type PublishInput struct {
  1441. // The message you want to send to the topic.
  1442. //
  1443. // If you want to send the same message to all transport protocols, include
  1444. // the text of the message as a String value.
  1445. //
  1446. // If you want to send different messages for each transport protocol, set
  1447. // the value of the MessageStructure parameter to json and use a JSON object
  1448. // for the Message parameter. See the Examples section for the format of the
  1449. // JSON object.
  1450. //
  1451. // Constraints: Messages must be UTF-8 encoded strings at most 256 KB in size
  1452. // (262144 bytes, not 262144 characters).
  1453. //
  1454. // JSON-specific constraints: Keys in the JSON object that correspond to supported
  1455. // transport protocols must have simple JSON string values. The values will
  1456. // be parsed (unescaped) before they are used in outgoing messages. Outbound
  1457. // notifications are JSON encoded (meaning that the characters will be reescaped
  1458. // for sending). Values have a minimum length of 0 (the empty string, "", is
  1459. // allowed). Values have a maximum length bounded by the overall message size
  1460. // (so, including multiple protocols may limit message sizes). Non-string values
  1461. // will cause the key to be ignored. Keys that do not correspond to supported
  1462. // transport protocols are ignored. Duplicate keys are not allowed. Failure
  1463. // to parse or validate any key or value in the message will cause the Publish
  1464. // call to return an error (no partial delivery).
  1465. Message *string `type:"string" required:"true"`
  1466. // Message attributes for Publish action.
  1467. MessageAttributes map[string]*MessageAttributeValue `locationNameKey:"Name" locationNameValue:"Value" type:"map"`
  1468. // Set MessageStructure to json if you want to send a different message for
  1469. // each protocol. For example, using one publish action, you can send a short
  1470. // message to your SMS subscribers and a longer message to your email subscribers.
  1471. // If you set MessageStructure to json, the value of the Message parameter must:
  1472. //
  1473. // be a syntactically valid JSON object; and contain at least a top-level
  1474. // JSON key of "default" with a value that is a string. You can define other
  1475. // top-level keys that define the message you want to send to a specific transport
  1476. // protocol (e.g., "http").
  1477. //
  1478. // For information about sending different messages for each protocol using
  1479. // the AWS Management Console, go to Create Different Messages for Each Protocol
  1480. // (http://docs.aws.amazon.com/sns/latest/gsg/Publish.html#sns-message-formatting-by-protocol)
  1481. // in the Amazon Simple Notification Service Getting Started Guide.
  1482. //
  1483. // Valid value: json
  1484. MessageStructure *string `type:"string"`
  1485. // Optional parameter to be used as the "Subject" line when the message is delivered
  1486. // to email endpoints. This field will also be included, if present, in the
  1487. // standard JSON messages delivered to other endpoints.
  1488. //
  1489. // Constraints: Subjects must be ASCII text that begins with a letter, number,
  1490. // or punctuation mark; must not include line breaks or control characters;
  1491. // and must be less than 100 characters long.
  1492. Subject *string `type:"string"`
  1493. // Either TopicArn or EndpointArn, but not both.
  1494. TargetArn *string `type:"string"`
  1495. // The topic you want to publish to.
  1496. TopicArn *string `type:"string"`
  1497. metadataPublishInput `json:"-" xml:"-"`
  1498. }
  1499. type metadataPublishInput struct {
  1500. SDKShapeTraits bool `type:"structure"`
  1501. }
  1502. // String returns the string representation
  1503. func (s PublishInput) String() string {
  1504. return awsutil.Prettify(s)
  1505. }
  1506. // GoString returns the string representation
  1507. func (s PublishInput) GoString() string {
  1508. return s.String()
  1509. }
  1510. // Response for Publish action.
  1511. type PublishOutput struct {
  1512. // Unique identifier assigned to the published message.
  1513. //
  1514. // Length Constraint: Maximum 100 characters
  1515. MessageId *string `type:"string"`
  1516. metadataPublishOutput `json:"-" xml:"-"`
  1517. }
  1518. type metadataPublishOutput struct {
  1519. SDKShapeTraits bool `type:"structure"`
  1520. }
  1521. // String returns the string representation
  1522. func (s PublishOutput) String() string {
  1523. return awsutil.Prettify(s)
  1524. }
  1525. // GoString returns the string representation
  1526. func (s PublishOutput) GoString() string {
  1527. return s.String()
  1528. }
  1529. // Input for RemovePermission action.
  1530. type RemovePermissionInput struct {
  1531. // The unique label of the statement you want to remove.
  1532. Label *string `type:"string" required:"true"`
  1533. // The ARN of the topic whose access control policy you wish to modify.
  1534. TopicArn *string `type:"string" required:"true"`
  1535. metadataRemovePermissionInput `json:"-" xml:"-"`
  1536. }
  1537. type metadataRemovePermissionInput struct {
  1538. SDKShapeTraits bool `type:"structure"`
  1539. }
  1540. // String returns the string representation
  1541. func (s RemovePermissionInput) String() string {
  1542. return awsutil.Prettify(s)
  1543. }
  1544. // GoString returns the string representation
  1545. func (s RemovePermissionInput) GoString() string {
  1546. return s.String()
  1547. }
  1548. type RemovePermissionOutput struct {
  1549. metadataRemovePermissionOutput `json:"-" xml:"-"`
  1550. }
  1551. type metadataRemovePermissionOutput struct {
  1552. SDKShapeTraits bool `type:"structure"`
  1553. }
  1554. // String returns the string representation
  1555. func (s RemovePermissionOutput) String() string {
  1556. return awsutil.Prettify(s)
  1557. }
  1558. // GoString returns the string representation
  1559. func (s RemovePermissionOutput) GoString() string {
  1560. return s.String()
  1561. }
  1562. // Input for SetEndpointAttributes action.
  1563. type SetEndpointAttributesInput struct {
  1564. // A map of the endpoint attributes. Attributes in this map include the following:
  1565. //
  1566. // CustomUserData -- arbitrary user data to associate with the endpoint.
  1567. // Amazon SNS does not use this data. The data must be in UTF-8 format and less
  1568. // than 2KB. Enabled -- flag that enables/disables delivery to the endpoint.
  1569. // Amazon SNS will set this to false when a notification service indicates to
  1570. // Amazon SNS that the endpoint is invalid. Users can set it back to true, typically
  1571. // after updating Token. Token -- device token, also referred to as a registration
  1572. // id, for an app and mobile device. This is returned from the notification
  1573. // service when an app and mobile device are registered with the notification
  1574. // service.
  1575. Attributes map[string]*string `type:"map" required:"true"`
  1576. // EndpointArn used for SetEndpointAttributes action.
  1577. EndpointArn *string `type:"string" required:"true"`
  1578. metadataSetEndpointAttributesInput `json:"-" xml:"-"`
  1579. }
  1580. type metadataSetEndpointAttributesInput struct {
  1581. SDKShapeTraits bool `type:"structure"`
  1582. }
  1583. // String returns the string representation
  1584. func (s SetEndpointAttributesInput) String() string {
  1585. return awsutil.Prettify(s)
  1586. }
  1587. // GoString returns the string representation
  1588. func (s SetEndpointAttributesInput) GoString() string {
  1589. return s.String()
  1590. }
  1591. type SetEndpointAttributesOutput struct {
  1592. metadataSetEndpointAttributesOutput `json:"-" xml:"-"`
  1593. }
  1594. type metadataSetEndpointAttributesOutput struct {
  1595. SDKShapeTraits bool `type:"structure"`
  1596. }
  1597. // String returns the string representation
  1598. func (s SetEndpointAttributesOutput) String() string {
  1599. return awsutil.Prettify(s)
  1600. }
  1601. // GoString returns the string representation
  1602. func (s SetEndpointAttributesOutput) GoString() string {
  1603. return s.String()
  1604. }
  1605. // Input for SetPlatformApplicationAttributes action.
  1606. type SetPlatformApplicationAttributesInput struct {
  1607. // A map of the platform application attributes. Attributes in this map include
  1608. // the following:
  1609. //
  1610. // PlatformCredential -- The credential received from the notification service.
  1611. // For APNS/APNS_SANDBOX, PlatformCredential is "private key". For GCM, PlatformCredential
  1612. // is "API key". For ADM, PlatformCredential is "client secret". PlatformPrincipal
  1613. // -- The principal received from the notification service. For APNS/APNS_SANDBOX,
  1614. // PlatformPrincipal is "SSL certificate". For GCM, PlatformPrincipal is not
  1615. // applicable. For ADM, PlatformPrincipal is "client id". EventEndpointCreated
  1616. // -- Topic ARN to which EndpointCreated event notifications should be sent.
  1617. // EventEndpointDeleted -- Topic ARN to which EndpointDeleted event notifications
  1618. // should be sent. EventEndpointUpdated -- Topic ARN to which EndpointUpdate
  1619. // event notifications should be sent. EventDeliveryFailure -- Topic ARN to
  1620. // which DeliveryFailure event notifications should be sent upon Direct Publish
  1621. // delivery failure (permanent) to one of the application's endpoints.
  1622. Attributes map[string]*string `type:"map" required:"true"`
  1623. // PlatformApplicationArn for SetPlatformApplicationAttributes action.
  1624. PlatformApplicationArn *string `type:"string" required:"true"`
  1625. metadataSetPlatformApplicationAttributesInput `json:"-" xml:"-"`
  1626. }
  1627. type metadataSetPlatformApplicationAttributesInput struct {
  1628. SDKShapeTraits bool `type:"structure"`
  1629. }
  1630. // String returns the string representation
  1631. func (s SetPlatformApplicationAttributesInput) String() string {
  1632. return awsutil.Prettify(s)
  1633. }
  1634. // GoString returns the string representation
  1635. func (s SetPlatformApplicationAttributesInput) GoString() string {
  1636. return s.String()
  1637. }
  1638. type SetPlatformApplicationAttributesOutput struct {
  1639. metadataSetPlatformApplicationAttributesOutput `json:"-" xml:"-"`
  1640. }
  1641. type metadataSetPlatformApplicationAttributesOutput struct {
  1642. SDKShapeTraits bool `type:"structure"`
  1643. }
  1644. // String returns the string representation
  1645. func (s SetPlatformApplicationAttributesOutput) String() string {
  1646. return awsutil.Prettify(s)
  1647. }
  1648. // GoString returns the string representation
  1649. func (s SetPlatformApplicationAttributesOutput) GoString() string {
  1650. return s.String()
  1651. }
  1652. // Input for SetSubscriptionAttributes action.
  1653. type SetSubscriptionAttributesInput struct {
  1654. // The name of the attribute you want to set. Only a subset of the subscriptions
  1655. // attributes are mutable.
  1656. //
  1657. // Valid values: DeliveryPolicy | RawMessageDelivery
  1658. AttributeName *string `type:"string" required:"true"`
  1659. // The new value for the attribute in JSON format.
  1660. AttributeValue *string `type:"string"`
  1661. // The ARN of the subscription to modify.
  1662. SubscriptionArn *string `type:"string" required:"true"`
  1663. metadataSetSubscriptionAttributesInput `json:"-" xml:"-"`
  1664. }
  1665. type metadataSetSubscriptionAttributesInput struct {
  1666. SDKShapeTraits bool `type:"structure"`
  1667. }
  1668. // String returns the string representation
  1669. func (s SetSubscriptionAttributesInput) String() string {
  1670. return awsutil.Prettify(s)
  1671. }
  1672. // GoString returns the string representation
  1673. func (s SetSubscriptionAttributesInput) GoString() string {
  1674. return s.String()
  1675. }
  1676. type SetSubscriptionAttributesOutput struct {
  1677. metadataSetSubscriptionAttributesOutput `json:"-" xml:"-"`
  1678. }
  1679. type metadataSetSubscriptionAttributesOutput struct {
  1680. SDKShapeTraits bool `type:"structure"`
  1681. }
  1682. // String returns the string representation
  1683. func (s SetSubscriptionAttributesOutput) String() string {
  1684. return awsutil.Prettify(s)
  1685. }
  1686. // GoString returns the string representation
  1687. func (s SetSubscriptionAttributesOutput) GoString() string {
  1688. return s.String()
  1689. }
  1690. // Input for SetTopicAttributes action.
  1691. type SetTopicAttributesInput struct {
  1692. // The name of the attribute you want to set. Only a subset of the topic's attributes
  1693. // are mutable.
  1694. //
  1695. // Valid values: Policy | DisplayName | DeliveryPolicy
  1696. AttributeName *string `type:"string" required:"true"`
  1697. // The new value for the attribute.
  1698. AttributeValue *string `type:"string"`
  1699. // The ARN of the topic to modify.
  1700. TopicArn *string `type:"string" required:"true"`
  1701. metadataSetTopicAttributesInput `json:"-" xml:"-"`
  1702. }
  1703. type metadataSetTopicAttributesInput struct {
  1704. SDKShapeTraits bool `type:"structure"`
  1705. }
  1706. // String returns the string representation
  1707. func (s SetTopicAttributesInput) String() string {
  1708. return awsutil.Prettify(s)
  1709. }
  1710. // GoString returns the string representation
  1711. func (s SetTopicAttributesInput) GoString() string {
  1712. return s.String()
  1713. }
  1714. type SetTopicAttributesOutput struct {
  1715. metadataSetTopicAttributesOutput `json:"-" xml:"-"`
  1716. }
  1717. type metadataSetTopicAttributesOutput struct {
  1718. SDKShapeTraits bool `type:"structure"`
  1719. }
  1720. // String returns the string representation
  1721. func (s SetTopicAttributesOutput) String() string {
  1722. return awsutil.Prettify(s)
  1723. }
  1724. // GoString returns the string representation
  1725. func (s SetTopicAttributesOutput) GoString() string {
  1726. return s.String()
  1727. }
  1728. // Input for Subscribe action.
  1729. type SubscribeInput struct {
  1730. // The endpoint that you want to receive notifications. Endpoints vary by protocol:
  1731. //
  1732. // For the http protocol, the endpoint is an URL beginning with "http://"
  1733. // For the https protocol, the endpoint is a URL beginning with "https://" For
  1734. // the email protocol, the endpoint is an email address For the email-json protocol,
  1735. // the endpoint is an email address For the sms protocol, the endpoint is a
  1736. // phone number of an SMS-enabled device For the sqs protocol, the endpoint
  1737. // is the ARN of an Amazon SQS queue For the application protocol, the endpoint
  1738. // is the EndpointArn of a mobile app and device.
  1739. Endpoint *string `type:"string"`
  1740. // The protocol you want to use. Supported protocols include:
  1741. //
  1742. // http -- delivery of JSON-encoded message via HTTP POST https -- delivery
  1743. // of JSON-encoded message via HTTPS POST email -- delivery of message via
  1744. // SMTP email-json -- delivery of JSON-encoded message via SMTP sms -- delivery
  1745. // of message via SMS sqs -- delivery of JSON-encoded message to an Amazon
  1746. // SQS queue application -- delivery of JSON-encoded message to an EndpointArn
  1747. // for a mobile app and device.
  1748. Protocol *string `type:"string" required:"true"`
  1749. // The ARN of the topic you want to subscribe to.
  1750. TopicArn *string `type:"string" required:"true"`
  1751. metadataSubscribeInput `json:"-" xml:"-"`
  1752. }
  1753. type metadataSubscribeInput struct {
  1754. SDKShapeTraits bool `type:"structure"`
  1755. }
  1756. // String returns the string representation
  1757. func (s SubscribeInput) String() string {
  1758. return awsutil.Prettify(s)
  1759. }
  1760. // GoString returns the string representation
  1761. func (s SubscribeInput) GoString() string {
  1762. return s.String()
  1763. }
  1764. // Response for Subscribe action.
  1765. type SubscribeOutput struct {
  1766. // The ARN of the subscription, if the service was able to create a subscription
  1767. // immediately (without requiring endpoint owner confirmation).
  1768. SubscriptionArn *string `type:"string"`
  1769. metadataSubscribeOutput `json:"-" xml:"-"`
  1770. }
  1771. type metadataSubscribeOutput struct {
  1772. SDKShapeTraits bool `type:"structure"`
  1773. }
  1774. // String returns the string representation
  1775. func (s SubscribeOutput) String() string {
  1776. return awsutil.Prettify(s)
  1777. }
  1778. // GoString returns the string representation
  1779. func (s SubscribeOutput) GoString() string {
  1780. return s.String()
  1781. }
  1782. // A wrapper type for the attributes of an Amazon SNS subscription.
  1783. type Subscription struct {
  1784. // The subscription's endpoint (format depends on the protocol).
  1785. Endpoint *string `type:"string"`
  1786. // The subscription's owner.
  1787. Owner *string `type:"string"`
  1788. // The subscription's protocol.
  1789. Protocol *string `type:"string"`
  1790. // The subscription's ARN.
  1791. SubscriptionArn *string `type:"string"`
  1792. // The ARN of the subscription's topic.
  1793. TopicArn *string `type:"string"`
  1794. metadataSubscription `json:"-" xml:"-"`
  1795. }
  1796. type metadataSubscription struct {
  1797. SDKShapeTraits bool `type:"structure"`
  1798. }
  1799. // String returns the string representation
  1800. func (s Subscription) String() string {
  1801. return awsutil.Prettify(s)
  1802. }
  1803. // GoString returns the string representation
  1804. func (s Subscription) GoString() string {
  1805. return s.String()
  1806. }
  1807. // A wrapper type for the topic's Amazon Resource Name (ARN). To retrieve a
  1808. // topic's attributes, use GetTopicAttributes.
  1809. type Topic struct {
  1810. // The topic's ARN.
  1811. TopicArn *string `type:"string"`
  1812. metadataTopic `json:"-" xml:"-"`
  1813. }
  1814. type metadataTopic struct {
  1815. SDKShapeTraits bool `type:"structure"`
  1816. }
  1817. // String returns the string representation
  1818. func (s Topic) String() string {
  1819. return awsutil.Prettify(s)
  1820. }
  1821. // GoString returns the string representation
  1822. func (s Topic) GoString() string {
  1823. return s.String()
  1824. }
  1825. // Input for Unsubscribe action.
  1826. type UnsubscribeInput struct {
  1827. // The ARN of the subscription to be deleted.
  1828. SubscriptionArn *string `type:"string" required:"true"`
  1829. metadataUnsubscribeInput `json:"-" xml:"-"`
  1830. }
  1831. type metadataUnsubscribeInput struct {
  1832. SDKShapeTraits bool `type:"structure"`
  1833. }
  1834. // String returns the string representation
  1835. func (s UnsubscribeInput) String() string {
  1836. return awsutil.Prettify(s)
  1837. }
  1838. // GoString returns the string representation
  1839. func (s UnsubscribeInput) GoString() string {
  1840. return s.String()
  1841. }
  1842. type UnsubscribeOutput struct {
  1843. metadataUnsubscribeOutput `json:"-" xml:"-"`
  1844. }
  1845. type metadataUnsubscribeOutput struct {
  1846. SDKShapeTraits bool `type:"structure"`
  1847. }
  1848. // String returns the string representation
  1849. func (s UnsubscribeOutput) String() string {
  1850. return awsutil.Prettify(s)
  1851. }
  1852. // GoString returns the string representation
  1853. func (s UnsubscribeOutput) GoString() string {
  1854. return s.String()
  1855. }