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.
- capo_lambda_microvms/__init__.py +73 -0
- capo_lambda_microvms/_async.py +25 -0
- capo_lambda_microvms/_auth/_identity.py +16 -0
- capo_lambda_microvms/_auth/_providers.py +886 -0
- capo_lambda_microvms/_auth/_signers.py +125 -0
- capo_lambda_microvms/_auth/_sigv4.py +579 -0
- capo_lambda_microvms/_auth/_zapros_handler.py +80 -0
- capo_lambda_microvms/_body.py +221 -0
- capo_lambda_microvms/_iter.py +113 -0
- capo_lambda_microvms/_operations/lambda_microvms/create_microvm_auth_token.py +181 -0
- capo_lambda_microvms/_operations/lambda_microvms/create_microvm_image.py +190 -0
- capo_lambda_microvms/_operations/lambda_microvms/create_microvm_shell_auth_token.py +181 -0
- capo_lambda_microvms/_operations/lambda_microvms/delete_microvm_image.py +170 -0
- capo_lambda_microvms/_operations/lambda_microvms/delete_microvm_image_version.py +174 -0
- capo_lambda_microvms/_operations/lambda_microvms/get_microvm.py +171 -0
- capo_lambda_microvms/_operations/lambda_microvms/get_microvm_image.py +170 -0
- capo_lambda_microvms/_operations/lambda_microvms/get_microvm_image_build.py +177 -0
- capo_lambda_microvms/_operations/lambda_microvms/get_microvm_image_version.py +179 -0
- capo_lambda_microvms/_operations/lambda_microvms/list_managed_microvm_image_versions.py +172 -0
- capo_lambda_microvms/_operations/lambda_microvms/list_managed_microvm_images.py +162 -0
- capo_lambda_microvms/_operations/lambda_microvms/list_microvm_image_builds.py +196 -0
- capo_lambda_microvms/_operations/lambda_microvms/list_microvm_image_versions.py +172 -0
- capo_lambda_microvms/_operations/lambda_microvms/list_microvm_images.py +164 -0
- capo_lambda_microvms/_operations/lambda_microvms/list_microvms.py +175 -0
- capo_lambda_microvms/_operations/lambda_microvms/list_tags.py +182 -0
- capo_lambda_microvms/_operations/lambda_microvms/resume_microvm.py +167 -0
- capo_lambda_microvms/_operations/lambda_microvms/run_microvm.py +187 -0
- capo_lambda_microvms/_operations/lambda_microvms/suspend_microvm.py +167 -0
- capo_lambda_microvms/_operations/lambda_microvms/tag_resource.py +164 -0
- capo_lambda_microvms/_operations/lambda_microvms/terminate_microvm.py +167 -0
- capo_lambda_microvms/_operations/lambda_microvms/untag_resource.py +162 -0
- capo_lambda_microvms/_operations/lambda_microvms/update_microvm_image.py +191 -0
- capo_lambda_microvms/_operations/lambda_microvms/update_microvm_image_version.py +190 -0
- capo_lambda_microvms/_pagination.py +21 -0
- capo_lambda_microvms/_protocol/__init__.py +1 -0
- capo_lambda_microvms/_protocol/errors.py +93 -0
- capo_lambda_microvms/_protocol/eventstream.py +240 -0
- capo_lambda_microvms/_protocol/serialize.py +47 -0
- capo_lambda_microvms/_protocol/xml.py +33 -0
- capo_lambda_microvms/_resources/lambda_microvms/microvm.py +983 -0
- capo_lambda_microvms/_resources/lambda_microvms/microvm_image.py +1394 -0
- capo_lambda_microvms/_rule_engine/__init__.py +0 -0
- capo_lambda_microvms/_rule_engine/_aws_partition.py +160 -0
- capo_lambda_microvms/_rule_engine/_endpoint_rule_set.py +135 -0
- capo_lambda_microvms/_rule_engine/_endpoint_runtime.py +389 -0
- capo_lambda_microvms/_services/_aws_config.py +160 -0
- capo_lambda_microvms/_services/_pipeline.py +247 -0
- capo_lambda_microvms/_services/async_lambda_microvms.py +1822 -0
- capo_lambda_microvms/_services/lambda_microvms.py +1798 -0
- capo_lambda_microvms/errors/__init__.py +49 -0
- capo_lambda_microvms/errors/_base.py +94 -0
- capo_lambda_microvms/errors/access_denied_exception.py +46 -0
- capo_lambda_microvms/errors/conflict_exception.py +56 -0
- capo_lambda_microvms/errors/insufficient_capacity_exception.py +49 -0
- capo_lambda_microvms/errors/internal_server_exception.py +48 -0
- capo_lambda_microvms/errors/invalid_parameter_value_exception.py +54 -0
- capo_lambda_microvms/errors/resource_conflict_exception.py +52 -0
- capo_lambda_microvms/errors/resource_not_found_exception.py +59 -0
- capo_lambda_microvms/errors/service_exception.py +50 -0
- capo_lambda_microvms/errors/service_quota_exceeded_exception.py +72 -0
- capo_lambda_microvms/errors/throttling_exception.py +58 -0
- capo_lambda_microvms/errors/too_many_requests_exception.py +52 -0
- capo_lambda_microvms/errors/validation_exception.py +44 -0
- capo_lambda_microvms/py.typed +0 -0
- capo_lambda_microvms/types/_prelude/blob.py +12 -0
- capo_lambda_microvms/types/_prelude/timestamp.py +17 -0
- capo_lambda_microvms/types/architecture.py +14 -0
- capo_lambda_microvms/types/auth_token_key.py +5 -0
- capo_lambda_microvms/types/auth_token_value.py +5 -0
- capo_lambda_microvms/types/build_state.py +19 -0
- capo_lambda_microvms/types/capability.py +15 -0
- capo_lambda_microvms/types/capability_list.py +29 -0
- capo_lambda_microvms/types/chipset.py +14 -0
- capo_lambda_microvms/types/cloud_watch_logging.py +34 -0
- capo_lambda_microvms/types/code_artifact.py +32 -0
- capo_lambda_microvms/types/cpu_configuration.py +39 -0
- capo_lambda_microvms/types/cpu_configuration_list.py +31 -0
- capo_lambda_microvms/types/create_microvm_auth_token_request.py +62 -0
- capo_lambda_microvms/types/create_microvm_auth_token_response.py +39 -0
- capo_lambda_microvms/types/create_microvm_image_request.py +219 -0
- capo_lambda_microvms/types/create_microvm_image_response.py +294 -0
- capo_lambda_microvms/types/create_microvm_shell_auth_token_request.py +38 -0
- capo_lambda_microvms/types/create_microvm_shell_auth_token_response.py +41 -0
- capo_lambda_microvms/types/delete_microvm_image_input.py +26 -0
- capo_lambda_microvms/types/delete_microvm_image_output.py +49 -0
- capo_lambda_microvms/types/delete_microvm_image_version_input.py +29 -0
- capo_lambda_microvms/types/delete_microvm_image_version_output.py +65 -0
- capo_lambda_microvms/types/environment_variable_key.py +5 -0
- capo_lambda_microvms/types/environment_variable_map.py +29 -0
- capo_lambda_microvms/types/environment_variable_value.py +5 -0
- capo_lambda_microvms/types/get_microvm_image_build_input.py +31 -0
- capo_lambda_microvms/types/get_microvm_image_build_output.py +144 -0
- capo_lambda_microvms/types/get_microvm_image_input.py +26 -0
- capo_lambda_microvms/types/get_microvm_image_output.py +117 -0
- capo_lambda_microvms/types/get_microvm_image_version_input.py +29 -0
- capo_lambda_microvms/types/get_microvm_image_version_output.py +308 -0
- capo_lambda_microvms/types/get_microvm_request.py +26 -0
- capo_lambda_microvms/types/get_microvm_response.py +188 -0
- capo_lambda_microvms/types/hook_state.py +18 -0
- capo_lambda_microvms/types/hooks.py +65 -0
- capo_lambda_microvms/types/idle_policy.py +40 -0
- capo_lambda_microvms/types/image_name.py +6 -0
- capo_lambda_microvms/types/list_managed_microvm_image_versions_input.py +31 -0
- capo_lambda_microvms/types/list_managed_microvm_image_versions_output.py +52 -0
- capo_lambda_microvms/types/list_managed_microvm_images_input.py +26 -0
- capo_lambda_microvms/types/list_managed_microvm_images_output.py +50 -0
- capo_lambda_microvms/types/list_microvm_image_builds_input.py +44 -0
- capo_lambda_microvms/types/list_microvm_image_builds_output.py +50 -0
- capo_lambda_microvms/types/list_microvm_image_versions_input.py +31 -0
- capo_lambda_microvms/types/list_microvm_image_versions_output.py +50 -0
- capo_lambda_microvms/types/list_microvm_images_request.py +31 -0
- capo_lambda_microvms/types/list_microvm_images_response.py +48 -0
- capo_lambda_microvms/types/list_microvms_request.py +33 -0
- capo_lambda_microvms/types/list_microvms_response.py +46 -0
- capo_lambda_microvms/types/list_of_port_specification.py +31 -0
- capo_lambda_microvms/types/list_tags_request.py +24 -0
- capo_lambda_microvms/types/list_tags_response.py +32 -0
- capo_lambda_microvms/types/logging.py +65 -0
- capo_lambda_microvms/types/logging_disabled.py +18 -0
- capo_lambda_microvms/types/managed_microvm_image_summary.py +66 -0
- capo_lambda_microvms/types/managed_microvm_image_summary_list.py +39 -0
- capo_lambda_microvms/types/managed_microvm_image_version.py +94 -0
- capo_lambda_microvms/types/managed_microvm_image_version_list.py +39 -0
- capo_lambda_microvms/types/managed_microvm_image_version_status.py +18 -0
- capo_lambda_microvms/types/microvm_hooks.py +108 -0
- capo_lambda_microvms/types/microvm_identifier.py +6 -0
- capo_lambda_microvms/types/microvm_image_arn.py +6 -0
- capo_lambda_microvms/types/microvm_image_build_summaries.py +37 -0
- capo_lambda_microvms/types/microvm_image_build_summary.py +125 -0
- capo_lambda_microvms/types/microvm_image_hooks.py +66 -0
- capo_lambda_microvms/types/microvm_image_identifier.py +6 -0
- capo_lambda_microvms/types/microvm_image_state.py +24 -0
- capo_lambda_microvms/types/microvm_image_summaries.py +35 -0
- capo_lambda_microvms/types/microvm_image_summary.py +90 -0
- capo_lambda_microvms/types/microvm_image_version_state.py +22 -0
- capo_lambda_microvms/types/microvm_image_version_status.py +17 -0
- capo_lambda_microvms/types/microvm_image_version_summary.py +300 -0
- capo_lambda_microvms/types/microvm_image_version_summary_list.py +39 -0
- capo_lambda_microvms/types/microvm_item.py +82 -0
- capo_lambda_microvms/types/microvm_item_list.py +29 -0
- capo_lambda_microvms/types/microvm_state.py +22 -0
- capo_lambda_microvms/types/network_connector.py +5 -0
- capo_lambda_microvms/types/network_connector_list.py +19 -0
- capo_lambda_microvms/types/non_blank_string.py +6 -0
- capo_lambda_microvms/types/port_number.py +6 -0
- capo_lambda_microvms/types/port_range.py +38 -0
- capo_lambda_microvms/types/port_specification.py +63 -0
- capo_lambda_microvms/types/positive_integer.py +5 -0
- capo_lambda_microvms/types/resources.py +26 -0
- capo_lambda_microvms/types/resources_list.py +29 -0
- capo_lambda_microvms/types/resume_microvm_request.py +26 -0
- capo_lambda_microvms/types/resume_microvm_response.py +18 -0
- capo_lambda_microvms/types/role_arn.py +6 -0
- capo_lambda_microvms/types/run_hook_payload.py +5 -0
- capo_lambda_microvms/types/run_microvm_request.py +139 -0
- capo_lambda_microvms/types/run_microvm_response.py +188 -0
- capo_lambda_microvms/types/snapshot_build.py +35 -0
- capo_lambda_microvms/types/string.py +5 -0
- capo_lambda_microvms/types/suspend_microvm_request.py +26 -0
- capo_lambda_microvms/types/suspend_microvm_response.py +18 -0
- capo_lambda_microvms/types/tag_key.py +5 -0
- capo_lambda_microvms/types/tag_key_list.py +17 -0
- capo_lambda_microvms/types/tag_resource_request.py +38 -0
- capo_lambda_microvms/types/tag_value.py +5 -0
- capo_lambda_microvms/types/taggable_resource.py +6 -0
- capo_lambda_microvms/types/tags.py +29 -0
- capo_lambda_microvms/types/terminate_microvm_request.py +26 -0
- capo_lambda_microvms/types/terminate_microvm_response.py +18 -0
- capo_lambda_microvms/types/token_parts.py +29 -0
- capo_lambda_microvms/types/untag_resource_request.py +27 -0
- capo_lambda_microvms/types/update_microvm_image_request.py +205 -0
- capo_lambda_microvms/types/update_microvm_image_response.py +284 -0
- capo_lambda_microvms/types/update_microvm_image_version_request.py +51 -0
- capo_lambda_microvms/types/update_microvm_image_version_response.py +312 -0
- capo_lambda_microvms/types/version.py +5 -0
- capo_lambda_microvms-0.1.0.dist-info/METADATA +103 -0
- capo_lambda_microvms-0.1.0.dist-info/RECORD +180 -0
- capo_lambda_microvms-0.1.0.dist-info/WHEEL +5 -0
- capo_lambda_microvms-0.1.0.dist-info/licenses/LICENSE +21 -0
- capo_lambda_microvms-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1822 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdamicrovms#LambdaMicrovms``."""
|
|
2
|
+
|
|
3
|
+
import uuid
|
|
4
|
+
import warnings
|
|
5
|
+
from collections.abc import AsyncIterator
|
|
6
|
+
from typing import TYPE_CHECKING, Any, Iterable, Optional
|
|
7
|
+
|
|
8
|
+
from typing_extensions import Self, TypedDict
|
|
9
|
+
from zapros import AsyncBaseHandler, AsyncClient
|
|
10
|
+
|
|
11
|
+
import capo_lambda_microvms._auth._signers
|
|
12
|
+
import capo_lambda_microvms._auth._sigv4
|
|
13
|
+
from capo_lambda_microvms._auth._identity import Credentials
|
|
14
|
+
from capo_lambda_microvms._auth._providers import (
|
|
15
|
+
CredentialsProvider,
|
|
16
|
+
IdentityProvider,
|
|
17
|
+
StaticAwsCredentialsProvider,
|
|
18
|
+
default_aws_credentials_chain,
|
|
19
|
+
)
|
|
20
|
+
from capo_lambda_microvms._auth._zapros_handler import AuthMiddleware
|
|
21
|
+
from capo_lambda_microvms._pagination import resolve_path as _resolve_path
|
|
22
|
+
from capo_lambda_microvms._resources.lambda_microvms.microvm import AsyncMicrovm
|
|
23
|
+
from capo_lambda_microvms._resources.lambda_microvms.microvm_image import (
|
|
24
|
+
AsyncMicrovmImage,
|
|
25
|
+
)
|
|
26
|
+
from capo_lambda_microvms._services._aws_config import aaws_config
|
|
27
|
+
from capo_lambda_microvms._services._pipeline import (
|
|
28
|
+
AsyncInterceptor,
|
|
29
|
+
AsyncOperationOptions,
|
|
30
|
+
AsyncOperationRequest,
|
|
31
|
+
AsyncOperationResponse,
|
|
32
|
+
aexecute_pipeline,
|
|
33
|
+
aretry,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
if TYPE_CHECKING:
|
|
37
|
+
import capo_lambda_microvms.types.architecture
|
|
38
|
+
import capo_lambda_microvms.types.capability_list
|
|
39
|
+
import capo_lambda_microvms.types.chipset
|
|
40
|
+
import capo_lambda_microvms.types.code_artifact
|
|
41
|
+
import capo_lambda_microvms.types.cpu_configuration_list
|
|
42
|
+
import capo_lambda_microvms.types.create_microvm_auth_token_request
|
|
43
|
+
import capo_lambda_microvms.types.create_microvm_auth_token_response
|
|
44
|
+
import capo_lambda_microvms.types.create_microvm_image_request
|
|
45
|
+
import capo_lambda_microvms.types.create_microvm_image_response
|
|
46
|
+
import capo_lambda_microvms.types.create_microvm_shell_auth_token_request
|
|
47
|
+
import capo_lambda_microvms.types.create_microvm_shell_auth_token_response
|
|
48
|
+
import capo_lambda_microvms.types.delete_microvm_image_input
|
|
49
|
+
import capo_lambda_microvms.types.delete_microvm_image_output
|
|
50
|
+
import capo_lambda_microvms.types.delete_microvm_image_version_input
|
|
51
|
+
import capo_lambda_microvms.types.delete_microvm_image_version_output
|
|
52
|
+
import capo_lambda_microvms.types.environment_variable_map
|
|
53
|
+
import capo_lambda_microvms.types.get_microvm_image_build_input
|
|
54
|
+
import capo_lambda_microvms.types.get_microvm_image_build_output
|
|
55
|
+
import capo_lambda_microvms.types.get_microvm_image_input
|
|
56
|
+
import capo_lambda_microvms.types.get_microvm_image_output
|
|
57
|
+
import capo_lambda_microvms.types.get_microvm_image_version_input
|
|
58
|
+
import capo_lambda_microvms.types.get_microvm_image_version_output
|
|
59
|
+
import capo_lambda_microvms.types.get_microvm_request
|
|
60
|
+
import capo_lambda_microvms.types.get_microvm_response
|
|
61
|
+
import capo_lambda_microvms.types.hooks
|
|
62
|
+
import capo_lambda_microvms.types.idle_policy
|
|
63
|
+
import capo_lambda_microvms.types.image_name
|
|
64
|
+
import capo_lambda_microvms.types.list_managed_microvm_image_versions_input
|
|
65
|
+
import capo_lambda_microvms.types.list_managed_microvm_image_versions_output
|
|
66
|
+
import capo_lambda_microvms.types.list_managed_microvm_images_input
|
|
67
|
+
import capo_lambda_microvms.types.list_managed_microvm_images_output
|
|
68
|
+
import capo_lambda_microvms.types.list_microvm_image_builds_input
|
|
69
|
+
import capo_lambda_microvms.types.list_microvm_image_builds_output
|
|
70
|
+
import capo_lambda_microvms.types.list_microvm_image_versions_input
|
|
71
|
+
import capo_lambda_microvms.types.list_microvm_image_versions_output
|
|
72
|
+
import capo_lambda_microvms.types.list_microvm_images_request
|
|
73
|
+
import capo_lambda_microvms.types.list_microvm_images_response
|
|
74
|
+
import capo_lambda_microvms.types.list_microvms_request
|
|
75
|
+
import capo_lambda_microvms.types.list_microvms_response
|
|
76
|
+
import capo_lambda_microvms.types.list_of_port_specification
|
|
77
|
+
import capo_lambda_microvms.types.list_tags_request
|
|
78
|
+
import capo_lambda_microvms.types.list_tags_response
|
|
79
|
+
import capo_lambda_microvms.types.logging
|
|
80
|
+
import capo_lambda_microvms.types.managed_microvm_image_summary
|
|
81
|
+
import capo_lambda_microvms.types.managed_microvm_image_version
|
|
82
|
+
import capo_lambda_microvms.types.microvm_identifier
|
|
83
|
+
import capo_lambda_microvms.types.microvm_image_build_summary
|
|
84
|
+
import capo_lambda_microvms.types.microvm_image_identifier
|
|
85
|
+
import capo_lambda_microvms.types.microvm_image_summary
|
|
86
|
+
import capo_lambda_microvms.types.microvm_image_version_status
|
|
87
|
+
import capo_lambda_microvms.types.microvm_image_version_summary
|
|
88
|
+
import capo_lambda_microvms.types.microvm_item
|
|
89
|
+
import capo_lambda_microvms.types.network_connector_list
|
|
90
|
+
import capo_lambda_microvms.types.non_blank_string
|
|
91
|
+
import capo_lambda_microvms.types.positive_integer
|
|
92
|
+
import capo_lambda_microvms.types.resources_list
|
|
93
|
+
import capo_lambda_microvms.types.resume_microvm_request
|
|
94
|
+
import capo_lambda_microvms.types.resume_microvm_response
|
|
95
|
+
import capo_lambda_microvms.types.role_arn
|
|
96
|
+
import capo_lambda_microvms.types.run_hook_payload
|
|
97
|
+
import capo_lambda_microvms.types.run_microvm_request
|
|
98
|
+
import capo_lambda_microvms.types.run_microvm_response
|
|
99
|
+
import capo_lambda_microvms.types.string
|
|
100
|
+
import capo_lambda_microvms.types.suspend_microvm_request
|
|
101
|
+
import capo_lambda_microvms.types.suspend_microvm_response
|
|
102
|
+
import capo_lambda_microvms.types.tag_key_list
|
|
103
|
+
import capo_lambda_microvms.types.tag_resource_request
|
|
104
|
+
import capo_lambda_microvms.types.taggable_resource
|
|
105
|
+
import capo_lambda_microvms.types.tags
|
|
106
|
+
import capo_lambda_microvms.types.terminate_microvm_request
|
|
107
|
+
import capo_lambda_microvms.types.terminate_microvm_response
|
|
108
|
+
import capo_lambda_microvms.types.untag_resource_request
|
|
109
|
+
import capo_lambda_microvms.types.update_microvm_image_request
|
|
110
|
+
import capo_lambda_microvms.types.update_microvm_image_response
|
|
111
|
+
import capo_lambda_microvms.types.update_microvm_image_version_request
|
|
112
|
+
import capo_lambda_microvms.types.update_microvm_image_version_response
|
|
113
|
+
import capo_lambda_microvms.types.version
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
class AsyncLambdaMicrovmsClientConfig(TypedDict, total=False, closed=True):
|
|
117
|
+
operation_interceptors: Iterable[AsyncInterceptor[Any, Any]]
|
|
118
|
+
retry_max_attempts: int | None
|
|
119
|
+
region: str | None
|
|
120
|
+
use_dual_stack: bool | None
|
|
121
|
+
use_fips: bool | None
|
|
122
|
+
endpoint: str | None
|
|
123
|
+
credentials_provider: IdentityProvider[Credentials] | None
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
class AsyncLambdaMicrovmsClient:
|
|
127
|
+
"""A client for the ``LambdaMicrovms`` service.
|
|
128
|
+
|
|
129
|
+
Args:
|
|
130
|
+
http_handler: HTTP handler for sending requests. If not provided, creates a default handler.
|
|
131
|
+
operation_interceptors: Interceptors that wrap every operation call. If not provided, defaults to an empty list.
|
|
132
|
+
retry_max_attempts: Maximum number of times to retry a failed operation. Defaults to 3.
|
|
133
|
+
region: The value of the ``AWS::Region`` endpoint parameter.
|
|
134
|
+
use_dual_stack: The value of the ``AWS::UseDualStack`` endpoint parameter.
|
|
135
|
+
use_fips: The value of the ``AWS::UseFIPS`` endpoint parameter.
|
|
136
|
+
endpoint: The value of the ``SDK::Endpoint`` endpoint parameter.
|
|
137
|
+
credentials: AWS credentials for request signing.
|
|
138
|
+
credentials_provider: Provider that resolves AWS credentials. Takes precedence over ``credentials``.
|
|
139
|
+
"""
|
|
140
|
+
|
|
141
|
+
def __init__(
|
|
142
|
+
self,
|
|
143
|
+
http_handler: AsyncBaseHandler | None = None,
|
|
144
|
+
operation_interceptors: Iterable[AsyncInterceptor[Any, Any]] | None = None,
|
|
145
|
+
retry_max_attempts: int | None = None,
|
|
146
|
+
region: str | None = None,
|
|
147
|
+
use_dual_stack: bool | None = None,
|
|
148
|
+
use_fips: bool | None = None,
|
|
149
|
+
endpoint: str | None = None,
|
|
150
|
+
credentials: Credentials | None = None,
|
|
151
|
+
credentials_provider: CredentialsProvider | None = None,
|
|
152
|
+
):
|
|
153
|
+
self._client = AsyncClient(http_handler).wrap_with_middleware(
|
|
154
|
+
lambda next: AuthMiddleware(next)
|
|
155
|
+
)
|
|
156
|
+
if credentials is not None and credentials_provider is not None:
|
|
157
|
+
warnings.warn(
|
|
158
|
+
"Both credentials and credentials_provider given; provider takes precedence"
|
|
159
|
+
)
|
|
160
|
+
resolved_credentials_provider: IdentityProvider[Credentials] | None = (
|
|
161
|
+
credentials_provider
|
|
162
|
+
)
|
|
163
|
+
if resolved_credentials_provider is None and credentials is not None:
|
|
164
|
+
resolved_credentials_provider = StaticAwsCredentialsProvider(credentials)
|
|
165
|
+
if resolved_credentials_provider is None and credentials is None:
|
|
166
|
+
resolved_credentials_provider = default_aws_credentials_chain(
|
|
167
|
+
AsyncClient(http_handler)
|
|
168
|
+
)
|
|
169
|
+
self._config = AsyncLambdaMicrovmsClientConfig(
|
|
170
|
+
{
|
|
171
|
+
"operation_interceptors": operation_interceptors or [],
|
|
172
|
+
"retry_max_attempts": retry_max_attempts,
|
|
173
|
+
"region": region,
|
|
174
|
+
"use_dual_stack": use_dual_stack,
|
|
175
|
+
"use_fips": use_fips,
|
|
176
|
+
"endpoint": endpoint,
|
|
177
|
+
"credentials_provider": resolved_credentials_provider,
|
|
178
|
+
}
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
# resources
|
|
182
|
+
self.microvm = AsyncMicrovm(self)
|
|
183
|
+
self.microvm_image = AsyncMicrovmImage(self)
|
|
184
|
+
|
|
185
|
+
def operation_options(
|
|
186
|
+
self, config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None
|
|
187
|
+
) -> tuple[Iterable[AsyncInterceptor[Any, Any]], AsyncOperationOptions]:
|
|
188
|
+
overrides: AsyncLambdaMicrovmsClientConfig = config_overrides or {}
|
|
189
|
+
interceptors_: list[AsyncInterceptor[Any, Any]] = [
|
|
190
|
+
*overrides.get(
|
|
191
|
+
"operation_interceptors", self._config.get("operation_interceptors", [])
|
|
192
|
+
),
|
|
193
|
+
aaws_config(),
|
|
194
|
+
aretry(),
|
|
195
|
+
]
|
|
196
|
+
options_: AsyncOperationOptions = AsyncOperationOptions(
|
|
197
|
+
client=self._client,
|
|
198
|
+
retry_max_attempts=overrides.get(
|
|
199
|
+
"retry_max_attempts", self._config.get("retry_max_attempts")
|
|
200
|
+
),
|
|
201
|
+
region=overrides.get("region", self._config.get("region")),
|
|
202
|
+
use_dual_stack=overrides.get(
|
|
203
|
+
"use_dual_stack", self._config.get("use_dual_stack")
|
|
204
|
+
),
|
|
205
|
+
use_fips=overrides.get("use_fips", self._config.get("use_fips")),
|
|
206
|
+
endpoint=overrides.get("endpoint", self._config.get("endpoint")),
|
|
207
|
+
credentials_provider=overrides.get(
|
|
208
|
+
"credentials_provider", self._config.get("credentials_provider")
|
|
209
|
+
),
|
|
210
|
+
)
|
|
211
|
+
return interceptors_, options_
|
|
212
|
+
|
|
213
|
+
async def create_microvm_image(
|
|
214
|
+
self,
|
|
215
|
+
base_image_arn: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
|
|
216
|
+
build_role_arn: "capo_lambda_microvms.types.role_arn.RoleArn",
|
|
217
|
+
code_artifact: "capo_lambda_microvms.types.code_artifact.CodeArtifact",
|
|
218
|
+
name: "capo_lambda_microvms.types.image_name.ImageName",
|
|
219
|
+
*,
|
|
220
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
221
|
+
base_image_version: Optional[
|
|
222
|
+
"capo_lambda_microvms.types.version.Version"
|
|
223
|
+
] = None,
|
|
224
|
+
description: Optional[str] = None,
|
|
225
|
+
logging: Optional["capo_lambda_microvms.types.logging.Logging"] = None,
|
|
226
|
+
egress_network_connectors: Optional[
|
|
227
|
+
"capo_lambda_microvms.types.network_connector_list.NetworkConnectorList"
|
|
228
|
+
] = None,
|
|
229
|
+
cpu_configurations: Optional[
|
|
230
|
+
"capo_lambda_microvms.types.cpu_configuration_list.CpuConfigurationList"
|
|
231
|
+
] = None,
|
|
232
|
+
resources: Optional[
|
|
233
|
+
"capo_lambda_microvms.types.resources_list.ResourcesList"
|
|
234
|
+
] = None,
|
|
235
|
+
additional_os_capabilities: Optional[
|
|
236
|
+
"capo_lambda_microvms.types.capability_list.CapabilityList"
|
|
237
|
+
] = None,
|
|
238
|
+
hooks: Optional["capo_lambda_microvms.types.hooks.Hooks"] = None,
|
|
239
|
+
environment_variables: Optional[
|
|
240
|
+
"capo_lambda_microvms.types.environment_variable_map.EnvironmentVariableMap"
|
|
241
|
+
] = None,
|
|
242
|
+
tags: Optional["capo_lambda_microvms.types.tags.Tags"] = None,
|
|
243
|
+
client_token: Optional[str] = None,
|
|
244
|
+
) -> "capo_lambda_microvms.types.create_microvm_image_response.CreateMicrovmImageResponse":
|
|
245
|
+
r"""<p>Creates a MicroVM image from the specified code artifact and base image. The build is asynchronous — the image transitions from CREATING to CREATED on success, or CREATE_FAILED on failure. Use GetMicrovmImage to poll for completion.</p>
|
|
246
|
+
|
|
247
|
+
Args:
|
|
248
|
+
base_image_arn: <p>The ARN of the Lambda-managed base MicroVM image to build upon. Use ListManagedMicrovmImages to discover available base images.</p>
|
|
249
|
+
base_image_version: <p>The specific version of the base MicroVM image to use.</p>
|
|
250
|
+
build_role_arn: <p>The ARN of the IAM role assumed during the image build process. This role must have permissions to access the code artifact and any required resources.</p>
|
|
251
|
+
description: <p>A description of the MicroVM image.</p>
|
|
252
|
+
code_artifact: <p>The code artifact containing the application code and metadata for the MicroVM image.</p>
|
|
253
|
+
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>
|
|
254
|
+
egress_network_connectors: <p>The list of egress network connectors available to the MicroVM at runtime.</p>
|
|
255
|
+
cpu_configurations: <p>The list of supported CPU configurations for the MicroVM.</p>
|
|
256
|
+
resources: <p>The resource requirements for the MicroVM.</p>
|
|
257
|
+
additional_os_capabilities: <p>Additional OS capabilities granted to the MicroVM runtime environment.</p>
|
|
258
|
+
environment_variables: <p>Environment variables set in the MicroVM runtime environment.</p>
|
|
259
|
+
name: <p>The name of the MicroVM image. Must be unique within the AWS account.</p>
|
|
260
|
+
tags: <p>A set of key-value pairs that you can attach to the resource. Use tags to categorize resources for cost allocation, access control (ABAC), and organization.</p>
|
|
261
|
+
client_token: <p>A unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token, the operation returns the successful response without performing any further actions.</p>
|
|
262
|
+
|
|
263
|
+
Raises:
|
|
264
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
265
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
266
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
267
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
268
|
+
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>
|
|
269
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
270
|
+
capo_lambda_microvms.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>You have exceeded a service quota for Lambda MicroVMs.</p>
|
|
271
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
272
|
+
"""
|
|
273
|
+
|
|
274
|
+
async def _handler(
|
|
275
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.create_microvm_image_request.CreateMicrovmImageRequest]",
|
|
276
|
+
) -> AsyncOperationResponse[
|
|
277
|
+
"capo_lambda_microvms.types.create_microvm_image_response.CreateMicrovmImageResponse"
|
|
278
|
+
]:
|
|
279
|
+
import capo_lambda_microvms._operations.lambda_microvms.create_microvm_image
|
|
280
|
+
|
|
281
|
+
(
|
|
282
|
+
output,
|
|
283
|
+
http_response,
|
|
284
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.create_microvm_image.async_create_microvm_image(
|
|
285
|
+
req.options, req.input
|
|
286
|
+
)
|
|
287
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
288
|
+
|
|
289
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
290
|
+
input_: capo_lambda_microvms.types.create_microvm_image_request.CreateMicrovmImageRequest = {
|
|
291
|
+
"base_image_arn": base_image_arn,
|
|
292
|
+
"build_role_arn": build_role_arn,
|
|
293
|
+
"code_artifact": code_artifact,
|
|
294
|
+
"name": name,
|
|
295
|
+
}
|
|
296
|
+
if base_image_version is not None:
|
|
297
|
+
input_["base_image_version"] = base_image_version
|
|
298
|
+
if description is not None:
|
|
299
|
+
input_["description"] = description
|
|
300
|
+
if logging is not None:
|
|
301
|
+
input_["logging"] = logging
|
|
302
|
+
if egress_network_connectors is not None:
|
|
303
|
+
input_["egress_network_connectors"] = egress_network_connectors
|
|
304
|
+
if cpu_configurations is not None:
|
|
305
|
+
input_["cpu_configurations"] = cpu_configurations
|
|
306
|
+
if resources is not None:
|
|
307
|
+
input_["resources"] = resources
|
|
308
|
+
if additional_os_capabilities is not None:
|
|
309
|
+
input_["additional_os_capabilities"] = additional_os_capabilities
|
|
310
|
+
if hooks is not None:
|
|
311
|
+
input_["hooks"] = hooks
|
|
312
|
+
if environment_variables is not None:
|
|
313
|
+
input_["environment_variables"] = environment_variables
|
|
314
|
+
if tags is not None:
|
|
315
|
+
input_["tags"] = tags
|
|
316
|
+
if client_token is None:
|
|
317
|
+
client_token = str(uuid.uuid4())
|
|
318
|
+
input_["client_token"] = client_token
|
|
319
|
+
|
|
320
|
+
response = await aexecute_pipeline(
|
|
321
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
322
|
+
handler=_handler,
|
|
323
|
+
interceptors=list(interceptors_),
|
|
324
|
+
)
|
|
325
|
+
await response.response.aclose()
|
|
326
|
+
return response.output
|
|
327
|
+
|
|
328
|
+
async def list_managed_microvm_images(
|
|
329
|
+
self,
|
|
330
|
+
*,
|
|
331
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
332
|
+
max_results: Optional[int] = None,
|
|
333
|
+
next_token: Optional["capo_lambda_microvms.types.string.String"] = None,
|
|
334
|
+
) -> "capo_lambda_microvms.types.list_managed_microvm_images_output.ListManagedMicrovmImagesOutput":
|
|
335
|
+
"""<p>Lists AWS managed MicroVM images available for use as base images. We recommend using pagination to ensure that the operation returns quickly and successfully.</p>
|
|
336
|
+
|
|
337
|
+
Args:
|
|
338
|
+
max_results: <p>The maximum number of results to return in a single call.</p>
|
|
339
|
+
next_token: <p>The pagination token from a previous call. Use this token to retrieve the next page of results.</p>
|
|
340
|
+
|
|
341
|
+
Raises:
|
|
342
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
343
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
344
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
345
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
346
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
347
|
+
"""
|
|
348
|
+
|
|
349
|
+
async def _handler(
|
|
350
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.list_managed_microvm_images_input.ListManagedMicrovmImagesInput]",
|
|
351
|
+
) -> AsyncOperationResponse[
|
|
352
|
+
"capo_lambda_microvms.types.list_managed_microvm_images_output.ListManagedMicrovmImagesOutput"
|
|
353
|
+
]:
|
|
354
|
+
import capo_lambda_microvms._operations.lambda_microvms.list_managed_microvm_images
|
|
355
|
+
|
|
356
|
+
(
|
|
357
|
+
output,
|
|
358
|
+
http_response,
|
|
359
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.list_managed_microvm_images.async_list_managed_microvm_images(
|
|
360
|
+
req.options, req.input
|
|
361
|
+
)
|
|
362
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
363
|
+
|
|
364
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
365
|
+
input_: capo_lambda_microvms.types.list_managed_microvm_images_input.ListManagedMicrovmImagesInput = {}
|
|
366
|
+
if max_results is not None:
|
|
367
|
+
input_["max_results"] = max_results
|
|
368
|
+
if next_token is not None:
|
|
369
|
+
input_["next_token"] = next_token
|
|
370
|
+
|
|
371
|
+
response = await aexecute_pipeline(
|
|
372
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
373
|
+
handler=_handler,
|
|
374
|
+
interceptors=list(interceptors_),
|
|
375
|
+
)
|
|
376
|
+
await response.response.aclose()
|
|
377
|
+
return response.output
|
|
378
|
+
|
|
379
|
+
async def iter_list_managed_microvm_images(
|
|
380
|
+
self,
|
|
381
|
+
*,
|
|
382
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
383
|
+
max_results: Optional[int] = None,
|
|
384
|
+
next_token: Optional["capo_lambda_microvms.types.string.String"] = None,
|
|
385
|
+
) -> "AsyncIterator[capo_lambda_microvms.types.managed_microvm_image_summary.ManagedMicrovmImageSummary]":
|
|
386
|
+
_token = next_token
|
|
387
|
+
while True:
|
|
388
|
+
_response = await self.list_managed_microvm_images(
|
|
389
|
+
config_overrides=config_overrides,
|
|
390
|
+
max_results=max_results,
|
|
391
|
+
next_token=_token,
|
|
392
|
+
)
|
|
393
|
+
_page = _resolve_path(_response, ("items",))
|
|
394
|
+
for _item in _page or []:
|
|
395
|
+
yield _item
|
|
396
|
+
_token = _resolve_path(_response, ("next_token",))
|
|
397
|
+
if not _token:
|
|
398
|
+
break
|
|
399
|
+
|
|
400
|
+
async def list_tags(
|
|
401
|
+
self,
|
|
402
|
+
resource: "capo_lambda_microvms.types.taggable_resource.TaggableResource",
|
|
403
|
+
*,
|
|
404
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
405
|
+
) -> "capo_lambda_microvms.types.list_tags_response.ListTagsResponse":
|
|
406
|
+
"""<p>Lists the tags associated with a Lambda MicroVM resource.</p>
|
|
407
|
+
|
|
408
|
+
Args:
|
|
409
|
+
resource: <p>The ARN of the resource to list tags for.</p>
|
|
410
|
+
|
|
411
|
+
Raises:
|
|
412
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
413
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
414
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
415
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
416
|
+
capo_lambda_microvms.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
|
|
417
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
418
|
+
capo_lambda_microvms.errors.service_exception.ServiceException: <p>The AWS Lambda MicroVMs service encountered an internal error.</p>
|
|
419
|
+
capo_lambda_microvms.errors.too_many_requests_exception.TooManyRequestsException: <p>The request throughput limit was exceeded. Retry the request later.</p>
|
|
420
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
421
|
+
"""
|
|
422
|
+
|
|
423
|
+
async def _handler(
|
|
424
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.list_tags_request.ListTagsRequest]",
|
|
425
|
+
) -> AsyncOperationResponse[
|
|
426
|
+
"capo_lambda_microvms.types.list_tags_response.ListTagsResponse"
|
|
427
|
+
]:
|
|
428
|
+
import capo_lambda_microvms._operations.lambda_microvms.list_tags
|
|
429
|
+
|
|
430
|
+
(
|
|
431
|
+
output,
|
|
432
|
+
http_response,
|
|
433
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.list_tags.async_list_tags(
|
|
434
|
+
req.options, req.input
|
|
435
|
+
)
|
|
436
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
437
|
+
|
|
438
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
439
|
+
input_: capo_lambda_microvms.types.list_tags_request.ListTagsRequest = {
|
|
440
|
+
"resource": resource
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
response = await aexecute_pipeline(
|
|
444
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
445
|
+
handler=_handler,
|
|
446
|
+
interceptors=list(interceptors_),
|
|
447
|
+
)
|
|
448
|
+
await response.response.aclose()
|
|
449
|
+
return response.output
|
|
450
|
+
|
|
451
|
+
async def tag_resource(
|
|
452
|
+
self,
|
|
453
|
+
resource: "capo_lambda_microvms.types.taggable_resource.TaggableResource",
|
|
454
|
+
tags: "capo_lambda_microvms.types.tags.Tags",
|
|
455
|
+
*,
|
|
456
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
457
|
+
) -> None:
|
|
458
|
+
"""<p>Adds tags to a Lambda MicroVM resource.</p>
|
|
459
|
+
|
|
460
|
+
Args:
|
|
461
|
+
resource: <p>The ARN of the resource to tag.</p>
|
|
462
|
+
tags: <p>The key-value pairs of tags to add to the resource.</p>
|
|
463
|
+
|
|
464
|
+
Raises:
|
|
465
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
466
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
467
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
468
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
469
|
+
capo_lambda_microvms.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
|
|
470
|
+
capo_lambda_microvms.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
|
|
471
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
472
|
+
capo_lambda_microvms.errors.service_exception.ServiceException: <p>The AWS Lambda MicroVMs service encountered an internal error.</p>
|
|
473
|
+
capo_lambda_microvms.errors.too_many_requests_exception.TooManyRequestsException: <p>The request throughput limit was exceeded. Retry the request later.</p>
|
|
474
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
475
|
+
"""
|
|
476
|
+
|
|
477
|
+
async def _handler(
|
|
478
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.tag_resource_request.TagResourceRequest]",
|
|
479
|
+
) -> AsyncOperationResponse[None]:
|
|
480
|
+
import capo_lambda_microvms._operations.lambda_microvms.tag_resource
|
|
481
|
+
|
|
482
|
+
(
|
|
483
|
+
output,
|
|
484
|
+
http_response,
|
|
485
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.tag_resource.async_tag_resource(
|
|
486
|
+
req.options, req.input
|
|
487
|
+
)
|
|
488
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
489
|
+
|
|
490
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
491
|
+
input_: capo_lambda_microvms.types.tag_resource_request.TagResourceRequest = {
|
|
492
|
+
"resource": resource,
|
|
493
|
+
"tags": tags,
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
response = await aexecute_pipeline(
|
|
497
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
498
|
+
handler=_handler,
|
|
499
|
+
interceptors=list(interceptors_),
|
|
500
|
+
)
|
|
501
|
+
await response.response.aclose()
|
|
502
|
+
return response.output
|
|
503
|
+
|
|
504
|
+
async def untag_resource(
|
|
505
|
+
self,
|
|
506
|
+
resource: "capo_lambda_microvms.types.taggable_resource.TaggableResource",
|
|
507
|
+
tag_keys: "capo_lambda_microvms.types.tag_key_list.TagKeyList",
|
|
508
|
+
*,
|
|
509
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
510
|
+
) -> None:
|
|
511
|
+
"""<p>Removes tags from a Lambda MicroVM resource.</p>
|
|
512
|
+
|
|
513
|
+
Args:
|
|
514
|
+
resource: <p>The ARN of the resource to remove tags from.</p>
|
|
515
|
+
tag_keys: <p>The list of tag keys to remove from the resource.</p>
|
|
516
|
+
|
|
517
|
+
Raises:
|
|
518
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
519
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
520
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
521
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
522
|
+
capo_lambda_microvms.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
|
|
523
|
+
capo_lambda_microvms.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
|
|
524
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
525
|
+
capo_lambda_microvms.errors.service_exception.ServiceException: <p>The AWS Lambda MicroVMs service encountered an internal error.</p>
|
|
526
|
+
capo_lambda_microvms.errors.too_many_requests_exception.TooManyRequestsException: <p>The request throughput limit was exceeded. Retry the request later.</p>
|
|
527
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
528
|
+
"""
|
|
529
|
+
|
|
530
|
+
async def _handler(
|
|
531
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.untag_resource_request.UntagResourceRequest]",
|
|
532
|
+
) -> AsyncOperationResponse[None]:
|
|
533
|
+
import capo_lambda_microvms._operations.lambda_microvms.untag_resource
|
|
534
|
+
|
|
535
|
+
(
|
|
536
|
+
output,
|
|
537
|
+
http_response,
|
|
538
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.untag_resource.async_untag_resource(
|
|
539
|
+
req.options, req.input
|
|
540
|
+
)
|
|
541
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
542
|
+
|
|
543
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
544
|
+
input_: capo_lambda_microvms.types.untag_resource_request.UntagResourceRequest = {
|
|
545
|
+
"resource": resource,
|
|
546
|
+
"tag_keys": tag_keys,
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
response = await aexecute_pipeline(
|
|
550
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
551
|
+
handler=_handler,
|
|
552
|
+
interceptors=list(interceptors_),
|
|
553
|
+
)
|
|
554
|
+
await response.response.aclose()
|
|
555
|
+
return response.output
|
|
556
|
+
|
|
557
|
+
async def run_microvm(
|
|
558
|
+
self,
|
|
559
|
+
image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
|
|
560
|
+
*,
|
|
561
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
562
|
+
ingress_network_connectors: Optional[
|
|
563
|
+
"capo_lambda_microvms.types.network_connector_list.NetworkConnectorList"
|
|
564
|
+
] = None,
|
|
565
|
+
egress_network_connectors: Optional[
|
|
566
|
+
"capo_lambda_microvms.types.network_connector_list.NetworkConnectorList"
|
|
567
|
+
] = None,
|
|
568
|
+
image_version: Optional["capo_lambda_microvms.types.version.Version"] = None,
|
|
569
|
+
execution_role_arn: Optional[
|
|
570
|
+
"capo_lambda_microvms.types.role_arn.RoleArn"
|
|
571
|
+
] = None,
|
|
572
|
+
idle_policy: Optional[
|
|
573
|
+
"capo_lambda_microvms.types.idle_policy.IdlePolicy"
|
|
574
|
+
] = None,
|
|
575
|
+
logging: Optional["capo_lambda_microvms.types.logging.Logging"] = None,
|
|
576
|
+
run_hook_payload: Optional[
|
|
577
|
+
"capo_lambda_microvms.types.run_hook_payload.RunHookPayload"
|
|
578
|
+
] = None,
|
|
579
|
+
maximum_duration_in_seconds: Optional[int] = None,
|
|
580
|
+
client_token: Optional[str] = None,
|
|
581
|
+
) -> "capo_lambda_microvms.types.run_microvm_response.RunMicrovmResponse":
|
|
582
|
+
r"""<p>Runs a new MicroVM from the specified image. The MicroVM starts in PENDING state and transitions to RUNNING once provisioning completes. To connect, generate an authentication token using CreateMicrovmAuthToken.</p>
|
|
583
|
+
|
|
584
|
+
Args:
|
|
585
|
+
ingress_network_connectors: <p>The list of ingress network connectors to configure for the MicroVM.</p>
|
|
586
|
+
egress_network_connectors: <p>The list of egress network connectors to configure for the MicroVM.</p>
|
|
587
|
+
image_identifier: <p>The identifier (ARN or ID) of the MicroVM image to run.</p>
|
|
588
|
+
image_version: <p>The version of the MicroVM image to run.</p>
|
|
589
|
+
execution_role_arn: <p>The ARN of the IAM role to be assumed by the MicroVM during execution.</p>
|
|
590
|
+
idle_policy: <p>Configuration to control auto-suspend and auto-resume behavior.</p>
|
|
591
|
+
logging: <p>The logging configuration for this MicroVM instance. Specify {\"cloudWatch\": {\"logGroup\": \"...\"}} to stream application logs to a custom CloudWatch log group, or {\"disabled\": {}} to turn off logging.</p>
|
|
592
|
+
run_hook_payload: <p>Per-MicroVM initialization data delivered as the request body of the /run lifecycle hook. Use to pass tenant-specific configuration such as session IDs or secret references. Maximum: 16,384 bytes.</p>
|
|
593
|
+
maximum_duration_in_seconds: <p>The maximum duration in seconds that the MicroVM can exist before being terminated by the platform. Valid range: 1–28,800 (8 hours).</p>
|
|
594
|
+
client_token: <p>A unique, case-sensitive identifier you provide to ensure the idempotency of the request.</p>
|
|
595
|
+
|
|
596
|
+
Raises:
|
|
597
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
598
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
599
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
600
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
601
|
+
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>
|
|
602
|
+
capo_lambda_microvms.errors.insufficient_capacity_exception.InsufficientCapacityException: <p>There is insufficient capacity to fulfill the request. Retry the request later.</p>
|
|
603
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
604
|
+
capo_lambda_microvms.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>You have exceeded a service quota for Lambda MicroVMs.</p>
|
|
605
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
606
|
+
"""
|
|
607
|
+
|
|
608
|
+
async def _handler(
|
|
609
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.run_microvm_request.RunMicrovmRequest]",
|
|
610
|
+
) -> AsyncOperationResponse[
|
|
611
|
+
"capo_lambda_microvms.types.run_microvm_response.RunMicrovmResponse"
|
|
612
|
+
]:
|
|
613
|
+
import capo_lambda_microvms._operations.lambda_microvms.run_microvm
|
|
614
|
+
|
|
615
|
+
(
|
|
616
|
+
output,
|
|
617
|
+
http_response,
|
|
618
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.run_microvm.async_run_microvm(
|
|
619
|
+
req.options, req.input
|
|
620
|
+
)
|
|
621
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
622
|
+
|
|
623
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
624
|
+
input_: capo_lambda_microvms.types.run_microvm_request.RunMicrovmRequest = {
|
|
625
|
+
"image_identifier": image_identifier
|
|
626
|
+
}
|
|
627
|
+
if ingress_network_connectors is not None:
|
|
628
|
+
input_["ingress_network_connectors"] = ingress_network_connectors
|
|
629
|
+
if egress_network_connectors is not None:
|
|
630
|
+
input_["egress_network_connectors"] = egress_network_connectors
|
|
631
|
+
if image_version is not None:
|
|
632
|
+
input_["image_version"] = image_version
|
|
633
|
+
if execution_role_arn is not None:
|
|
634
|
+
input_["execution_role_arn"] = execution_role_arn
|
|
635
|
+
if idle_policy is not None:
|
|
636
|
+
input_["idle_policy"] = idle_policy
|
|
637
|
+
if logging is not None:
|
|
638
|
+
input_["logging"] = logging
|
|
639
|
+
if run_hook_payload is not None:
|
|
640
|
+
input_["run_hook_payload"] = run_hook_payload
|
|
641
|
+
if maximum_duration_in_seconds is not None:
|
|
642
|
+
input_["maximum_duration_in_seconds"] = maximum_duration_in_seconds
|
|
643
|
+
if client_token is None:
|
|
644
|
+
client_token = str(uuid.uuid4())
|
|
645
|
+
input_["client_token"] = client_token
|
|
646
|
+
|
|
647
|
+
response = await aexecute_pipeline(
|
|
648
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
649
|
+
handler=_handler,
|
|
650
|
+
interceptors=list(interceptors_),
|
|
651
|
+
)
|
|
652
|
+
await response.response.aclose()
|
|
653
|
+
return response.output
|
|
654
|
+
|
|
655
|
+
async def get_microvm(
|
|
656
|
+
self,
|
|
657
|
+
microvm_identifier: "capo_lambda_microvms.types.microvm_identifier.MicrovmIdentifier",
|
|
658
|
+
*,
|
|
659
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
660
|
+
) -> "capo_lambda_microvms.types.get_microvm_response.GetMicrovmResponse":
|
|
661
|
+
"""<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>
|
|
662
|
+
|
|
663
|
+
Args:
|
|
664
|
+
microvm_identifier: <p>The ID of the MicroVM to retrieve.</p>
|
|
665
|
+
|
|
666
|
+
Raises:
|
|
667
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
668
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
669
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
670
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
671
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
672
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
673
|
+
"""
|
|
674
|
+
|
|
675
|
+
async def _handler(
|
|
676
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.get_microvm_request.GetMicrovmRequest]",
|
|
677
|
+
) -> AsyncOperationResponse[
|
|
678
|
+
"capo_lambda_microvms.types.get_microvm_response.GetMicrovmResponse"
|
|
679
|
+
]:
|
|
680
|
+
import capo_lambda_microvms._operations.lambda_microvms.get_microvm
|
|
681
|
+
|
|
682
|
+
(
|
|
683
|
+
output,
|
|
684
|
+
http_response,
|
|
685
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.get_microvm.async_get_microvm(
|
|
686
|
+
req.options, req.input
|
|
687
|
+
)
|
|
688
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
689
|
+
|
|
690
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
691
|
+
input_: capo_lambda_microvms.types.get_microvm_request.GetMicrovmRequest = {
|
|
692
|
+
"microvm_identifier": microvm_identifier
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
response = await aexecute_pipeline(
|
|
696
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
697
|
+
handler=_handler,
|
|
698
|
+
interceptors=list(interceptors_),
|
|
699
|
+
)
|
|
700
|
+
await response.response.aclose()
|
|
701
|
+
return response.output
|
|
702
|
+
|
|
703
|
+
async def terminate_microvm(
|
|
704
|
+
self,
|
|
705
|
+
microvm_identifier: "capo_lambda_microvms.types.microvm_identifier.MicrovmIdentifier",
|
|
706
|
+
*,
|
|
707
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
708
|
+
) -> (
|
|
709
|
+
"capo_lambda_microvms.types.terminate_microvm_response.TerminateMicrovmResponse"
|
|
710
|
+
):
|
|
711
|
+
"""<p>Terminates a MicroVM. This operation is idempotent; terminating a MicroVM that has already been terminated succeeds without error.</p>
|
|
712
|
+
|
|
713
|
+
Args:
|
|
714
|
+
microvm_identifier: <p>The ID of the MicroVM to terminate.</p>
|
|
715
|
+
|
|
716
|
+
Raises:
|
|
717
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
718
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
719
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
720
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
721
|
+
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>
|
|
722
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
723
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
724
|
+
"""
|
|
725
|
+
|
|
726
|
+
async def _handler(
|
|
727
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.terminate_microvm_request.TerminateMicrovmRequest]",
|
|
728
|
+
) -> AsyncOperationResponse[
|
|
729
|
+
"capo_lambda_microvms.types.terminate_microvm_response.TerminateMicrovmResponse"
|
|
730
|
+
]:
|
|
731
|
+
import capo_lambda_microvms._operations.lambda_microvms.terminate_microvm
|
|
732
|
+
|
|
733
|
+
(
|
|
734
|
+
output,
|
|
735
|
+
http_response,
|
|
736
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.terminate_microvm.async_terminate_microvm(
|
|
737
|
+
req.options, req.input
|
|
738
|
+
)
|
|
739
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
740
|
+
|
|
741
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
742
|
+
input_: capo_lambda_microvms.types.terminate_microvm_request.TerminateMicrovmRequest = {
|
|
743
|
+
"microvm_identifier": microvm_identifier
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
response = await aexecute_pipeline(
|
|
747
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
748
|
+
handler=_handler,
|
|
749
|
+
interceptors=list(interceptors_),
|
|
750
|
+
)
|
|
751
|
+
await response.response.aclose()
|
|
752
|
+
return response.output
|
|
753
|
+
|
|
754
|
+
async def list_microvms(
|
|
755
|
+
self,
|
|
756
|
+
*,
|
|
757
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
758
|
+
max_results: Optional[int] = None,
|
|
759
|
+
next_token: Optional["capo_lambda_microvms.types.string.String"] = None,
|
|
760
|
+
image_identifier: Optional[
|
|
761
|
+
"capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier"
|
|
762
|
+
] = None,
|
|
763
|
+
image_version: Optional[str] = None,
|
|
764
|
+
) -> "capo_lambda_microvms.types.list_microvms_response.ListMicrovmsResponse":
|
|
765
|
+
"""<p>Lists MicroVMs in the account with optional filtering by image and version. We recommend using pagination to ensure that the operation returns quickly and successfully.</p>
|
|
766
|
+
|
|
767
|
+
Args:
|
|
768
|
+
max_results: <p>The maximum number of results to return in a single call.</p>
|
|
769
|
+
next_token: <p>The pagination token from a previous call. Use this token to retrieve the next page of results.</p>
|
|
770
|
+
image_identifier: <p>Optional filter to list only MicroVMs running the specified image.</p>
|
|
771
|
+
image_version: <p>Optional filter to list only MicroVMs running the specified image version.</p>
|
|
772
|
+
|
|
773
|
+
Raises:
|
|
774
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
775
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
776
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
777
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
778
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
779
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
780
|
+
"""
|
|
781
|
+
|
|
782
|
+
async def _handler(
|
|
783
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.list_microvms_request.ListMicrovmsRequest]",
|
|
784
|
+
) -> AsyncOperationResponse[
|
|
785
|
+
"capo_lambda_microvms.types.list_microvms_response.ListMicrovmsResponse"
|
|
786
|
+
]:
|
|
787
|
+
import capo_lambda_microvms._operations.lambda_microvms.list_microvms
|
|
788
|
+
|
|
789
|
+
(
|
|
790
|
+
output,
|
|
791
|
+
http_response,
|
|
792
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.list_microvms.async_list_microvms(
|
|
793
|
+
req.options, req.input
|
|
794
|
+
)
|
|
795
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
796
|
+
|
|
797
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
798
|
+
input_: capo_lambda_microvms.types.list_microvms_request.ListMicrovmsRequest = {}
|
|
799
|
+
if max_results is not None:
|
|
800
|
+
input_["max_results"] = max_results
|
|
801
|
+
if next_token is not None:
|
|
802
|
+
input_["next_token"] = next_token
|
|
803
|
+
if image_identifier is not None:
|
|
804
|
+
input_["image_identifier"] = image_identifier
|
|
805
|
+
if image_version is not None:
|
|
806
|
+
input_["image_version"] = image_version
|
|
807
|
+
|
|
808
|
+
response = await aexecute_pipeline(
|
|
809
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
810
|
+
handler=_handler,
|
|
811
|
+
interceptors=list(interceptors_),
|
|
812
|
+
)
|
|
813
|
+
await response.response.aclose()
|
|
814
|
+
return response.output
|
|
815
|
+
|
|
816
|
+
async def iter_list_microvms(
|
|
817
|
+
self,
|
|
818
|
+
*,
|
|
819
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
820
|
+
max_results: Optional[int] = None,
|
|
821
|
+
next_token: Optional["capo_lambda_microvms.types.string.String"] = None,
|
|
822
|
+
image_identifier: Optional[
|
|
823
|
+
"capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier"
|
|
824
|
+
] = None,
|
|
825
|
+
image_version: Optional[str] = None,
|
|
826
|
+
) -> "AsyncIterator[capo_lambda_microvms.types.microvm_item.MicrovmItem]":
|
|
827
|
+
_token = next_token
|
|
828
|
+
while True:
|
|
829
|
+
_response = await self.list_microvms(
|
|
830
|
+
config_overrides=config_overrides,
|
|
831
|
+
max_results=max_results,
|
|
832
|
+
next_token=_token,
|
|
833
|
+
image_identifier=image_identifier,
|
|
834
|
+
image_version=image_version,
|
|
835
|
+
)
|
|
836
|
+
_page = _resolve_path(_response, ("items",))
|
|
837
|
+
for _item in _page or []:
|
|
838
|
+
yield _item
|
|
839
|
+
_token = _resolve_path(_response, ("next_token",))
|
|
840
|
+
if not _token:
|
|
841
|
+
break
|
|
842
|
+
|
|
843
|
+
async def create_microvm_auth_token(
|
|
844
|
+
self,
|
|
845
|
+
microvm_identifier: "capo_lambda_microvms.types.microvm_identifier.MicrovmIdentifier",
|
|
846
|
+
expiration_in_minutes: "capo_lambda_microvms.types.positive_integer.PositiveInteger",
|
|
847
|
+
allowed_ports: "capo_lambda_microvms.types.list_of_port_specification.ListOfPortSpecification",
|
|
848
|
+
*,
|
|
849
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
850
|
+
) -> "capo_lambda_microvms.types.create_microvm_auth_token_response.CreateMicrovmAuthTokenResponse":
|
|
851
|
+
"""<p>Creates an authentication token for accessing a running MicroVM. The token grants access to the specified ports on the MicroVM endpoint.</p>
|
|
852
|
+
|
|
853
|
+
Args:
|
|
854
|
+
microvm_identifier: <p>The ID of the MicroVM to create an authentication token for.</p>
|
|
855
|
+
expiration_in_minutes: <p>The duration in minutes before the authentication token expires. Maximum: 60 minutes.</p>
|
|
856
|
+
allowed_ports: <p>The list of port specifications that the authentication token grants access to on the MicroVM.</p>
|
|
857
|
+
|
|
858
|
+
Raises:
|
|
859
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
860
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
861
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
862
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
863
|
+
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>
|
|
864
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
865
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
866
|
+
"""
|
|
867
|
+
|
|
868
|
+
async def _handler(
|
|
869
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.create_microvm_auth_token_request.CreateMicrovmAuthTokenRequest]",
|
|
870
|
+
) -> AsyncOperationResponse[
|
|
871
|
+
"capo_lambda_microvms.types.create_microvm_auth_token_response.CreateMicrovmAuthTokenResponse"
|
|
872
|
+
]:
|
|
873
|
+
import capo_lambda_microvms._operations.lambda_microvms.create_microvm_auth_token
|
|
874
|
+
|
|
875
|
+
(
|
|
876
|
+
output,
|
|
877
|
+
http_response,
|
|
878
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.create_microvm_auth_token.async_create_microvm_auth_token(
|
|
879
|
+
req.options, req.input
|
|
880
|
+
)
|
|
881
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
882
|
+
|
|
883
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
884
|
+
input_: capo_lambda_microvms.types.create_microvm_auth_token_request.CreateMicrovmAuthTokenRequest = {
|
|
885
|
+
"microvm_identifier": microvm_identifier,
|
|
886
|
+
"expiration_in_minutes": expiration_in_minutes,
|
|
887
|
+
"allowed_ports": allowed_ports,
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
response = await aexecute_pipeline(
|
|
891
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
892
|
+
handler=_handler,
|
|
893
|
+
interceptors=list(interceptors_),
|
|
894
|
+
)
|
|
895
|
+
await response.response.aclose()
|
|
896
|
+
return response.output
|
|
897
|
+
|
|
898
|
+
async def create_microvm_shell_auth_token(
|
|
899
|
+
self,
|
|
900
|
+
microvm_identifier: "capo_lambda_microvms.types.microvm_identifier.MicrovmIdentifier",
|
|
901
|
+
expiration_in_minutes: "capo_lambda_microvms.types.positive_integer.PositiveInteger",
|
|
902
|
+
*,
|
|
903
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
904
|
+
) -> "capo_lambda_microvms.types.create_microvm_shell_auth_token_response.CreateMicrovmShellAuthTokenResponse":
|
|
905
|
+
"""<p>Creates a shell authentication token for interactive shell access to a running MicroVM. The MicroVM must have been run with the SHELL_INGRESS network connector attached.</p>
|
|
906
|
+
|
|
907
|
+
Args:
|
|
908
|
+
microvm_identifier: <p>The ID of the MicroVM to create a shell authentication token for.</p>
|
|
909
|
+
expiration_in_minutes: <p>The duration in minutes before the shell authentication token expires.</p>
|
|
910
|
+
|
|
911
|
+
Raises:
|
|
912
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
913
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
914
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
915
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
916
|
+
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>
|
|
917
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
918
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
919
|
+
"""
|
|
920
|
+
|
|
921
|
+
async def _handler(
|
|
922
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.create_microvm_shell_auth_token_request.CreateMicrovmShellAuthTokenRequest]",
|
|
923
|
+
) -> AsyncOperationResponse[
|
|
924
|
+
"capo_lambda_microvms.types.create_microvm_shell_auth_token_response.CreateMicrovmShellAuthTokenResponse"
|
|
925
|
+
]:
|
|
926
|
+
import capo_lambda_microvms._operations.lambda_microvms.create_microvm_shell_auth_token
|
|
927
|
+
|
|
928
|
+
(
|
|
929
|
+
output,
|
|
930
|
+
http_response,
|
|
931
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.create_microvm_shell_auth_token.async_create_microvm_shell_auth_token(
|
|
932
|
+
req.options, req.input
|
|
933
|
+
)
|
|
934
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
935
|
+
|
|
936
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
937
|
+
input_: capo_lambda_microvms.types.create_microvm_shell_auth_token_request.CreateMicrovmShellAuthTokenRequest = {
|
|
938
|
+
"microvm_identifier": microvm_identifier,
|
|
939
|
+
"expiration_in_minutes": expiration_in_minutes,
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
response = await aexecute_pipeline(
|
|
943
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
944
|
+
handler=_handler,
|
|
945
|
+
interceptors=list(interceptors_),
|
|
946
|
+
)
|
|
947
|
+
await response.response.aclose()
|
|
948
|
+
return response.output
|
|
949
|
+
|
|
950
|
+
async def resume_microvm(
|
|
951
|
+
self,
|
|
952
|
+
microvm_identifier: "capo_lambda_microvms.types.microvm_identifier.MicrovmIdentifier",
|
|
953
|
+
*,
|
|
954
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
955
|
+
) -> "capo_lambda_microvms.types.resume_microvm_response.ResumeMicrovmResponse":
|
|
956
|
+
"""<p>Resumes a suspended MicroVM, restoring it to RUNNING state with all state intact. The MicroVM must be in SUSPENDED state.</p>
|
|
957
|
+
|
|
958
|
+
Args:
|
|
959
|
+
microvm_identifier: <p>The ID of the MicroVM to resume.</p>
|
|
960
|
+
|
|
961
|
+
Raises:
|
|
962
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
963
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
964
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
965
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
966
|
+
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>
|
|
967
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
968
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
969
|
+
"""
|
|
970
|
+
|
|
971
|
+
async def _handler(
|
|
972
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.resume_microvm_request.ResumeMicrovmRequest]",
|
|
973
|
+
) -> AsyncOperationResponse[
|
|
974
|
+
"capo_lambda_microvms.types.resume_microvm_response.ResumeMicrovmResponse"
|
|
975
|
+
]:
|
|
976
|
+
import capo_lambda_microvms._operations.lambda_microvms.resume_microvm
|
|
977
|
+
|
|
978
|
+
(
|
|
979
|
+
output,
|
|
980
|
+
http_response,
|
|
981
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.resume_microvm.async_resume_microvm(
|
|
982
|
+
req.options, req.input
|
|
983
|
+
)
|
|
984
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
985
|
+
|
|
986
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
987
|
+
input_: capo_lambda_microvms.types.resume_microvm_request.ResumeMicrovmRequest = {
|
|
988
|
+
"microvm_identifier": microvm_identifier
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
response = await aexecute_pipeline(
|
|
992
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
993
|
+
handler=_handler,
|
|
994
|
+
interceptors=list(interceptors_),
|
|
995
|
+
)
|
|
996
|
+
await response.response.aclose()
|
|
997
|
+
return response.output
|
|
998
|
+
|
|
999
|
+
async def suspend_microvm(
|
|
1000
|
+
self,
|
|
1001
|
+
microvm_identifier: "capo_lambda_microvms.types.microvm_identifier.MicrovmIdentifier",
|
|
1002
|
+
*,
|
|
1003
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
1004
|
+
) -> "capo_lambda_microvms.types.suspend_microvm_response.SuspendMicrovmResponse":
|
|
1005
|
+
"""<p>Suspends a running MicroVM, preserving its full memory and disk state. The MicroVM transitions through SUSPENDING to SUSPENDED. To restore, call ResumeMicrovm or send traffic to the endpoint if autoResumeEnabled is true.</p>
|
|
1006
|
+
|
|
1007
|
+
Args:
|
|
1008
|
+
microvm_identifier: <p>The ID of the MicroVM to suspend.</p>
|
|
1009
|
+
|
|
1010
|
+
Raises:
|
|
1011
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
1012
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
1013
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
1014
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
1015
|
+
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>
|
|
1016
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
1017
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
1018
|
+
"""
|
|
1019
|
+
|
|
1020
|
+
async def _handler(
|
|
1021
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.suspend_microvm_request.SuspendMicrovmRequest]",
|
|
1022
|
+
) -> AsyncOperationResponse[
|
|
1023
|
+
"capo_lambda_microvms.types.suspend_microvm_response.SuspendMicrovmResponse"
|
|
1024
|
+
]:
|
|
1025
|
+
import capo_lambda_microvms._operations.lambda_microvms.suspend_microvm
|
|
1026
|
+
|
|
1027
|
+
(
|
|
1028
|
+
output,
|
|
1029
|
+
http_response,
|
|
1030
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.suspend_microvm.async_suspend_microvm(
|
|
1031
|
+
req.options, req.input
|
|
1032
|
+
)
|
|
1033
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
1034
|
+
|
|
1035
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
1036
|
+
input_: capo_lambda_microvms.types.suspend_microvm_request.SuspendMicrovmRequest = {
|
|
1037
|
+
"microvm_identifier": microvm_identifier
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
response = await aexecute_pipeline(
|
|
1041
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
1042
|
+
handler=_handler,
|
|
1043
|
+
interceptors=list(interceptors_),
|
|
1044
|
+
)
|
|
1045
|
+
await response.response.aclose()
|
|
1046
|
+
return response.output
|
|
1047
|
+
|
|
1048
|
+
async def get_microvm_image(
|
|
1049
|
+
self,
|
|
1050
|
+
image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
|
|
1051
|
+
*,
|
|
1052
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
1053
|
+
) -> "capo_lambda_microvms.types.get_microvm_image_output.GetMicrovmImageOutput":
|
|
1054
|
+
"""<p>Retrieves the details of a MicroVM image, including its state, versions, and configuration.</p>
|
|
1055
|
+
|
|
1056
|
+
Args:
|
|
1057
|
+
image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image to retrieve.</p>
|
|
1058
|
+
|
|
1059
|
+
Raises:
|
|
1060
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
1061
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
1062
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
1063
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
1064
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
1065
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
1066
|
+
"""
|
|
1067
|
+
|
|
1068
|
+
async def _handler(
|
|
1069
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.get_microvm_image_input.GetMicrovmImageInput]",
|
|
1070
|
+
) -> AsyncOperationResponse[
|
|
1071
|
+
"capo_lambda_microvms.types.get_microvm_image_output.GetMicrovmImageOutput"
|
|
1072
|
+
]:
|
|
1073
|
+
import capo_lambda_microvms._operations.lambda_microvms.get_microvm_image
|
|
1074
|
+
|
|
1075
|
+
(
|
|
1076
|
+
output,
|
|
1077
|
+
http_response,
|
|
1078
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.get_microvm_image.async_get_microvm_image(
|
|
1079
|
+
req.options, req.input
|
|
1080
|
+
)
|
|
1081
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
1082
|
+
|
|
1083
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
1084
|
+
input_: capo_lambda_microvms.types.get_microvm_image_input.GetMicrovmImageInput = {
|
|
1085
|
+
"image_identifier": image_identifier
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
response = await aexecute_pipeline(
|
|
1089
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
1090
|
+
handler=_handler,
|
|
1091
|
+
interceptors=list(interceptors_),
|
|
1092
|
+
)
|
|
1093
|
+
await response.response.aclose()
|
|
1094
|
+
return response.output
|
|
1095
|
+
|
|
1096
|
+
async def delete_microvm_image(
|
|
1097
|
+
self,
|
|
1098
|
+
image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
|
|
1099
|
+
*,
|
|
1100
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
1101
|
+
) -> "capo_lambda_microvms.types.delete_microvm_image_output.DeleteMicrovmImageOutput":
|
|
1102
|
+
"""<p>Deletes a MicroVM image. This operation is idempotent; deleting an image that has already been deleted succeeds without error.</p>
|
|
1103
|
+
|
|
1104
|
+
Args:
|
|
1105
|
+
image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image to delete.</p>
|
|
1106
|
+
|
|
1107
|
+
Raises:
|
|
1108
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
1109
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
1110
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
1111
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
1112
|
+
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>
|
|
1113
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
1114
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
1115
|
+
"""
|
|
1116
|
+
|
|
1117
|
+
async def _handler(
|
|
1118
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.delete_microvm_image_input.DeleteMicrovmImageInput]",
|
|
1119
|
+
) -> AsyncOperationResponse[
|
|
1120
|
+
"capo_lambda_microvms.types.delete_microvm_image_output.DeleteMicrovmImageOutput"
|
|
1121
|
+
]:
|
|
1122
|
+
import capo_lambda_microvms._operations.lambda_microvms.delete_microvm_image
|
|
1123
|
+
|
|
1124
|
+
(
|
|
1125
|
+
output,
|
|
1126
|
+
http_response,
|
|
1127
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.delete_microvm_image.async_delete_microvm_image(
|
|
1128
|
+
req.options, req.input
|
|
1129
|
+
)
|
|
1130
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
1131
|
+
|
|
1132
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
1133
|
+
input_: capo_lambda_microvms.types.delete_microvm_image_input.DeleteMicrovmImageInput = {
|
|
1134
|
+
"image_identifier": image_identifier
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
response = await aexecute_pipeline(
|
|
1138
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
1139
|
+
handler=_handler,
|
|
1140
|
+
interceptors=list(interceptors_),
|
|
1141
|
+
)
|
|
1142
|
+
await response.response.aclose()
|
|
1143
|
+
return response.output
|
|
1144
|
+
|
|
1145
|
+
async def list_microvm_images(
|
|
1146
|
+
self,
|
|
1147
|
+
*,
|
|
1148
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
1149
|
+
max_results: Optional[int] = None,
|
|
1150
|
+
next_token: Optional["capo_lambda_microvms.types.string.String"] = None,
|
|
1151
|
+
name_filter: Optional[
|
|
1152
|
+
"capo_lambda_microvms.types.non_blank_string.NonBlankString"
|
|
1153
|
+
] = None,
|
|
1154
|
+
) -> "capo_lambda_microvms.types.list_microvm_images_response.ListMicrovmImagesResponse":
|
|
1155
|
+
"""<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>
|
|
1156
|
+
|
|
1157
|
+
Args:
|
|
1158
|
+
max_results: <p>The maximum number of results to return in a single call.</p>
|
|
1159
|
+
next_token: <p>The pagination token from a previous call. Use this token to retrieve the next page of results.</p>
|
|
1160
|
+
name_filter: <p>Filters images whose name contains the specified string.</p>
|
|
1161
|
+
|
|
1162
|
+
Raises:
|
|
1163
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
1164
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
1165
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
1166
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
1167
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
1168
|
+
"""
|
|
1169
|
+
|
|
1170
|
+
async def _handler(
|
|
1171
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.list_microvm_images_request.ListMicrovmImagesRequest]",
|
|
1172
|
+
) -> AsyncOperationResponse[
|
|
1173
|
+
"capo_lambda_microvms.types.list_microvm_images_response.ListMicrovmImagesResponse"
|
|
1174
|
+
]:
|
|
1175
|
+
import capo_lambda_microvms._operations.lambda_microvms.list_microvm_images
|
|
1176
|
+
|
|
1177
|
+
(
|
|
1178
|
+
output,
|
|
1179
|
+
http_response,
|
|
1180
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.list_microvm_images.async_list_microvm_images(
|
|
1181
|
+
req.options, req.input
|
|
1182
|
+
)
|
|
1183
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
1184
|
+
|
|
1185
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
1186
|
+
input_: capo_lambda_microvms.types.list_microvm_images_request.ListMicrovmImagesRequest = {}
|
|
1187
|
+
if max_results is not None:
|
|
1188
|
+
input_["max_results"] = max_results
|
|
1189
|
+
if next_token is not None:
|
|
1190
|
+
input_["next_token"] = next_token
|
|
1191
|
+
if name_filter is not None:
|
|
1192
|
+
input_["name_filter"] = name_filter
|
|
1193
|
+
|
|
1194
|
+
response = await aexecute_pipeline(
|
|
1195
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
1196
|
+
handler=_handler,
|
|
1197
|
+
interceptors=list(interceptors_),
|
|
1198
|
+
)
|
|
1199
|
+
await response.response.aclose()
|
|
1200
|
+
return response.output
|
|
1201
|
+
|
|
1202
|
+
async def iter_list_microvm_images(
|
|
1203
|
+
self,
|
|
1204
|
+
*,
|
|
1205
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
1206
|
+
max_results: Optional[int] = None,
|
|
1207
|
+
next_token: Optional["capo_lambda_microvms.types.string.String"] = None,
|
|
1208
|
+
name_filter: Optional[
|
|
1209
|
+
"capo_lambda_microvms.types.non_blank_string.NonBlankString"
|
|
1210
|
+
] = None,
|
|
1211
|
+
) -> "AsyncIterator[capo_lambda_microvms.types.microvm_image_summary.MicrovmImageSummary]":
|
|
1212
|
+
_token = next_token
|
|
1213
|
+
while True:
|
|
1214
|
+
_response = await self.list_microvm_images(
|
|
1215
|
+
config_overrides=config_overrides,
|
|
1216
|
+
max_results=max_results,
|
|
1217
|
+
next_token=_token,
|
|
1218
|
+
name_filter=name_filter,
|
|
1219
|
+
)
|
|
1220
|
+
_page = _resolve_path(_response, ("items",))
|
|
1221
|
+
for _item in _page or []:
|
|
1222
|
+
yield _item
|
|
1223
|
+
_token = _resolve_path(_response, ("next_token",))
|
|
1224
|
+
if not _token:
|
|
1225
|
+
break
|
|
1226
|
+
|
|
1227
|
+
async def delete_microvm_image_version(
|
|
1228
|
+
self,
|
|
1229
|
+
image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
|
|
1230
|
+
image_version: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
|
|
1231
|
+
*,
|
|
1232
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
1233
|
+
) -> "capo_lambda_microvms.types.delete_microvm_image_version_output.DeleteMicrovmImageVersionOutput":
|
|
1234
|
+
"""<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>
|
|
1235
|
+
|
|
1236
|
+
Args:
|
|
1237
|
+
image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image.</p>
|
|
1238
|
+
image_version: <p>The version of the MicroVM image to delete.</p>
|
|
1239
|
+
|
|
1240
|
+
Raises:
|
|
1241
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
1242
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
1243
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
1244
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
1245
|
+
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>
|
|
1246
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
1247
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
1248
|
+
"""
|
|
1249
|
+
|
|
1250
|
+
async def _handler(
|
|
1251
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.delete_microvm_image_version_input.DeleteMicrovmImageVersionInput]",
|
|
1252
|
+
) -> AsyncOperationResponse[
|
|
1253
|
+
"capo_lambda_microvms.types.delete_microvm_image_version_output.DeleteMicrovmImageVersionOutput"
|
|
1254
|
+
]:
|
|
1255
|
+
import capo_lambda_microvms._operations.lambda_microvms.delete_microvm_image_version
|
|
1256
|
+
|
|
1257
|
+
(
|
|
1258
|
+
output,
|
|
1259
|
+
http_response,
|
|
1260
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.delete_microvm_image_version.async_delete_microvm_image_version(
|
|
1261
|
+
req.options, req.input
|
|
1262
|
+
)
|
|
1263
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
1264
|
+
|
|
1265
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
1266
|
+
input_: capo_lambda_microvms.types.delete_microvm_image_version_input.DeleteMicrovmImageVersionInput = {
|
|
1267
|
+
"image_identifier": image_identifier,
|
|
1268
|
+
"image_version": image_version,
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
response = await aexecute_pipeline(
|
|
1272
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
1273
|
+
handler=_handler,
|
|
1274
|
+
interceptors=list(interceptors_),
|
|
1275
|
+
)
|
|
1276
|
+
await response.response.aclose()
|
|
1277
|
+
return response.output
|
|
1278
|
+
|
|
1279
|
+
async def get_microvm_image_build(
|
|
1280
|
+
self,
|
|
1281
|
+
image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
|
|
1282
|
+
image_version: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
|
|
1283
|
+
build_id: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
|
|
1284
|
+
*,
|
|
1285
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
1286
|
+
) -> "capo_lambda_microvms.types.get_microvm_image_build_output.GetMicrovmImageBuildOutput":
|
|
1287
|
+
"""<p>Retrieves the details of a specific MicroVM image build, including its state, target architecture, and snapshot information.</p>
|
|
1288
|
+
|
|
1289
|
+
Args:
|
|
1290
|
+
image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image.</p>
|
|
1291
|
+
image_version: <p>The version of the MicroVM image.</p>
|
|
1292
|
+
build_id: <p>The unique identifier of the build to retrieve.</p>
|
|
1293
|
+
|
|
1294
|
+
Raises:
|
|
1295
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
1296
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
1297
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
1298
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
1299
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
1300
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
1301
|
+
"""
|
|
1302
|
+
|
|
1303
|
+
async def _handler(
|
|
1304
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.get_microvm_image_build_input.GetMicrovmImageBuildInput]",
|
|
1305
|
+
) -> AsyncOperationResponse[
|
|
1306
|
+
"capo_lambda_microvms.types.get_microvm_image_build_output.GetMicrovmImageBuildOutput"
|
|
1307
|
+
]:
|
|
1308
|
+
import capo_lambda_microvms._operations.lambda_microvms.get_microvm_image_build
|
|
1309
|
+
|
|
1310
|
+
(
|
|
1311
|
+
output,
|
|
1312
|
+
http_response,
|
|
1313
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.get_microvm_image_build.async_get_microvm_image_build(
|
|
1314
|
+
req.options, req.input
|
|
1315
|
+
)
|
|
1316
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
1317
|
+
|
|
1318
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
1319
|
+
input_: capo_lambda_microvms.types.get_microvm_image_build_input.GetMicrovmImageBuildInput = {
|
|
1320
|
+
"image_identifier": image_identifier,
|
|
1321
|
+
"image_version": image_version,
|
|
1322
|
+
"build_id": build_id,
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
response = await aexecute_pipeline(
|
|
1326
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
1327
|
+
handler=_handler,
|
|
1328
|
+
interceptors=list(interceptors_),
|
|
1329
|
+
)
|
|
1330
|
+
await response.response.aclose()
|
|
1331
|
+
return response.output
|
|
1332
|
+
|
|
1333
|
+
async def get_microvm_image_version(
|
|
1334
|
+
self,
|
|
1335
|
+
image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
|
|
1336
|
+
image_version: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
|
|
1337
|
+
*,
|
|
1338
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
1339
|
+
) -> "capo_lambda_microvms.types.get_microvm_image_version_output.GetMicrovmImageVersionOutput":
|
|
1340
|
+
"""<p>Retrieves the details of a specific version of a MicroVM image, including its configuration, state, and build information.</p>
|
|
1341
|
+
|
|
1342
|
+
Args:
|
|
1343
|
+
image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image.</p>
|
|
1344
|
+
image_version: <p>The version of the MicroVM image to retrieve.</p>
|
|
1345
|
+
|
|
1346
|
+
Raises:
|
|
1347
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
1348
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
1349
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
1350
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
1351
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
1352
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
1353
|
+
"""
|
|
1354
|
+
|
|
1355
|
+
async def _handler(
|
|
1356
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.get_microvm_image_version_input.GetMicrovmImageVersionInput]",
|
|
1357
|
+
) -> AsyncOperationResponse[
|
|
1358
|
+
"capo_lambda_microvms.types.get_microvm_image_version_output.GetMicrovmImageVersionOutput"
|
|
1359
|
+
]:
|
|
1360
|
+
import capo_lambda_microvms._operations.lambda_microvms.get_microvm_image_version
|
|
1361
|
+
|
|
1362
|
+
(
|
|
1363
|
+
output,
|
|
1364
|
+
http_response,
|
|
1365
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.get_microvm_image_version.async_get_microvm_image_version(
|
|
1366
|
+
req.options, req.input
|
|
1367
|
+
)
|
|
1368
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
1369
|
+
|
|
1370
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
1371
|
+
input_: capo_lambda_microvms.types.get_microvm_image_version_input.GetMicrovmImageVersionInput = {
|
|
1372
|
+
"image_identifier": image_identifier,
|
|
1373
|
+
"image_version": image_version,
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
response = await aexecute_pipeline(
|
|
1377
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
1378
|
+
handler=_handler,
|
|
1379
|
+
interceptors=list(interceptors_),
|
|
1380
|
+
)
|
|
1381
|
+
await response.response.aclose()
|
|
1382
|
+
return response.output
|
|
1383
|
+
|
|
1384
|
+
async def list_managed_microvm_image_versions(
|
|
1385
|
+
self,
|
|
1386
|
+
image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
|
|
1387
|
+
*,
|
|
1388
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
1389
|
+
max_results: Optional[int] = None,
|
|
1390
|
+
next_token: Optional["capo_lambda_microvms.types.string.String"] = None,
|
|
1391
|
+
) -> "capo_lambda_microvms.types.list_managed_microvm_image_versions_output.ListManagedMicrovmImageVersionsOutput":
|
|
1392
|
+
"""<p>Lists versions of a managed MicroVM image. We recommend using pagination to ensure that the operation returns quickly and successfully.</p>
|
|
1393
|
+
|
|
1394
|
+
Args:
|
|
1395
|
+
max_results: <p>The maximum number of results to return in a single call.</p>
|
|
1396
|
+
next_token: <p>The pagination token from a previous call. Use this token to retrieve the next page of results.</p>
|
|
1397
|
+
image_identifier: <p>The unique identifier (ARN or ID) of the managed MicroVM image to list versions for.</p>
|
|
1398
|
+
|
|
1399
|
+
Raises:
|
|
1400
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
1401
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
1402
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
1403
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
1404
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
1405
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
1406
|
+
"""
|
|
1407
|
+
|
|
1408
|
+
async def _handler(
|
|
1409
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.list_managed_microvm_image_versions_input.ListManagedMicrovmImageVersionsInput]",
|
|
1410
|
+
) -> AsyncOperationResponse[
|
|
1411
|
+
"capo_lambda_microvms.types.list_managed_microvm_image_versions_output.ListManagedMicrovmImageVersionsOutput"
|
|
1412
|
+
]:
|
|
1413
|
+
import capo_lambda_microvms._operations.lambda_microvms.list_managed_microvm_image_versions
|
|
1414
|
+
|
|
1415
|
+
(
|
|
1416
|
+
output,
|
|
1417
|
+
http_response,
|
|
1418
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.list_managed_microvm_image_versions.async_list_managed_microvm_image_versions(
|
|
1419
|
+
req.options, req.input
|
|
1420
|
+
)
|
|
1421
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
1422
|
+
|
|
1423
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
1424
|
+
input_: capo_lambda_microvms.types.list_managed_microvm_image_versions_input.ListManagedMicrovmImageVersionsInput = {
|
|
1425
|
+
"image_identifier": image_identifier
|
|
1426
|
+
}
|
|
1427
|
+
if max_results is not None:
|
|
1428
|
+
input_["max_results"] = max_results
|
|
1429
|
+
if next_token is not None:
|
|
1430
|
+
input_["next_token"] = next_token
|
|
1431
|
+
|
|
1432
|
+
response = await aexecute_pipeline(
|
|
1433
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
1434
|
+
handler=_handler,
|
|
1435
|
+
interceptors=list(interceptors_),
|
|
1436
|
+
)
|
|
1437
|
+
await response.response.aclose()
|
|
1438
|
+
return response.output
|
|
1439
|
+
|
|
1440
|
+
async def iter_list_managed_microvm_image_versions(
|
|
1441
|
+
self,
|
|
1442
|
+
image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
|
|
1443
|
+
*,
|
|
1444
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
1445
|
+
max_results: Optional[int] = None,
|
|
1446
|
+
next_token: Optional["capo_lambda_microvms.types.string.String"] = None,
|
|
1447
|
+
) -> "AsyncIterator[capo_lambda_microvms.types.managed_microvm_image_version.ManagedMicrovmImageVersion]":
|
|
1448
|
+
_token = next_token
|
|
1449
|
+
while True:
|
|
1450
|
+
_response = await self.list_managed_microvm_image_versions(
|
|
1451
|
+
image_identifier,
|
|
1452
|
+
config_overrides=config_overrides,
|
|
1453
|
+
max_results=max_results,
|
|
1454
|
+
next_token=_token,
|
|
1455
|
+
)
|
|
1456
|
+
_page = _resolve_path(_response, ("items",))
|
|
1457
|
+
for _item in _page or []:
|
|
1458
|
+
yield _item
|
|
1459
|
+
_token = _resolve_path(_response, ("next_token",))
|
|
1460
|
+
if not _token:
|
|
1461
|
+
break
|
|
1462
|
+
|
|
1463
|
+
async def list_microvm_image_builds(
|
|
1464
|
+
self,
|
|
1465
|
+
image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
|
|
1466
|
+
image_version: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
|
|
1467
|
+
*,
|
|
1468
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
1469
|
+
max_results: Optional[int] = None,
|
|
1470
|
+
next_token: Optional["capo_lambda_microvms.types.string.String"] = None,
|
|
1471
|
+
architecture: Optional[
|
|
1472
|
+
"capo_lambda_microvms.types.architecture.Architecture"
|
|
1473
|
+
] = None,
|
|
1474
|
+
chipset: Optional["capo_lambda_microvms.types.chipset.Chipset"] = None,
|
|
1475
|
+
chipset_generation: Optional[
|
|
1476
|
+
"capo_lambda_microvms.types.non_blank_string.NonBlankString"
|
|
1477
|
+
] = None,
|
|
1478
|
+
) -> "capo_lambda_microvms.types.list_microvm_image_builds_output.ListMicrovmImageBuildsOutput":
|
|
1479
|
+
"""<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>
|
|
1480
|
+
|
|
1481
|
+
Args:
|
|
1482
|
+
max_results: <p>The maximum number of results to return in a single call.</p>
|
|
1483
|
+
next_token: <p>The pagination token from a previous call. Use this token to retrieve the next page of results.</p>
|
|
1484
|
+
image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image.</p>
|
|
1485
|
+
image_version: <p>The version of the MicroVM image to list builds for.</p>
|
|
1486
|
+
architecture: <p>Filters builds by target CPU architecture.</p>
|
|
1487
|
+
chipset: <p>Filters builds by target chipset.</p>
|
|
1488
|
+
chipset_generation: <p>Filters builds by target chipset generation.</p>
|
|
1489
|
+
|
|
1490
|
+
Raises:
|
|
1491
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
1492
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
1493
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
1494
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
1495
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
1496
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
1497
|
+
"""
|
|
1498
|
+
|
|
1499
|
+
async def _handler(
|
|
1500
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.list_microvm_image_builds_input.ListMicrovmImageBuildsInput]",
|
|
1501
|
+
) -> AsyncOperationResponse[
|
|
1502
|
+
"capo_lambda_microvms.types.list_microvm_image_builds_output.ListMicrovmImageBuildsOutput"
|
|
1503
|
+
]:
|
|
1504
|
+
import capo_lambda_microvms._operations.lambda_microvms.list_microvm_image_builds
|
|
1505
|
+
|
|
1506
|
+
(
|
|
1507
|
+
output,
|
|
1508
|
+
http_response,
|
|
1509
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.list_microvm_image_builds.async_list_microvm_image_builds(
|
|
1510
|
+
req.options, req.input
|
|
1511
|
+
)
|
|
1512
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
1513
|
+
|
|
1514
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
1515
|
+
input_: capo_lambda_microvms.types.list_microvm_image_builds_input.ListMicrovmImageBuildsInput = {
|
|
1516
|
+
"image_identifier": image_identifier,
|
|
1517
|
+
"image_version": image_version,
|
|
1518
|
+
}
|
|
1519
|
+
if max_results is not None:
|
|
1520
|
+
input_["max_results"] = max_results
|
|
1521
|
+
if next_token is not None:
|
|
1522
|
+
input_["next_token"] = next_token
|
|
1523
|
+
if architecture is not None:
|
|
1524
|
+
input_["architecture"] = architecture
|
|
1525
|
+
if chipset is not None:
|
|
1526
|
+
input_["chipset"] = chipset
|
|
1527
|
+
if chipset_generation is not None:
|
|
1528
|
+
input_["chipset_generation"] = chipset_generation
|
|
1529
|
+
|
|
1530
|
+
response = await aexecute_pipeline(
|
|
1531
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
1532
|
+
handler=_handler,
|
|
1533
|
+
interceptors=list(interceptors_),
|
|
1534
|
+
)
|
|
1535
|
+
await response.response.aclose()
|
|
1536
|
+
return response.output
|
|
1537
|
+
|
|
1538
|
+
async def iter_list_microvm_image_builds(
|
|
1539
|
+
self,
|
|
1540
|
+
image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
|
|
1541
|
+
image_version: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
|
|
1542
|
+
*,
|
|
1543
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
1544
|
+
max_results: Optional[int] = None,
|
|
1545
|
+
next_token: Optional["capo_lambda_microvms.types.string.String"] = None,
|
|
1546
|
+
architecture: Optional[
|
|
1547
|
+
"capo_lambda_microvms.types.architecture.Architecture"
|
|
1548
|
+
] = None,
|
|
1549
|
+
chipset: Optional["capo_lambda_microvms.types.chipset.Chipset"] = None,
|
|
1550
|
+
chipset_generation: Optional[
|
|
1551
|
+
"capo_lambda_microvms.types.non_blank_string.NonBlankString"
|
|
1552
|
+
] = None,
|
|
1553
|
+
) -> "AsyncIterator[capo_lambda_microvms.types.microvm_image_build_summary.MicrovmImageBuildSummary]":
|
|
1554
|
+
_token = next_token
|
|
1555
|
+
while True:
|
|
1556
|
+
_response = await self.list_microvm_image_builds(
|
|
1557
|
+
image_identifier,
|
|
1558
|
+
image_version,
|
|
1559
|
+
config_overrides=config_overrides,
|
|
1560
|
+
max_results=max_results,
|
|
1561
|
+
next_token=_token,
|
|
1562
|
+
architecture=architecture,
|
|
1563
|
+
chipset=chipset,
|
|
1564
|
+
chipset_generation=chipset_generation,
|
|
1565
|
+
)
|
|
1566
|
+
_page = _resolve_path(_response, ("items",))
|
|
1567
|
+
for _item in _page or []:
|
|
1568
|
+
yield _item
|
|
1569
|
+
_token = _resolve_path(_response, ("next_token",))
|
|
1570
|
+
if not _token:
|
|
1571
|
+
break
|
|
1572
|
+
|
|
1573
|
+
async def list_microvm_image_versions(
|
|
1574
|
+
self,
|
|
1575
|
+
image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
|
|
1576
|
+
*,
|
|
1577
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
1578
|
+
max_results: Optional[int] = None,
|
|
1579
|
+
next_token: Optional["capo_lambda_microvms.types.string.String"] = None,
|
|
1580
|
+
) -> "capo_lambda_microvms.types.list_microvm_image_versions_output.ListMicrovmImageVersionsOutput":
|
|
1581
|
+
"""<p>Lists versions of a MicroVM image. We recommend using pagination to ensure that the operation returns quickly and successfully.</p>
|
|
1582
|
+
|
|
1583
|
+
Args:
|
|
1584
|
+
max_results: <p>The maximum number of results to return in a single call.</p>
|
|
1585
|
+
next_token: <p>The pagination token from a previous call. Use this token to retrieve the next page of results.</p>
|
|
1586
|
+
image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image to list versions for.</p>
|
|
1587
|
+
|
|
1588
|
+
Raises:
|
|
1589
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
1590
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
1591
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
1592
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
1593
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
1594
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
1595
|
+
"""
|
|
1596
|
+
|
|
1597
|
+
async def _handler(
|
|
1598
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.list_microvm_image_versions_input.ListMicrovmImageVersionsInput]",
|
|
1599
|
+
) -> AsyncOperationResponse[
|
|
1600
|
+
"capo_lambda_microvms.types.list_microvm_image_versions_output.ListMicrovmImageVersionsOutput"
|
|
1601
|
+
]:
|
|
1602
|
+
import capo_lambda_microvms._operations.lambda_microvms.list_microvm_image_versions
|
|
1603
|
+
|
|
1604
|
+
(
|
|
1605
|
+
output,
|
|
1606
|
+
http_response,
|
|
1607
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.list_microvm_image_versions.async_list_microvm_image_versions(
|
|
1608
|
+
req.options, req.input
|
|
1609
|
+
)
|
|
1610
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
1611
|
+
|
|
1612
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
1613
|
+
input_: capo_lambda_microvms.types.list_microvm_image_versions_input.ListMicrovmImageVersionsInput = {
|
|
1614
|
+
"image_identifier": image_identifier
|
|
1615
|
+
}
|
|
1616
|
+
if max_results is not None:
|
|
1617
|
+
input_["max_results"] = max_results
|
|
1618
|
+
if next_token is not None:
|
|
1619
|
+
input_["next_token"] = next_token
|
|
1620
|
+
|
|
1621
|
+
response = await aexecute_pipeline(
|
|
1622
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
1623
|
+
handler=_handler,
|
|
1624
|
+
interceptors=list(interceptors_),
|
|
1625
|
+
)
|
|
1626
|
+
await response.response.aclose()
|
|
1627
|
+
return response.output
|
|
1628
|
+
|
|
1629
|
+
async def iter_list_microvm_image_versions(
|
|
1630
|
+
self,
|
|
1631
|
+
image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
|
|
1632
|
+
*,
|
|
1633
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
1634
|
+
max_results: Optional[int] = None,
|
|
1635
|
+
next_token: Optional["capo_lambda_microvms.types.string.String"] = None,
|
|
1636
|
+
) -> "AsyncIterator[capo_lambda_microvms.types.microvm_image_version_summary.MicrovmImageVersionSummary]":
|
|
1637
|
+
_token = next_token
|
|
1638
|
+
while True:
|
|
1639
|
+
_response = await self.list_microvm_image_versions(
|
|
1640
|
+
image_identifier,
|
|
1641
|
+
config_overrides=config_overrides,
|
|
1642
|
+
max_results=max_results,
|
|
1643
|
+
next_token=_token,
|
|
1644
|
+
)
|
|
1645
|
+
_page = _resolve_path(_response, ("items",))
|
|
1646
|
+
for _item in _page or []:
|
|
1647
|
+
yield _item
|
|
1648
|
+
_token = _resolve_path(_response, ("next_token",))
|
|
1649
|
+
if not _token:
|
|
1650
|
+
break
|
|
1651
|
+
|
|
1652
|
+
async def update_microvm_image(
|
|
1653
|
+
self,
|
|
1654
|
+
base_image_arn: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
|
|
1655
|
+
build_role_arn: "capo_lambda_microvms.types.role_arn.RoleArn",
|
|
1656
|
+
code_artifact: "capo_lambda_microvms.types.code_artifact.CodeArtifact",
|
|
1657
|
+
image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
|
|
1658
|
+
*,
|
|
1659
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
1660
|
+
base_image_version: Optional[
|
|
1661
|
+
"capo_lambda_microvms.types.version.Version"
|
|
1662
|
+
] = None,
|
|
1663
|
+
description: Optional[str] = None,
|
|
1664
|
+
logging: Optional["capo_lambda_microvms.types.logging.Logging"] = None,
|
|
1665
|
+
egress_network_connectors: Optional[
|
|
1666
|
+
"capo_lambda_microvms.types.network_connector_list.NetworkConnectorList"
|
|
1667
|
+
] = None,
|
|
1668
|
+
cpu_configurations: Optional[
|
|
1669
|
+
"capo_lambda_microvms.types.cpu_configuration_list.CpuConfigurationList"
|
|
1670
|
+
] = None,
|
|
1671
|
+
resources: Optional[
|
|
1672
|
+
"capo_lambda_microvms.types.resources_list.ResourcesList"
|
|
1673
|
+
] = None,
|
|
1674
|
+
additional_os_capabilities: Optional[
|
|
1675
|
+
"capo_lambda_microvms.types.capability_list.CapabilityList"
|
|
1676
|
+
] = None,
|
|
1677
|
+
hooks: Optional["capo_lambda_microvms.types.hooks.Hooks"] = None,
|
|
1678
|
+
environment_variables: Optional[
|
|
1679
|
+
"capo_lambda_microvms.types.environment_variable_map.EnvironmentVariableMap"
|
|
1680
|
+
] = None,
|
|
1681
|
+
client_token: Optional[str] = None,
|
|
1682
|
+
) -> "capo_lambda_microvms.types.update_microvm_image_response.UpdateMicrovmImageResponse":
|
|
1683
|
+
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>
|
|
1684
|
+
|
|
1685
|
+
Args:
|
|
1686
|
+
base_image_arn: <p>The ARN of the base MicroVM image.</p>
|
|
1687
|
+
base_image_version: <p>The specific version of the base MicroVM image to use.</p>
|
|
1688
|
+
build_role_arn: <p>The ARN of the IAM build role.</p>
|
|
1689
|
+
description: <p>The description of the MicroVM image.</p>
|
|
1690
|
+
code_artifact: <p>The code artifact containing the application code and metadata for the MicroVM image.</p>
|
|
1691
|
+
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>
|
|
1692
|
+
egress_network_connectors: <p>The list of egress network connectors available to the MicroVM at runtime.</p>
|
|
1693
|
+
cpu_configurations: <p>The list of supported CPU configurations for the MicroVM.</p>
|
|
1694
|
+
resources: <p>The resource requirements for the MicroVM.</p>
|
|
1695
|
+
additional_os_capabilities: <p>Additional OS capabilities granted to the MicroVM runtime environment.</p>
|
|
1696
|
+
environment_variables: <p>Environment variables set in the MicroVM runtime environment.</p>
|
|
1697
|
+
image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image to update.</p>
|
|
1698
|
+
client_token: <p>A unique, case-sensitive identifier you provide to ensure the idempotency of the request.</p>
|
|
1699
|
+
|
|
1700
|
+
Raises:
|
|
1701
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
1702
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
1703
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
1704
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
1705
|
+
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>
|
|
1706
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
1707
|
+
capo_lambda_microvms.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>You have exceeded a service quota for Lambda MicroVMs.</p>
|
|
1708
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
1709
|
+
"""
|
|
1710
|
+
|
|
1711
|
+
async def _handler(
|
|
1712
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.update_microvm_image_request.UpdateMicrovmImageRequest]",
|
|
1713
|
+
) -> AsyncOperationResponse[
|
|
1714
|
+
"capo_lambda_microvms.types.update_microvm_image_response.UpdateMicrovmImageResponse"
|
|
1715
|
+
]:
|
|
1716
|
+
import capo_lambda_microvms._operations.lambda_microvms.update_microvm_image
|
|
1717
|
+
|
|
1718
|
+
(
|
|
1719
|
+
output,
|
|
1720
|
+
http_response,
|
|
1721
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.update_microvm_image.async_update_microvm_image(
|
|
1722
|
+
req.options, req.input
|
|
1723
|
+
)
|
|
1724
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
1725
|
+
|
|
1726
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
1727
|
+
input_: capo_lambda_microvms.types.update_microvm_image_request.UpdateMicrovmImageRequest = {
|
|
1728
|
+
"base_image_arn": base_image_arn,
|
|
1729
|
+
"build_role_arn": build_role_arn,
|
|
1730
|
+
"code_artifact": code_artifact,
|
|
1731
|
+
"image_identifier": image_identifier,
|
|
1732
|
+
}
|
|
1733
|
+
if base_image_version is not None:
|
|
1734
|
+
input_["base_image_version"] = base_image_version
|
|
1735
|
+
if description is not None:
|
|
1736
|
+
input_["description"] = description
|
|
1737
|
+
if logging is not None:
|
|
1738
|
+
input_["logging"] = logging
|
|
1739
|
+
if egress_network_connectors is not None:
|
|
1740
|
+
input_["egress_network_connectors"] = egress_network_connectors
|
|
1741
|
+
if cpu_configurations is not None:
|
|
1742
|
+
input_["cpu_configurations"] = cpu_configurations
|
|
1743
|
+
if resources is not None:
|
|
1744
|
+
input_["resources"] = resources
|
|
1745
|
+
if additional_os_capabilities is not None:
|
|
1746
|
+
input_["additional_os_capabilities"] = additional_os_capabilities
|
|
1747
|
+
if hooks is not None:
|
|
1748
|
+
input_["hooks"] = hooks
|
|
1749
|
+
if environment_variables is not None:
|
|
1750
|
+
input_["environment_variables"] = environment_variables
|
|
1751
|
+
if client_token is None:
|
|
1752
|
+
client_token = str(uuid.uuid4())
|
|
1753
|
+
input_["client_token"] = client_token
|
|
1754
|
+
|
|
1755
|
+
response = await aexecute_pipeline(
|
|
1756
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
1757
|
+
handler=_handler,
|
|
1758
|
+
interceptors=list(interceptors_),
|
|
1759
|
+
)
|
|
1760
|
+
await response.response.aclose()
|
|
1761
|
+
return response.output
|
|
1762
|
+
|
|
1763
|
+
async def update_microvm_image_version(
|
|
1764
|
+
self,
|
|
1765
|
+
image_identifier: "capo_lambda_microvms.types.microvm_image_identifier.MicrovmImageIdentifier",
|
|
1766
|
+
image_version: "capo_lambda_microvms.types.non_blank_string.NonBlankString",
|
|
1767
|
+
status: "capo_lambda_microvms.types.microvm_image_version_status.MicrovmImageVersionStatus",
|
|
1768
|
+
*,
|
|
1769
|
+
config_overrides: Optional[AsyncLambdaMicrovmsClientConfig] = None,
|
|
1770
|
+
) -> "capo_lambda_microvms.types.update_microvm_image_version_response.UpdateMicrovmImageVersionResponse":
|
|
1771
|
+
"""<p>Updates the status of a specific MicroVM image version.</p>
|
|
1772
|
+
|
|
1773
|
+
Args:
|
|
1774
|
+
image_identifier: <p>The unique identifier (ARN or ID) of the MicroVM image.</p>
|
|
1775
|
+
image_version: <p>The version of the MicroVM image to update.</p>
|
|
1776
|
+
status: <p>The new status to set for the MicroVM image version.</p>
|
|
1777
|
+
|
|
1778
|
+
Raises:
|
|
1779
|
+
capo_lambda_microvms.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
|
|
1780
|
+
capo_lambda_microvms.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry the request later.</p>
|
|
1781
|
+
capo_lambda_microvms.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request later.</p>
|
|
1782
|
+
capo_lambda_microvms.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by the service.</p>
|
|
1783
|
+
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>
|
|
1784
|
+
capo_lambda_microvms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
|
|
1785
|
+
capo_lambda_microvms.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
1786
|
+
"""
|
|
1787
|
+
|
|
1788
|
+
async def _handler(
|
|
1789
|
+
req: "AsyncOperationRequest[capo_lambda_microvms.types.update_microvm_image_version_request.UpdateMicrovmImageVersionRequest]",
|
|
1790
|
+
) -> AsyncOperationResponse[
|
|
1791
|
+
"capo_lambda_microvms.types.update_microvm_image_version_response.UpdateMicrovmImageVersionResponse"
|
|
1792
|
+
]:
|
|
1793
|
+
import capo_lambda_microvms._operations.lambda_microvms.update_microvm_image_version
|
|
1794
|
+
|
|
1795
|
+
(
|
|
1796
|
+
output,
|
|
1797
|
+
http_response,
|
|
1798
|
+
) = await capo_lambda_microvms._operations.lambda_microvms.update_microvm_image_version.async_update_microvm_image_version(
|
|
1799
|
+
req.options, req.input
|
|
1800
|
+
)
|
|
1801
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
1802
|
+
|
|
1803
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
1804
|
+
input_: capo_lambda_microvms.types.update_microvm_image_version_request.UpdateMicrovmImageVersionRequest = {
|
|
1805
|
+
"image_identifier": image_identifier,
|
|
1806
|
+
"image_version": image_version,
|
|
1807
|
+
"status": status,
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
response = await aexecute_pipeline(
|
|
1811
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
1812
|
+
handler=_handler,
|
|
1813
|
+
interceptors=list(interceptors_),
|
|
1814
|
+
)
|
|
1815
|
+
await response.response.aclose()
|
|
1816
|
+
return response.output
|
|
1817
|
+
|
|
1818
|
+
async def __aenter__(self) -> Self:
|
|
1819
|
+
return self
|
|
1820
|
+
|
|
1821
|
+
async def __aexit__(self, exc_type: Any, exc: Any, tb: Any):
|
|
1822
|
+
await self._client.aclose()
|