blib/lib/Paws/TimestreamQuery.pm untested

filter: Statementstmt 0.0% 0 / 44 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 11 Podpod 0.0% 0 / 10 totaltotal 0.0% 0 / 69 CC 3 SCAR 14.6
CC
3
Cov
0%
QueryAll
12.0
service
2.0
signing_name
2.0
CRAP 4.3
1 package Paws::TimestreamQuery;
2 use Moose;
3 sub service { 'query.timestream' }
4 sub signing_name { 'timestream' }
5 sub version { '2018-11-01' }
6 sub target_prefix { 'Timestream_20181101' }
7 sub json_version { "1.0" }
8 has max_attempts => (is => 'ro', isa => 'Int', default => 5);
9 has retry => (is => 'ro', isa => 'HashRef', default => sub {
10 { base => 'rand', type => 'exponential', growth_factor => 2 }
11 });
12 has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [
13 ] });
14  
15 with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::JsonCaller';
16  
17
18 sub CancelQuery {
19 my $self = shift;
20 my $call_object = $self->new_with_coercions('Paws::TimestreamQuery::CancelQuery', @_);
21 return $self->caller->do_call($self, $call_object);
22 }
23 sub DescribeEndpoints {
24 my $self = shift;
25 my $call_object = $self->new_with_coercions('Paws::TimestreamQuery::DescribeEndpoints', @_);
26 return $self->caller->do_call($self, $call_object);
27 }
28 sub Query {
29 my $self = shift;
30 my $call_object = $self->new_with_coercions('Paws::TimestreamQuery::Query', @_);
31 return $self->caller->do_call($self, $call_object);
32 }
33
34 sub QueryAll {
35 my $self = shift;
36  
37 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
38 my $result = $self->Query(@_);
39 my $next_result = $result;
40  
41 if (not defined $callback) {
42 while ($next_result->NextToken) {
43 $next_result = $self->Query(@_, NextToken => $next_result->NextToken);
44 push @{ $result->Rows }, @{ $next_result->Rows };
45 }
46 return $result;
47 } else {
48 while ($result->NextToken) {
49 $callback->($_ => 'Rows') foreach (@{ $result->Rows });
50 $result = $self->Query(@_, NextToken => $result->NextToken);
51 }
52 $callback->($_ => 'Rows') foreach (@{ $result->Rows });
53 }
54  
55 return undef
56 }
57  
58  
59 sub operations { qw/CancelQuery DescribeEndpoints Query / }
60  
61 1;
62  
63 ### main pod documentation begin ###
64  
65 =head1 NAME
66  
67 Paws::TimestreamQuery - Perl Interface to AWS Amazon Timestream Query
68  
69 =head1 SYNOPSIS
70  
71 use Paws;
72  
73 my $obj = Paws->service('TimestreamQuery');
74 my $res = $obj->Method(
75 Arg1 => $val1,
76 Arg2 => [ 'V1', 'V2' ],
77 # if Arg3 is an object, the HashRef will be used as arguments to the constructor
78 # of the arguments type
79 Arg3 => { Att1 => 'Val1' },
80 # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
81 # the constructor of the arguments type
82 Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
83 );
84  
85 =head1 DESCRIPTION
86  
87  
88  
89 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/query.timestream-2018-11-01>
90  
91  
92 =head1 METHODS
93  
94 =head2 CancelQuery
95  
96 =over
97  
98 =item QueryId => Str
99  
100  
101 =back
102  
103 Each argument is described in detail in: L<Paws::TimestreamQuery::CancelQuery>
104  
105 Returns: a L<Paws::TimestreamQuery::CancelQueryResponse> instance
106  
107 Cancels a query that has been issued. Cancellation is guaranteed only
108 if the query has not completed execution before the cancellation
109 request was issued. Because cancellation is an idempotent operation,
110 subsequent cancellation requests will return a C<CancellationMessage>,
111 indicating that the query has already been canceled.
112  
113  
114 =head2 DescribeEndpoints
115  
116  
117  
118  
119  
120  
121 Each argument is described in detail in: L<Paws::TimestreamQuery::DescribeEndpoints>
122  
123 Returns: a L<Paws::TimestreamQuery::DescribeEndpointsResponse> instance
124  
125 DescribeEndpoints returns a list of available endpoints to make
126 Timestream API calls against. This API is available through both Write
127 and Query.
128  
129 Because TimestreamE<rsquo>s SDKs are designed to transparently work
130 with the serviceE<rsquo>s architecture, including the management and
131 mapping of the service endpoints, I<it is not recommended that you use
132 this API unless>:
133  
134 =over
135  
136 =item *
137  
138 Your application uses a programming language that does not yet have SDK
139 support
140  
141 =item *
142  
143 You require better control over the client-side implementation
144  
145 =back
146  
147 For detailed information on how to use DescribeEndpoints, see The
148 Endpoint Discovery Pattern and REST APIs
149 (https://docs.aws.amazon.com/timestream/latest/developerguide/Using-API.endpoint-discovery.html).
150  
151  
152 =head2 Query
153  
154 =over
155  
156 =item QueryString => Str
157  
158 =item [ClientToken => Str]
159  
160 =item [MaxRows => Int]
161  
162 =item [NextToken => Str]
163  
164  
165 =back
166  
167 Each argument is described in detail in: L<Paws::TimestreamQuery::Query>
168  
169 Returns: a L<Paws::TimestreamQuery::QueryResponse> instance
170  
171 Query is a synchronous operation that enables you to execute a query.
172 Query will timeout after 60 seconds. You must update the default
173 timeout in the SDK to support a timeout of 60 seconds. The result set
174 will be truncated to 1MB. Service quotas apply. For more information,
175 see Quotas in the Timestream Developer Guide.
176  
177  
178  
179  
180 =head1 PAGINATORS
181  
182 Paginator methods are helpers that repetively call methods that return partial results
183  
184 =head2 QueryAll(sub { },QueryString => Str, [ClientToken => Str, MaxRows => Int, NextToken => Str])
185  
186 =head2 QueryAll(QueryString => Str, [ClientToken => Str, MaxRows => Int, NextToken => Str])
187  
188  
189 If passed a sub as first parameter, it will call the sub for each element found in :
190  
191 - Rows, passing the object as the first parameter, and the string 'Rows' as the second parameter
192  
193 If not, it will return a a L<Paws::TimestreamQuery::QueryResponse> 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.
194  
195  
196  
197  
198  
199 =head1 SEE ALSO
200  
201 This service class forms part of L<Paws>
202  
203 =head1 BUGS and CONTRIBUTIONS
204  
205 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
206  
207 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
208  
209 =cut
210