File Coverage

blib/lib/Paws/Athena.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::Athena;
2 1     1   2053 use Moose;
  1         2  
  1         10  
3             sub service { 'athena' }
4             sub version { '2017-05-18' }
5             sub target_prefix { 'AmazonAthena' }
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 BatchGetNamedQuery {
18             my $self = shift;
19             my $call_object = $self->new_with_coercions('Paws::Athena::BatchGetNamedQuery', @_);
20             return $self->caller->do_call($self, $call_object);
21             }
22             sub BatchGetQueryExecution {
23             my $self = shift;
24             my $call_object = $self->new_with_coercions('Paws::Athena::BatchGetQueryExecution', @_);
25             return $self->caller->do_call($self, $call_object);
26             }
27             sub CreateNamedQuery {
28             my $self = shift;
29             my $call_object = $self->new_with_coercions('Paws::Athena::CreateNamedQuery', @_);
30             return $self->caller->do_call($self, $call_object);
31             }
32             sub DeleteNamedQuery {
33             my $self = shift;
34             my $call_object = $self->new_with_coercions('Paws::Athena::DeleteNamedQuery', @_);
35             return $self->caller->do_call($self, $call_object);
36             }
37             sub GetNamedQuery {
38             my $self = shift;
39             my $call_object = $self->new_with_coercions('Paws::Athena::GetNamedQuery', @_);
40             return $self->caller->do_call($self, $call_object);
41             }
42             sub GetQueryExecution {
43             my $self = shift;
44             my $call_object = $self->new_with_coercions('Paws::Athena::GetQueryExecution', @_);
45             return $self->caller->do_call($self, $call_object);
46             }
47             sub GetQueryResults {
48             my $self = shift;
49             my $call_object = $self->new_with_coercions('Paws::Athena::GetQueryResults', @_);
50             return $self->caller->do_call($self, $call_object);
51             }
52             sub ListNamedQueries {
53             my $self = shift;
54             my $call_object = $self->new_with_coercions('Paws::Athena::ListNamedQueries', @_);
55             return $self->caller->do_call($self, $call_object);
56             }
57             sub ListQueryExecutions {
58             my $self = shift;
59             my $call_object = $self->new_with_coercions('Paws::Athena::ListQueryExecutions', @_);
60             return $self->caller->do_call($self, $call_object);
61             }
62             sub StartQueryExecution {
63             my $self = shift;
64             my $call_object = $self->new_with_coercions('Paws::Athena::StartQueryExecution', @_);
65             return $self->caller->do_call($self, $call_object);
66             }
67             sub StopQueryExecution {
68             my $self = shift;
69             my $call_object = $self->new_with_coercions('Paws::Athena::StopQueryExecution', @_);
70             return $self->caller->do_call($self, $call_object);
71             }
72            
73             sub GetAllQueryResults {
74             my $self = shift;
75              
76             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
77             my $result = $self->GetQueryResults(@_);
78             my $next_result = $result;
79              
80             if (not defined $callback) {
81             while ($next_result->NextToken) {
82             $next_result = $self->GetQueryResults(@_, NextToken => $next_result->NextToken);
83             push @{ $result->ResultSet->Rows }, @{ $next_result->ResultSet->Rows };
84             }
85             return $result;
86             } else {
87             while ($result->NextToken) {
88             $callback->($_ => 'ResultSet.Rows') foreach (@{ $result->ResultSet->Rows });
89             $result = $self->GetQueryResults(@_, NextToken => $result->NextToken);
90             }
91             $callback->($_ => 'ResultSet.Rows') foreach (@{ $result->ResultSet->Rows });
92             }
93              
94             return undef
95             }
96             sub ListAllNamedQueries {
97             my $self = shift;
98              
99             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
100             my $result = $self->ListNamedQueries(@_);
101             my $next_result = $result;
102              
103             if (not defined $callback) {
104             while ($next_result->NextToken) {
105             $next_result = $self->ListNamedQueries(@_, NextToken => $next_result->NextToken);
106             push @{ $result->NamedQueryIds }, @{ $next_result->NamedQueryIds };
107             }
108             return $result;
109             } else {
110             while ($result->NextToken) {
111             $callback->($_ => 'NamedQueryIds') foreach (@{ $result->NamedQueryIds });
112             $result = $self->ListNamedQueries(@_, NextToken => $result->NextToken);
113             }
114             $callback->($_ => 'NamedQueryIds') foreach (@{ $result->NamedQueryIds });
115             }
116              
117             return undef
118             }
119             sub ListAllQueryExecutions {
120             my $self = shift;
121              
122             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
123             my $result = $self->ListQueryExecutions(@_);
124             my $next_result = $result;
125              
126             if (not defined $callback) {
127             while ($next_result->NextToken) {
128             $next_result = $self->ListQueryExecutions(@_, NextToken => $next_result->NextToken);
129             push @{ $result->QueryExecutionIds }, @{ $next_result->QueryExecutionIds };
130             }
131             return $result;
132             } else {
133             while ($result->NextToken) {
134             $callback->($_ => 'QueryExecutionIds') foreach (@{ $result->QueryExecutionIds });
135             $result = $self->ListQueryExecutions(@_, NextToken => $result->NextToken);
136             }
137             $callback->($_ => 'QueryExecutionIds') foreach (@{ $result->QueryExecutionIds });
138             }
139              
140             return undef
141             }
142              
143              
144             sub operations { qw/BatchGetNamedQuery BatchGetQueryExecution CreateNamedQuery DeleteNamedQuery GetNamedQuery GetQueryExecution GetQueryResults ListNamedQueries ListQueryExecutions StartQueryExecution StopQueryExecution / }
145              
146             1;
147              
148             ### main pod documentation begin ###
149              
150             =head1 NAME
151              
152             Paws::Athena - Perl Interface to AWS Amazon Athena
153              
154             =head1 SYNOPSIS
155              
156             use Paws;
157              
158             my $obj = Paws->service('Athena');
159             my $res = $obj->Method(
160             Arg1 => $val1,
161             Arg2 => [ 'V1', 'V2' ],
162             # if Arg3 is an object, the HashRef will be used as arguments to the constructor
163             # of the arguments type
164             Arg3 => { Att1 => 'Val1' },
165             # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
166             # the constructor of the arguments type
167             Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
168             );
169              
170             =head1 DESCRIPTION
171              
172             Amazon Athena is an interactive query service that lets you use
173             standard SQL to analyze data directly in Amazon S3. You can point
174             Athena at your data in Amazon S3 and run ad-hoc queries and get results
175             in seconds. Athena is serverless, so there is no infrastructure to set
176             up or manage. You pay only for the queries you run. Athena scales
177             automaticallyE<mdash>executing queries in parallelE<mdash>so results
178             are fast, even with large datasets and complex queries. For more
179             information, see What is Amazon Athena in the I<Amazon Athena User
180             Guide>.
181              
182             For code samples using the AWS SDK for Java, see Examples and Code
183             Samples in the I<Amazon Athena User Guide>.
184              
185             =head1 METHODS
186              
187             =head2 BatchGetNamedQuery(NamedQueryIds => ArrayRef[Str|Undef])
188              
189             Each argument is described in detail in: L<Paws::Athena::BatchGetNamedQuery>
190              
191             Returns: a L<Paws::Athena::BatchGetNamedQueryOutput> instance
192              
193             Returns the details of a single named query or a list of up to 50
194             queries, which you provide as an array of query ID strings. Use
195             ListNamedQueries to get the list of named query IDs. If information
196             could not be retrieved for a submitted query ID, information about the
197             query ID submitted is listed under UnprocessedNamedQueryId. Named
198             queries are different from executed queries. Use BatchGetQueryExecution
199             to get details about each unique query execution, and
200             ListQueryExecutions to get a list of query execution IDs.
201              
202              
203             =head2 BatchGetQueryExecution(QueryExecutionIds => ArrayRef[Str|Undef])
204              
205             Each argument is described in detail in: L<Paws::Athena::BatchGetQueryExecution>
206              
207             Returns: a L<Paws::Athena::BatchGetQueryExecutionOutput> instance
208              
209             Returns the details of a single query execution or a list of up to 50
210             query executions, which you provide as an array of query execution ID
211             strings. To get a list of query execution IDs, use ListQueryExecutions.
212             Query executions are different from named (saved) queries. Use
213             BatchGetNamedQuery to get details about named queries.
214              
215              
216             =head2 CreateNamedQuery(Database => Str, Name => Str, QueryString => Str, [ClientRequestToken => Str, Description => Str])
217              
218             Each argument is described in detail in: L<Paws::Athena::CreateNamedQuery>
219              
220             Returns: a L<Paws::Athena::CreateNamedQueryOutput> instance
221              
222             Creates a named query.
223              
224             For code samples using the AWS SDK for Java, see Examples and Code
225             Samples in the I<Amazon Athena User Guide>.
226              
227              
228             =head2 DeleteNamedQuery(NamedQueryId => Str)
229              
230             Each argument is described in detail in: L<Paws::Athena::DeleteNamedQuery>
231              
232             Returns: a L<Paws::Athena::DeleteNamedQueryOutput> instance
233              
234             Deletes a named query.
235              
236             For code samples using the AWS SDK for Java, see Examples and Code
237             Samples in the I<Amazon Athena User Guide>.
238              
239              
240             =head2 GetNamedQuery(NamedQueryId => Str)
241              
242             Each argument is described in detail in: L<Paws::Athena::GetNamedQuery>
243              
244             Returns: a L<Paws::Athena::GetNamedQueryOutput> instance
245              
246             Returns information about a single query.
247              
248              
249             =head2 GetQueryExecution(QueryExecutionId => Str)
250              
251             Each argument is described in detail in: L<Paws::Athena::GetQueryExecution>
252              
253             Returns: a L<Paws::Athena::GetQueryExecutionOutput> instance
254              
255             Returns information about a single execution of a query. Each time a
256             query executes, information about the query execution is saved with a
257             unique ID.
258              
259              
260             =head2 GetQueryResults(QueryExecutionId => Str, [MaxResults => Int, NextToken => Str])
261              
262             Each argument is described in detail in: L<Paws::Athena::GetQueryResults>
263              
264             Returns: a L<Paws::Athena::GetQueryResultsOutput> instance
265              
266             Returns the results of a single query execution specified by
267             C<QueryExecutionId>. This request does not execute the query but
268             returns results. Use StartQueryExecution to run a query.
269              
270              
271             =head2 ListNamedQueries([MaxResults => Int, NextToken => Str])
272              
273             Each argument is described in detail in: L<Paws::Athena::ListNamedQueries>
274              
275             Returns: a L<Paws::Athena::ListNamedQueriesOutput> instance
276              
277             Provides a list of all available query IDs.
278              
279             For code samples using the AWS SDK for Java, see Examples and Code
280             Samples in the I<Amazon Athena User Guide>.
281              
282              
283             =head2 ListQueryExecutions([MaxResults => Int, NextToken => Str])
284              
285             Each argument is described in detail in: L<Paws::Athena::ListQueryExecutions>
286              
287             Returns: a L<Paws::Athena::ListQueryExecutionsOutput> instance
288              
289             Provides a list of all available query execution IDs.
290              
291             For code samples using the AWS SDK for Java, see Examples and Code
292             Samples in the I<Amazon Athena User Guide>.
293              
294              
295             =head2 StartQueryExecution(QueryString => Str, ResultConfiguration => L<Paws::Athena::ResultConfiguration>, [ClientRequestToken => Str, QueryExecutionContext => L<Paws::Athena::QueryExecutionContext>])
296              
297             Each argument is described in detail in: L<Paws::Athena::StartQueryExecution>
298              
299             Returns: a L<Paws::Athena::StartQueryExecutionOutput> instance
300              
301             Runs (executes) the SQL query statements contained in the C<Query>
302             string.
303              
304             For code samples using the AWS SDK for Java, see Examples and Code
305             Samples in the I<Amazon Athena User Guide>.
306              
307              
308             =head2 StopQueryExecution(QueryExecutionId => Str)
309              
310             Each argument is described in detail in: L<Paws::Athena::StopQueryExecution>
311              
312             Returns: a L<Paws::Athena::StopQueryExecutionOutput> instance
313              
314             Stops a query execution.
315              
316             For code samples using the AWS SDK for Java, see Examples and Code
317             Samples in the I<Amazon Athena User Guide>.
318              
319              
320              
321              
322             =head1 PAGINATORS
323              
324             Paginator methods are helpers that repetively call methods that return partial results
325              
326             =head2 GetAllQueryResults(sub { },QueryExecutionId => Str, [MaxResults => Int, NextToken => Str])
327              
328             =head2 GetAllQueryResults(QueryExecutionId => Str, [MaxResults => Int, NextToken => Str])
329              
330              
331             If passed a sub as first parameter, it will call the sub for each element found in :
332              
333             - ResultSet.Rows, passing the object as the first parameter, and the string 'ResultSet.Rows' as the second parameter
334              
335             If not, it will return a a L<Paws::Athena::GetQueryResultsOutput> 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.
336              
337              
338             =head2 ListAllNamedQueries(sub { },[MaxResults => Int, NextToken => Str])
339              
340             =head2 ListAllNamedQueries([MaxResults => Int, NextToken => Str])
341              
342              
343             If passed a sub as first parameter, it will call the sub for each element found in :
344              
345             - NamedQueryIds, passing the object as the first parameter, and the string 'NamedQueryIds' as the second parameter
346              
347             If not, it will return a a L<Paws::Athena::ListNamedQueriesOutput> 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.
348              
349              
350             =head2 ListAllQueryExecutions(sub { },[MaxResults => Int, NextToken => Str])
351              
352             =head2 ListAllQueryExecutions([MaxResults => Int, NextToken => Str])
353              
354              
355             If passed a sub as first parameter, it will call the sub for each element found in :
356              
357             - QueryExecutionIds, passing the object as the first parameter, and the string 'QueryExecutionIds' as the second parameter
358              
359             If not, it will return a a L<Paws::Athena::ListQueryExecutionsOutput> 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.
360              
361              
362              
363              
364              
365             =head1 SEE ALSO
366              
367             This service class forms part of L<Paws>
368              
369             =head1 BUGS and CONTRIBUTIONS
370              
371             The source code is located here: https://github.com/pplu/aws-sdk-perl
372              
373             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
374              
375             =cut
376