capo-lambda-microvms 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. capo_lambda_microvms/__init__.py +73 -0
  2. capo_lambda_microvms/_async.py +25 -0
  3. capo_lambda_microvms/_auth/_identity.py +16 -0
  4. capo_lambda_microvms/_auth/_providers.py +886 -0
  5. capo_lambda_microvms/_auth/_signers.py +125 -0
  6. capo_lambda_microvms/_auth/_sigv4.py +579 -0
  7. capo_lambda_microvms/_auth/_zapros_handler.py +80 -0
  8. capo_lambda_microvms/_body.py +221 -0
  9. capo_lambda_microvms/_iter.py +113 -0
  10. capo_lambda_microvms/_operations/lambda_microvms/create_microvm_auth_token.py +181 -0
  11. capo_lambda_microvms/_operations/lambda_microvms/create_microvm_image.py +190 -0
  12. capo_lambda_microvms/_operations/lambda_microvms/create_microvm_shell_auth_token.py +181 -0
  13. capo_lambda_microvms/_operations/lambda_microvms/delete_microvm_image.py +170 -0
  14. capo_lambda_microvms/_operations/lambda_microvms/delete_microvm_image_version.py +174 -0
  15. capo_lambda_microvms/_operations/lambda_microvms/get_microvm.py +171 -0
  16. capo_lambda_microvms/_operations/lambda_microvms/get_microvm_image.py +170 -0
  17. capo_lambda_microvms/_operations/lambda_microvms/get_microvm_image_build.py +177 -0
  18. capo_lambda_microvms/_operations/lambda_microvms/get_microvm_image_version.py +179 -0
  19. capo_lambda_microvms/_operations/lambda_microvms/list_managed_microvm_image_versions.py +172 -0
  20. capo_lambda_microvms/_operations/lambda_microvms/list_managed_microvm_images.py +162 -0
  21. capo_lambda_microvms/_operations/lambda_microvms/list_microvm_image_builds.py +196 -0
  22. capo_lambda_microvms/_operations/lambda_microvms/list_microvm_image_versions.py +172 -0
  23. capo_lambda_microvms/_operations/lambda_microvms/list_microvm_images.py +164 -0
  24. capo_lambda_microvms/_operations/lambda_microvms/list_microvms.py +175 -0
  25. capo_lambda_microvms/_operations/lambda_microvms/list_tags.py +182 -0
  26. capo_lambda_microvms/_operations/lambda_microvms/resume_microvm.py +167 -0
  27. capo_lambda_microvms/_operations/lambda_microvms/run_microvm.py +187 -0
  28. capo_lambda_microvms/_operations/lambda_microvms/suspend_microvm.py +167 -0
  29. capo_lambda_microvms/_operations/lambda_microvms/tag_resource.py +164 -0
  30. capo_lambda_microvms/_operations/lambda_microvms/terminate_microvm.py +167 -0
  31. capo_lambda_microvms/_operations/lambda_microvms/untag_resource.py +162 -0
  32. capo_lambda_microvms/_operations/lambda_microvms/update_microvm_image.py +191 -0
  33. capo_lambda_microvms/_operations/lambda_microvms/update_microvm_image_version.py +190 -0
  34. capo_lambda_microvms/_pagination.py +21 -0
  35. capo_lambda_microvms/_protocol/__init__.py +1 -0
  36. capo_lambda_microvms/_protocol/errors.py +93 -0
  37. capo_lambda_microvms/_protocol/eventstream.py +240 -0
  38. capo_lambda_microvms/_protocol/serialize.py +47 -0
  39. capo_lambda_microvms/_protocol/xml.py +33 -0
  40. capo_lambda_microvms/_resources/lambda_microvms/microvm.py +983 -0
  41. capo_lambda_microvms/_resources/lambda_microvms/microvm_image.py +1394 -0
  42. capo_lambda_microvms/_rule_engine/__init__.py +0 -0
  43. capo_lambda_microvms/_rule_engine/_aws_partition.py +160 -0
  44. capo_lambda_microvms/_rule_engine/_endpoint_rule_set.py +135 -0
  45. capo_lambda_microvms/_rule_engine/_endpoint_runtime.py +389 -0
  46. capo_lambda_microvms/_services/_aws_config.py +160 -0
  47. capo_lambda_microvms/_services/_pipeline.py +247 -0
  48. capo_lambda_microvms/_services/async_lambda_microvms.py +1822 -0
  49. capo_lambda_microvms/_services/lambda_microvms.py +1798 -0
  50. capo_lambda_microvms/errors/__init__.py +49 -0
  51. capo_lambda_microvms/errors/_base.py +94 -0
  52. capo_lambda_microvms/errors/access_denied_exception.py +46 -0
  53. capo_lambda_microvms/errors/conflict_exception.py +56 -0
  54. capo_lambda_microvms/errors/insufficient_capacity_exception.py +49 -0
  55. capo_lambda_microvms/errors/internal_server_exception.py +48 -0
  56. capo_lambda_microvms/errors/invalid_parameter_value_exception.py +54 -0
  57. capo_lambda_microvms/errors/resource_conflict_exception.py +52 -0
  58. capo_lambda_microvms/errors/resource_not_found_exception.py +59 -0
  59. capo_lambda_microvms/errors/service_exception.py +50 -0
  60. capo_lambda_microvms/errors/service_quota_exceeded_exception.py +72 -0
  61. capo_lambda_microvms/errors/throttling_exception.py +58 -0
  62. capo_lambda_microvms/errors/too_many_requests_exception.py +52 -0
  63. capo_lambda_microvms/errors/validation_exception.py +44 -0
  64. capo_lambda_microvms/py.typed +0 -0
  65. capo_lambda_microvms/types/_prelude/blob.py +12 -0
  66. capo_lambda_microvms/types/_prelude/timestamp.py +17 -0
  67. capo_lambda_microvms/types/architecture.py +14 -0
  68. capo_lambda_microvms/types/auth_token_key.py +5 -0
  69. capo_lambda_microvms/types/auth_token_value.py +5 -0
  70. capo_lambda_microvms/types/build_state.py +19 -0
  71. capo_lambda_microvms/types/capability.py +15 -0
  72. capo_lambda_microvms/types/capability_list.py +29 -0
  73. capo_lambda_microvms/types/chipset.py +14 -0
  74. capo_lambda_microvms/types/cloud_watch_logging.py +34 -0
  75. capo_lambda_microvms/types/code_artifact.py +32 -0
  76. capo_lambda_microvms/types/cpu_configuration.py +39 -0
  77. capo_lambda_microvms/types/cpu_configuration_list.py +31 -0
  78. capo_lambda_microvms/types/create_microvm_auth_token_request.py +62 -0
  79. capo_lambda_microvms/types/create_microvm_auth_token_response.py +39 -0
  80. capo_lambda_microvms/types/create_microvm_image_request.py +219 -0
  81. capo_lambda_microvms/types/create_microvm_image_response.py +294 -0
  82. capo_lambda_microvms/types/create_microvm_shell_auth_token_request.py +38 -0
  83. capo_lambda_microvms/types/create_microvm_shell_auth_token_response.py +41 -0
  84. capo_lambda_microvms/types/delete_microvm_image_input.py +26 -0
  85. capo_lambda_microvms/types/delete_microvm_image_output.py +49 -0
  86. capo_lambda_microvms/types/delete_microvm_image_version_input.py +29 -0
  87. capo_lambda_microvms/types/delete_microvm_image_version_output.py +65 -0
  88. capo_lambda_microvms/types/environment_variable_key.py +5 -0
  89. capo_lambda_microvms/types/environment_variable_map.py +29 -0
  90. capo_lambda_microvms/types/environment_variable_value.py +5 -0
  91. capo_lambda_microvms/types/get_microvm_image_build_input.py +31 -0
  92. capo_lambda_microvms/types/get_microvm_image_build_output.py +144 -0
  93. capo_lambda_microvms/types/get_microvm_image_input.py +26 -0
  94. capo_lambda_microvms/types/get_microvm_image_output.py +117 -0
  95. capo_lambda_microvms/types/get_microvm_image_version_input.py +29 -0
  96. capo_lambda_microvms/types/get_microvm_image_version_output.py +308 -0
  97. capo_lambda_microvms/types/get_microvm_request.py +26 -0
  98. capo_lambda_microvms/types/get_microvm_response.py +188 -0
  99. capo_lambda_microvms/types/hook_state.py +18 -0
  100. capo_lambda_microvms/types/hooks.py +65 -0
  101. capo_lambda_microvms/types/idle_policy.py +40 -0
  102. capo_lambda_microvms/types/image_name.py +6 -0
  103. capo_lambda_microvms/types/list_managed_microvm_image_versions_input.py +31 -0
  104. capo_lambda_microvms/types/list_managed_microvm_image_versions_output.py +52 -0
  105. capo_lambda_microvms/types/list_managed_microvm_images_input.py +26 -0
  106. capo_lambda_microvms/types/list_managed_microvm_images_output.py +50 -0
  107. capo_lambda_microvms/types/list_microvm_image_builds_input.py +44 -0
  108. capo_lambda_microvms/types/list_microvm_image_builds_output.py +50 -0
  109. capo_lambda_microvms/types/list_microvm_image_versions_input.py +31 -0
  110. capo_lambda_microvms/types/list_microvm_image_versions_output.py +50 -0
  111. capo_lambda_microvms/types/list_microvm_images_request.py +31 -0
  112. capo_lambda_microvms/types/list_microvm_images_response.py +48 -0
  113. capo_lambda_microvms/types/list_microvms_request.py +33 -0
  114. capo_lambda_microvms/types/list_microvms_response.py +46 -0
  115. capo_lambda_microvms/types/list_of_port_specification.py +31 -0
  116. capo_lambda_microvms/types/list_tags_request.py +24 -0
  117. capo_lambda_microvms/types/list_tags_response.py +32 -0
  118. capo_lambda_microvms/types/logging.py +65 -0
  119. capo_lambda_microvms/types/logging_disabled.py +18 -0
  120. capo_lambda_microvms/types/managed_microvm_image_summary.py +66 -0
  121. capo_lambda_microvms/types/managed_microvm_image_summary_list.py +39 -0
  122. capo_lambda_microvms/types/managed_microvm_image_version.py +94 -0
  123. capo_lambda_microvms/types/managed_microvm_image_version_list.py +39 -0
  124. capo_lambda_microvms/types/managed_microvm_image_version_status.py +18 -0
  125. capo_lambda_microvms/types/microvm_hooks.py +108 -0
  126. capo_lambda_microvms/types/microvm_identifier.py +6 -0
  127. capo_lambda_microvms/types/microvm_image_arn.py +6 -0
  128. capo_lambda_microvms/types/microvm_image_build_summaries.py +37 -0
  129. capo_lambda_microvms/types/microvm_image_build_summary.py +125 -0
  130. capo_lambda_microvms/types/microvm_image_hooks.py +66 -0
  131. capo_lambda_microvms/types/microvm_image_identifier.py +6 -0
  132. capo_lambda_microvms/types/microvm_image_state.py +24 -0
  133. capo_lambda_microvms/types/microvm_image_summaries.py +35 -0
  134. capo_lambda_microvms/types/microvm_image_summary.py +90 -0
  135. capo_lambda_microvms/types/microvm_image_version_state.py +22 -0
  136. capo_lambda_microvms/types/microvm_image_version_status.py +17 -0
  137. capo_lambda_microvms/types/microvm_image_version_summary.py +300 -0
  138. capo_lambda_microvms/types/microvm_image_version_summary_list.py +39 -0
  139. capo_lambda_microvms/types/microvm_item.py +82 -0
  140. capo_lambda_microvms/types/microvm_item_list.py +29 -0
  141. capo_lambda_microvms/types/microvm_state.py +22 -0
  142. capo_lambda_microvms/types/network_connector.py +5 -0
  143. capo_lambda_microvms/types/network_connector_list.py +19 -0
  144. capo_lambda_microvms/types/non_blank_string.py +6 -0
  145. capo_lambda_microvms/types/port_number.py +6 -0
  146. capo_lambda_microvms/types/port_range.py +38 -0
  147. capo_lambda_microvms/types/port_specification.py +63 -0
  148. capo_lambda_microvms/types/positive_integer.py +5 -0
  149. capo_lambda_microvms/types/resources.py +26 -0
  150. capo_lambda_microvms/types/resources_list.py +29 -0
  151. capo_lambda_microvms/types/resume_microvm_request.py +26 -0
  152. capo_lambda_microvms/types/resume_microvm_response.py +18 -0
  153. capo_lambda_microvms/types/role_arn.py +6 -0
  154. capo_lambda_microvms/types/run_hook_payload.py +5 -0
  155. capo_lambda_microvms/types/run_microvm_request.py +139 -0
  156. capo_lambda_microvms/types/run_microvm_response.py +188 -0
  157. capo_lambda_microvms/types/snapshot_build.py +35 -0
  158. capo_lambda_microvms/types/string.py +5 -0
  159. capo_lambda_microvms/types/suspend_microvm_request.py +26 -0
  160. capo_lambda_microvms/types/suspend_microvm_response.py +18 -0
  161. capo_lambda_microvms/types/tag_key.py +5 -0
  162. capo_lambda_microvms/types/tag_key_list.py +17 -0
  163. capo_lambda_microvms/types/tag_resource_request.py +38 -0
  164. capo_lambda_microvms/types/tag_value.py +5 -0
  165. capo_lambda_microvms/types/taggable_resource.py +6 -0
  166. capo_lambda_microvms/types/tags.py +29 -0
  167. capo_lambda_microvms/types/terminate_microvm_request.py +26 -0
  168. capo_lambda_microvms/types/terminate_microvm_response.py +18 -0
  169. capo_lambda_microvms/types/token_parts.py +29 -0
  170. capo_lambda_microvms/types/untag_resource_request.py +27 -0
  171. capo_lambda_microvms/types/update_microvm_image_request.py +205 -0
  172. capo_lambda_microvms/types/update_microvm_image_response.py +284 -0
  173. capo_lambda_microvms/types/update_microvm_image_version_request.py +51 -0
  174. capo_lambda_microvms/types/update_microvm_image_version_response.py +312 -0
  175. capo_lambda_microvms/types/version.py +5 -0
  176. capo_lambda_microvms-0.1.0.dist-info/METADATA +103 -0
  177. capo_lambda_microvms-0.1.0.dist-info/RECORD +180 -0
  178. capo_lambda_microvms-0.1.0.dist-info/WHEEL +5 -0
  179. capo_lambda_microvms-0.1.0.dist-info/licenses/LICENSE +21 -0
  180. capo_lambda_microvms-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1394 @@
1
+ from __future__ import annotations
2
+
3
+ import uuid
4
+ from typing import TYPE_CHECKING, Optional
5
+
6
+ import capo_lambda_microvms._auth._signers
7
+ import capo_lambda_microvms._auth._sigv4
8
+ from capo_lambda_microvms._services._pipeline import (
9
+ AsyncOperationRequest,
10
+ AsyncOperationResponse,
11
+ OperationRequest,
12
+ OperationResponse,
13
+ aexecute_pipeline,
14
+ execute_pipeline,
15
+ )
16
+
17
+ if TYPE_CHECKING:
18
+ import capo_lambda_microvms.types.architecture
19
+ import capo_lambda_microvms.types.capability_list
20
+ import capo_lambda_microvms.types.chipset
21
+ import capo_lambda_microvms.types.code_artifact
22
+ import capo_lambda_microvms.types.cpu_configuration_list
23
+ import capo_lambda_microvms.types.delete_microvm_image_input
24
+ import capo_lambda_microvms.types.delete_microvm_image_output
25
+ import capo_lambda_microvms.types.delete_microvm_image_version_input
26
+ import capo_lambda_microvms.types.delete_microvm_image_version_output
27
+ import capo_lambda_microvms.types.environment_variable_map
28
+ import capo_lambda_microvms.types.get_microvm_image_build_input
29
+ import capo_lambda_microvms.types.get_microvm_image_build_output
30
+ import capo_lambda_microvms.types.get_microvm_image_input
31
+ import capo_lambda_microvms.types.get_microvm_image_output
32
+ import capo_lambda_microvms.types.get_microvm_image_version_input
33
+ import capo_lambda_microvms.types.get_microvm_image_version_output
34
+ import capo_lambda_microvms.types.hooks
35
+ import capo_lambda_microvms.types.list_managed_microvm_image_versions_input
36
+ import capo_lambda_microvms.types.list_managed_microvm_image_versions_output
37
+ import capo_lambda_microvms.types.list_microvm_image_builds_input
38
+ import capo_lambda_microvms.types.list_microvm_image_builds_output
39
+ import capo_lambda_microvms.types.list_microvm_image_versions_input
40
+ import capo_lambda_microvms.types.list_microvm_image_versions_output
41
+ import capo_lambda_microvms.types.list_microvm_images_request
42
+ import capo_lambda_microvms.types.list_microvm_images_response
43
+ import capo_lambda_microvms.types.logging
44
+ import capo_lambda_microvms.types.managed_microvm_image_version
45
+ import capo_lambda_microvms.types.microvm_image_build_summary
46
+ import capo_lambda_microvms.types.microvm_image_identifier
47
+ import capo_lambda_microvms.types.microvm_image_summary
48
+ import capo_lambda_microvms.types.microvm_image_version_status
49
+ import capo_lambda_microvms.types.microvm_image_version_summary
50
+ import capo_lambda_microvms.types.network_connector_list
51
+ import capo_lambda_microvms.types.non_blank_string
52
+ import capo_lambda_microvms.types.resources_list
53
+ import capo_lambda_microvms.types.role_arn
54
+ import capo_lambda_microvms.types.string
55
+ import capo_lambda_microvms.types.update_microvm_image_request
56
+ import capo_lambda_microvms.types.update_microvm_image_response
57
+ import capo_lambda_microvms.types.update_microvm_image_version_request
58
+ import capo_lambda_microvms.types.update_microvm_image_version_response
59
+ import capo_lambda_microvms.types.version
60
+ from capo_lambda_microvms._services.async_lambda_microvms import (
61
+ AsyncLambdaMicrovmsClient,
62
+ AsyncLambdaMicrovmsClientConfig,
63
+ )
64
+ from capo_lambda_microvms._services.lambda_microvms import (
65
+ LambdaMicrovmsClient,
66
+ LambdaMicrovmsClientConfig,
67
+ )
68
+
69
+
70
+ class MicrovmImage:
71
+ def __init__(self, service: LambdaMicrovmsClient) -> None:
72
+ self._service = service
73
+
74
+ def read(
75
+ self,
76
+ image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
77
+ *,
78
+ config_overrides: Optional[LambdaMicrovmsClientConfig] = None,
79
+ ) -> "capo_lambda_microvms.types.get_microvm_image_output.GetMicrovmImageOutput":
80
+ """<p>Retrieves the details of a MicroVM image, including its state, versions, and configuration.</p>
81
+
82
+ Args:
83
+ image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image to retrieve.</p>
84
+
85
+ Raises:
86
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
87
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
88
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
89
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
90
+ capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
91
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
92
+ """
93
+
94
+ def _handler(
95
+ req: "OperationRequest[capo_lambda_microvms.types.get_microvm_image_input.GetMicrovmImageInput]",
96
+ ) -> OperationResponse[
97
+ "capo_lambda_microvms.types.get_microvm_image_output.GetMicrovmImageOutput"
98
+ ]:
99
+ import capo_lambda_microvms._operations.lambda_microvms.get_microvm_image
100
+
101
+ output, http_response = (
102
+ capo_lambda_microvms._operations.lambda_microvms.get_microvm_image.get_microvm_image(
103
+ req.options, req.input
104
+ )
105
+ )
106
+ return OperationResponse(output=output, response=http_response)
107
+
108
+ interceptors_, options_ = self._service.operation_options(config_overrides)
109
+ input_: capo_lambda_microvms.types.get_microvm_image_input.GetMicrovmImageInput = {
110
+ "image_identifier": image_identifier
111
+ }
112
+
113
+ response = execute_pipeline(
114
+ OperationRequest(input=input_, options=options_),
115
+ handler=_handler,
116
+ interceptors=list(interceptors_),
117
+ )
118
+ response.response.close()
119
+ return response.output
120
+
121
+ def delete(
122
+ self,
123
+ image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
124
+ *,
125
+ config_overrides: Optional[LambdaMicrovmsClientConfig] = None,
126
+ ) -> "capo_lambda_microvms.types.delete_microvm_image_output.DeleteMicrovmImageOutput":
127
+ """<p>Deletes a MicroVM image. This operation is idempotent; deleting an image that has already been deleted succeeds without error.</p>
128
+
129
+ Args:
130
+ image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image to delete.</p>
131
+
132
+ Raises:
133
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
134
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
135
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
136
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
137
+ capo_lambda_microvms.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the resource.</p>
138
+ capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
139
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
140
+ """
141
+
142
+ def _handler(
143
+ req: "OperationRequest[capo_lambda_microvms.types.delete_microvm_image_input.DeleteMicrovmImageInput]",
144
+ ) -> OperationResponse[
145
+ "capo_lambda_microvms.types.delete_microvm_image_output.DeleteMicrovmImageOutput"
146
+ ]:
147
+ import capo_lambda_microvms._operations.lambda_microvms.delete_microvm_image
148
+
149
+ output, http_response = (
150
+ capo_lambda_microvms._operations.lambda_microvms.delete_microvm_image.delete_microvm_image(
151
+ req.options, req.input
152
+ )
153
+ )
154
+ return OperationResponse(output=output, response=http_response)
155
+
156
+ interceptors_, options_ = self._service.operation_options(config_overrides)
157
+ input_: capo_lambda_microvms.types.delete_microvm_image_input.DeleteMicrovmImageInput = {
158
+ "image_identifier": image_identifier
159
+ }
160
+
161
+ response = execute_pipeline(
162
+ OperationRequest(input=input_, options=options_),
163
+ handler=_handler,
164
+ interceptors=list(interceptors_),
165
+ )
166
+ response.response.close()
167
+ return response.output
168
+
169
+ def list(
170
+ self,
171
+ *,
172
+ config_overrides: Optional[LambdaMicrovmsClientConfig] = None,
173
+ max_results: Optional[int] = None,
174
+ next_token: Optional["capo_lambda_microvms.types.string.String"] = None,
175
+ name_filter: Optional[
176
+ "capo_lambda_microvms.types.non_blank_string.NonBlankString"
177
+ ] = None,
178
+ ) -> "capo_lambda_microvms.types.list_microvm_images_response.ListMicrovmImagesResponse":
179
+ """<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>
180
+
181
+ Args:
182
+ max_results: <p>The maximum number of results to return in a single call.</p>
183
+ next_token: <p>The pagination token from a previous call. Use this token to retrieve the next page of results.</p>
184
+ name_filter: <p>Filters images whose name contains the specified string.</p>
185
+
186
+ Raises:
187
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
188
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
189
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
190
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
191
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
192
+ """
193
+
194
+ def _handler(
195
+ req: "OperationRequest[capo_lambda_microvms.types.list_microvm_images_request.ListMicrovmImagesRequest]",
196
+ ) -> OperationResponse[
197
+ "capo_lambda_microvms.types.list_microvm_images_response.ListMicrovmImagesResponse"
198
+ ]:
199
+ import capo_lambda_microvms._operations.lambda_microvms.list_microvm_images
200
+
201
+ output, http_response = (
202
+ capo_lambda_microvms._operations.lambda_microvms.list_microvm_images.list_microvm_images(
203
+ req.options, req.input
204
+ )
205
+ )
206
+ return OperationResponse(output=output, response=http_response)
207
+
208
+ interceptors_, options_ = self._service.operation_options(config_overrides)
209
+ input_: capo_lambda_microvms.types.list_microvm_images_request.ListMicrovmImagesRequest = {}
210
+ if max_results is not None:
211
+ input_["max_results"] = max_results
212
+ if next_token is not None:
213
+ input_["next_token"] = next_token
214
+ if name_filter is not None:
215
+ input_["name_filter"] = name_filter
216
+
217
+ response = execute_pipeline(
218
+ OperationRequest(input=input_, options=options_),
219
+ handler=_handler,
220
+ interceptors=list(interceptors_),
221
+ )
222
+ response.response.close()
223
+ return response.output
224
+
225
+ def delete_microvm_image_version(
226
+ self,
227
+ image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
228
+ image_version: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
229
+ *,
230
+ config_overrides: Optional[LambdaMicrovmsClientConfig] = None,
231
+ ) -> "capo_lambda_microvms.types.delete_microvm_image_version_output.DeleteMicrovmImageVersionOutput":
232
+ """<p>Deletes a specific version of a MicroVM image. This operation is idempotent; deleting a version that has already been deleted succeeds without error.</p>
233
+
234
+ Args:
235
+ image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image.</p>
236
+ image_version: <p>The version of the MicroVM image to delete.</p>
237
+
238
+ Raises:
239
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
240
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
241
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
242
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
243
+ capo_lambda_microvms.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the resource.</p>
244
+ capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
245
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
246
+ """
247
+
248
+ def _handler(
249
+ req: "OperationRequest[capo_lambda_microvms.types.delete_microvm_image_version_input.DeleteMicrovmImageVersionInput]",
250
+ ) -> OperationResponse[
251
+ "capo_lambda_microvms.types.delete_microvm_image_version_output.DeleteMicrovmImageVersionOutput"
252
+ ]:
253
+ import capo_lambda_microvms._operations.lambda_microvms.delete_microvm_image_version
254
+
255
+ output, http_response = (
256
+ capo_lambda_microvms._operations.lambda_microvms.delete_microvm_image_version.delete_microvm_image_version(
257
+ req.options, req.input
258
+ )
259
+ )
260
+ return OperationResponse(output=output, response=http_response)
261
+
262
+ interceptors_, options_ = self._service.operation_options(config_overrides)
263
+ input_: capo_lambda_microvms.types.delete_microvm_image_version_input.DeleteMicrovmImageVersionInput = {
264
+ "image_identifier": image_identifier,
265
+ "image_version": image_version,
266
+ }
267
+
268
+ response = execute_pipeline(
269
+ OperationRequest(input=input_, options=options_),
270
+ handler=_handler,
271
+ interceptors=list(interceptors_),
272
+ )
273
+ response.response.close()
274
+ return response.output
275
+
276
+ def get_microvm_image_build(
277
+ self,
278
+ image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
279
+ image_version: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
280
+ build_id: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
281
+ *,
282
+ config_overrides: Optional[LambdaMicrovmsClientConfig] = None,
283
+ ) -> "capo_lambda_microvms.types.get_microvm_image_build_output.GetMicrovmImageBuildOutput":
284
+ """<p>Retrieves the details of a specific MicroVM image build, including its state, target architecture, and snapshot information.</p>
285
+
286
+ Args:
287
+ image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image.</p>
288
+ image_version: <p>The version of the MicroVM image.</p>
289
+ build_id: <p>The unique identifier of the build to retrieve.</p>
290
+
291
+ Raises:
292
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
293
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
294
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
295
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
296
+ capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
297
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
298
+ """
299
+
300
+ def _handler(
301
+ req: "OperationRequest[capo_lambda_microvms.types.get_microvm_image_build_input.GetMicrovmImageBuildInput]",
302
+ ) -> OperationResponse[
303
+ "capo_lambda_microvms.types.get_microvm_image_build_output.GetMicrovmImageBuildOutput"
304
+ ]:
305
+ import capo_lambda_microvms._operations.lambda_microvms.get_microvm_image_build
306
+
307
+ output, http_response = (
308
+ capo_lambda_microvms._operations.lambda_microvms.get_microvm_image_build.get_microvm_image_build(
309
+ req.options, req.input
310
+ )
311
+ )
312
+ return OperationResponse(output=output, response=http_response)
313
+
314
+ interceptors_, options_ = self._service.operation_options(config_overrides)
315
+ input_: capo_lambda_microvms.types.get_microvm_image_build_input.GetMicrovmImageBuildInput = {
316
+ "image_identifier": image_identifier,
317
+ "image_version": image_version,
318
+ "build_id": build_id,
319
+ }
320
+
321
+ response = execute_pipeline(
322
+ OperationRequest(input=input_, options=options_),
323
+ handler=_handler,
324
+ interceptors=list(interceptors_),
325
+ )
326
+ response.response.close()
327
+ return response.output
328
+
329
+ def get_microvm_image_version(
330
+ self,
331
+ image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
332
+ image_version: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
333
+ *,
334
+ config_overrides: Optional[LambdaMicrovmsClientConfig] = None,
335
+ ) -> "capo_lambda_microvms.types.get_microvm_image_version_output.GetMicrovmImageVersionOutput":
336
+ """<p>Retrieves the details of a specific version of a MicroVM image, including its configuration, state, and build information.</p>
337
+
338
+ Args:
339
+ image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image.</p>
340
+ image_version: <p>The version of the MicroVM image to retrieve.</p>
341
+
342
+ Raises:
343
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
344
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
345
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
346
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
347
+ capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
348
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
349
+ """
350
+
351
+ def _handler(
352
+ req: "OperationRequest[capo_lambda_microvms.types.get_microvm_image_version_input.GetMicrovmImageVersionInput]",
353
+ ) -> OperationResponse[
354
+ "capo_lambda_microvms.types.get_microvm_image_version_output.GetMicrovmImageVersionOutput"
355
+ ]:
356
+ import capo_lambda_microvms._operations.lambda_microvms.get_microvm_image_version
357
+
358
+ output, http_response = (
359
+ capo_lambda_microvms._operations.lambda_microvms.get_microvm_image_version.get_microvm_image_version(
360
+ req.options, req.input
361
+ )
362
+ )
363
+ return OperationResponse(output=output, response=http_response)
364
+
365
+ interceptors_, options_ = self._service.operation_options(config_overrides)
366
+ input_: capo_lambda_microvms.types.get_microvm_image_version_input.GetMicrovmImageVersionInput = {
367
+ "image_identifier": image_identifier,
368
+ "image_version": image_version,
369
+ }
370
+
371
+ response = execute_pipeline(
372
+ OperationRequest(input=input_, options=options_),
373
+ handler=_handler,
374
+ interceptors=list(interceptors_),
375
+ )
376
+ response.response.close()
377
+ return response.output
378
+
379
+ def list_managed_microvm_image_versions(
380
+ self,
381
+ image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
382
+ *,
383
+ config_overrides: Optional[LambdaMicrovmsClientConfig] = None,
384
+ max_results: Optional[int] = None,
385
+ next_token: Optional["capo_lambda_microvms.types.string.String"] = None,
386
+ ) -> "capo_lambda_microvms.types.list_managed_microvm_image_versions_output.ListManagedMicrovmImageVersionsOutput":
387
+ """<p>Lists versions of a managed MicroVM image. We recommend using pagination to ensure that the operation returns quickly and successfully.</p>
388
+
389
+ Args:
390
+ max_results: <p>The maximum number of results to return in a single call.</p>
391
+ next_token: <p>The pagination token from a previous call. Use this token to retrieve the next page of results.</p>
392
+ image_identifier: <p>The unique identifier (ARN or ID) of the managed MicroVM image to list versions for.</p>
393
+
394
+ Raises:
395
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
396
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
397
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
398
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
399
+ capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
400
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
401
+ """
402
+
403
+ def _handler(
404
+ req: "OperationRequest[capo_lambda_microvms.types.list_managed_microvm_image_versions_input.ListManagedMicrovmImageVersionsInput]",
405
+ ) -> OperationResponse[
406
+ "capo_lambda_microvms.types.list_managed_microvm_image_versions_output.ListManagedMicrovmImageVersionsOutput"
407
+ ]:
408
+ import capo_lambda_microvms._operations.lambda_microvms.list_managed_microvm_image_versions
409
+
410
+ output, http_response = (
411
+ capo_lambda_microvms._operations.lambda_microvms.list_managed_microvm_image_versions.list_managed_microvm_image_versions(
412
+ req.options, req.input
413
+ )
414
+ )
415
+ return OperationResponse(output=output, response=http_response)
416
+
417
+ interceptors_, options_ = self._service.operation_options(config_overrides)
418
+ input_: capo_lambda_microvms.types.list_managed_microvm_image_versions_input.ListManagedMicrovmImageVersionsInput = {
419
+ "image_identifier": image_identifier
420
+ }
421
+ if max_results is not None:
422
+ input_["max_results"] = max_results
423
+ if next_token is not None:
424
+ input_["next_token"] = next_token
425
+
426
+ response = execute_pipeline(
427
+ OperationRequest(input=input_, options=options_),
428
+ handler=_handler,
429
+ interceptors=list(interceptors_),
430
+ )
431
+ response.response.close()
432
+ return response.output
433
+
434
+ def list_microvm_image_builds(
435
+ self,
436
+ image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
437
+ image_version: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
438
+ *,
439
+ config_overrides: Optional[LambdaMicrovmsClientConfig] = None,
440
+ max_results: Optional[int] = None,
441
+ next_token: Optional["capo_lambda_microvms.types.string.String"] = None,
442
+ architecture: Optional[
443
+ "capo_lambda_microvms.types.architecture.Architecture"
444
+ ] = None,
445
+ chipset: Optional["capo_lambda_microvms.types.chipset.Chipset"] = None,
446
+ chipset_generation: Optional[
447
+ "capo_lambda_microvms.types.non_blank_string.NonBlankString"
448
+ ] = None,
449
+ ) -> "capo_lambda_microvms.types.list_microvm_image_builds_output.ListMicrovmImageBuildsOutput":
450
+ """<p>Lists builds for a MicroVM image version with optional filtering by architecture and chipset. We recommend using pagination to ensure that the operation returns quickly and successfully.</p>
451
+
452
+ Args:
453
+ max_results: <p>The maximum number of results to return in a single call.</p>
454
+ next_token: <p>The pagination token from a previous call. Use this token to retrieve the next page of results.</p>
455
+ image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image.</p>
456
+ image_version: <p>The version of the MicroVM image to list builds for.</p>
457
+ architecture: <p>Filters builds by target CPU architecture.</p>
458
+ chipset: <p>Filters builds by target chipset.</p>
459
+ chipset_generation: <p>Filters builds by target chipset generation.</p>
460
+
461
+ Raises:
462
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
463
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
464
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
465
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
466
+ capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
467
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
468
+ """
469
+
470
+ def _handler(
471
+ req: "OperationRequest[capo_lambda_microvms.types.list_microvm_image_builds_input.ListMicrovmImageBuildsInput]",
472
+ ) -> OperationResponse[
473
+ "capo_lambda_microvms.types.list_microvm_image_builds_output.ListMicrovmImageBuildsOutput"
474
+ ]:
475
+ import capo_lambda_microvms._operations.lambda_microvms.list_microvm_image_builds
476
+
477
+ output, http_response = (
478
+ capo_lambda_microvms._operations.lambda_microvms.list_microvm_image_builds.list_microvm_image_builds(
479
+ req.options, req.input
480
+ )
481
+ )
482
+ return OperationResponse(output=output, response=http_response)
483
+
484
+ interceptors_, options_ = self._service.operation_options(config_overrides)
485
+ input_: capo_lambda_microvms.types.list_microvm_image_builds_input.ListMicrovmImageBuildsInput = {
486
+ "image_identifier": image_identifier,
487
+ "image_version": image_version,
488
+ }
489
+ if max_results is not None:
490
+ input_["max_results"] = max_results
491
+ if next_token is not None:
492
+ input_["next_token"] = next_token
493
+ if architecture is not None:
494
+ input_["architecture"] = architecture
495
+ if chipset is not None:
496
+ input_["chipset"] = chipset
497
+ if chipset_generation is not None:
498
+ input_["chipset_generation"] = chipset_generation
499
+
500
+ response = execute_pipeline(
501
+ OperationRequest(input=input_, options=options_),
502
+ handler=_handler,
503
+ interceptors=list(interceptors_),
504
+ )
505
+ response.response.close()
506
+ return response.output
507
+
508
+ def list_microvm_image_versions(
509
+ self,
510
+ image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
511
+ *,
512
+ config_overrides: Optional[LambdaMicrovmsClientConfig] = None,
513
+ max_results: Optional[int] = None,
514
+ next_token: Optional["capo_lambda_microvms.types.string.String"] = None,
515
+ ) -> "capo_lambda_microvms.types.list_microvm_image_versions_output.ListMicrovmImageVersionsOutput":
516
+ """<p>Lists versions of a MicroVM image. We recommend using pagination to ensure that the operation returns quickly and successfully.</p>
517
+
518
+ Args:
519
+ max_results: <p>The maximum number of results to return in a single call.</p>
520
+ next_token: <p>The pagination token from a previous call. Use this token to retrieve the next page of results.</p>
521
+ image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image to list versions for.</p>
522
+
523
+ Raises:
524
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
525
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
526
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
527
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
528
+ capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
529
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
530
+ """
531
+
532
+ def _handler(
533
+ req: "OperationRequest[capo_lambda_microvms.types.list_microvm_image_versions_input.ListMicrovmImageVersionsInput]",
534
+ ) -> OperationResponse[
535
+ "capo_lambda_microvms.types.list_microvm_image_versions_output.ListMicrovmImageVersionsOutput"
536
+ ]:
537
+ import capo_lambda_microvms._operations.lambda_microvms.list_microvm_image_versions
538
+
539
+ output, http_response = (
540
+ capo_lambda_microvms._operations.lambda_microvms.list_microvm_image_versions.list_microvm_image_versions(
541
+ req.options, req.input
542
+ )
543
+ )
544
+ return OperationResponse(output=output, response=http_response)
545
+
546
+ interceptors_, options_ = self._service.operation_options(config_overrides)
547
+ input_: capo_lambda_microvms.types.list_microvm_image_versions_input.ListMicrovmImageVersionsInput = {
548
+ "image_identifier": image_identifier
549
+ }
550
+ if max_results is not None:
551
+ input_["max_results"] = max_results
552
+ if next_token is not None:
553
+ input_["next_token"] = next_token
554
+
555
+ response = execute_pipeline(
556
+ OperationRequest(input=input_, options=options_),
557
+ handler=_handler,
558
+ interceptors=list(interceptors_),
559
+ )
560
+ response.response.close()
561
+ return response.output
562
+
563
+ def update_microvm_image(
564
+ self,
565
+ base_image_arn: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
566
+ build_role_arn: "capo_lambda_microvms.types.role_arn.RoleArn",
567
+ code_artifact: "capo_lambda_microvms.types.code_artifact.CodeArtifact",
568
+ image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
569
+ *,
570
+ config_overrides: Optional[LambdaMicrovmsClientConfig] = None,
571
+ base_image_version: Optional[
572
+ "capo_lambda_microvms.types.version.Version"
573
+ ] = None,
574
+ description: Optional[str] = None,
575
+ logging: Optional["capo_lambda_microvms.types.logging.Logging"] = None,
576
+ egress_network_connectors: Optional[
577
+ "capo_lambda_microvms.types.network_connector_list.NetworkConnectorList"
578
+ ] = None,
579
+ cpu_configurations: Optional[
580
+ "capo_lambda_microvms.types.cpu_configuration_list.CpuConfigurationList"
581
+ ] = None,
582
+ resources: Optional[
583
+ "capo_lambda_microvms.types.resources_list.ResourcesList"
584
+ ] = None,
585
+ additional_os_capabilities: Optional[
586
+ "capo_lambda_microvms.types.capability_list.CapabilityList"
587
+ ] = None,
588
+ hooks: Optional["capo_lambda_microvms.types.hooks.Hooks"] = None,
589
+ environment_variables: Optional[
590
+ "capo_lambda_microvms.types.environment_variable_map.EnvironmentVariableMap"
591
+ ] = None,
592
+ client_token: Optional[str] = None,
593
+ ) -> "capo_lambda_microvms.types.update_microvm_image_response.UpdateMicrovmImageResponse":
594
+ r"""<p>Updates the configuration of a MicroVM image and triggers a new version build. This operation uses PUT semantics — all required fields (codeArtifact, baseImageArn, buildRoleArn) must be provided with every request.</p>
595
+
596
+ Args:
597
+ base_image_arn: <p>The ARN of the base MicroVM image.</p>
598
+ base_image_version: <p>The specific version of the base MicroVM image to use.</p>
599
+ build_role_arn: <p>The ARN of the IAM build role.</p>
600
+ description: <p>The description of the MicroVM image.</p>
601
+ code_artifact: <p>The code artifact containing the application code and metadata for the MicroVM image.</p>
602
+ logging: <p>The logging configuration for build-time and runtime logs. Specify {\"cloudWatch\": {\"logGroup\": \"...\"}} to stream logs to a custom CloudWatch log group, or {\"disabled\": {}} to turn off logging.</p>
603
+ egress_network_connectors: <p>The list of egress network connectors available to the MicroVM at runtime.</p>
604
+ cpu_configurations: <p>The list of supported CPU configurations for the MicroVM.</p>
605
+ resources: <p>The resource requirements for the MicroVM.</p>
606
+ additional_os_capabilities: <p>Additional OS capabilities granted to the MicroVM runtime environment.</p>
607
+ environment_variables: <p>Environment variables set in the MicroVM runtime environment.</p>
608
+ image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image to update.</p>
609
+ client_token: <p>A unique, case-sensitive identifier you provide to ensure the idempotency of the request.</p>
610
+
611
+ Raises:
612
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
613
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
614
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
615
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
616
+ capo_lambda_microvms.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the resource.</p>
617
+ capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
618
+ capo_lambda_microvms.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>You have exceeded a service quota for Lambda MicroVMs.</p>
619
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
620
+ """
621
+
622
+ def _handler(
623
+ req: "OperationRequest[capo_lambda_microvms.types.update_microvm_image_request.UpdateMicrovmImageRequest]",
624
+ ) -> OperationResponse[
625
+ "capo_lambda_microvms.types.update_microvm_image_response.UpdateMicrovmImageResponse"
626
+ ]:
627
+ import capo_lambda_microvms._operations.lambda_microvms.update_microvm_image
628
+
629
+ output, http_response = (
630
+ capo_lambda_microvms._operations.lambda_microvms.update_microvm_image.update_microvm_image(
631
+ req.options, req.input
632
+ )
633
+ )
634
+ return OperationResponse(output=output, response=http_response)
635
+
636
+ interceptors_, options_ = self._service.operation_options(config_overrides)
637
+ input_: capo_lambda_microvms.types.update_microvm_image_request.UpdateMicrovmImageRequest = {
638
+ "base_image_arn": base_image_arn,
639
+ "build_role_arn": build_role_arn,
640
+ "code_artifact": code_artifact,
641
+ "image_identifier": image_identifier,
642
+ }
643
+ if base_image_version is not None:
644
+ input_["base_image_version"] = base_image_version
645
+ if description is not None:
646
+ input_["description"] = description
647
+ if logging is not None:
648
+ input_["logging"] = logging
649
+ if egress_network_connectors is not None:
650
+ input_["egress_network_connectors"] = egress_network_connectors
651
+ if cpu_configurations is not None:
652
+ input_["cpu_configurations"] = cpu_configurations
653
+ if resources is not None:
654
+ input_["resources"] = resources
655
+ if additional_os_capabilities is not None:
656
+ input_["additional_os_capabilities"] = additional_os_capabilities
657
+ if hooks is not None:
658
+ input_["hooks"] = hooks
659
+ if environment_variables is not None:
660
+ input_["environment_variables"] = environment_variables
661
+ if client_token is None:
662
+ client_token = str(uuid.uuid4())
663
+ input_["client_token"] = client_token
664
+
665
+ response = execute_pipeline(
666
+ OperationRequest(input=input_, options=options_),
667
+ handler=_handler,
668
+ interceptors=list(interceptors_),
669
+ )
670
+ response.response.close()
671
+ return response.output
672
+
673
+ def update_microvm_image_version(
674
+ self,
675
+ image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
676
+ image_version: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
677
+ status: "capo_lambda_microvms.types.microvm_image_version_status.MicrovmImageVersionStatus",
678
+ *,
679
+ config_overrides: Optional[LambdaMicrovmsClientConfig] = None,
680
+ ) -> "capo_lambda_microvms.types.update_microvm_image_version_response.UpdateMicrovmImageVersionResponse":
681
+ """<p>Updates the status of a specific MicroVM image version.</p>
682
+
683
+ Args:
684
+ image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image.</p>
685
+ image_version: <p>The version of the MicroVM image to update.</p>
686
+ status: <p>The new status to set for the MicroVM image version.</p>
687
+
688
+ Raises:
689
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
690
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
691
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
692
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
693
+ capo_lambda_microvms.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the resource.</p>
694
+ capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
695
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
696
+ """
697
+
698
+ def _handler(
699
+ req: "OperationRequest[capo_lambda_microvms.types.update_microvm_image_version_request.UpdateMicrovmImageVersionRequest]",
700
+ ) -> OperationResponse[
701
+ "capo_lambda_microvms.types.update_microvm_image_version_response.UpdateMicrovmImageVersionResponse"
702
+ ]:
703
+ import capo_lambda_microvms._operations.lambda_microvms.update_microvm_image_version
704
+
705
+ output, http_response = (
706
+ capo_lambda_microvms._operations.lambda_microvms.update_microvm_image_version.update_microvm_image_version(
707
+ req.options, req.input
708
+ )
709
+ )
710
+ return OperationResponse(output=output, response=http_response)
711
+
712
+ interceptors_, options_ = self._service.operation_options(config_overrides)
713
+ input_: capo_lambda_microvms.types.update_microvm_image_version_request.UpdateMicrovmImageVersionRequest = {
714
+ "image_identifier": image_identifier,
715
+ "image_version": image_version,
716
+ "status": status,
717
+ }
718
+
719
+ response = execute_pipeline(
720
+ OperationRequest(input=input_, options=options_),
721
+ handler=_handler,
722
+ interceptors=list(interceptors_),
723
+ )
724
+ response.response.close()
725
+ return response.output
726
+
727
+
728
+ class AsyncMicrovmImage:
729
+ def __init__(self, service: AsyncLambdaMicrovmsClient) -> None:
730
+ self._service = service
731
+
732
+ async def read(
733
+ self,
734
+ image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
735
+ *,
736
+ config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
737
+ ) -> "capo_lambda_microvms.types.get_microvm_image_output.GetMicrovmImageOutput":
738
+ """<p>Retrieves the details of a MicroVM image, including its state, versions, and configuration.</p>
739
+
740
+ Args:
741
+ image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image to retrieve.</p>
742
+
743
+ Raises:
744
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
745
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
746
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
747
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
748
+ capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
749
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
750
+ """
751
+
752
+ async def _handler(
753
+ req: "AsyncOperationRequest[capo_lambda_microvms.types.get_microvm_image_input.GetMicrovmImageInput]",
754
+ ) -> AsyncOperationResponse[
755
+ "capo_lambda_microvms.types.get_microvm_image_output.GetMicrovmImageOutput"
756
+ ]:
757
+ import capo_lambda_microvms._operations.lambda_microvms.get_microvm_image
758
+
759
+ (
760
+ output,
761
+ http_response,
762
+ ) = await capo_lambda_microvms._operations.lambda_microvms.get_microvm_image.async_get_microvm_image(
763
+ req.options, req.input
764
+ )
765
+ return AsyncOperationResponse(output=output, response=http_response)
766
+
767
+ interceptors_, options_ = self._service.operation_options(config_overrides)
768
+ input_: capo_lambda_microvms.types.get_microvm_image_input.GetMicrovmImageInput = {
769
+ "image_identifier": image_identifier
770
+ }
771
+
772
+ response = await aexecute_pipeline(
773
+ AsyncOperationRequest(input=input_, options=options_),
774
+ handler=_handler,
775
+ interceptors=list(interceptors_),
776
+ )
777
+ await response.response.aclose()
778
+ return response.output
779
+
780
+ async def delete(
781
+ self,
782
+ image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
783
+ *,
784
+ config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
785
+ ) -> "capo_lambda_microvms.types.delete_microvm_image_output.DeleteMicrovmImageOutput":
786
+ """<p>Deletes a MicroVM image. This operation is idempotent; deleting an image that has already been deleted succeeds without error.</p>
787
+
788
+ Args:
789
+ image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image to delete.</p>
790
+
791
+ Raises:
792
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
793
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
794
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
795
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
796
+ capo_lambda_microvms.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the resource.</p>
797
+ capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
798
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
799
+ """
800
+
801
+ async def _handler(
802
+ req: "AsyncOperationRequest[capo_lambda_microvms.types.delete_microvm_image_input.DeleteMicrovmImageInput]",
803
+ ) -> AsyncOperationResponse[
804
+ "capo_lambda_microvms.types.delete_microvm_image_output.DeleteMicrovmImageOutput"
805
+ ]:
806
+ import capo_lambda_microvms._operations.lambda_microvms.delete_microvm_image
807
+
808
+ (
809
+ output,
810
+ http_response,
811
+ ) = await capo_lambda_microvms._operations.lambda_microvms.delete_microvm_image.async_delete_microvm_image(
812
+ req.options, req.input
813
+ )
814
+ return AsyncOperationResponse(output=output, response=http_response)
815
+
816
+ interceptors_, options_ = self._service.operation_options(config_overrides)
817
+ input_: capo_lambda_microvms.types.delete_microvm_image_input.DeleteMicrovmImageInput = {
818
+ "image_identifier": image_identifier
819
+ }
820
+
821
+ response = await aexecute_pipeline(
822
+ AsyncOperationRequest(input=input_, options=options_),
823
+ handler=_handler,
824
+ interceptors=list(interceptors_),
825
+ )
826
+ await response.response.aclose()
827
+ return response.output
828
+
829
+ async def list(
830
+ self,
831
+ *,
832
+ config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
833
+ max_results: Optional[int] = None,
834
+ next_token: Optional["capo_lambda_microvms.types.string.String"] = None,
835
+ name_filter: Optional[
836
+ "capo_lambda_microvms.types.non_blank_string.NonBlankString"
837
+ ] = None,
838
+ ) -> "capo_lambda_microvms.types.list_microvm_images_response.ListMicrovmImagesResponse":
839
+ """<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>
840
+
841
+ Args:
842
+ max_results: <p>The maximum number of results to return in a single call.</p>
843
+ next_token: <p>The pagination token from a previous call. Use this token to retrieve the next page of results.</p>
844
+ name_filter: <p>Filters images whose name contains the specified string.</p>
845
+
846
+ Raises:
847
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
848
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
849
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
850
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
851
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
852
+ """
853
+
854
+ async def _handler(
855
+ req: "AsyncOperationRequest[capo_lambda_microvms.types.list_microvm_images_request.ListMicrovmImagesRequest]",
856
+ ) -> AsyncOperationResponse[
857
+ "capo_lambda_microvms.types.list_microvm_images_response.ListMicrovmImagesResponse"
858
+ ]:
859
+ import capo_lambda_microvms._operations.lambda_microvms.list_microvm_images
860
+
861
+ (
862
+ output,
863
+ http_response,
864
+ ) = await capo_lambda_microvms._operations.lambda_microvms.list_microvm_images.async_list_microvm_images(
865
+ req.options, req.input
866
+ )
867
+ return AsyncOperationResponse(output=output, response=http_response)
868
+
869
+ interceptors_, options_ = self._service.operation_options(config_overrides)
870
+ input_: capo_lambda_microvms.types.list_microvm_images_request.ListMicrovmImagesRequest = {}
871
+ if max_results is not None:
872
+ input_["max_results"] = max_results
873
+ if next_token is not None:
874
+ input_["next_token"] = next_token
875
+ if name_filter is not None:
876
+ input_["name_filter"] = name_filter
877
+
878
+ response = await aexecute_pipeline(
879
+ AsyncOperationRequest(input=input_, options=options_),
880
+ handler=_handler,
881
+ interceptors=list(interceptors_),
882
+ )
883
+ await response.response.aclose()
884
+ return response.output
885
+
886
+ async def delete_microvm_image_version(
887
+ self,
888
+ image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
889
+ image_version: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
890
+ *,
891
+ config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
892
+ ) -> "capo_lambda_microvms.types.delete_microvm_image_version_output.DeleteMicrovmImageVersionOutput":
893
+ """<p>Deletes a specific version of a MicroVM image. This operation is idempotent; deleting a version that has already been deleted succeeds without error.</p>
894
+
895
+ Args:
896
+ image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image.</p>
897
+ image_version: <p>The version of the MicroVM image to delete.</p>
898
+
899
+ Raises:
900
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
901
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
902
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
903
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
904
+ capo_lambda_microvms.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the resource.</p>
905
+ capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
906
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
907
+ """
908
+
909
+ async def _handler(
910
+ req: "AsyncOperationRequest[capo_lambda_microvms.types.delete_microvm_image_version_input.DeleteMicrovmImageVersionInput]",
911
+ ) -> AsyncOperationResponse[
912
+ "capo_lambda_microvms.types.delete_microvm_image_version_output.DeleteMicrovmImageVersionOutput"
913
+ ]:
914
+ import capo_lambda_microvms._operations.lambda_microvms.delete_microvm_image_version
915
+
916
+ (
917
+ output,
918
+ http_response,
919
+ ) = await capo_lambda_microvms._operations.lambda_microvms.delete_microvm_image_version.async_delete_microvm_image_version(
920
+ req.options, req.input
921
+ )
922
+ return AsyncOperationResponse(output=output, response=http_response)
923
+
924
+ interceptors_, options_ = self._service.operation_options(config_overrides)
925
+ input_: capo_lambda_microvms.types.delete_microvm_image_version_input.DeleteMicrovmImageVersionInput = {
926
+ "image_identifier": image_identifier,
927
+ "image_version": image_version,
928
+ }
929
+
930
+ response = await aexecute_pipeline(
931
+ AsyncOperationRequest(input=input_, options=options_),
932
+ handler=_handler,
933
+ interceptors=list(interceptors_),
934
+ )
935
+ await response.response.aclose()
936
+ return response.output
937
+
938
+ async def get_microvm_image_build(
939
+ self,
940
+ image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
941
+ image_version: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
942
+ build_id: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
943
+ *,
944
+ config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
945
+ ) -> "capo_lambda_microvms.types.get_microvm_image_build_output.GetMicrovmImageBuildOutput":
946
+ """<p>Retrieves the details of a specific MicroVM image build, including its state, target architecture, and snapshot information.</p>
947
+
948
+ Args:
949
+ image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image.</p>
950
+ image_version: <p>The version of the MicroVM image.</p>
951
+ build_id: <p>The unique identifier of the build to retrieve.</p>
952
+
953
+ Raises:
954
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
955
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
956
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
957
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
958
+ capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
959
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
960
+ """
961
+
962
+ async def _handler(
963
+ req: "AsyncOperationRequest[capo_lambda_microvms.types.get_microvm_image_build_input.GetMicrovmImageBuildInput]",
964
+ ) -> AsyncOperationResponse[
965
+ "capo_lambda_microvms.types.get_microvm_image_build_output.GetMicrovmImageBuildOutput"
966
+ ]:
967
+ import capo_lambda_microvms._operations.lambda_microvms.get_microvm_image_build
968
+
969
+ (
970
+ output,
971
+ http_response,
972
+ ) = await capo_lambda_microvms._operations.lambda_microvms.get_microvm_image_build.async_get_microvm_image_build(
973
+ req.options, req.input
974
+ )
975
+ return AsyncOperationResponse(output=output, response=http_response)
976
+
977
+ interceptors_, options_ = self._service.operation_options(config_overrides)
978
+ input_: capo_lambda_microvms.types.get_microvm_image_build_input.GetMicrovmImageBuildInput = {
979
+ "image_identifier": image_identifier,
980
+ "image_version": image_version,
981
+ "build_id": build_id,
982
+ }
983
+
984
+ response = await aexecute_pipeline(
985
+ AsyncOperationRequest(input=input_, options=options_),
986
+ handler=_handler,
987
+ interceptors=list(interceptors_),
988
+ )
989
+ await response.response.aclose()
990
+ return response.output
991
+
992
+ async def get_microvm_image_version(
993
+ self,
994
+ image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
995
+ image_version: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
996
+ *,
997
+ config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
998
+ ) -> "capo_lambda_microvms.types.get_microvm_image_version_output.GetMicrovmImageVersionOutput":
999
+ """<p>Retrieves the details of a specific version of a MicroVM image, including its configuration, state, and build information.</p>
1000
+
1001
+ Args:
1002
+ image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image.</p>
1003
+ image_version: <p>The version of the MicroVM image to retrieve.</p>
1004
+
1005
+ Raises:
1006
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
1007
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
1008
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
1009
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
1010
+ capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
1011
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
1012
+ """
1013
+
1014
+ async def _handler(
1015
+ req: "AsyncOperationRequest[capo_lambda_microvms.types.get_microvm_image_version_input.GetMicrovmImageVersionInput]",
1016
+ ) -> AsyncOperationResponse[
1017
+ "capo_lambda_microvms.types.get_microvm_image_version_output.GetMicrovmImageVersionOutput"
1018
+ ]:
1019
+ import capo_lambda_microvms._operations.lambda_microvms.get_microvm_image_version
1020
+
1021
+ (
1022
+ output,
1023
+ http_response,
1024
+ ) = await capo_lambda_microvms._operations.lambda_microvms.get_microvm_image_version.async_get_microvm_image_version(
1025
+ req.options, req.input
1026
+ )
1027
+ return AsyncOperationResponse(output=output, response=http_response)
1028
+
1029
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1030
+ input_: capo_lambda_microvms.types.get_microvm_image_version_input.GetMicrovmImageVersionInput = {
1031
+ "image_identifier": image_identifier,
1032
+ "image_version": image_version,
1033
+ }
1034
+
1035
+ response = await aexecute_pipeline(
1036
+ AsyncOperationRequest(input=input_, options=options_),
1037
+ handler=_handler,
1038
+ interceptors=list(interceptors_),
1039
+ )
1040
+ await response.response.aclose()
1041
+ return response.output
1042
+
1043
+ async def list_managed_microvm_image_versions(
1044
+ self,
1045
+ image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
1046
+ *,
1047
+ config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
1048
+ max_results: Optional[int] = None,
1049
+ next_token: Optional["capo_lambda_microvms.types.string.String"] = None,
1050
+ ) -> "capo_lambda_microvms.types.list_managed_microvm_image_versions_output.ListManagedMicrovmImageVersionsOutput":
1051
+ """<p>Lists versions of a managed MicroVM image. We recommend using pagination to ensure that the operation returns quickly and successfully.</p>
1052
+
1053
+ Args:
1054
+ max_results: <p>The maximum number of results to return in a single call.</p>
1055
+ next_token: <p>The pagination token from a previous call. Use this token to retrieve the next page of results.</p>
1056
+ image_identifier: <p>The unique identifier (ARN or ID) of the managed MicroVM image to list versions for.</p>
1057
+
1058
+ Raises:
1059
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
1060
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
1061
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
1062
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
1063
+ capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
1064
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
1065
+ """
1066
+
1067
+ async def _handler(
1068
+ req: "AsyncOperationRequest[capo_lambda_microvms.types.list_managed_microvm_image_versions_input.ListManagedMicrovmImageVersionsInput]",
1069
+ ) -> AsyncOperationResponse[
1070
+ "capo_lambda_microvms.types.list_managed_microvm_image_versions_output.ListManagedMicrovmImageVersionsOutput"
1071
+ ]:
1072
+ import capo_lambda_microvms._operations.lambda_microvms.list_managed_microvm_image_versions
1073
+
1074
+ (
1075
+ output,
1076
+ http_response,
1077
+ ) = await capo_lambda_microvms._operations.lambda_microvms.list_managed_microvm_image_versions.async_list_managed_microvm_image_versions(
1078
+ req.options, req.input
1079
+ )
1080
+ return AsyncOperationResponse(output=output, response=http_response)
1081
+
1082
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1083
+ input_: capo_lambda_microvms.types.list_managed_microvm_image_versions_input.ListManagedMicrovmImageVersionsInput = {
1084
+ "image_identifier": image_identifier
1085
+ }
1086
+ if max_results is not None:
1087
+ input_["max_results"] = max_results
1088
+ if next_token is not None:
1089
+ input_["next_token"] = next_token
1090
+
1091
+ response = await aexecute_pipeline(
1092
+ AsyncOperationRequest(input=input_, options=options_),
1093
+ handler=_handler,
1094
+ interceptors=list(interceptors_),
1095
+ )
1096
+ await response.response.aclose()
1097
+ return response.output
1098
+
1099
+ async def list_microvm_image_builds(
1100
+ self,
1101
+ image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
1102
+ image_version: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
1103
+ *,
1104
+ config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
1105
+ max_results: Optional[int] = None,
1106
+ next_token: Optional["capo_lambda_microvms.types.string.String"] = None,
1107
+ architecture: Optional[
1108
+ "capo_lambda_microvms.types.architecture.Architecture"
1109
+ ] = None,
1110
+ chipset: Optional["capo_lambda_microvms.types.chipset.Chipset"] = None,
1111
+ chipset_generation: Optional[
1112
+ "capo_lambda_microvms.types.non_blank_string.NonBlankString"
1113
+ ] = None,
1114
+ ) -> "capo_lambda_microvms.types.list_microvm_image_builds_output.ListMicrovmImageBuildsOutput":
1115
+ """<p>Lists builds for a MicroVM image version with optional filtering by architecture and chipset. We recommend using pagination to ensure that the operation returns quickly and successfully.</p>
1116
+
1117
+ Args:
1118
+ max_results: <p>The maximum number of results to return in a single call.</p>
1119
+ next_token: <p>The pagination token from a previous call. Use this token to retrieve the next page of results.</p>
1120
+ image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image.</p>
1121
+ image_version: <p>The version of the MicroVM image to list builds for.</p>
1122
+ architecture: <p>Filters builds by target CPU architecture.</p>
1123
+ chipset: <p>Filters builds by target chipset.</p>
1124
+ chipset_generation: <p>Filters builds by target chipset generation.</p>
1125
+
1126
+ Raises:
1127
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
1128
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
1129
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
1130
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
1131
+ capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
1132
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
1133
+ """
1134
+
1135
+ async def _handler(
1136
+ req: "AsyncOperationRequest[capo_lambda_microvms.types.list_microvm_image_builds_input.ListMicrovmImageBuildsInput]",
1137
+ ) -> AsyncOperationResponse[
1138
+ "capo_lambda_microvms.types.list_microvm_image_builds_output.ListMicrovmImageBuildsOutput"
1139
+ ]:
1140
+ import capo_lambda_microvms._operations.lambda_microvms.list_microvm_image_builds
1141
+
1142
+ (
1143
+ output,
1144
+ http_response,
1145
+ ) = await capo_lambda_microvms._operations.lambda_microvms.list_microvm_image_builds.async_list_microvm_image_builds(
1146
+ req.options, req.input
1147
+ )
1148
+ return AsyncOperationResponse(output=output, response=http_response)
1149
+
1150
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1151
+ input_: capo_lambda_microvms.types.list_microvm_image_builds_input.ListMicrovmImageBuildsInput = {
1152
+ "image_identifier": image_identifier,
1153
+ "image_version": image_version,
1154
+ }
1155
+ if max_results is not None:
1156
+ input_["max_results"] = max_results
1157
+ if next_token is not None:
1158
+ input_["next_token"] = next_token
1159
+ if architecture is not None:
1160
+ input_["architecture"] = architecture
1161
+ if chipset is not None:
1162
+ input_["chipset"] = chipset
1163
+ if chipset_generation is not None:
1164
+ input_["chipset_generation"] = chipset_generation
1165
+
1166
+ response = await aexecute_pipeline(
1167
+ AsyncOperationRequest(input=input_, options=options_),
1168
+ handler=_handler,
1169
+ interceptors=list(interceptors_),
1170
+ )
1171
+ await response.response.aclose()
1172
+ return response.output
1173
+
1174
+ async def list_microvm_image_versions(
1175
+ self,
1176
+ image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
1177
+ *,
1178
+ config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
1179
+ max_results: Optional[int] = None,
1180
+ next_token: Optional["capo_lambda_microvms.types.string.String"] = None,
1181
+ ) -> "capo_lambda_microvms.types.list_microvm_image_versions_output.ListMicrovmImageVersionsOutput":
1182
+ """<p>Lists versions of a MicroVM image. We recommend using pagination to ensure that the operation returns quickly and successfully.</p>
1183
+
1184
+ Args:
1185
+ max_results: <p>The maximum number of results to return in a single call.</p>
1186
+ next_token: <p>The pagination token from a previous call. Use this token to retrieve the next page of results.</p>
1187
+ image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image to list versions for.</p>
1188
+
1189
+ Raises:
1190
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
1191
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
1192
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
1193
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
1194
+ capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
1195
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
1196
+ """
1197
+
1198
+ async def _handler(
1199
+ req: "AsyncOperationRequest[capo_lambda_microvms.types.list_microvm_image_versions_input.ListMicrovmImageVersionsInput]",
1200
+ ) -> AsyncOperationResponse[
1201
+ "capo_lambda_microvms.types.list_microvm_image_versions_output.ListMicrovmImageVersionsOutput"
1202
+ ]:
1203
+ import capo_lambda_microvms._operations.lambda_microvms.list_microvm_image_versions
1204
+
1205
+ (
1206
+ output,
1207
+ http_response,
1208
+ ) = await capo_lambda_microvms._operations.lambda_microvms.list_microvm_image_versions.async_list_microvm_image_versions(
1209
+ req.options, req.input
1210
+ )
1211
+ return AsyncOperationResponse(output=output, response=http_response)
1212
+
1213
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1214
+ input_: capo_lambda_microvms.types.list_microvm_image_versions_input.ListMicrovmImageVersionsInput = {
1215
+ "image_identifier": image_identifier
1216
+ }
1217
+ if max_results is not None:
1218
+ input_["max_results"] = max_results
1219
+ if next_token is not None:
1220
+ input_["next_token"] = next_token
1221
+
1222
+ response = await aexecute_pipeline(
1223
+ AsyncOperationRequest(input=input_, options=options_),
1224
+ handler=_handler,
1225
+ interceptors=list(interceptors_),
1226
+ )
1227
+ await response.response.aclose()
1228
+ return response.output
1229
+
1230
+ async def update_microvm_image(
1231
+ self,
1232
+ base_image_arn: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
1233
+ build_role_arn: "capo_lambda_microvms.types.role_arn.RoleArn",
1234
+ code_artifact: "capo_lambda_microvms.types.code_artifact.CodeArtifact",
1235
+ image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
1236
+ *,
1237
+ config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
1238
+ base_image_version: Optional[
1239
+ "capo_lambda_microvms.types.version.Version"
1240
+ ] = None,
1241
+ description: Optional[str] = None,
1242
+ logging: Optional["capo_lambda_microvms.types.logging.Logging"] = None,
1243
+ egress_network_connectors: Optional[
1244
+ "capo_lambda_microvms.types.network_connector_list.NetworkConnectorList"
1245
+ ] = None,
1246
+ cpu_configurations: Optional[
1247
+ "capo_lambda_microvms.types.cpu_configuration_list.CpuConfigurationList"
1248
+ ] = None,
1249
+ resources: Optional[
1250
+ "capo_lambda_microvms.types.resources_list.ResourcesList"
1251
+ ] = None,
1252
+ additional_os_capabilities: Optional[
1253
+ "capo_lambda_microvms.types.capability_list.CapabilityList"
1254
+ ] = None,
1255
+ hooks: Optional["capo_lambda_microvms.types.hooks.Hooks"] = None,
1256
+ environment_variables: Optional[
1257
+ "capo_lambda_microvms.types.environment_variable_map.EnvironmentVariableMap"
1258
+ ] = None,
1259
+ client_token: Optional[str] = None,
1260
+ ) -> "capo_lambda_microvms.types.update_microvm_image_response.UpdateMicrovmImageResponse":
1261
+ r"""<p>Updates the configuration of a MicroVM image and triggers a new version build. This operation uses PUT semantics — all required fields (codeArtifact, baseImageArn, buildRoleArn) must be provided with every request.</p>
1262
+
1263
+ Args:
1264
+ base_image_arn: <p>The ARN of the base MicroVM image.</p>
1265
+ base_image_version: <p>The specific version of the base MicroVM image to use.</p>
1266
+ build_role_arn: <p>The ARN of the IAM build role.</p>
1267
+ description: <p>The description of the MicroVM image.</p>
1268
+ code_artifact: <p>The code artifact containing the application code and metadata for the MicroVM image.</p>
1269
+ logging: <p>The logging configuration for build-time and runtime logs. Specify {\"cloudWatch\": {\"logGroup\": \"...\"}} to stream logs to a custom CloudWatch log group, or {\"disabled\": {}} to turn off logging.</p>
1270
+ egress_network_connectors: <p>The list of egress network connectors available to the MicroVM at runtime.</p>
1271
+ cpu_configurations: <p>The list of supported CPU configurations for the MicroVM.</p>
1272
+ resources: <p>The resource requirements for the MicroVM.</p>
1273
+ additional_os_capabilities: <p>Additional OS capabilities granted to the MicroVM runtime environment.</p>
1274
+ environment_variables: <p>Environment variables set in the MicroVM runtime environment.</p>
1275
+ image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image to update.</p>
1276
+ client_token: <p>A unique, case-sensitive identifier you provide to ensure the idempotency of the request.</p>
1277
+
1278
+ Raises:
1279
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
1280
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
1281
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
1282
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
1283
+ capo_lambda_microvms.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the resource.</p>
1284
+ capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
1285
+ capo_lambda_microvms.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>You have exceeded a service quota for Lambda MicroVMs.</p>
1286
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
1287
+ """
1288
+
1289
+ async def _handler(
1290
+ req: "AsyncOperationRequest[capo_lambda_microvms.types.update_microvm_image_request.UpdateMicrovmImageRequest]",
1291
+ ) -> AsyncOperationResponse[
1292
+ "capo_lambda_microvms.types.update_microvm_image_response.UpdateMicrovmImageResponse"
1293
+ ]:
1294
+ import capo_lambda_microvms._operations.lambda_microvms.update_microvm_image
1295
+
1296
+ (
1297
+ output,
1298
+ http_response,
1299
+ ) = await capo_lambda_microvms._operations.lambda_microvms.update_microvm_image.async_update_microvm_image(
1300
+ req.options, req.input
1301
+ )
1302
+ return AsyncOperationResponse(output=output, response=http_response)
1303
+
1304
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1305
+ input_: capo_lambda_microvms.types.update_microvm_image_request.UpdateMicrovmImageRequest = {
1306
+ "base_image_arn": base_image_arn,
1307
+ "build_role_arn": build_role_arn,
1308
+ "code_artifact": code_artifact,
1309
+ "image_identifier": image_identifier,
1310
+ }
1311
+ if base_image_version is not None:
1312
+ input_["base_image_version"] = base_image_version
1313
+ if description is not None:
1314
+ input_["description"] = description
1315
+ if logging is not None:
1316
+ input_["logging"] = logging
1317
+ if egress_network_connectors is not None:
1318
+ input_["egress_network_connectors"] = egress_network_connectors
1319
+ if cpu_configurations is not None:
1320
+ input_["cpu_configurations"] = cpu_configurations
1321
+ if resources is not None:
1322
+ input_["resources"] = resources
1323
+ if additional_os_capabilities is not None:
1324
+ input_["additional_os_capabilities"] = additional_os_capabilities
1325
+ if hooks is not None:
1326
+ input_["hooks"] = hooks
1327
+ if environment_variables is not None:
1328
+ input_["environment_variables"] = environment_variables
1329
+ if client_token is None:
1330
+ client_token = str(uuid.uuid4())
1331
+ input_["client_token"] = client_token
1332
+
1333
+ response = await aexecute_pipeline(
1334
+ AsyncOperationRequest(input=input_, options=options_),
1335
+ handler=_handler,
1336
+ interceptors=list(interceptors_),
1337
+ )
1338
+ await response.response.aclose()
1339
+ return response.output
1340
+
1341
+ async def update_microvm_image_version(
1342
+ self,
1343
+ image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
1344
+ image_version: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
1345
+ status: "capo_lambda_microvms.types.microvm_image_version_status.MicrovmImageVersionStatus",
1346
+ *,
1347
+ config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
1348
+ ) -> "capo_lambda_microvms.types.update_microvm_image_version_response.UpdateMicrovmImageVersionResponse":
1349
+ """<p>Updates the status of a specific MicroVM image version.</p>
1350
+
1351
+ Args:
1352
+ image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image.</p>
1353
+ image_version: <p>The version of the MicroVM image to update.</p>
1354
+ status: <p>The new status to set for the MicroVM image version.</p>
1355
+
1356
+ Raises:
1357
+ capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
1358
+ capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
1359
+ capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
1360
+ capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
1361
+ capo_lambda_microvms.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the resource.</p>
1362
+ capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
1363
+ capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
1364
+ """
1365
+
1366
+ async def _handler(
1367
+ req: "AsyncOperationRequest[capo_lambda_microvms.types.update_microvm_image_version_request.UpdateMicrovmImageVersionRequest]",
1368
+ ) -> AsyncOperationResponse[
1369
+ "capo_lambda_microvms.types.update_microvm_image_version_response.UpdateMicrovmImageVersionResponse"
1370
+ ]:
1371
+ import capo_lambda_microvms._operations.lambda_microvms.update_microvm_image_version
1372
+
1373
+ (
1374
+ output,
1375
+ http_response,
1376
+ ) = await capo_lambda_microvms._operations.lambda_microvms.update_microvm_image_version.async_update_microvm_image_version(
1377
+ req.options, req.input
1378
+ )
1379
+ return AsyncOperationResponse(output=output, response=http_response)
1380
+
1381
+ interceptors_, options_ = self._service.operation_options(config_overrides)
1382
+ input_: capo_lambda_microvms.types.update_microvm_image_version_request.UpdateMicrovmImageVersionRequest = {
1383
+ "image_identifier": image_identifier,
1384
+ "image_version": image_version,
1385
+ "status": status,
1386
+ }
1387
+
1388
+ response = await aexecute_pipeline(
1389
+ AsyncOperationRequest(input=input_, options=options_),
1390
+ handler=_handler,
1391
+ interceptors=list(interceptors_),
1392
+ )
1393
+ await response.response.aclose()
1394
+ return response.output