get_ec2_recommendation_projected_metrics
¶
get_ec2_recommendation_projected_metrics(
instance_arn: InstanceArn,
stat: MetricStatistic,
period: Period,
start_time: Timestamp,
end_time: Timestamp,
*,
config_overrides: Optional[ComputeOptimizerClientConfig] = 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/compute_optimizer.py
1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 | |