Lists the functions in this account, in this Region. Each entry is a summary. To get the expressions of a function, use GetFunction.
Parameters:
-
max_results
(Optional[int], default:
None
)
–
The maximum number of functions to return in one response. Valid range: 1 to 100. The default is 100.
-
next_token
(Optional[str], default:
None
)
–
The token that identifies the page of results to return. Use the nextToken value from a previous response.
Raises:
-
AccessDeniedException
–
You do not have sufficient access to perform this action.
-
InternalServerErrorException
–
An internal server error occurred. This is a temporary condition and the request can be retried. If the problem persists, contact AWS Support.
-
TooManyRequestException
–
The request was denied due to request throttling. Too many requests have been made within a given time period. Reduce the frequency of requests and use exponential backoff when retrying.
-
ValidationException
–
The input fails to satisfy the constraints specified by the service. Check the error message for details about which parameter or field is invalid and correct the request before retrying.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_elementalinference/_services/elemental_inference.py
| def list_functions(
self,
*,
config_overrides: Optional[ElementalInferenceClientConfig] = None,
max_results: Optional[int] = None,
next_token: Optional[str] = None,
) -> "capo_elementalinference.types.list_functions_response.ListFunctionsResponse":
"""<p>Lists the functions in this account, in this Region. Each entry is a summary. To get the expressions of a function, use GetFunction. </p>
Args:
max_results: <p>The maximum number of functions to return in one response. Valid range: 1 to 100. The default is 100. </p>
next_token: <p>The token that identifies the page of results to return. Use the nextToken value from a previous response. </p>
Raises:
capo_elementalinference.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_elementalinference.errors.internal_server_error_exception.InternalServerErrorException: <p>An internal server error occurred. This is a temporary condition and the request can be retried. If the problem persists, contact AWS Support. </p>
capo_elementalinference.errors.too_many_request_exception.TooManyRequestException: <p>The request was denied due to request throttling. Too many requests have been made within a given time period. Reduce the frequency of requests and use exponential backoff when retrying. </p>
capo_elementalinference.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service. Check the error message for details about which parameter or field is invalid and correct the request before retrying. </p>
capo_elementalinference.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_elementalinference.types.list_functions_request.ListFunctionsRequest]",
) -> OperationResponse[
"capo_elementalinference.types.list_functions_response.ListFunctionsResponse"
]:
import capo_elementalinference._operations.elemental_inference.list_functions
output, http_response = (
capo_elementalinference._operations.elemental_inference.list_functions.list_functions(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_elementalinference.types.list_functions_response.ListFunctionsResponse",
) -> dict[str, Any]:
import capo_elementalinference.types.list_functions_response
return (
capo_elementalinference.types.list_functions_response.redact_sensitive(
output
)
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("ListFunctions", redact_output=_redact_output),
)
input_: capo_elementalinference.types.list_functions_request.ListFunctionsRequest = {}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|