Returns a list of proactive resource evaluations.
Parameters:
-
filters
(Optional[ResourceEvaluationFilters], default:
None
)
–
Returns a ResourceEvaluationFilters object.
-
limit
(Optional[ListResourceEvaluationsPageItemLimit], default:
None
)
–
The maximum number of evaluations returned on each page. The default is 10. You cannot specify a number greater than 100. If you specify 0, Config uses the default.
-
next_token
(Optional[String], default:
None
)
–
The nextToken string returned on a previous page that you use to get the next page of results in a paginated response.
Raises:
-
InvalidNextTokenException
–
The specified next token is not valid. Specify the nextToken string that was returned in the previous response to get the next page of results.
-
InvalidParameterValueException
–
One or more of the specified parameters are not valid. Verify that your parameters are valid and try again.
-
InvalidTimeRangeException
–
The specified time range is not valid. The earlier time is not chronologically before the later time.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_config_service/_services/async_config_service.py
| async def list_resource_evaluations(
self,
*,
config_overrides: Optional[AsyncConfigServiceClientConfig] = None,
filters: Optional[
"capo_config_service.types.resource_evaluation_filters.ResourceEvaluationFilters"
] = None,
limit: Optional[
"capo_config_service.types.list_resource_evaluations_page_item_limit.ListResourceEvaluationsPageItemLimit"
] = None,
next_token: Optional["capo_config_service.types.string.String"] = None,
) -> "capo_config_service.types.list_resource_evaluations_response.ListResourceEvaluationsResponse":
"""<p>Returns a list of proactive resource evaluations.</p>
Args:
filters: <p>Returns a <code>ResourceEvaluationFilters</code> object.</p>
limit: <p>The maximum number of evaluations returned on each page. The default is 10. You cannot specify a number greater than 100. If you specify 0, Config uses the default.</p>
next_token: <p>The <code>nextToken</code> string returned on a previous page that you use to get the next page of results in a paginated response.</p>
Raises:
capo_config_service.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The specified next token is not valid. Specify the <code>nextToken</code> string that was returned in the previous response to get the next page of results.</p>
capo_config_service.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One or more of the specified parameters are not valid. Verify that your parameters are valid and try again.</p>
capo_config_service.errors.invalid_time_range_exception.InvalidTimeRangeException: <p>The specified time range is not valid. The earlier time is not chronologically before the later time.</p>
capo_config_service.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_config_service.types.list_resource_evaluations_request.ListResourceEvaluationsRequest]",
) -> AsyncOperationResponse[
"capo_config_service.types.list_resource_evaluations_response.ListResourceEvaluationsResponse"
]:
import capo_config_service._operations.starling_dove_service.list_resource_evaluations
(
output,
http_response,
) = await capo_config_service._operations.starling_dove_service.list_resource_evaluations.async_list_resource_evaluations(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListResourceEvaluations")
)
input_: capo_config_service.types.list_resource_evaluations_request.ListResourceEvaluationsRequest = {}
if filters is not None:
input_["filters"] = filters
if limit is not None:
input_["limit"] = limit
if next_token is not None:
input_["next_token"] = next_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|