File Coverage

blib/lib/Paws/Health.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package Paws::Health;
2 1     1   11845 use Moose;
  1         5  
  1         13  
3             sub service { 'health' }
4             sub version { '2016-08-04' }
5             sub target_prefix { 'AWSHealth_20160804' }
6             sub json_version { "1.1" }
7             has max_attempts => (is => 'ro', isa => 'Int', default => 5);
8             has retry => (is => 'ro', isa => 'HashRef', default => sub {
9             { base => 'rand', type => 'exponential', growth_factor => 2 }
10             });
11             has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [
12             ] });
13              
14             with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::JsonCaller', 'Paws::Net::JsonResponse';
15              
16            
17             sub DescribeAffectedEntities {
18             my $self = shift;
19             my $call_object = $self->new_with_coercions('Paws::Health::DescribeAffectedEntities', @_);
20             return $self->caller->do_call($self, $call_object);
21             }
22             sub DescribeEntityAggregates {
23             my $self = shift;
24             my $call_object = $self->new_with_coercions('Paws::Health::DescribeEntityAggregates', @_);
25             return $self->caller->do_call($self, $call_object);
26             }
27             sub DescribeEventAggregates {
28             my $self = shift;
29             my $call_object = $self->new_with_coercions('Paws::Health::DescribeEventAggregates', @_);
30             return $self->caller->do_call($self, $call_object);
31             }
32             sub DescribeEventDetails {
33             my $self = shift;
34             my $call_object = $self->new_with_coercions('Paws::Health::DescribeEventDetails', @_);
35             return $self->caller->do_call($self, $call_object);
36             }
37             sub DescribeEvents {
38             my $self = shift;
39             my $call_object = $self->new_with_coercions('Paws::Health::DescribeEvents', @_);
40             return $self->caller->do_call($self, $call_object);
41             }
42             sub DescribeEventTypes {
43             my $self = shift;
44             my $call_object = $self->new_with_coercions('Paws::Health::DescribeEventTypes', @_);
45             return $self->caller->do_call($self, $call_object);
46             }
47            
48             sub DescribeAllAffectedEntities {
49             my $self = shift;
50              
51             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
52             my $result = $self->DescribeAffectedEntities(@_);
53             my $next_result = $result;
54              
55             if (not defined $callback) {
56             while ($next_result->nextToken) {
57             $next_result = $self->DescribeAffectedEntities(@_, nextToken => $next_result->nextToken);
58             push @{ $result->entities }, @{ $next_result->entities };
59             }
60             return $result;
61             } else {
62             while ($result->nextToken) {
63             $callback->($_ => 'entities') foreach (@{ $result->entities });
64             $result = $self->DescribeAffectedEntities(@_, nextToken => $result->nextToken);
65             }
66             $callback->($_ => 'entities') foreach (@{ $result->entities });
67             }
68              
69             return undef
70             }
71             sub DescribeAllEventAggregates {
72             my $self = shift;
73              
74             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
75             my $result = $self->DescribeEventAggregates(@_);
76             my $next_result = $result;
77              
78             if (not defined $callback) {
79             while ($next_result->nextToken) {
80             $next_result = $self->DescribeEventAggregates(@_, nextToken => $next_result->nextToken);
81             push @{ $result->eventAggregates }, @{ $next_result->eventAggregates };
82             }
83             return $result;
84             } else {
85             while ($result->nextToken) {
86             $callback->($_ => 'eventAggregates') foreach (@{ $result->eventAggregates });
87             $result = $self->DescribeEventAggregates(@_, nextToken => $result->nextToken);
88             }
89             $callback->($_ => 'eventAggregates') foreach (@{ $result->eventAggregates });
90             }
91              
92             return undef
93             }
94             sub DescribeAllEvents {
95             my $self = shift;
96              
97             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
98             my $result = $self->DescribeEvents(@_);
99             my $next_result = $result;
100              
101             if (not defined $callback) {
102             while ($next_result->nextToken) {
103             $next_result = $self->DescribeEvents(@_, nextToken => $next_result->nextToken);
104             push @{ $result->events }, @{ $next_result->events };
105             }
106             return $result;
107             } else {
108             while ($result->nextToken) {
109             $callback->($_ => 'events') foreach (@{ $result->events });
110             $result = $self->DescribeEvents(@_, nextToken => $result->nextToken);
111             }
112             $callback->($_ => 'events') foreach (@{ $result->events });
113             }
114              
115             return undef
116             }
117             sub DescribeAllEventTypes {
118             my $self = shift;
119              
120             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
121             my $result = $self->DescribeEventTypes(@_);
122             my $next_result = $result;
123              
124             if (not defined $callback) {
125             while ($next_result->nextToken) {
126             $next_result = $self->DescribeEventTypes(@_, nextToken => $next_result->nextToken);
127             push @{ $result->eventTypes }, @{ $next_result->eventTypes };
128             }
129             return $result;
130             } else {
131             while ($result->nextToken) {
132             $callback->($_ => 'eventTypes') foreach (@{ $result->eventTypes });
133             $result = $self->DescribeEventTypes(@_, nextToken => $result->nextToken);
134             }
135             $callback->($_ => 'eventTypes') foreach (@{ $result->eventTypes });
136             }
137              
138             return undef
139             }
140              
141              
142             sub operations { qw/DescribeAffectedEntities DescribeEntityAggregates DescribeEventAggregates DescribeEventDetails DescribeEvents DescribeEventTypes / }
143              
144             1;
145              
146             ### main pod documentation begin ###
147              
148             =head1 NAME
149              
150             Paws::Health - Perl Interface to AWS AWS Health APIs and Notifications
151              
152             =head1 SYNOPSIS
153              
154             use Paws;
155              
156             my $obj = Paws->service('Health');
157             my $res = $obj->Method(
158             Arg1 => $val1,
159             Arg2 => [ 'V1', 'V2' ],
160             # if Arg3 is an object, the HashRef will be used as arguments to the constructor
161             # of the arguments type
162             Arg3 => { Att1 => 'Val1' },
163             # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
164             # the constructor of the arguments type
165             Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
166             );
167              
168             =head1 DESCRIPTION
169              
170             AWS Health
171              
172             The AWS Health API provides programmatic access to the AWS Health
173             information that is presented in the AWS Personal Health Dashboard. You
174             can get information about events that affect your AWS resources:
175              
176             =over
177              
178             =item *
179              
180             DescribeEvents: Summary information about events.
181              
182             =item *
183              
184             DescribeEventDetails: Detailed information about one or more events.
185              
186             =item *
187              
188             DescribeAffectedEntities: Information about AWS resources that are
189             affected by one or more events.
190              
191             =back
192              
193             In addition, these operations provide information about event types and
194             summary counts of events or affected entities:
195              
196             =over
197              
198             =item *
199              
200             DescribeEventTypes: Information about the kinds of events that AWS
201             Health tracks.
202              
203             =item *
204              
205             DescribeEventAggregates: A count of the number of events that meet
206             specified criteria.
207              
208             =item *
209              
210             DescribeEntityAggregates: A count of the number of affected entities
211             that meet specified criteria.
212              
213             =back
214              
215             The Health API requires a Business or Enterprise support plan from AWS
216             Support. Calling the Health API from an account that does not have a
217             Business or Enterprise support plan causes a
218             C<SubscriptionRequiredException>.
219              
220             For authentication of requests, AWS Health uses the Signature Version 4
221             Signing Process.
222              
223             See the AWS Health User Guide for information about how to use the API.
224              
225             B<Service Endpoint>
226              
227             The HTTP endpoint for the AWS Health API is:
228              
229             =over
230              
231             =item *
232              
233             https://health.us-east-1.amazonaws.com
234              
235             =back
236              
237              
238             =head1 METHODS
239              
240             =head2 DescribeAffectedEntities(Filter => L<Paws::Health::EntityFilter>, [Locale => Str, MaxResults => Int, NextToken => Str])
241              
242             Each argument is described in detail in: L<Paws::Health::DescribeAffectedEntities>
243              
244             Returns: a L<Paws::Health::DescribeAffectedEntitiesResponse> instance
245              
246             Returns a list of entities that have been affected by the specified
247             events, based on the specified filter criteria. Entities can refer to
248             individual customer resources, groups of customer resources, or any
249             other construct, depending on the AWS service. Events that have impact
250             beyond that of the affected entities, or where the extent of impact is
251             unknown, include at least one entity indicating this.
252              
253             At least one event ARN is required. Results are sorted by the
254             C<lastUpdatedTime> of the entity, starting with the most recent.
255              
256              
257             =head2 DescribeEntityAggregates([EventArns => ArrayRef[Str|Undef]])
258              
259             Each argument is described in detail in: L<Paws::Health::DescribeEntityAggregates>
260              
261             Returns: a L<Paws::Health::DescribeEntityAggregatesResponse> instance
262              
263             Returns the number of entities that are affected by each of the
264             specified events. If no events are specified, the counts of all
265             affected entities are returned.
266              
267              
268             =head2 DescribeEventAggregates(AggregateField => Str, [Filter => L<Paws::Health::EventFilter>, MaxResults => Int, NextToken => Str])
269              
270             Each argument is described in detail in: L<Paws::Health::DescribeEventAggregates>
271              
272             Returns: a L<Paws::Health::DescribeEventAggregatesResponse> instance
273              
274             Returns the number of events of each event type (issue, scheduled
275             change, and account notification). If no filter is specified, the
276             counts of all events in each category are returned.
277              
278              
279             =head2 DescribeEventDetails(EventArns => ArrayRef[Str|Undef], [Locale => Str])
280              
281             Each argument is described in detail in: L<Paws::Health::DescribeEventDetails>
282              
283             Returns: a L<Paws::Health::DescribeEventDetailsResponse> instance
284              
285             Returns detailed information about one or more specified events.
286             Information includes standard event data (region, service, etc., as
287             returned by DescribeEvents), a detailed event description, and possible
288             additional metadata that depends upon the nature of the event. Affected
289             entities are not included; to retrieve those, use the
290             DescribeAffectedEntities operation.
291              
292             If a specified event cannot be retrieved, an error message is returned
293             for that event.
294              
295              
296             =head2 DescribeEvents([Filter => L<Paws::Health::EventFilter>, Locale => Str, MaxResults => Int, NextToken => Str])
297              
298             Each argument is described in detail in: L<Paws::Health::DescribeEvents>
299              
300             Returns: a L<Paws::Health::DescribeEventsResponse> instance
301              
302             Returns information about events that meet the specified filter
303             criteria. Events are returned in a summary form and do not include the
304             detailed description, any additional metadata that depends on the event
305             type, or any affected resources. To retrieve that information, use the
306             DescribeEventDetails and DescribeAffectedEntities operations.
307              
308             If no filter criteria are specified, all events are returned. Results
309             are sorted by C<lastModifiedTime>, starting with the most recent.
310              
311              
312             =head2 DescribeEventTypes([Filter => L<Paws::Health::EventTypeFilter>, Locale => Str, MaxResults => Int, NextToken => Str])
313              
314             Each argument is described in detail in: L<Paws::Health::DescribeEventTypes>
315              
316             Returns: a L<Paws::Health::DescribeEventTypesResponse> instance
317              
318             Returns the event types that meet the specified filter criteria. If no
319             filter criteria are specified, all event types are returned, in no
320             particular order.
321              
322              
323              
324              
325             =head1 PAGINATORS
326              
327             Paginator methods are helpers that repetively call methods that return partial results
328              
329             =head2 DescribeAllAffectedEntities(sub { },Filter => L<Paws::Health::EntityFilter>, [Locale => Str, MaxResults => Int, NextToken => Str])
330              
331             =head2 DescribeAllAffectedEntities(Filter => L<Paws::Health::EntityFilter>, [Locale => Str, MaxResults => Int, NextToken => Str])
332              
333              
334             If passed a sub as first parameter, it will call the sub for each element found in :
335              
336             - entities, passing the object as the first parameter, and the string 'entities' as the second parameter
337              
338             If not, it will return a a L<Paws::Health::DescribeAffectedEntitiesResponse> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
339              
340              
341             =head2 DescribeAllEventAggregates(sub { },AggregateField => Str, [Filter => L<Paws::Health::EventFilter>, MaxResults => Int, NextToken => Str])
342              
343             =head2 DescribeAllEventAggregates(AggregateField => Str, [Filter => L<Paws::Health::EventFilter>, MaxResults => Int, NextToken => Str])
344              
345              
346             If passed a sub as first parameter, it will call the sub for each element found in :
347              
348             - eventAggregates, passing the object as the first parameter, and the string 'eventAggregates' as the second parameter
349              
350             If not, it will return a a L<Paws::Health::DescribeEventAggregatesResponse> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
351              
352              
353             =head2 DescribeAllEvents(sub { },[Filter => L<Paws::Health::EventFilter>, Locale => Str, MaxResults => Int, NextToken => Str])
354              
355             =head2 DescribeAllEvents([Filter => L<Paws::Health::EventFilter>, Locale => Str, MaxResults => Int, NextToken => Str])
356              
357              
358             If passed a sub as first parameter, it will call the sub for each element found in :
359              
360             - events, passing the object as the first parameter, and the string 'events' as the second parameter
361              
362             If not, it will return a a L<Paws::Health::DescribeEventsResponse> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
363              
364              
365             =head2 DescribeAllEventTypes(sub { },[Filter => L<Paws::Health::EventTypeFilter>, Locale => Str, MaxResults => Int, NextToken => Str])
366              
367             =head2 DescribeAllEventTypes([Filter => L<Paws::Health::EventTypeFilter>, Locale => Str, MaxResults => Int, NextToken => Str])
368              
369              
370             If passed a sub as first parameter, it will call the sub for each element found in :
371              
372             - eventTypes, passing the object as the first parameter, and the string 'eventTypes' as the second parameter
373              
374             If not, it will return a a L<Paws::Health::DescribeEventTypesResponse> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
375              
376              
377              
378              
379              
380             =head1 SEE ALSO
381              
382             This service class forms part of L<Paws>
383              
384             =head1 BUGS and CONTRIBUTIONS
385              
386             The source code is located here: https://github.com/pplu/aws-sdk-perl
387              
388             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
389              
390             =cut
391