blib/lib/Paws/CloudWatch/GetMetricData.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 18 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::CloudWatch::GetMetricData;
3 use Moose;
4 has EndTime => (is => 'ro', isa => 'Str', required => 1);
5 has LabelOptions => (is => 'ro', isa => 'Paws::CloudWatch::LabelOptions');
6 has MaxDatapoints => (is => 'ro', isa => 'Int');
7 has MetricDataQueries => (is => 'ro', isa => 'ArrayRef[Paws::CloudWatch::MetricDataQuery]', required => 1);
8 has NextToken => (is => 'ro', isa => 'Str');
9 has ScanBy => (is => 'ro', isa => 'Str');
10 has StartTime => (is => 'ro', isa => 'Str', required => 1);
11  
12 use MooseX::ClassAttribute;
13  
14 class_has _api_call => (isa => 'Str', is => 'ro', default => 'GetMetricData');
15 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::CloudWatch::GetMetricDataOutput');
16 class_has _result_key => (isa => 'Str', is => 'ro', default => 'GetMetricDataResult');
17 1;
18  
19 ### main pod documentation begin ###
20  
21 =head1 NAME
22  
23 Paws::CloudWatch::GetMetricData - Arguments for method GetMetricData on L<Paws::CloudWatch>
24  
25 =head1 DESCRIPTION
26  
27 This class represents the parameters used for calling the method GetMetricData on the
28 L<Amazon CloudWatch|Paws::CloudWatch> service. Use the attributes of this class
29 as arguments to method GetMetricData.
30  
31 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to GetMetricData.
32  
33 =head1 SYNOPSIS
34  
35 my $monitoring = Paws->service('CloudWatch');
36 my $GetMetricDataOutput = $monitoring->GetMetricData(
37 EndTime => '1970-01-01T01:00:00',
38 MetricDataQueries => [
39 {
40 Id => 'MyMetricId', # min: 1, max: 255
41 Expression => 'MyMetricExpression', # min: 1, max: 1024; OPTIONAL
42 Label => 'MyMetricLabel', # OPTIONAL
43 MetricStat => {
44 Metric => {
45 Dimensions => [
46 {
47 Name => 'MyDimensionName', # min: 1, max: 255
48 Value => 'MyDimensionValue', # min: 1, max: 255
49  
50 },
51 ...
52 ], # max: 10; OPTIONAL
53 MetricName => 'MyMetricName', # min: 1, max: 255; OPTIONAL
54 Namespace => 'MyNamespace', # min: 1, max: 255; OPTIONAL
55 },
56 Period => 1, # min: 1
57 Stat => 'MyStat',
58 Unit => 'Seconds'
59 , # values: Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, None; OPTIONAL
60 }, # OPTIONAL
61 Period => 1, # min: 1
62 ReturnData => 1, # OPTIONAL
63 },
64 ...
65 ],
66 StartTime => '1970-01-01T01:00:00',
67 LabelOptions => {
68 Timezone => 'MyGetMetricDataLabelTimezone', # OPTIONAL
69 }, # OPTIONAL
70 MaxDatapoints => 1, # OPTIONAL
71 NextToken => 'MyNextToken', # OPTIONAL
72 ScanBy => 'TimestampDescending', # OPTIONAL
73 );
74  
75 # Results:
76 my $Messages = $GetMetricDataOutput->Messages;
77 my $MetricDataResults = $GetMetricDataOutput->MetricDataResults;
78 my $NextToken = $GetMetricDataOutput->NextToken;
79  
80 # Returns a L<Paws::CloudWatch::GetMetricDataOutput> object.
81  
82 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.
83 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/monitoring/GetMetricData>
84  
85 =head1 ATTRIBUTES
86  
87  
88 =head2 B<REQUIRED> EndTime => Str
89  
90 The time stamp indicating the latest data to be returned.
91  
92 The value specified is exclusive; results include data points up to the
93 specified time stamp.
94  
95 For better performance, specify C<StartTime> and C<EndTime> values that
96 align with the value of the metric's C<Period> and sync up with the
97 beginning and end of an hour. For example, if the C<Period> of a metric
98 is 5 minutes, specifying 12:05 or 12:30 as C<EndTime> can get a faster
99 response from CloudWatch than setting 12:07 or 12:29 as the C<EndTime>.
100  
101  
102  
103 =head2 LabelOptions => L<Paws::CloudWatch::LabelOptions>
104  
105 This structure includes the C<Timezone> parameter, which you can use to
106 specify your time zone so that the labels of returned data display the
107 correct time for your time zone.
108  
109  
110  
111 =head2 MaxDatapoints => Int
112  
113 The maximum number of data points the request should return before
114 paginating. If you omit this, the default of 100,800 is used.
115  
116  
117  
118 =head2 B<REQUIRED> MetricDataQueries => ArrayRef[L<Paws::CloudWatch::MetricDataQuery>]
119  
120 The metric queries to be returned. A single C<GetMetricData> call can
121 include as many as 500 C<MetricDataQuery> structures. Each of these
122 structures can specify either a metric to retrieve, or a math
123 expression to perform on retrieved data.
124  
125  
126  
127 =head2 NextToken => Str
128  
129 Include this value, if it was returned by the previous C<GetMetricData>
130 operation, to get the next set of data points.
131  
132  
133  
134 =head2 ScanBy => Str
135  
136 The order in which data points should be returned.
137 C<TimestampDescending> returns the newest data first and paginates when
138 the C<MaxDatapoints> limit is reached. C<TimestampAscending> returns
139 the oldest data first and paginates when the C<MaxDatapoints> limit is
140 reached.
141  
142 Valid values are: C<"TimestampDescending">, C<"TimestampAscending">
143  
144 =head2 B<REQUIRED> StartTime => Str
145  
146 The time stamp indicating the earliest data to be returned.
147  
148 The value specified is inclusive; results include data points with the
149 specified time stamp.
150  
151 CloudWatch rounds the specified time stamp as follows:
152  
153 =over
154  
155 =item *
156  
157 Start time less than 15 days ago - Round down to the nearest whole
158 minute. For example, 12:32:34 is rounded down to 12:32:00.
159  
160 =item *
161  
162 Start time between 15 and 63 days ago - Round down to the nearest
163 5-minute clock interval. For example, 12:32:34 is rounded down to
164 12:30:00.
165  
166 =item *
167  
168 Start time greater than 63 days ago - Round down to the nearest 1-hour
169 clock interval. For example, 12:32:34 is rounded down to 12:00:00.
170  
171 =back
172  
173 If you set C<Period> to 5, 10, or 30, the start time of your request is
174 rounded down to the nearest time that corresponds to even 5-, 10-, or
175 30-second divisions of a minute. For example, if you make a query at
176 (HH:mm:ss) 01:05:23 for the previous 10-second period, the start time
177 of your request is rounded down and you receive data from 01:05:10 to
178 01:05:20. If you make a query at 15:07:17 for the previous 5 minutes of
179 data, using a period of 5 seconds, you receive data timestamped between
180 15:02:15 and 15:07:15.
181  
182 For better performance, specify C<StartTime> and C<EndTime> values that
183 align with the value of the metric's C<Period> and sync up with the
184 beginning and end of an hour. For example, if the C<Period> of a metric
185 is 5 minutes, specifying 12:05 or 12:30 as C<StartTime> can get a
186 faster response from CloudWatch than setting 12:07 or 12:29 as the
187 C<StartTime>.
188  
189  
190  
191  
192 =head1 SEE ALSO
193  
194 This class forms part of L<Paws>, documenting arguments for method GetMetricData in L<Paws::CloudWatch>
195  
196 =head1 BUGS and CONTRIBUTIONS
197  
198 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
199  
200 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
201  
202 =cut
203