« blib/lib/Paws/Lightsail/GetInstanceAccessDetailsResult.pm
↑ Summary
blib/lib/Paws/Lightsail/GetInstanceMetricDataResult.pm »
| 1 | |||
| 2 | package Paws::Lightsail::GetInstanceMetricData; | ||
| 3 | use Moose; | ||
| 4 | has EndTime => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'endTime' , required => 1); | ||
| 5 | has InstanceName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'instanceName' , 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 => 'GetInstanceMetricData'); | ||
| 15 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Lightsail::GetInstanceMetricDataResult'); | ||
| 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::GetInstanceMetricData - Arguments for method GetInstanceMetricData on L<Paws::Lightsail> | ||
| 24 | |||
| 25 | =head1 DESCRIPTION | ||
| 26 | |||
| 27 | This class represents the parameters used for calling the method GetInstanceMetricData on the | ||
| 28 | L<Amazon Lightsail|Paws::Lightsail> service. Use the attributes of this class | ||
| 29 | as arguments to method GetInstanceMetricData. | ||
| 30 | |||
| 31 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to GetInstanceMetricData. | ||
| 32 | |||
| 33 | =head1 SYNOPSIS | ||
| 34 | |||
| 35 | my $lightsail = Paws->service('Lightsail'); | ||
| 36 | my $GetInstanceMetricDataResult = $lightsail->GetInstanceMetricData( | ||
| 37 | EndTime => '1970-01-01T01:00:00', | ||
| 38 | InstanceName => 'MyResourceName', | ||
| 39 | MetricName => 'CPUUtilization', | ||
| 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 = $GetInstanceMetricDataResult->MetricData; | ||
| 51 | my $MetricName = $GetInstanceMetricDataResult->MetricName; | ||
| 52 | |||
| 53 | # Returns a L<Paws::Lightsail::GetInstanceMetricDataResult> 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/GetInstanceMetricData> | ||
| 57 | |||
| 58 | =head1 ATTRIBUTES | ||
| 59 | |||
| 60 | |||
| 61 | =head2 B<REQUIRED> EndTime => Str | ||
| 62 | |||
| 63 | The end time of the time period. | ||
| 64 | |||
| 65 | |||
| 66 | |||
| 67 | =head2 B<REQUIRED> InstanceName => Str | ||
| 68 | |||
| 69 | The name of the instance for which you want to get metrics data. | ||
| 70 | |||
| 71 | |||
| 72 | |||
| 73 | =head2 B<REQUIRED> MetricName => Str | ||
| 74 | |||
| 75 | The metric for which you want to return information. | ||
| 76 | |||
| 77 | Valid instance metric names are listed below, along with the most | ||
| 78 | useful C<statistics> to include in your request, and the published | ||
| 79 | C<unit> value. | ||
| 80 | |||
| 81 | =over | ||
| 82 | |||
| 83 | =item * | ||
| 84 | |||
| 85 | B<C<BurstCapacityPercentage> > - The percentage of CPU performance | ||
| 86 | available for your instance to burst above its baseline. Your instance | ||
| 87 | continuously accrues and consumes burst capacity. Burst capacity stops | ||
| 88 | accruing when your instance's C<BurstCapacityPercentage> reaches 100%. | ||
| 89 | For more information, see Viewing instance burst capacity in Amazon | ||
| 90 | Lightsail | ||
| 91 | (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-viewing-instance-burst-capacity). | ||
| 92 | |||
| 93 | C<Statistics>: The most useful statistics are C<Maximum> and | ||
| 94 | C<Average>. | ||
| 95 | |||
| 96 | C<Unit>: The published unit is C<Percent>. | ||
| 97 | |||
| 98 | =item * | ||
| 99 | |||
| 100 | B<C<BurstCapacityTime> > - The available amount of time for your | ||
| 101 | instance to burst at 100% CPU utilization. Your instance continuously | ||
| 102 | accrues and consumes burst capacity. Burst capacity time stops accruing | ||
| 103 | when your instance's C<BurstCapacityPercentage> metric reaches 100%. | ||
| 104 | |||
| 105 | Burst capacity time is consumed at the full rate only when your | ||
| 106 | instance operates at 100% CPU utilization. For example, if your | ||
| 107 | instance operates at 50% CPU utilization in the burstable zone for a | ||
| 108 | 5-minute period, then it consumes CPU burst capacity minutes at a 50% | ||
| 109 | rate in that period. Your instance consumed 2 minutes and 30 seconds of | ||
| 110 | CPU burst capacity minutes in the 5-minute period. For more | ||
| 111 | information, see Viewing instance burst capacity in Amazon Lightsail | ||
| 112 | (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-viewing-instance-burst-capacity). | ||
| 113 | |||
| 114 | C<Statistics>: The most useful statistics are C<Maximum> and | ||
| 115 | C<Average>. | ||
| 116 | |||
| 117 | C<Unit>: The published unit is C<Seconds>. | ||
| 118 | |||
| 119 | =item * | ||
| 120 | |||
| 121 | B<C<CPUUtilization> > - The percentage of allocated compute units that | ||
| 122 | are currently in use on the instance. This metric identifies the | ||
| 123 | processing power to run the applications on the instance. Tools in your | ||
| 124 | operating system can show a lower percentage than Lightsail when the | ||
| 125 | instance is not allocated a full processor core. | ||
| 126 | |||
| 127 | C<Statistics>: The most useful statistics are C<Maximum> and | ||
| 128 | C<Average>. | ||
| 129 | |||
| 130 | C<Unit>: The published unit is C<Percent>. | ||
| 131 | |||
| 132 | =item * | ||
| 133 | |||
| 134 | B<C<NetworkIn> > - The number of bytes received on all network | ||
| 135 | interfaces by the instance. This metric identifies the volume of | ||
| 136 | incoming network traffic to the instance. The number reported is the | ||
| 137 | number of bytes received during the period. Because this metric is | ||
| 138 | reported in 5-minute intervals, divide the reported number by 300 to | ||
| 139 | find Bytes/second. | ||
| 140 | |||
| 141 | C<Statistics>: The most useful statistic is C<Sum>. | ||
| 142 | |||
| 143 | C<Unit>: The published unit is C<Bytes>. | ||
| 144 | |||
| 145 | =item * | ||
| 146 | |||
| 147 | B<C<NetworkOut> > - The number of bytes sent out on all network | ||
| 148 | interfaces by the instance. This metric identifies the volume of | ||
| 149 | outgoing network traffic from the instance. The number reported is the | ||
| 150 | number of bytes sent during the period. Because this metric is reported | ||
| 151 | in 5-minute intervals, divide the reported number by 300 to find | ||
| 152 | Bytes/second. | ||
| 153 | |||
| 154 | C<Statistics>: The most useful statistic is C<Sum>. | ||
| 155 | |||
| 156 | C<Unit>: The published unit is C<Bytes>. | ||
| 157 | |||
| 158 | =item * | ||
| 159 | |||
| 160 | B<C<StatusCheckFailed> > - Reports whether the instance passed or | ||
| 161 | failed both the instance status check and the system status check. This | ||
| 162 | metric can be either 0 (passed) or 1 (failed). This metric data is | ||
| 163 | available in 1-minute (60 seconds) granularity. | ||
| 164 | |||
| 165 | C<Statistics>: The most useful statistic is C<Sum>. | ||
| 166 | |||
| 167 | C<Unit>: The published unit is C<Count>. | ||
| 168 | |||
| 169 | =item * | ||
| 170 | |||
| 171 | B<C<StatusCheckFailed_Instance> > - Reports whether the instance passed | ||
| 172 | or failed the instance status check. This metric can be either 0 | ||
| 173 | (passed) or 1 (failed). This metric data is available in 1-minute (60 | ||
| 174 | seconds) granularity. | ||
| 175 | |||
| 176 | C<Statistics>: The most useful statistic is C<Sum>. | ||
| 177 | |||
| 178 | C<Unit>: The published unit is C<Count>. | ||
| 179 | |||
| 180 | =item * | ||
| 181 | |||
| 182 | B<C<StatusCheckFailed_System> > - Reports whether the instance passed | ||
| 183 | or failed the system status check. This metric can be either 0 (passed) | ||
| 184 | or 1 (failed). This metric data is available in 1-minute (60 seconds) | ||
| 185 | granularity. | ||
| 186 | |||
| 187 | C<Statistics>: The most useful statistic is C<Sum>. | ||
| 188 | |||
| 189 | C<Unit>: The published unit is C<Count>. | ||
| 190 | |||
| 191 | =back | ||
| 192 | |||
| 193 | |||
| 194 | Valid values are: C<"CPUUtilization">, C<"NetworkIn">, C<"NetworkOut">, C<"StatusCheckFailed">, C<"StatusCheckFailed_Instance">, C<"StatusCheckFailed_System">, C<"BurstCapacityTime">, C<"BurstCapacityPercentage"> | ||
| 195 | |||
| 196 | =head2 B<REQUIRED> Period => Int | ||
| 197 | |||
| 198 | The granularity, in seconds, of the returned data points. | ||
| 199 | |||
| 200 | The C<StatusCheckFailed>, C<StatusCheckFailed_Instance>, and | ||
| 201 | C<StatusCheckFailed_System> instance metric data is available in | ||
| 202 | 1-minute (60 seconds) granularity. All other instance metric data is | ||
| 203 | available in 5-minute (300 seconds) granularity. | ||
| 204 | |||
| 205 | |||
| 206 | |||
| 207 | =head2 B<REQUIRED> StartTime => Str | ||
| 208 | |||
| 209 | The start time of the time period. | ||
| 210 | |||
| 211 | |||
| 212 | |||
| 213 | =head2 B<REQUIRED> Statistics => ArrayRef[Str|Undef] | ||
| 214 | |||
| 215 | The statistic for the metric. | ||
| 216 | |||
| 217 | The following statistics are available: | ||
| 218 | |||
| 219 | =over | ||
| 220 | |||
| 221 | =item * | ||
| 222 | |||
| 223 | C<Minimum> - The lowest value observed during the specified period. Use | ||
| 224 | this value to determine low volumes of activity for your application. | ||
| 225 | |||
| 226 | =item * | ||
| 227 | |||
| 228 | C<Maximum> - The highest value observed during the specified period. | ||
| 229 | Use this value to determine high volumes of activity for your | ||
| 230 | application. | ||
| 231 | |||
| 232 | =item * | ||
| 233 | |||
| 234 | C<Sum> - All values submitted for the matching metric added together. | ||
| 235 | You can use this statistic to determine the total volume of a metric. | ||
| 236 | |||
| 237 | =item * | ||
| 238 | |||
| 239 | C<Average> - The value of Sum / SampleCount during the specified | ||
| 240 | period. By comparing this statistic with the Minimum and Maximum | ||
| 241 | values, you can determine the full scope of a metric and how close the | ||
| 242 | average use is to the Minimum and Maximum values. This comparison helps | ||
| 243 | you to know when to increase or decrease your resources. | ||
| 244 | |||
| 245 | =item * | ||
| 246 | |||
| 247 | C<SampleCount> - The count, or number, of data points used for the | ||
| 248 | statistical calculation. | ||
| 249 | |||
| 250 | =back | ||
| 251 | |||
| 252 | |||
| 253 | |||
| 254 | |||
| 255 | =head2 B<REQUIRED> Unit => Str | ||
| 256 | |||
| 257 | The unit for the metric data request. Valid units depend on the metric | ||
| 258 | data being requested. For the valid units to specify with each | ||
| 259 | available metric, see the C<metricName> parameter. | ||
| 260 | |||
| 261 | 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"> | ||
| 262 | |||
| 263 | |||
| 264 | =head1 SEE ALSO | ||
| 265 | |||
| 266 | This class forms part of L<Paws>, documenting arguments for method GetInstanceMetricData in L<Paws::Lightsail> | ||
| 267 | |||
| 268 | =head1 BUGS and CONTRIBUTIONS | ||
| 269 | |||
| 270 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 271 | |||
| 272 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 273 | |||
| 274 | =cut | ||
| 275 |