get_ec2_recommendation_projected_metrics
async
¶
get_ec2_recommendation_projected_metrics(
instance_arn: InstanceArn,
stat: MetricStatistic,
period: Period,
start_time: Timestamp,
end_time: Timestamp,
*,
config_overrides: Optional[AsyncComputeOptimizerClientConfig] = None,
recommendation_preferences: Optional[RecommendationPreferences] = None,
) -> GetEC2RecommendationProjectedMetricsResponse
Returns the projected utilization metrics of Amazon EC2 instance recommendations.
The Cpu and Memory metrics are the only projected utilization metrics returned when you run this action. Additionally, the Memory metric is returned only for resources that have the unified CloudWatch agent installed on them. For more information, see Enabling Memory Utilization with the CloudWatch Agent.
Parameters:
-
instance_arn(InstanceArn) –The Amazon Resource Name (ARN) of the instances for which to return recommendation projected metrics.
-
stat(MetricStatistic) –The statistic of the projected metrics.
-
period(Period) –The granularity, in seconds, of the projected metrics data points.
-
start_time(Timestamp) –The timestamp of the first projected metrics data point to return.
-
end_time(Timestamp) –The timestamp of the last projected metrics data point to return.
-
recommendation_preferences(Optional[RecommendationPreferences], default:None) –An object to specify the preferences for the Amazon EC2 recommendation projected metrics to return in the response.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
InternalServerException–An internal error has occurred. Try your call again.
-
InvalidParameterValueException–The value supplied for the input parameter is out of range or not valid.
-
MissingAuthenticationToken–The request must contain either a valid (registered) Amazon Web Services access key ID or X.509 certificate.
-
OptInRequiredException–The account is not opted in to Compute Optimizer.
-
ResourceNotFoundException–A resource that is required for the action doesn't exist.
-
ServiceUnavailableException–The request has failed due to a temporary failure of the server.
-
ThrottlingException–The request was denied due to request throttling.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_compute_optimizer/_services/async_compute_optimizer.py
1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 | |