blib/lib/Paws/Lightsail/GetDistributionMetricData.pm untested

filter: Statementstmt 0.0% 0 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 25 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::Lightsail::GetDistributionMetricData;
3 use Moose;
4 has DistributionName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'distributionName' , required => 1);
5 has EndTime => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'endTime' , required => 1);
6 has MetricName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'metricName' , required => 1);
7 has Period => (is => 'ro', isa => 'Int', traits => ['NameInRequest'], request_name => 'period' , required => 1);
8 has StartTime => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'startTime' , required => 1);
9 has Statistics => (is => 'ro', isa => 'ArrayRef[Str|Undef]', traits => ['NameInRequest'], request_name => 'statistics' , required => 1);
10 has Unit => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'unit' , required => 1);
11  
12 use MooseX::ClassAttribute;
13  
14 class_has _api_call => (isa => 'Str', is => 'ro', default => 'GetDistributionMetricData');
15 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Lightsail::GetDistributionMetricDataResult');
16 class_has _result_key => (isa => 'Str', is => 'ro');
17 1;
18  
19 ### main pod documentation begin ###
20  
21 =head1 NAME
22  
23 Paws::Lightsail::GetDistributionMetricData - Arguments for method GetDistributionMetricData on L<Paws::Lightsail>
24  
25 =head1 DESCRIPTION
26  
27 This class represents the parameters used for calling the method GetDistributionMetricData on the
28 L<Amazon Lightsail|Paws::Lightsail> service. Use the attributes of this class
29 as arguments to method GetDistributionMetricData.
30  
31 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to GetDistributionMetricData.
32  
33 =head1 SYNOPSIS
34  
35 my $lightsail = Paws->service('Lightsail');
36 my $GetDistributionMetricDataResult = $lightsail->GetDistributionMetricData(
37 DistributionName => 'MyResourceName',
38 EndTime => '1970-01-01T01:00:00',
39 MetricName => 'Requests',
40 Period => 1,
41 StartTime => '1970-01-01T01:00:00',
42 Statistics => [
43 'Minimum', ... # values: Minimum, Maximum, Sum, Average, SampleCount
44 ],
45 Unit => 'Seconds',
46  
47 );
48  
49 # Results:
50 my $MetricData = $GetDistributionMetricDataResult->MetricData;
51 my $MetricName = $GetDistributionMetricDataResult->MetricName;
52  
53 # Returns a L<Paws::Lightsail::GetDistributionMetricDataResult> object.
54  
55 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.
56 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/lightsail/GetDistributionMetricData>
57  
58 =head1 ATTRIBUTES
59  
60  
61 =head2 B<REQUIRED> DistributionName => Str
62  
63 The name of the distribution for which to get metric data.
64  
65 Use the C<GetDistributions> action to get a list of distribution names
66 that you can specify.
67  
68  
69  
70 =head2 B<REQUIRED> EndTime => Str
71  
72 The end of the time interval for which to get metric data.
73  
74 Constraints:
75  
76 =over
77  
78 =item *
79  
80 Specified in Coordinated Universal Time (UTC).
81  
82 =item *
83  
84 Specified in the Unix time format.
85  
86 For example, if you wish to use an end time of October 1, 2018, at 9 PM
87 UTC, specify C<1538427600> as the end time.
88  
89 =back
90  
91 You can convert a human-friendly time to Unix time format using a
92 converter like Epoch converter (https://www.epochconverter.com/).
93  
94  
95  
96 =head2 B<REQUIRED> MetricName => Str
97  
98 The metric for which you want to return information.
99  
100 Valid distribution metric names are listed below, along with the most
101 useful C<statistics> to include in your request, and the published
102 C<unit> value.
103  
104 =over
105  
106 =item *
107  
108 B<C<Requests> > - The total number of viewer requests received by your
109 Lightsail distribution, for all HTTP methods, and for both HTTP and
110 HTTPS requests.
111  
112 C<Statistics>: The most useful statistic is C<Sum>.
113  
114 C<Unit>: The published unit is C<None>.
115  
116 =item *
117  
118 B<C<BytesDownloaded> > - The number of bytes downloaded by viewers for
119 GET, HEAD, and OPTIONS requests.
120  
121 C<Statistics>: The most useful statistic is C<Sum>.
122  
123 C<Unit>: The published unit is C<None>.
124  
125 =item *
126  
127 B<C<BytesUploaded > > - The number of bytes uploaded to your origin by
128 your Lightsail distribution, using POST and PUT requests.
129  
130 C<Statistics>: The most useful statistic is C<Sum>.
131  
132 C<Unit>: The published unit is C<None>.
133  
134 =item *
135  
136 B<C<TotalErrorRate> > - The percentage of all viewer requests for which
137 the response's HTTP status code was 4xx or 5xx.
138  
139 C<Statistics>: The most useful statistic is C<Average>.
140  
141 C<Unit>: The published unit is C<Percent>.
142  
143 =item *
144  
145 B<C<4xxErrorRate> > - The percentage of all viewer requests for which
146 the response's HTTP status cod was 4xx. In these cases, the client or
147 client viewer may have made an error. For example, a status code of 404
148 (Not Found) means that the client requested an object that could not be
149 found.
150  
151 C<Statistics>: The most useful statistic is C<Average>.
152  
153 C<Unit>: The published unit is C<Percent>.
154  
155 =item *
156  
157 B<C<5xxErrorRate> > - The percentage of all viewer requests for which
158 the response's HTTP status code was 5xx. In these cases, the origin
159 server did not satisfy the requests. For example, a status code of 503
160 (Service Unavailable) means that the origin server is currently
161 unavailable.
162  
163 C<Statistics>: The most useful statistic is C<Average>.
164  
165 C<Unit>: The published unit is C<Percent>.
166  
167 =back
168  
169  
170 Valid values are: C<"Requests">, C<"BytesDownloaded">, C<"BytesUploaded">, C<"TotalErrorRate">, C<"Http4xxErrorRate">, C<"Http5xxErrorRate">
171  
172 =head2 B<REQUIRED> Period => Int
173  
174 The granularity, in seconds, for the metric data points that will be
175 returned.
176  
177  
178  
179 =head2 B<REQUIRED> StartTime => Str
180  
181 The start of the time interval for which to get metric data.
182  
183 Constraints:
184  
185 =over
186  
187 =item *
188  
189 Specified in Coordinated Universal Time (UTC).
190  
191 =item *
192  
193 Specified in the Unix time format.
194  
195 For example, if you wish to use a start time of October 1, 2018, at 8
196 PM UTC, specify C<1538424000> as the start time.
197  
198 =back
199  
200 You can convert a human-friendly time to Unix time format using a
201 converter like Epoch converter (https://www.epochconverter.com/).
202  
203  
204  
205 =head2 B<REQUIRED> Statistics => ArrayRef[Str|Undef]
206  
207 The statistic for the metric.
208  
209 The following statistics are available:
210  
211 =over
212  
213 =item *
214  
215 C<Minimum> - The lowest value observed during the specified period. Use
216 this value to determine low volumes of activity for your application.
217  
218 =item *
219  
220 C<Maximum> - The highest value observed during the specified period.
221 Use this value to determine high volumes of activity for your
222 application.
223  
224 =item *
225  
226 C<Sum> - All values submitted for the matching metric added together.
227 You can use this statistic to determine the total volume of a metric.
228  
229 =item *
230  
231 C<Average> - The value of Sum / SampleCount during the specified
232 period. By comparing this statistic with the Minimum and Maximum
233 values, you can determine the full scope of a metric and how close the
234 average use is to the Minimum and Maximum values. This comparison helps
235 you to know when to increase or decrease your resources.
236  
237 =item *
238  
239 C<SampleCount> - The count, or number, of data points used for the
240 statistical calculation.
241  
242 =back
243  
244  
245  
246  
247 =head2 B<REQUIRED> Unit => Str
248  
249 The unit for the metric data request.
250  
251 Valid units depend on the metric data being requested. For the valid
252 units with each available metric, see the C<metricName> parameter.
253  
254 Valid values are: C<"Seconds">, C<"Microseconds">, C<"Milliseconds">, C<"Bytes">, C<"Kilobytes">, C<"Megabytes">, C<"Gigabytes">, C<"Terabytes">, C<"Bits">, C<"Kilobits">, C<"Megabits">, C<"Gigabits">, C<"Terabits">, C<"Percent">, C<"Count">, C<"Bytes/Second">, C<"Kilobytes/Second">, C<"Megabytes/Second">, C<"Gigabytes/Second">, C<"Terabytes/Second">, C<"Bits/Second">, C<"Kilobits/Second">, C<"Megabits/Second">, C<"Gigabits/Second">, C<"Terabits/Second">, C<"Count/Second">, C<"None">
255  
256  
257 =head1 SEE ALSO
258  
259 This class forms part of L<Paws>, documenting arguments for method GetDistributionMetricData in L<Paws::Lightsail>
260  
261 =head1 BUGS and CONTRIBUTIONS
262  
263 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
264  
265 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
266  
267 =cut
268