Skip to content

list_microvm_images async

list_microvm_images(
    *,
    config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[String] = None,
    name_filter: Optional[NonBlankString] = None,
) -> ListMicrovmImagesResponse

Lists MicroVM images in the account with optional name filtering. We recommend using pagination to ensure that the operation returns quickly and successfully.

Parameters:

  • max_results (Optional[int], default: None ) –

    The maximum number of results to return in a single call.

  • next_token (Optional[String], default: None ) –

    The pagination token from a previous call. Use this token to retrieve the next page of results.

  • name_filter (Optional[NonBlankString], default: None ) –

    Filters images whose name contains the specified string.

Raises:

Source code in docs_src/capo_lambda_microvms/_services/async_lambda_microvms.py
async def list_microvm_images(
    self,
    *,
    config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional["capo_lambda_microvms.types.string.String"] = None,
    name_filter: Optional[
        "capo_lambda_microvms.types.non_blank_string.NonBlankString"
    ] = None,
) -> "capo_lambda_microvms.types.list_microvm_images_response.ListMicrovmImagesResponse":
    """<p>Lists MicroVM images in the account with optional name filtering. We recommend using pagination to ensure that the operation returns quickly and successfully.</p>

    Args:
        max_results: <p>The maximum number of results to return in a single call.</p>
        next_token: <p>The pagination token from a previous call. Use this token to retrieve the next page of results.</p>
        name_filter: <p>Filters images whose name contains the specified string.</p>

    Raises:
        capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
        capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
        capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
        capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_lambda_microvms.types.list_microvm_images_request.ListMicrovmImagesRequest]",
    ) -> AsyncOperationResponse[
        "capo_lambda_microvms.types.list_microvm_images_response.ListMicrovmImagesResponse"
    ]:
        import capo_lambda_microvms._operations.lambda_microvms.list_microvm_images

        (
            output,
            http_response,
        ) = await capo_lambda_microvms._operations.lambda_microvms.list_microvm_images.async_list_microvm_images(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListMicrovmImages")
    )
    input_: capo_lambda_microvms.types.list_microvm_images_request.ListMicrovmImagesRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if name_filter is not None:
        input_["name_filter"] = name_filter

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output