get_rightsizing_recommendation
¶
get_rightsizing_recommendation(
service: GenericString,
*,
config_overrides: Optional[CostExplorerClientConfig] = None,
filter: Optional[Expression] = None,
configuration: Optional[RightsizingRecommendationConfiguration] = None,
page_size: Optional[RecommendationsPageSize] = None,
next_page_token: Optional[NextPageToken] = None,
) -> GetRightsizingRecommendationResponse
Creates recommendations that help you save cost by identifying idle and underutilized Amazon EC2 instances.
Recommendations are generated to either downsize or terminate instances, along with providing savings detail and metrics. For more information about calculation and function, see Optimizing Your Cost with Rightsizing Recommendations in the Billing and Cost Management User Guide.
Parameters:
-
configuration(Optional[RightsizingRecommendationConfiguration], default:None) –You can use Configuration to customize recommendations across two attributes. You can choose to view recommendations for instances within the same instance families or across different instance families. You can also choose to view your estimated savings that are associated with recommendations with consideration of existing Savings Plans or RI benefits, or neither.
-
service(GenericString) –The specific service that you want recommendations for. The only valid value for
GetRightsizingRecommendationis "AmazonEC2". -
page_size(Optional[RecommendationsPageSize], default:None) –The number of recommendations that you want returned in a single response object.
-
next_page_token(Optional[NextPageToken], default:None) –The pagination token that indicates the next set of results that you want to retrieve.
Raises:
-
InvalidNextTokenException–The pagination token is invalid. Try again without a pagination token.
-
LimitExceededException–You made too many calls in a short period of time. Try again later.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_cost_explorer/_services/cost_explorer.py
2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 | |