Retrieves the details of a specific MicroVM, including its state, endpoint, image information, and configuration. The state field is eventually consistent — determine readiness by connecting to the endpoint.
Parameters:
Raises:
Source code in docs_src/capo_lambda_microvms/_services/lambda_microvms.py
| def get_microvm(
self,
microvm_identifier: "capo_lambda_microvms.types.microvm_identifier.MicrovmIdentifier",
*,
config_overrides: Optional[LambdaMicrovmsClientConfig] = None,
) -> "capo_lambda_microvms.types.get_microvm_response.GetMicrovmResponse":
"""<p>Retrieves the details of a specific MicroVM, including its state, endpoint, image information, and configuration. The state field is eventually consistent — determine readiness by connecting to the endpoint.</p>
Args:
microvm_identifier: <p>The ID of the MicroVM to retrieve.</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.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_lambda_microvms.types.get_microvm_request.GetMicrovmRequest]",
) -> OperationResponse[
"capo_lambda_microvms.types.get_microvm_response.GetMicrovmResponse"
]:
import capo_lambda_microvms._operations.lambda_microvms.get_microvm
output, http_response = (
capo_lambda_microvms._operations.lambda_microvms.get_microvm.get_microvm(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetMicrovm")
)
input_: capo_lambda_microvms.types.get_microvm_request.GetMicrovmRequest = {
"microvm_identifier": microvm_identifier
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|