1package Paws::SNS { 2 use Moose; 3 sub service { 'sns' } 4 sub version { '2010-03-31' } 5 sub flattened_arrays { 0 } 6 7 with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::QueryCaller', 'Paws::Net::XMLResponse'; 8 9 10 sub AddPermission { 11 my $self = shift; 12 my $call_object = $self->new_with_coercions('Paws::SNS::AddPermission', @_); 13 return $self->caller->do_call($self, $call_object); 14 } 15 sub ConfirmSubscription { 16 my $self = shift; 17 my $call_object = $self->new_with_coercions('Paws::SNS::ConfirmSubscription', @_); 18 return $self->caller->do_call($self, $call_object); 19 } 20 sub CreatePlatformApplication { 21 my $self = shift; 22 my $call_object = $self->new_with_coercions('Paws::SNS::CreatePlatformApplication', @_); 23 return $self->caller->do_call($self, $call_object); 24 } 25 sub CreatePlatformEndpoint { 26 my $self = shift; 27 my $call_object = $self->new_with_coercions('Paws::SNS::CreatePlatformEndpoint', @_); 28 return $self->caller->do_call($self, $call_object); 29 } 30 sub CreateTopic { 31 my $self = shift; 32 my $call_object = $self->new_with_coercions('Paws::SNS::CreateTopic', @_); 33 return $self->caller->do_call($self, $call_object); 34 } 35 sub DeleteEndpoint { 36 my $self = shift; 37 my $call_object = $self->new_with_coercions('Paws::SNS::DeleteEndpoint', @_); 38 return $self->caller->do_call($self, $call_object); 39 } 40 sub DeletePlatformApplication { 41 my $self = shift; 42 my $call_object = $self->new_with_coercions('Paws::SNS::DeletePlatformApplication', @_); 43 return $self->caller->do_call($self, $call_object); 44 } 45 sub DeleteTopic { 46 my $self = shift; 47 my $call_object = $self->new_with_coercions('Paws::SNS::DeleteTopic', @_); 48 return $self->caller->do_call($self, $call_object); 49 } 50 sub GetEndpointAttributes { 51 my $self = shift; 52 my $call_object = $self->new_with_coercions('Paws::SNS::GetEndpointAttributes', @_); 53 return $self->caller->do_call($self, $call_object); 54 } 55 sub GetPlatformApplicationAttributes { 56 my $self = shift; 57 my $call_object = $self->new_with_coercions('Paws::SNS::GetPlatformApplicationAttributes', @_); 58 return $self->caller->do_call($self, $call_object); 59 } 60 sub GetSubscriptionAttributes { 61 my $self = shift; 62 my $call_object = $self->new_with_coercions('Paws::SNS::GetSubscriptionAttributes', @_); 63 return $self->caller->do_call($self, $call_object); 64 } 65 sub GetTopicAttributes { 66 my $self = shift; 67 my $call_object = $self->new_with_coercions('Paws::SNS::GetTopicAttributes', @_); 68 return $self->caller->do_call($self, $call_object); 69 } 70 sub ListEndpointsByPlatformApplication { 71 my $self = shift; 72 my $call_object = $self->new_with_coercions('Paws::SNS::ListEndpointsByPlatformApplication', @_); 73 return $self->caller->do_call($self, $call_object); 74 } 75 sub ListPlatformApplications { 76 my $self = shift; 77 my $call_object = $self->new_with_coercions('Paws::SNS::ListPlatformApplications', @_); 78 return $self->caller->do_call($self, $call_object); 79 } 80 sub ListSubscriptions { 81 my $self = shift; 82 my $call_object = $self->new_with_coercions('Paws::SNS::ListSubscriptions', @_); 83 return $self->caller->do_call($self, $call_object); 84 } 85 sub ListSubscriptionsByTopic { 86 my $self = shift; 87 my $call_object = $self->new_with_coercions('Paws::SNS::ListSubscriptionsByTopic', @_); 88 return $self->caller->do_call($self, $call_object); 89 } 90 sub ListTopics { 91 my $self = shift; 92 my $call_object = $self->new_with_coercions('Paws::SNS::ListTopics', @_); 93 return $self->caller->do_call($self, $call_object); 94 } 95 sub Publish { 96 my $self = shift; 97 my $call_object = $self->new_with_coercions('Paws::SNS::Publish', @_); 98 return $self->caller->do_call($self, $call_object); 99 } 100 sub RemovePermission { 101 my $self = shift; 102 my $call_object = $self->new_with_coercions('Paws::SNS::RemovePermission', @_); 103 return $self->caller->do_call($self, $call_object); 104 } 105 sub SetEndpointAttributes { 106 my $self = shift; 107 my $call_object = $self->new_with_coercions('Paws::SNS::SetEndpointAttributes', @_); 108 return $self->caller->do_call($self, $call_object); 109 } 110 sub SetPlatformApplicationAttributes { 111 my $self = shift; 112 my $call_object = $self->new_with_coercions('Paws::SNS::SetPlatformApplicationAttributes', @_); 113 return $self->caller->do_call($self, $call_object); 114 } 115 sub SetSubscriptionAttributes { 116 my $self = shift; 117 my $call_object = $self->new_with_coercions('Paws::SNS::SetSubscriptionAttributes', @_); 118 return $self->caller->do_call($self, $call_object); 119 } 120 sub SetTopicAttributes { 121 my $self = shift; 122 my $call_object = $self->new_with_coercions('Paws::SNS::SetTopicAttributes', @_); 123 return $self->caller->do_call($self, $call_object); 124 } 125 sub Subscribe { 126 my $self = shift; 127 my $call_object = $self->new_with_coercions('Paws::SNS::Subscribe', @_); 128 return $self->caller->do_call($self, $call_object); 129 } 130 sub Unsubscribe { 131 my $self = shift; 132 my $call_object = $self->new_with_coercions('Paws::SNS::Unsubscribe', @_); 133 return $self->caller->do_call($self, $call_object); 134 } 135} 1361; 137 138### main pod documentation begin ### 139 140=head1 NAME 141 142Paws::SNS - Perl Interface to AWS Amazon Simple Notification Service 143 144=head1 SYNOPSIS 145 146 use Paws; 147 148 my $obj = Paws->service('SNS')->new; 149 my $res = $obj->Method( 150 Arg1 => $val1, 151 Arg2 => [ 'V1', 'V2' ], 152 # if Arg3 is an object, the HashRef will be used as arguments to the constructor 153 # of the arguments type 154 Arg3 => { Att1 => 'Val1' }, 155 # if Arg4 is an array of objects, the HashRefs will be passed as arguments to 156 # the constructor of the arguments type 157 Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ], 158 ); 159 160=head1 DESCRIPTION 161 162 163 164Amazon Simple Notification Service 165 166Amazon Simple Notification Service (Amazon SNS) is a web service that 167enables you to build distributed web-enabled applications. Applications 168can use Amazon SNS to easily push real-time notification messages to 169interested subscribers over multiple delivery protocols. For more 170information about this product see http://aws.amazon.com/sns. For 171detailed information about Amazon SNS features and their associated API 172calls, see the Amazon SNS Developer Guide. 173 174We also provide SDKs that enable you to access Amazon SNS from your 175preferred programming language. The SDKs contain functionality that 176automatically takes care of tasks such as: cryptographically signing 177your service requests, retrying requests, and handling error responses. 178For a list of available SDKs, go to Tools for Amazon Web Services. 179 180 181 182 183 184 185 186 187 188 189=head1 METHODS 190 191=head2 AddPermission(ActionName => ArrayRef[Str], AWSAccountId => ArrayRef[Str], Label => Str, TopicArn => Str) 192 193Each argument is described in detail in: L<Paws::SNS::AddPermission> 194 195Returns: nothing 196 197 198 199Adds a statement to a topic's access control policy, granting access 200for the specified AWS accounts to the specified actions. 201 202 203 204 205 206 207 208 209 210 211 212=head2 ConfirmSubscription(Token => Str, TopicArn => Str, [AuthenticateOnUnsubscribe => Str]) 213 214Each argument is described in detail in: L<Paws::SNS::ConfirmSubscription> 215 216Returns: a L<Paws::SNS::ConfirmSubscriptionResponse> instance 217 218 219 220Verifies an endpoint owner's intent to receive messages by validating 221the token sent to the endpoint by an earlier C<Subscribe> action. If 222the token is valid, the action creates a new subscription and returns 223its Amazon Resource Name (ARN). This call requires an AWS signature 224only when the C<AuthenticateOnUnsubscribe> flag is set to "true". 225 226 227 228 229 230 231 232 233 234 235 236=head2 CreatePlatformApplication(Attributes => Paws::SNS::MapStringToString, Name => Str, Platform => Str) 237 238Each argument is described in detail in: L<Paws::SNS::CreatePlatformApplication> 239 240Returns: a L<Paws::SNS::CreatePlatformApplicationResponse> instance 241 242 243 244Creates a platform application object for one of the supported push 245notification services, such as APNS and GCM, to which devices and 246mobile apps may register. You must specify PlatformPrincipal and 247PlatformCredential attributes when using the 248C<CreatePlatformApplication> action. The PlatformPrincipal is received 249from the notification service. For APNS/APNS_SANDBOX, PlatformPrincipal 250is "SSL certificate". For GCM, PlatformPrincipal is not applicable. For 251ADM, PlatformPrincipal is "client id". The PlatformCredential is also 252received from the notification service. For APNS/APNS_SANDBOX, 253PlatformCredential is "private key". For GCM, PlatformCredential is 254"API key". For ADM, PlatformCredential is "client secret". The 255PlatformApplicationArn that is returned when using 256C<CreatePlatformApplication> is then used as an attribute for the 257C<CreatePlatformEndpoint> action. For more information, see Using 258Amazon SNS Mobile Push Notifications. 259 260 261 262 263 264 265 266 267 268 269 270=head2 CreatePlatformEndpoint(PlatformApplicationArn => Str, Token => Str, [Attributes => Paws::SNS::MapStringToString, CustomUserData => Str]) 271 272Each argument is described in detail in: L<Paws::SNS::CreatePlatformEndpoint> 273 274Returns: a L<Paws::SNS::CreateEndpointResponse> instance 275 276 277 278Creates an endpoint for a device and mobile app on one of the supported 279push notification services, such as GCM and APNS. 280C<CreatePlatformEndpoint> requires the PlatformApplicationArn that is 281returned from C<CreatePlatformApplication>. The EndpointArn that is 282returned when using C<CreatePlatformEndpoint> can then be used by the 283C<Publish> action to send a message to a mobile app or by the 284C<Subscribe> action for subscription to a topic. The 285C<CreatePlatformEndpoint> action is idempotent, so if the requester 286already owns an endpoint with the same device token and attributes, 287that endpoint's ARN is returned without creating a new endpoint. For 288more information, see Using Amazon SNS Mobile Push Notifications. 289 290When using C<CreatePlatformEndpoint> with Baidu, two attributes must be 291provided: ChannelId and UserId. The token field must also contain the 292ChannelId. For more information, see Creating an Amazon SNS Endpoint 293for Baidu. 294 295 296 297 298 299 300 301 302 303 304 305=head2 CreateTopic(Name => Str) 306 307Each argument is described in detail in: L<Paws::SNS::CreateTopic> 308 309Returns: a L<Paws::SNS::CreateTopicResponse> instance 310 311 312 313Creates a topic to which notifications can be published. Users can 314create at most 3000 topics. For more information, see 315http://aws.amazon.com/sns. This action is idempotent, so if the 316requester already owns a topic with the specified name, that topic's 317ARN is returned without creating a new topic. 318 319 320 321 322 323 324 325 326 327 328 329=head2 DeleteEndpoint(EndpointArn => Str) 330 331Each argument is described in detail in: L<Paws::SNS::DeleteEndpoint> 332 333Returns: nothing 334 335 336 337Deletes the endpoint from Amazon SNS. This action is idempotent. For 338more information, see Using Amazon SNS Mobile Push Notifications. 339 340 341 342 343 344 345 346 347 348 349 350=head2 DeletePlatformApplication(PlatformApplicationArn => Str) 351 352Each argument is described in detail in: L<Paws::SNS::DeletePlatformApplication> 353 354Returns: nothing 355 356 357 358Deletes a platform application object for one of the supported push 359notification services, such as APNS and GCM. For more information, see 360Using Amazon SNS Mobile Push Notifications. 361 362 363 364 365 366 367 368 369 370 371 372=head2 DeleteTopic(TopicArn => Str) 373 374Each argument is described in detail in: L<Paws::SNS::DeleteTopic> 375 376Returns: nothing 377 378 379 380Deletes a topic and all its subscriptions. Deleting a topic might 381prevent some messages previously sent to the topic from being delivered 382to subscribers. This action is idempotent, so deleting a topic that 383does not exist does not result in an error. 384 385 386 387 388 389 390 391 392 393 394 395=head2 GetEndpointAttributes(EndpointArn => Str) 396 397Each argument is described in detail in: L<Paws::SNS::GetEndpointAttributes> 398 399Returns: a L<Paws::SNS::GetEndpointAttributesResponse> instance 400 401 402 403Retrieves the endpoint attributes for a device on one of the supported 404push notification services, such as GCM and APNS. For more information, 405see Using Amazon SNS Mobile Push Notifications. 406 407 408 409 410 411 412 413 414 415 416 417=head2 GetPlatformApplicationAttributes(PlatformApplicationArn => Str) 418 419Each argument is described in detail in: L<Paws::SNS::GetPlatformApplicationAttributes> 420 421Returns: a L<Paws::SNS::GetPlatformApplicationAttributesResponse> instance 422 423 424 425Retrieves the attributes of the platform application object for the 426supported push notification services, such as APNS and GCM. For more 427information, see Using Amazon SNS Mobile Push Notifications. 428 429 430 431 432 433 434 435 436 437 438 439=head2 GetSubscriptionAttributes(SubscriptionArn => Str) 440 441Each argument is described in detail in: L<Paws::SNS::GetSubscriptionAttributes> 442 443Returns: a L<Paws::SNS::GetSubscriptionAttributesResponse> instance 444 445 446 447Returns all of the properties of a subscription. 448 449 450 451 452 453 454 455 456 457 458 459=head2 GetTopicAttributes(TopicArn => Str) 460 461Each argument is described in detail in: L<Paws::SNS::GetTopicAttributes> 462 463Returns: a L<Paws::SNS::GetTopicAttributesResponse> instance 464 465 466 467Returns all of the properties of a topic. Topic properties returned 468might differ based on the authorization of the user. 469 470 471 472 473 474 475 476 477 478 479 480=head2 ListEndpointsByPlatformApplication(PlatformApplicationArn => Str, [NextToken => Str]) 481 482Each argument is described in detail in: L<Paws::SNS::ListEndpointsByPlatformApplication> 483 484Returns: a L<Paws::SNS::ListEndpointsByPlatformApplicationResponse> instance 485 486 487 488Lists the endpoints and endpoint attributes for devices in a supported 489push notification service, such as GCM and APNS. The results for 490C<ListEndpointsByPlatformApplication> are paginated and return a 491limited list of endpoints, up to 100. If additional records are 492available after the first page results, then a NextToken string will be 493returned. To receive the next page, you call 494C<ListEndpointsByPlatformApplication> again using the NextToken string 495received from the previous call. When there are no more records to 496return, NextToken will be null. For more information, see Using Amazon 497SNS Mobile Push Notifications. 498 499 500 501 502 503 504 505 506 507 508 509=head2 ListPlatformApplications([NextToken => Str]) 510 511Each argument is described in detail in: L<Paws::SNS::ListPlatformApplications> 512 513Returns: a L<Paws::SNS::ListPlatformApplicationsResponse> instance 514 515 516 517Lists the platform application objects for the supported push 518notification services, such as APNS and GCM. The results for 519C<ListPlatformApplications> are paginated and return a limited list of 520applications, up to 100. If additional records are available after the 521first page results, then a NextToken string will be returned. To 522receive the next page, you call C<ListPlatformApplications> using the 523NextToken string received from the previous call. When there are no 524more records to return, NextToken will be null. For more information, 525see Using Amazon SNS Mobile Push Notifications. 526 527 528 529 530 531 532 533 534 535 536 537=head2 ListSubscriptions([NextToken => Str]) 538 539Each argument is described in detail in: L<Paws::SNS::ListSubscriptions> 540 541Returns: a L<Paws::SNS::ListSubscriptionsResponse> instance 542 543 544 545Returns a list of the requester's subscriptions. Each call returns a 546limited list of subscriptions, up to 100. If there are more 547subscriptions, a C<NextToken> is also returned. Use the C<NextToken> 548parameter in a new C<ListSubscriptions> call to get further results. 549 550 551 552 553 554 555 556 557 558 559 560=head2 ListSubscriptionsByTopic(TopicArn => Str, [NextToken => Str]) 561 562Each argument is described in detail in: L<Paws::SNS::ListSubscriptionsByTopic> 563 564Returns: a L<Paws::SNS::ListSubscriptionsByTopicResponse> instance 565 566 567 568Returns a list of the subscriptions to a specific topic. Each call 569returns a limited list of subscriptions, up to 100. If there are more 570subscriptions, a C<NextToken> is also returned. Use the C<NextToken> 571parameter in a new C<ListSubscriptionsByTopic> call to get further 572results. 573 574 575 576 577 578 579 580 581 582 583 584=head2 ListTopics([NextToken => Str]) 585 586Each argument is described in detail in: L<Paws::SNS::ListTopics> 587 588Returns: a L<Paws::SNS::ListTopicsResponse> instance 589 590 591 592Returns a list of the requester's topics. Each call returns a limited 593list of topics, up to 100. If there are more topics, a C<NextToken> is 594also returned. Use the C<NextToken> parameter in a new C<ListTopics> 595call to get further results. 596 597 598 599 600 601 602 603 604 605 606 607=head2 Publish(Message => Str, [MessageAttributes => Paws::SNS::MessageAttributeMap, MessageStructure => Str, Subject => Str, TargetArn => Str, TopicArn => Str]) 608 609Each argument is described in detail in: L<Paws::SNS::Publish> 610 611Returns: a L<Paws::SNS::PublishResponse> instance 612 613 614 615Sends a message to all of a topic's subscribed endpoints. When a 616C<messageId> is returned, the message has been saved and Amazon SNS 617will attempt to deliver it to the topic's subscribers shortly. The 618format of the outgoing message to each subscribed endpoint depends on 619the notification protocol selected. 620 621To use the C<Publish> action for sending a message to a mobile 622endpoint, such as an app on a Kindle device or mobile phone, you must 623specify the EndpointArn. The EndpointArn is returned when making a call 624with the C<CreatePlatformEndpoint> action. The second example below 625shows a request and response for publishing to a mobile endpoint. 626 627 628 629 630 631 632 633 634 635 636 637=head2 RemovePermission(Label => Str, TopicArn => Str) 638 639Each argument is described in detail in: L<Paws::SNS::RemovePermission> 640 641Returns: nothing 642 643 644 645Removes a statement from a topic's access control policy. 646 647 648 649 650 651 652 653 654 655 656 657=head2 SetEndpointAttributes(Attributes => Paws::SNS::MapStringToString, EndpointArn => Str) 658 659Each argument is described in detail in: L<Paws::SNS::SetEndpointAttributes> 660 661Returns: nothing 662 663 664 665Sets the attributes for an endpoint for a device on one of the 666supported push notification services, such as GCM and APNS. For more 667information, see Using Amazon SNS Mobile Push Notifications. 668 669 670 671 672 673 674 675 676 677 678 679=head2 SetPlatformApplicationAttributes(Attributes => Paws::SNS::MapStringToString, PlatformApplicationArn => Str) 680 681Each argument is described in detail in: L<Paws::SNS::SetPlatformApplicationAttributes> 682 683Returns: nothing 684 685 686 687Sets the attributes of the platform application object for the 688supported push notification services, such as APNS and GCM. For more 689information, see Using Amazon SNS Mobile Push Notifications. 690 691 692 693 694 695 696 697 698 699 700 701=head2 SetSubscriptionAttributes(AttributeName => Str, SubscriptionArn => Str, [AttributeValue => Str]) 702 703Each argument is described in detail in: L<Paws::SNS::SetSubscriptionAttributes> 704 705Returns: nothing 706 707 708 709Allows a subscription owner to set an attribute of the topic to a new 710value. 711 712 713 714 715 716 717 718 719 720 721 722=head2 SetTopicAttributes(AttributeName => Str, TopicArn => Str, [AttributeValue => Str]) 723 724Each argument is described in detail in: L<Paws::SNS::SetTopicAttributes> 725 726Returns: nothing 727 728 729 730Allows a topic owner to set an attribute of the topic to a new value. 731 732 733 734 735 736 737 738 739 740 741 742=head2 Subscribe(Protocol => Str, TopicArn => Str, [Endpoint => Str]) 743 744Each argument is described in detail in: L<Paws::SNS::Subscribe> 745 746Returns: a L<Paws::SNS::SubscribeResponse> instance 747 748 749 750Prepares to subscribe an endpoint by sending the endpoint a 751confirmation message. To actually create a subscription, the endpoint 752owner must call the C<ConfirmSubscription> action with the token from 753the confirmation message. Confirmation tokens are valid for three days. 754 755 756 757 758 759 760 761 762 763 764 765=head2 Unsubscribe(SubscriptionArn => Str) 766 767Each argument is described in detail in: L<Paws::SNS::Unsubscribe> 768 769Returns: nothing 770 771 772 773Deletes a subscription. If the subscription requires authentication for 774deletion, only the owner of the subscription or the topic's owner can 775unsubscribe, and an AWS signature is required. If the C<Unsubscribe> 776call does not require authentication and the requester is not the 777subscription owner, a final cancellation message is delivered to the 778endpoint, so that the endpoint owner can easily resubscribe to the 779topic if the C<Unsubscribe> request was unintended. 780 781 782 783 784 785 786 787 788 789 790 791=head1 SEE ALSO 792 793This service class forms part of L<Paws> 794 795=head1 BUGS and CONTRIBUTIONS 796 797The source code is located here: https://github.com/pplu/aws-sdk-perl 798 799Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues 800 801=cut 802 803