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,58 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdamicrovms#ThrottlingException``."""
|
|
2
|
+
|
|
3
|
+
from typing_extensions import NotRequired, TypedDict
|
|
4
|
+
|
|
5
|
+
from capo_lambda_microvms.errors import ServiceError
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ThrottlingException_(TypedDict, closed=True):
|
|
9
|
+
message: NotRequired["str"]
|
|
10
|
+
service_code: NotRequired["str"]
|
|
11
|
+
"""<p>The service code of the throttled service quota.</p>"""
|
|
12
|
+
quota_code: NotRequired["str"]
|
|
13
|
+
"""<p>The quota code of the throttled service quota.</p>"""
|
|
14
|
+
retry_after_seconds: NotRequired["int"]
|
|
15
|
+
"""<p>The number of seconds to wait before retrying the request.</p>"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# --- restJson1 ser/de ---
|
|
19
|
+
def serialize_json(value: ThrottlingException_) -> dict:
|
|
20
|
+
out: dict = {}
|
|
21
|
+
if "message" in value:
|
|
22
|
+
out["message"] = value["message"]
|
|
23
|
+
if "service_code" in value:
|
|
24
|
+
out["serviceCode"] = value["service_code"]
|
|
25
|
+
if "quota_code" in value:
|
|
26
|
+
out["quotaCode"] = value["quota_code"]
|
|
27
|
+
return out
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def deserialize_json(data: dict) -> ThrottlingException_:
|
|
31
|
+
out: ThrottlingException_ = {} # type: ignore[typeddict-item]
|
|
32
|
+
if data.get("message") is not None:
|
|
33
|
+
out["message"] = data["message"]
|
|
34
|
+
if data.get("serviceCode") is not None:
|
|
35
|
+
out["service_code"] = data["serviceCode"]
|
|
36
|
+
if data.get("quotaCode") is not None:
|
|
37
|
+
out["quota_code"] = data["quotaCode"]
|
|
38
|
+
return out
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class ThrottlingException(ServiceError):
|
|
42
|
+
"""Modeled error for Smithy shape ``com.amazonaws.lambdamicrovms#ThrottlingException``."""
|
|
43
|
+
|
|
44
|
+
code: str | None = "ThrottlingException"
|
|
45
|
+
|
|
46
|
+
def __init__(self, data: ThrottlingException_, message: str | None = None):
|
|
47
|
+
super().__init__(
|
|
48
|
+
"client",
|
|
49
|
+
is_throttling_error=True,
|
|
50
|
+
is_retryable=True,
|
|
51
|
+
code="ThrottlingException",
|
|
52
|
+
message=message,
|
|
53
|
+
)
|
|
54
|
+
self.data = data
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_json(cls, data: dict, message: str | None = None) -> "ThrottlingException":
|
|
58
|
+
return cls(deserialize_json(data), message)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdamicrovms#TooManyRequestsException``."""
|
|
2
|
+
|
|
3
|
+
from typing_extensions import NotRequired, TypedDict
|
|
4
|
+
|
|
5
|
+
from capo_lambda_microvms.errors import ServiceError
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class TooManyRequestsException_(TypedDict, closed=True):
|
|
9
|
+
type: NotRequired["str"]
|
|
10
|
+
"""<p>The exception type.</p>"""
|
|
11
|
+
message: NotRequired["str"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# --- restJson1 ser/de ---
|
|
15
|
+
def serialize_json(value: TooManyRequestsException_) -> dict:
|
|
16
|
+
out: dict = {}
|
|
17
|
+
if "type" in value:
|
|
18
|
+
out["Type"] = value["type"]
|
|
19
|
+
if "message" in value:
|
|
20
|
+
out["message"] = value["message"]
|
|
21
|
+
return out
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def deserialize_json(data: dict) -> TooManyRequestsException_:
|
|
25
|
+
out: TooManyRequestsException_ = {} # type: ignore[typeddict-item]
|
|
26
|
+
if data.get("Type") is not None:
|
|
27
|
+
out["type"] = data["Type"]
|
|
28
|
+
if data.get("message") is not None:
|
|
29
|
+
out["message"] = data["message"]
|
|
30
|
+
return out
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class TooManyRequestsException(ServiceError):
|
|
34
|
+
"""Modeled error for Smithy shape ``com.amazonaws.lambdamicrovms#TooManyRequestsException``."""
|
|
35
|
+
|
|
36
|
+
code: str | None = "TooManyRequestsException"
|
|
37
|
+
|
|
38
|
+
def __init__(self, data: TooManyRequestsException_, message: str | None = None):
|
|
39
|
+
super().__init__(
|
|
40
|
+
"client",
|
|
41
|
+
is_throttling_error=False,
|
|
42
|
+
is_retryable=False,
|
|
43
|
+
code="TooManyRequestsException",
|
|
44
|
+
message=message,
|
|
45
|
+
)
|
|
46
|
+
self.data = data
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(
|
|
50
|
+
cls, data: dict, message: str | None = None
|
|
51
|
+
) -> "TooManyRequestsException":
|
|
52
|
+
return cls(deserialize_json(data), message)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdamicrovms#ValidationException``."""
|
|
2
|
+
|
|
3
|
+
from typing_extensions import NotRequired, TypedDict
|
|
4
|
+
|
|
5
|
+
from capo_lambda_microvms.errors import ServiceError
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ValidationException_(TypedDict, closed=True):
|
|
9
|
+
message: NotRequired["str"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
# --- restJson1 ser/de ---
|
|
13
|
+
def serialize_json(value: ValidationException_) -> dict:
|
|
14
|
+
out: dict = {}
|
|
15
|
+
if "message" in value:
|
|
16
|
+
out["message"] = value["message"]
|
|
17
|
+
return out
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def deserialize_json(data: dict) -> ValidationException_:
|
|
21
|
+
out: ValidationException_ = {} # type: ignore[typeddict-item]
|
|
22
|
+
if data.get("message") is not None:
|
|
23
|
+
out["message"] = data["message"]
|
|
24
|
+
return out
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ValidationException(ServiceError):
|
|
28
|
+
"""Modeled error for Smithy shape ``com.amazonaws.lambdamicrovms#ValidationException``."""
|
|
29
|
+
|
|
30
|
+
code: str | None = "ValidationException"
|
|
31
|
+
|
|
32
|
+
def __init__(self, data: ValidationException_, message: str | None = None):
|
|
33
|
+
super().__init__(
|
|
34
|
+
"client",
|
|
35
|
+
is_throttling_error=False,
|
|
36
|
+
is_retryable=False,
|
|
37
|
+
code="ValidationException",
|
|
38
|
+
message=message,
|
|
39
|
+
)
|
|
40
|
+
self.data = data
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def from_json(cls, data: dict, message: str | None = None) -> "ValidationException":
|
|
44
|
+
return cls(deserialize_json(data), message)
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""Generated from Smithy prelude shape ``smithy.api#Blob``."""
|
|
2
|
+
|
|
3
|
+
import base64
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
# --- restJson1 ser/de ---
|
|
7
|
+
def serialize_json(value: bytes) -> str:
|
|
8
|
+
return base64.b64encode(value).decode("ascii")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def deserialize_json(data: str) -> bytes:
|
|
12
|
+
return base64.b64decode(data)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Generated from Smithy prelude shape ``smithy.api#Timestamp``."""
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
# --- restJson1 ser/de ---
|
|
7
|
+
def serialize_json(value: datetime.datetime) -> float:
|
|
8
|
+
value = (
|
|
9
|
+
value.astimezone(datetime.timezone.utc)
|
|
10
|
+
if value.tzinfo
|
|
11
|
+
else value.replace(tzinfo=datetime.timezone.utc)
|
|
12
|
+
)
|
|
13
|
+
return value.timestamp()
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def deserialize_json(data: float) -> datetime.datetime:
|
|
17
|
+
return datetime.datetime.fromtimestamp(float(data), tz=datetime.timezone.utc)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdamicrovms#Architecture``."""
|
|
2
|
+
|
|
3
|
+
from typing import Literal, TypeAlias, cast
|
|
4
|
+
|
|
5
|
+
Architecture: TypeAlias = Literal["ARM_64",]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# --- restJson1 ser/de ---
|
|
9
|
+
def serialize_json(value: Architecture) -> str:
|
|
10
|
+
return value
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def deserialize_json(data: str) -> Architecture:
|
|
14
|
+
return cast(Architecture, data)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdamicrovms#BuildState``."""
|
|
2
|
+
|
|
3
|
+
from typing import Literal, TypeAlias, cast
|
|
4
|
+
|
|
5
|
+
BuildState: TypeAlias = Literal[
|
|
6
|
+
"PENDING",
|
|
7
|
+
"IN_PROGRESS",
|
|
8
|
+
"SUCCESSFUL",
|
|
9
|
+
"FAILED",
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# --- restJson1 ser/de ---
|
|
14
|
+
def serialize_json(value: BuildState) -> str:
|
|
15
|
+
return value
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def deserialize_json(data: str) -> BuildState:
|
|
19
|
+
return cast(BuildState, data)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdamicrovms#Capability``."""
|
|
2
|
+
|
|
3
|
+
from typing import Literal, TypeAlias, cast
|
|
4
|
+
|
|
5
|
+
"""Capability granted to the application when booted"""
|
|
6
|
+
Capability: TypeAlias = Literal["ALL",]
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# --- restJson1 ser/de ---
|
|
10
|
+
def serialize_json(value: Capability) -> str:
|
|
11
|
+
return value
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def deserialize_json(data: str) -> Capability:
|
|
15
|
+
return cast(Capability, data)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdamicrovms#CapabilityList``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_lambda_microvms.types.capability
|
|
7
|
+
|
|
8
|
+
CapabilityList: TypeAlias = list["capo_lambda_microvms.types.capability.Capability"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- restJson1 ser/de ---
|
|
12
|
+
def serialize_json(value: CapabilityList) -> list:
|
|
13
|
+
import capo_lambda_microvms.types.capability
|
|
14
|
+
|
|
15
|
+
out: list = []
|
|
16
|
+
for item in value:
|
|
17
|
+
out.append(capo_lambda_microvms.types.capability.serialize_json(item))
|
|
18
|
+
return out
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def deserialize_json(data: list) -> CapabilityList:
|
|
22
|
+
import capo_lambda_microvms.types.capability
|
|
23
|
+
|
|
24
|
+
out: CapabilityList = []
|
|
25
|
+
for item in data:
|
|
26
|
+
if item is None:
|
|
27
|
+
continue
|
|
28
|
+
out.append(capo_lambda_microvms.types.capability.deserialize_json(item))
|
|
29
|
+
return out
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdamicrovms#Chipset``."""
|
|
2
|
+
|
|
3
|
+
from typing import Literal, TypeAlias, cast
|
|
4
|
+
|
|
5
|
+
Chipset: TypeAlias = Literal["GRAVITON",]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# --- restJson1 ser/de ---
|
|
9
|
+
def serialize_json(value: Chipset) -> str:
|
|
10
|
+
return value
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def deserialize_json(data: str) -> Chipset:
|
|
14
|
+
return cast(Chipset, data)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdamicrovms#CloudWatchLogging``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
import capo_lambda_microvms.types.string
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CloudWatchLogging(TypedDict, closed=True):
|
|
12
|
+
log_group: NotRequired["capo_lambda_microvms.types.string.String"]
|
|
13
|
+
"""<p>The name of the CloudWatch Logs log group to send logs to.</p>"""
|
|
14
|
+
log_stream: NotRequired["capo_lambda_microvms.types.string.String"]
|
|
15
|
+
"""<p>The name of the CloudWatch Logs log stream within the log group.</p>"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# --- restJson1 ser/de ---
|
|
19
|
+
def serialize_json(value: CloudWatchLogging) -> dict:
|
|
20
|
+
out: dict = {}
|
|
21
|
+
if "log_group" in value:
|
|
22
|
+
out["logGroup"] = value["log_group"]
|
|
23
|
+
if "log_stream" in value:
|
|
24
|
+
out["logStream"] = value["log_stream"]
|
|
25
|
+
return out
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def deserialize_json(data: dict) -> CloudWatchLogging:
|
|
29
|
+
out: CloudWatchLogging = {} # type: ignore[typeddict-item]
|
|
30
|
+
if data.get("logGroup") is not None:
|
|
31
|
+
out["log_group"] = data["logGroup"]
|
|
32
|
+
if data.get("logStream") is not None:
|
|
33
|
+
out["log_stream"] = data["logStream"]
|
|
34
|
+
return out
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdamicrovms#CodeArtifact``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_lambda_microvms.errors import DeserializationError, SerializationError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_lambda_microvms.types.non_blank_string
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class _CodeArtifact_uri(TypedDict, closed=True):
|
|
14
|
+
uri: "capo_lambda_microvms.types.non_blank_string.NonBlankString"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
CodeArtifact: TypeAlias = _CodeArtifact_uri
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# --- restJson1 ser/de ---
|
|
21
|
+
def serialize_json(value: CodeArtifact) -> dict:
|
|
22
|
+
if "uri" in value:
|
|
23
|
+
return {"uri": value["uri"]}
|
|
24
|
+
else:
|
|
25
|
+
raise SerializationError("CodeArtifact: no variant present")
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def deserialize_json(data: dict) -> CodeArtifact:
|
|
29
|
+
if data.get("uri") is not None:
|
|
30
|
+
return {"uri": data["uri"]}
|
|
31
|
+
else:
|
|
32
|
+
raise DeserializationError("CodeArtifact: no recognized variant key")
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdamicrovms#CpuConfiguration``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_lambda_microvms.errors import DeserializationError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_lambda_microvms.types.architecture
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CpuConfiguration(TypedDict, closed=True):
|
|
14
|
+
architecture: "capo_lambda_microvms.types.architecture.Architecture"
|
|
15
|
+
"""<p>The CPU architecture.</p>"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# --- restJson1 ser/de ---
|
|
19
|
+
def serialize_json(value: CpuConfiguration) -> dict:
|
|
20
|
+
out: dict = {}
|
|
21
|
+
import capo_lambda_microvms.types.architecture
|
|
22
|
+
|
|
23
|
+
out["architecture"] = capo_lambda_microvms.types.architecture.serialize_json(
|
|
24
|
+
value["architecture"]
|
|
25
|
+
)
|
|
26
|
+
return out
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def deserialize_json(data: dict) -> CpuConfiguration:
|
|
30
|
+
out: CpuConfiguration = {} # type: ignore[typeddict-item]
|
|
31
|
+
if data.get("architecture") is not None:
|
|
32
|
+
import capo_lambda_microvms.types.architecture
|
|
33
|
+
|
|
34
|
+
out["architecture"] = capo_lambda_microvms.types.architecture.deserialize_json(
|
|
35
|
+
data["architecture"]
|
|
36
|
+
)
|
|
37
|
+
else:
|
|
38
|
+
raise DeserializationError("CpuConfiguration.architecture required")
|
|
39
|
+
return out
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdamicrovms#CpuConfigurationList``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_lambda_microvms.types.cpu_configuration
|
|
7
|
+
|
|
8
|
+
CpuConfigurationList: TypeAlias = list[
|
|
9
|
+
"capo_lambda_microvms.types.cpu_configuration.CpuConfiguration"
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# --- restJson1 ser/de ---
|
|
14
|
+
def serialize_json(value: CpuConfigurationList) -> list:
|
|
15
|
+
import capo_lambda_microvms.types.cpu_configuration
|
|
16
|
+
|
|
17
|
+
out: list = []
|
|
18
|
+
for item in value:
|
|
19
|
+
out.append(capo_lambda_microvms.types.cpu_configuration.serialize_json(item))
|
|
20
|
+
return out
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def deserialize_json(data: list) -> CpuConfigurationList:
|
|
24
|
+
import capo_lambda_microvms.types.cpu_configuration
|
|
25
|
+
|
|
26
|
+
out: CpuConfigurationList = []
|
|
27
|
+
for item in data:
|
|
28
|
+
if item is None:
|
|
29
|
+
continue
|
|
30
|
+
out.append(capo_lambda_microvms.types.cpu_configuration.deserialize_json(item))
|
|
31
|
+
return out
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdamicrovms#CreateMicrovmAuthTokenRequest``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_lambda_microvms.errors import DeserializationError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_lambda_microvms.types.list_of_port_specification
|
|
11
|
+
import capo_lambda_microvms.types.microvm_identifier
|
|
12
|
+
import capo_lambda_microvms.types.positive_integer
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class CreateMicrovmAuthTokenRequest(TypedDict, closed=True):
|
|
16
|
+
microvm_identifier: (
|
|
17
|
+
"capo_lambda_microvms.types.microvm_identifier.MicrovmIdentifier"
|
|
18
|
+
)
|
|
19
|
+
"""<p>The ID of the MicroVM to create an authentication token for.</p>"""
|
|
20
|
+
expiration_in_minutes: "capo_lambda_microvms.types.positive_integer.PositiveInteger"
|
|
21
|
+
"""<p>The duration in minutes before the authentication token expires. Maximum: 60 minutes.</p>"""
|
|
22
|
+
allowed_ports: (
|
|
23
|
+
"capo_lambda_microvms.types.list_of_port_specification.ListOfPortSpecification"
|
|
24
|
+
)
|
|
25
|
+
"""<p>The list of port specifications that the authentication token grants access to on the MicroVM.</p>"""
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# --- restJson1 ser/de ---
|
|
29
|
+
def serialize_json(value: CreateMicrovmAuthTokenRequest) -> dict:
|
|
30
|
+
out: dict = {}
|
|
31
|
+
out["expirationInMinutes"] = value["expiration_in_minutes"]
|
|
32
|
+
import capo_lambda_microvms.types.list_of_port_specification
|
|
33
|
+
|
|
34
|
+
out["allowedPorts"] = (
|
|
35
|
+
capo_lambda_microvms.types.list_of_port_specification.serialize_json(
|
|
36
|
+
value["allowed_ports"]
|
|
37
|
+
)
|
|
38
|
+
)
|
|
39
|
+
return out
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def deserialize_json(data: dict) -> CreateMicrovmAuthTokenRequest:
|
|
43
|
+
out: CreateMicrovmAuthTokenRequest = {} # type: ignore[typeddict-item]
|
|
44
|
+
if data.get("expirationInMinutes") is not None:
|
|
45
|
+
out["expiration_in_minutes"] = data["expirationInMinutes"]
|
|
46
|
+
else:
|
|
47
|
+
raise DeserializationError(
|
|
48
|
+
"CreateMicrovmAuthTokenRequest.expiration_in_minutes required"
|
|
49
|
+
)
|
|
50
|
+
if data.get("allowedPorts") is not None:
|
|
51
|
+
import capo_lambda_microvms.types.list_of_port_specification
|
|
52
|
+
|
|
53
|
+
out["allowed_ports"] = (
|
|
54
|
+
capo_lambda_microvms.types.list_of_port_specification.deserialize_json(
|
|
55
|
+
data["allowedPorts"]
|
|
56
|
+
)
|
|
57
|
+
)
|
|
58
|
+
else:
|
|
59
|
+
raise DeserializationError(
|
|
60
|
+
"CreateMicrovmAuthTokenRequest.allowed_ports required"
|
|
61
|
+
)
|
|
62
|
+
return out
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdamicrovms#CreateMicrovmAuthTokenResponse``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_lambda_microvms.errors import DeserializationError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_lambda_microvms.types.token_parts
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CreateMicrovmAuthTokenResponse(TypedDict, closed=True):
|
|
14
|
+
auth_token: "capo_lambda_microvms.types.token_parts.TokenParts"
|
|
15
|
+
r"""<p>A map containing the authentication token. Use the value at key \"X-aws-proxy-auth\" as the header value when connecting to the MicroVM endpoint.</p>"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# --- restJson1 ser/de ---
|
|
19
|
+
def serialize_json(value: CreateMicrovmAuthTokenResponse) -> dict:
|
|
20
|
+
out: dict = {}
|
|
21
|
+
import capo_lambda_microvms.types.token_parts
|
|
22
|
+
|
|
23
|
+
out["authToken"] = capo_lambda_microvms.types.token_parts.serialize_json(
|
|
24
|
+
value["auth_token"]
|
|
25
|
+
)
|
|
26
|
+
return out
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def deserialize_json(data: dict) -> CreateMicrovmAuthTokenResponse:
|
|
30
|
+
out: CreateMicrovmAuthTokenResponse = {} # type: ignore[typeddict-item]
|
|
31
|
+
if data.get("authToken") is not None:
|
|
32
|
+
import capo_lambda_microvms.types.token_parts
|
|
33
|
+
|
|
34
|
+
out["auth_token"] = capo_lambda_microvms.types.token_parts.deserialize_json(
|
|
35
|
+
data["authToken"]
|
|
36
|
+
)
|
|
37
|
+
else:
|
|
38
|
+
raise DeserializationError("CreateMicrovmAuthTokenResponse.auth_token required")
|
|
39
|
+
return out
|