blib/lib/Paws/CloudWatch/GetMetricStatistics.pm

filter: Statementstmt 100% 19 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 21 / 21 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Paws/CloudWatch/Dimension.pm ↑ Summary blib/lib/Paws/CloudWatch/GetMetricStatisticsOutput.pm »
1  
2 package Paws::CloudWatch::GetMetricStatistics;
3 1 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 has Dimensions => (is => 'ro', isa => 'ArrayRef[Paws::CloudWatch::Dimension]');
5 1 has EndTime => (is => 'ro', isa => 'Str', required => 1);
6 1 has ExtendedStatistics => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
7 1 has MetricName => (is => 'ro', isa => 'Str', required => 1);
8 1 has Namespace => (is => 'ro', isa => 'Str', required => 1);
9 1 has Period => (is => 'ro', isa => 'Int', required => 1);
10 1 has StartTime => (is => 'ro', isa => 'Str', required => 1);
11 1 has Statistics => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
12 1 has Unit => (is => 'ro', isa => 'Str');
13  
14 1 ▶ use MooseX::ClassAttribute;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 1 class_has _api_call => (isa => 'Str', is => 'ro', default => 'GetMetricStatistics');
17 1 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::CloudWatch::GetMetricStatisticsOutput');
18 1 class_has _result_key => (isa => 'Str', is => 'ro', default => 'GetMetricStatisticsResult');
19 1 1;
20  
21 ### main pod documentation begin ###
22  
23 =head1 NAME
24  
25 Paws::CloudWatch::GetMetricStatistics - Arguments for method GetMetricStatistics on L<Paws::CloudWatch>
26  
27 =head1 DESCRIPTION
28  
29 This class represents the parameters used for calling the method GetMetricStatistics on the
30 L<Amazon CloudWatch|Paws::CloudWatch> service. Use the attributes of this class
31 as arguments to method GetMetricStatistics.
32  
33 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to GetMetricStatistics.
34  
35 =head1 SYNOPSIS
36  
37 my $monitoring = Paws->service('CloudWatch');
38 my $GetMetricStatisticsOutput = $monitoring->GetMetricStatistics(
39 EndTime => '1970-01-01T01:00:00',
40 MetricName => 'MyMetricName',
41 Namespace => 'MyNamespace',
42 Period => 1,
43 StartTime => '1970-01-01T01:00:00',
44 Dimensions => [
45 {
46 Name => 'MyDimensionName', # min: 1, max: 255
47 Value => 'MyDimensionValue', # min: 1, max: 255
48  
49 },
50 ...
51 ], # OPTIONAL
52 ExtendedStatistics => [ 'MyExtendedStatistic', ... ], # OPTIONAL
53 Statistics => [
54 'SampleCount', ... # values: SampleCount, Average, Sum, Minimum, Maximum
55 ], # OPTIONAL
56 Unit => 'Seconds', # OPTIONAL
57 );
58  
59 # Results:
60 my $Datapoints = $GetMetricStatisticsOutput->Datapoints;
61 my $Label = $GetMetricStatisticsOutput->Label;
62  
63 # Returns a L<Paws::CloudWatch::GetMetricStatisticsOutput> object.
64  
65 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.
66 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/monitoring/GetMetricStatistics>
67  
68 =head1 ATTRIBUTES
69  
70  
71 =head2 Dimensions => ArrayRef[L<Paws::CloudWatch::Dimension>]
72  
73 The dimensions. If the metric contains multiple dimensions, you must
74 include a value for each dimension. CloudWatch treats each unique
75 combination of dimensions as a separate metric. If a specific
76 combination of dimensions was not published, you can't retrieve
77 statistics for it. You must specify the same dimensions that were used
78 when the metrics were created. For an example, see Dimension
79 Combinations
80 (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#dimension-combinations)
81 in the I<Amazon CloudWatch User Guide>. For more information about
82 specifying dimensions, see Publishing Metrics
83 (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html)
84 in the I<Amazon CloudWatch User Guide>.
85  
86  
87  
88 =head2 B<REQUIRED> EndTime => Str
89  
90 The time stamp that determines the last data point to return.
91  
92 The value specified is exclusive; results include data points up to the
93 specified time stamp. In a raw HTTP query, the time stamp must be in
94 ISO 8601 UTC format (for example, 2016-10-10T23:00:00Z).
95  
96  
97  
98 =head2 ExtendedStatistics => ArrayRef[Str|Undef]
99  
100 The percentile statistics. Specify values between p0.0 and p100. When
101 calling C<GetMetricStatistics>, you must specify either C<Statistics>
102 or C<ExtendedStatistics>, but not both. Percentile statistics are not
103 available for metrics when any of the metric values are negative
104 numbers.
105  
106  
107  
108 =head2 B<REQUIRED> MetricName => Str
109  
110 The name of the metric, with or without spaces.
111  
112  
113  
114 =head2 B<REQUIRED> Namespace => Str
115  
116 The namespace of the metric, with or without spaces.
117  
118  
119  
120 =head2 B<REQUIRED> Period => Int
121  
122 The granularity, in seconds, of the returned data points. For metrics
123 with regular resolution, a period can be as short as one minute (60
124 seconds) and must be a multiple of 60. For high-resolution metrics that
125 are collected at intervals of less than one minute, the period can be
126 1, 5, 10, 30, 60, or any multiple of 60. High-resolution metrics are
127 those metrics stored by a C<PutMetricData> call that includes a
128 C<StorageResolution> of 1 second.
129  
130 If the C<StartTime> parameter specifies a time stamp that is greater
131 than 3 hours ago, you must specify the period as follows or no data
132 points in that time range is returned:
133  
134 =over
135  
136 =item *
137  
138 Start time between 3 hours and 15 days ago - Use a multiple of 60
139 seconds (1 minute).
140  
141 =item *
142  
143 Start time between 15 and 63 days ago - Use a multiple of 300 seconds
144 (5 minutes).
145  
146 =item *
147  
148 Start time greater than 63 days ago - Use a multiple of 3600 seconds (1
149 hour).
150  
151 =back
152  
153  
154  
155  
156 =head2 B<REQUIRED> StartTime => Str
157  
158 The time stamp that determines the first data point to return. Start
159 times are evaluated relative to the time that CloudWatch receives the
160 request.
161  
162 The value specified is inclusive; results include data points with the
163 specified time stamp. In a raw HTTP query, the time stamp must be in
164 ISO 8601 UTC format (for example, 2016-10-03T23:00:00Z).
165  
166 CloudWatch rounds the specified time stamp as follows:
167  
168 =over
169  
170 =item *
171  
172 Start time less than 15 days ago - Round down to the nearest whole
173 minute. For example, 12:32:34 is rounded down to 12:32:00.
174  
175 =item *
176  
177 Start time between 15 and 63 days ago - Round down to the nearest
178 5-minute clock interval. For example, 12:32:34 is rounded down to
179 12:30:00.
180  
181 =item *
182  
183 Start time greater than 63 days ago - Round down to the nearest 1-hour
184 clock interval. For example, 12:32:34 is rounded down to 12:00:00.
185  
186 =back
187  
188 If you set C<Period> to 5, 10, or 30, the start time of your request is
189 rounded down to the nearest time that corresponds to even 5-, 10-, or
190 30-second divisions of a minute. For example, if you make a query at
191 (HH:mm:ss) 01:05:23 for the previous 10-second period, the start time
192 of your request is rounded down and you receive data from 01:05:10 to
193 01:05:20. If you make a query at 15:07:17 for the previous 5 minutes of
194 data, using a period of 5 seconds, you receive data timestamped between
195 15:02:15 and 15:07:15.
196  
197  
198  
199 =head2 Statistics => ArrayRef[Str|Undef]
200  
201 The metric statistics, other than percentile. For percentile
202 statistics, use C<ExtendedStatistics>. When calling
203 C<GetMetricStatistics>, you must specify either C<Statistics> or
204 C<ExtendedStatistics>, but not both.
205  
206  
207  
208 =head2 Unit => Str
209  
210 The unit for a given metric. If you omit C<Unit>, all data that was
211 collected with any unit is returned, along with the corresponding units
212 that were specified when the data was reported to CloudWatch. If you
213 specify a unit, the operation returns only data that was collected with
214 that unit specified. If you specify a unit that does not match the data
215 collected, the results of the operation are null. CloudWatch does not
216 perform unit conversions.
217  
218 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">
219  
220  
221 =head1 SEE ALSO
222  
223 This class forms part of L<Paws>, documenting arguments for method GetMetricStatistics in L<Paws::CloudWatch>
224  
225 =head1 BUGS and CONTRIBUTIONS
226  
227 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
228  
229 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
230  
231 =cut
232  
« blib/lib/Paws/CloudWatch/Dimension.pm ↑ Summary blib/lib/Paws/CloudWatch/GetMetricStatisticsOutput.pm »