get_rightsizing_recommendation
async
¶
get_rightsizing_recommendation(
service: GenericString,
*,
config_overrides: Optional[AsyncCostExplorerClientConfig] = 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/async_cost_explorer.py
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 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 | |