blib/lib/Paws/SNS/Subscribe.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 17 / 17 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Paws/SNS/SetPlatformApplicationAttributes.pm ↑ Summary blib/lib/Paws/SNS/SubscribeResponse.pm »
1  
2 package Paws::SNS::Subscribe;
3 1 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 has Attributes => (is => 'ro', isa => 'Paws::SNS::SubscriptionAttributesMap');
5 1 has Endpoint => (is => 'ro', isa => 'Str');
6 1 has Protocol => (is => 'ro', isa => 'Str', required => 1);
7 1 has ReturnSubscriptionArn => (is => 'ro', isa => 'Bool');
8 1 has TopicArn => (is => 'ro', isa => 'Str', required => 1);
9  
10 1 ▶ use MooseX::ClassAttribute;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 class_has _api_call => (isa => 'Str', is => 'ro', default => 'Subscribe');
13 1 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::SNS::SubscribeResponse');
14 1 class_has _result_key => (isa => 'Str', is => 'ro', default => 'SubscribeResult');
15 1 1;
16  
17 ### main pod documentation begin ###
18  
19 =head1 NAME
20  
21 Paws::SNS::Subscribe - Arguments for method Subscribe on L<Paws::SNS>
22  
23 =head1 DESCRIPTION
24  
25 This class represents the parameters used for calling the method Subscribe on the
26 L<Amazon Simple Notification Service|Paws::SNS> service. Use the attributes of this class
27 as arguments to method Subscribe.
28  
29 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to Subscribe.
30  
31 =head1 SYNOPSIS
32  
33 my $sns = Paws->service('SNS');
34 my $SubscribeResponse = $sns->Subscribe(
35 Protocol => 'Myprotocol',
36 TopicArn => 'MytopicARN',
37 Attributes => { 'MyattributeName' => 'MyattributeValue', }, # OPTIONAL
38 Endpoint => 'Myendpoint', # OPTIONAL
39 ReturnSubscriptionArn => 1, # OPTIONAL
40 );
41  
42 # Results:
43 my $SubscriptionArn = $SubscribeResponse->SubscriptionArn;
44  
45 # Returns a L<Paws::SNS::SubscribeResponse> object.
46  
47 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
48 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/sns/Subscribe>
49  
50 =head1 ATTRIBUTES
51  
52  
53 =head2 Attributes => L<Paws::SNS::SubscriptionAttributesMap>
54  
55 A map of attributes with their corresponding values.
56  
57 The following lists the names, descriptions, and values of the special
58 request parameters that the C<Subscribe> action uses:
59  
60 =over
61  
62 =item *
63  
64 C<DeliveryPolicy> E<ndash> The policy that defines how Amazon SNS
65 retries failed deliveries to HTTP/S endpoints.
66  
67 =item *
68  
69 C<FilterPolicy> E<ndash> The simple JSON object that lets your
70 subscriber receive only a subset of messages, rather than receiving
71 every message published to the topic.
72  
73 =item *
74  
75 C<RawMessageDelivery> E<ndash> When set to C<true>, enables raw message
76 delivery to Amazon SQS or HTTP/S endpoints. This eliminates the need
77 for the endpoints to process JSON formatting, which is otherwise
78 created for Amazon SNS metadata.
79  
80 =item *
81  
82 C<RedrivePolicy> E<ndash> When specified, sends undeliverable messages
83 to the specified Amazon SQS dead-letter queue. Messages that can't be
84 delivered due to client errors (for example, when the subscribed
85 endpoint is unreachable) or server errors (for example, when the
86 service that powers the subscribed endpoint becomes unavailable) are
87 held in the dead-letter queue for further analysis or reprocessing.
88  
89 =back
90  
91 The following attribute applies only to Amazon Kinesis Data Firehose
92 delivery stream subscriptions:
93  
94 =over
95  
96 =item *
97  
98 C<SubscriptionRoleArn> E<ndash> The ARN of the IAM role that has the
99 following:
100  
101 =over
102  
103 =item *
104  
105 Permission to write to the Kinesis Data Firehose delivery stream
106  
107 =item *
108  
109 Amazon SNS listed as a trusted entity
110  
111 =back
112  
113 Specifying a valid ARN for this attribute is required for Kinesis Data
114 Firehose delivery stream subscriptions. For more information, see
115 Fanout to Kinesis Data Firehose delivery streams
116 (https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html)
117 in the I<Amazon SNS Developer Guide>.
118  
119 =back
120  
121  
122  
123  
124 =head2 Endpoint => Str
125  
126 The endpoint that you want to receive notifications. Endpoints vary by
127 protocol:
128  
129 =over
130  
131 =item *
132  
133 For the C<http> protocol, the (public) endpoint is a URL beginning with
134 C<http://>.
135  
136 =item *
137  
138 For the C<https> protocol, the (public) endpoint is a URL beginning
139 with C<https://>.
140  
141 =item *
142  
143 For the C<email> protocol, the endpoint is an email address.
144  
145 =item *
146  
147 For the C<email-json> protocol, the endpoint is an email address.
148  
149 =item *
150  
151 For the C<sms> protocol, the endpoint is a phone number of an
152 SMS-enabled device.
153  
154 =item *
155  
156 For the C<sqs> protocol, the endpoint is the ARN of an Amazon SQS
157 queue.
158  
159 =item *
160  
161 For the C<application> protocol, the endpoint is the EndpointArn of a
162 mobile app and device.
163  
164 =item *
165  
166 For the C<lambda> protocol, the endpoint is the ARN of an Lambda
167 function.
168  
169 =item *
170  
171 For the C<firehose> protocol, the endpoint is the ARN of an Amazon
172 Kinesis Data Firehose delivery stream.
173  
174 =back
175  
176  
177  
178  
179 =head2 B<REQUIRED> Protocol => Str
180  
181 The protocol that you want to use. Supported protocols include:
182  
183 =over
184  
185 =item *
186  
187 C<http> E<ndash> delivery of JSON-encoded message via HTTP POST
188  
189 =item *
190  
191 C<https> E<ndash> delivery of JSON-encoded message via HTTPS POST
192  
193 =item *
194  
195 C<email> E<ndash> delivery of message via SMTP
196  
197 =item *
198  
199 C<email-json> E<ndash> delivery of JSON-encoded message via SMTP
200  
201 =item *
202  
203 C<sms> E<ndash> delivery of message via SMS
204  
205 =item *
206  
207 C<sqs> E<ndash> delivery of JSON-encoded message to an Amazon SQS queue
208  
209 =item *
210  
211 C<application> E<ndash> delivery of JSON-encoded message to an
212 EndpointArn for a mobile app and device
213  
214 =item *
215  
216 C<lambda> E<ndash> delivery of JSON-encoded message to an Lambda
217 function
218  
219 =item *
220  
221 C<firehose> E<ndash> delivery of JSON-encoded message to an Amazon
222 Kinesis Data Firehose delivery stream.
223  
224 =back
225  
226  
227  
228  
229 =head2 ReturnSubscriptionArn => Bool
230  
231 Sets whether the response from the C<Subscribe> request includes the
232 subscription ARN, even if the subscription is not yet confirmed.
233  
234 If you set this parameter to C<true>, the response includes the ARN in
235 all cases, even if the subscription is not yet confirmed. In addition
236 to the ARN for confirmed subscriptions, the response also includes the
237 C<pending subscription> ARN value for subscriptions that aren't yet
238 confirmed. A subscription becomes confirmed when the subscriber calls
239 the C<ConfirmSubscription> action with a confirmation token.
240  
241 The default value is C<false>.
242  
243  
244  
245 =head2 B<REQUIRED> TopicArn => Str
246  
247 The ARN of the topic you want to subscribe to.
248  
249  
250  
251  
252 =head1 SEE ALSO
253  
254 This class forms part of L<Paws>, documenting arguments for method Subscribe in L<Paws::SNS>
255  
256 =head1 BUGS and CONTRIBUTIONS
257  
258 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
259  
260 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
261  
262 =cut
263  
« blib/lib/Paws/SNS/SetPlatformApplicationAttributes.pm ↑ Summary blib/lib/Paws/SNS/SubscribeResponse.pm »