capo-lambda-core 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_core/__init__.py +71 -0
- capo_lambda_core/_async.py +25 -0
- capo_lambda_core/_auth/_identity.py +16 -0
- capo_lambda_core/_auth/_providers.py +886 -0
- capo_lambda_core/_auth/_signers.py +121 -0
- capo_lambda_core/_auth/_sigv4.py +579 -0
- capo_lambda_core/_auth/_zapros_handler.py +80 -0
- capo_lambda_core/_body.py +221 -0
- capo_lambda_core/_iter.py +113 -0
- capo_lambda_core/_operations/lambda_core_api_service/create_network_connector.py +166 -0
- capo_lambda_core/_operations/lambda_core_api_service/delete_network_connector.py +163 -0
- capo_lambda_core/_operations/lambda_core_api_service/get_network_connector.py +162 -0
- capo_lambda_core/_operations/lambda_core_api_service/list_network_connectors.py +166 -0
- capo_lambda_core/_operations/lambda_core_api_service/update_network_connector.py +169 -0
- capo_lambda_core/_pagination.py +21 -0
- capo_lambda_core/_protocol/__init__.py +1 -0
- capo_lambda_core/_protocol/errors.py +93 -0
- capo_lambda_core/_protocol/eventstream.py +240 -0
- capo_lambda_core/_protocol/serialize.py +47 -0
- capo_lambda_core/_protocol/xml.py +33 -0
- capo_lambda_core/_resources/lambda_core_api_service/network_connector.py +616 -0
- capo_lambda_core/_rule_engine/__init__.py +0 -0
- capo_lambda_core/_rule_engine/_aws_partition.py +160 -0
- capo_lambda_core/_rule_engine/_endpoint_rule_set.py +135 -0
- capo_lambda_core/_rule_engine/_endpoint_runtime.py +389 -0
- capo_lambda_core/_services/_aws_config.py +160 -0
- capo_lambda_core/_services/_pipeline.py +247 -0
- capo_lambda_core/_services/async_lambda_core.py +468 -0
- capo_lambda_core/_services/lambda_core.py +463 -0
- capo_lambda_core/errors/__init__.py +39 -0
- capo_lambda_core/errors/_base.py +94 -0
- capo_lambda_core/errors/invalid_parameter_value_exception.py +59 -0
- capo_lambda_core/errors/network_connector_limit_exceeded_exception.py +60 -0
- capo_lambda_core/errors/resource_conflict_exception.py +57 -0
- capo_lambda_core/errors/resource_not_found_exception.py +57 -0
- capo_lambda_core/errors/service_exception.py +55 -0
- capo_lambda_core/errors/too_many_requests_exception.py +74 -0
- capo_lambda_core/py.typed +0 -0
- capo_lambda_core/types/_prelude/blob.py +12 -0
- capo_lambda_core/types/_prelude/timestamp.py +17 -0
- capo_lambda_core/types/associated_compute_resource_types_list.py +31 -0
- capo_lambda_core/types/client_token_string.py +5 -0
- capo_lambda_core/types/compute_resource_type.py +14 -0
- capo_lambda_core/types/core_timestamp.py +20 -0
- capo_lambda_core/types/create_network_connector_request.py +88 -0
- capo_lambda_core/types/create_network_connector_response.py +93 -0
- capo_lambda_core/types/delete_network_connector_request.py +25 -0
- capo_lambda_core/types/delete_network_connector_response.py +93 -0
- capo_lambda_core/types/get_network_connector_request.py +25 -0
- capo_lambda_core/types/get_network_connector_response.py +196 -0
- capo_lambda_core/types/list_network_connectors_request.py +34 -0
- capo_lambda_core/types/list_network_connectors_response.py +54 -0
- capo_lambda_core/types/max_hundred_list_items.py +5 -0
- capo_lambda_core/types/network_connector_arn.py +5 -0
- capo_lambda_core/types/network_connector_configuration.py +48 -0
- capo_lambda_core/types/network_connector_id.py +6 -0
- capo_lambda_core/types/network_connector_identifier.py +6 -0
- capo_lambda_core/types/network_connector_last_update_status.py +18 -0
- capo_lambda_core/types/network_connector_last_update_status_reason.py +5 -0
- capo_lambda_core/types/network_connector_last_update_status_reason_code.py +22 -0
- capo_lambda_core/types/network_connector_name.py +5 -0
- capo_lambda_core/types/network_connector_role_arn.py +5 -0
- capo_lambda_core/types/network_connector_security_group_id.py +5 -0
- capo_lambda_core/types/network_connector_security_group_ids.py +19 -0
- capo_lambda_core/types/network_connector_state.py +21 -0
- capo_lambda_core/types/network_connector_state_reason_code.py +22 -0
- capo_lambda_core/types/network_connector_subnet_id.py +5 -0
- capo_lambda_core/types/network_connector_subnet_ids.py +19 -0
- capo_lambda_core/types/network_connector_summary.py +94 -0
- capo_lambda_core/types/network_connector_tag_key.py +5 -0
- capo_lambda_core/types/network_connector_tag_value.py +5 -0
- capo_lambda_core/types/network_connector_tags.py +29 -0
- capo_lambda_core/types/network_connector_type.py +14 -0
- capo_lambda_core/types/network_connector_version.py +5 -0
- capo_lambda_core/types/network_connector_vpc_egress_configuration.py +103 -0
- capo_lambda_core/types/network_connectors_list.py +35 -0
- capo_lambda_core/types/network_protocol.py +17 -0
- capo_lambda_core/types/string.py +5 -0
- capo_lambda_core/types/throttle_reason.py +21 -0
- capo_lambda_core/types/update_network_connector_request.py +64 -0
- capo_lambda_core/types/update_network_connector_response.py +138 -0
- capo_lambda_core-0.1.0.dist-info/METADATA +103 -0
- capo_lambda_core-0.1.0.dist-info/RECORD +86 -0
- capo_lambda_core-0.1.0.dist-info/WHEEL +5 -0
- capo_lambda_core-0.1.0.dist-info/licenses/LICENSE +21 -0
- capo_lambda_core-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdacore#NetworkConnectorLimitExceededException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_lambda_core.errors import ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_lambda_core.types.string
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class NetworkConnectorLimitExceededException_(TypedDict, closed=True):
|
|
14
|
+
type: NotRequired["capo_lambda_core.types.string.String"]
|
|
15
|
+
"""<p>The exception type.</p>"""
|
|
16
|
+
message: NotRequired["capo_lambda_core.types.string.String"]
|
|
17
|
+
"""<p>A human-readable description of the error.</p>"""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# --- restJson1 ser/de ---
|
|
21
|
+
def serialize_json(value: NetworkConnectorLimitExceededException_) -> dict:
|
|
22
|
+
out: dict = {}
|
|
23
|
+
if "type" in value:
|
|
24
|
+
out["Type"] = value["type"]
|
|
25
|
+
if "message" in value:
|
|
26
|
+
out["message"] = value["message"]
|
|
27
|
+
return out
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def deserialize_json(data: dict) -> NetworkConnectorLimitExceededException_:
|
|
31
|
+
out: NetworkConnectorLimitExceededException_ = {} # type: ignore[typeddict-item]
|
|
32
|
+
if data.get("Type") is not None:
|
|
33
|
+
out["type"] = data["Type"]
|
|
34
|
+
if data.get("message") is not None:
|
|
35
|
+
out["message"] = data["message"]
|
|
36
|
+
return out
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class NetworkConnectorLimitExceededException(ServiceError):
|
|
40
|
+
"""Modeled error for Smithy shape ``com.amazonaws.lambdacore#NetworkConnectorLimitExceededException``."""
|
|
41
|
+
|
|
42
|
+
code: str | None = "NetworkConnectorLimitExceededException"
|
|
43
|
+
|
|
44
|
+
def __init__(
|
|
45
|
+
self, data: NetworkConnectorLimitExceededException_, message: str | None = None
|
|
46
|
+
):
|
|
47
|
+
super().__init__(
|
|
48
|
+
"client",
|
|
49
|
+
is_throttling_error=False,
|
|
50
|
+
is_retryable=False,
|
|
51
|
+
code="NetworkConnectorLimitExceededException",
|
|
52
|
+
message=message,
|
|
53
|
+
)
|
|
54
|
+
self.data = data
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_json(
|
|
58
|
+
cls, data: dict, message: str | None = None
|
|
59
|
+
) -> "NetworkConnectorLimitExceededException":
|
|
60
|
+
return cls(deserialize_json(data), message)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdacore#ResourceConflictException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_lambda_core.errors import ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_lambda_core.types.string
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ResourceConflictException_(TypedDict, closed=True):
|
|
14
|
+
type: NotRequired["capo_lambda_core.types.string.String"]
|
|
15
|
+
"""<p>The exception type.</p>"""
|
|
16
|
+
message: NotRequired["capo_lambda_core.types.string.String"]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# --- restJson1 ser/de ---
|
|
20
|
+
def serialize_json(value: ResourceConflictException_) -> dict:
|
|
21
|
+
out: dict = {}
|
|
22
|
+
if "type" in value:
|
|
23
|
+
out["Type"] = value["type"]
|
|
24
|
+
if "message" in value:
|
|
25
|
+
out["message"] = value["message"]
|
|
26
|
+
return out
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def deserialize_json(data: dict) -> ResourceConflictException_:
|
|
30
|
+
out: ResourceConflictException_ = {} # type: ignore[typeddict-item]
|
|
31
|
+
if data.get("Type") is not None:
|
|
32
|
+
out["type"] = data["Type"]
|
|
33
|
+
if data.get("message") is not None:
|
|
34
|
+
out["message"] = data["message"]
|
|
35
|
+
return out
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class ResourceConflictException(ServiceError):
|
|
39
|
+
"""Modeled error for Smithy shape ``com.amazonaws.lambdacore#ResourceConflictException``."""
|
|
40
|
+
|
|
41
|
+
code: str | None = "ResourceConflictException"
|
|
42
|
+
|
|
43
|
+
def __init__(self, data: ResourceConflictException_, message: str | None = None):
|
|
44
|
+
super().__init__(
|
|
45
|
+
"client",
|
|
46
|
+
is_throttling_error=False,
|
|
47
|
+
is_retryable=False,
|
|
48
|
+
code="ResourceConflictException",
|
|
49
|
+
message=message,
|
|
50
|
+
)
|
|
51
|
+
self.data = data
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(
|
|
55
|
+
cls, data: dict, message: str | None = None
|
|
56
|
+
) -> "ResourceConflictException":
|
|
57
|
+
return cls(deserialize_json(data), message)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdacore#ResourceNotFoundException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_lambda_core.errors import ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_lambda_core.types.string
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ResourceNotFoundException_(TypedDict, closed=True):
|
|
14
|
+
type: NotRequired["capo_lambda_core.types.string.String"]
|
|
15
|
+
"""<p>The exception type.</p>"""
|
|
16
|
+
message: NotRequired["capo_lambda_core.types.string.String"]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# --- restJson1 ser/de ---
|
|
20
|
+
def serialize_json(value: ResourceNotFoundException_) -> dict:
|
|
21
|
+
out: dict = {}
|
|
22
|
+
if "type" in value:
|
|
23
|
+
out["Type"] = value["type"]
|
|
24
|
+
if "message" in value:
|
|
25
|
+
out["Message"] = value["message"]
|
|
26
|
+
return out
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def deserialize_json(data: dict) -> ResourceNotFoundException_:
|
|
30
|
+
out: ResourceNotFoundException_ = {} # type: ignore[typeddict-item]
|
|
31
|
+
if data.get("Type") is not None:
|
|
32
|
+
out["type"] = data["Type"]
|
|
33
|
+
if data.get("Message") is not None:
|
|
34
|
+
out["message"] = data["Message"]
|
|
35
|
+
return out
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class ResourceNotFoundException(ServiceError):
|
|
39
|
+
"""Modeled error for Smithy shape ``com.amazonaws.lambdacore#ResourceNotFoundException``."""
|
|
40
|
+
|
|
41
|
+
code: str | None = "ResourceNotFoundException"
|
|
42
|
+
|
|
43
|
+
def __init__(self, data: ResourceNotFoundException_, message: str | None = None):
|
|
44
|
+
super().__init__(
|
|
45
|
+
"client",
|
|
46
|
+
is_throttling_error=False,
|
|
47
|
+
is_retryable=False,
|
|
48
|
+
code="ResourceNotFoundException",
|
|
49
|
+
message=message,
|
|
50
|
+
)
|
|
51
|
+
self.data = data
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(
|
|
55
|
+
cls, data: dict, message: str | None = None
|
|
56
|
+
) -> "ResourceNotFoundException":
|
|
57
|
+
return cls(deserialize_json(data), message)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdacore#ServiceException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_lambda_core.errors import ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_lambda_core.types.string
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ServiceException_(TypedDict, closed=True):
|
|
14
|
+
type: NotRequired["capo_lambda_core.types.string.String"]
|
|
15
|
+
"""<p>The exception type.</p>"""
|
|
16
|
+
message: NotRequired["capo_lambda_core.types.string.String"]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# --- restJson1 ser/de ---
|
|
20
|
+
def serialize_json(value: ServiceException_) -> dict:
|
|
21
|
+
out: dict = {}
|
|
22
|
+
if "type" in value:
|
|
23
|
+
out["Type"] = value["type"]
|
|
24
|
+
if "message" in value:
|
|
25
|
+
out["Message"] = value["message"]
|
|
26
|
+
return out
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def deserialize_json(data: dict) -> ServiceException_:
|
|
30
|
+
out: ServiceException_ = {} # type: ignore[typeddict-item]
|
|
31
|
+
if data.get("Type") is not None:
|
|
32
|
+
out["type"] = data["Type"]
|
|
33
|
+
if data.get("Message") is not None:
|
|
34
|
+
out["message"] = data["Message"]
|
|
35
|
+
return out
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class ServiceException(ServiceError):
|
|
39
|
+
"""Modeled error for Smithy shape ``com.amazonaws.lambdacore#ServiceException``."""
|
|
40
|
+
|
|
41
|
+
code: str | None = "ServiceException"
|
|
42
|
+
|
|
43
|
+
def __init__(self, data: ServiceException_, message: str | None = None):
|
|
44
|
+
super().__init__(
|
|
45
|
+
"server",
|
|
46
|
+
is_throttling_error=False,
|
|
47
|
+
is_retryable=False,
|
|
48
|
+
code="ServiceException",
|
|
49
|
+
message=message,
|
|
50
|
+
)
|
|
51
|
+
self.data = data
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, data: dict, message: str | None = None) -> "ServiceException":
|
|
55
|
+
return cls(deserialize_json(data), message)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdacore#TooManyRequestsException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_lambda_core.errors import ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_lambda_core.types.string
|
|
11
|
+
import capo_lambda_core.types.throttle_reason
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class TooManyRequestsException_(TypedDict, closed=True):
|
|
15
|
+
retry_after_seconds: NotRequired["capo_lambda_core.types.string.String"]
|
|
16
|
+
"""<p>The number of seconds to wait before retrying the request.</p>"""
|
|
17
|
+
type: NotRequired["capo_lambda_core.types.string.String"]
|
|
18
|
+
"""<p>The exception type.</p>"""
|
|
19
|
+
message: NotRequired["capo_lambda_core.types.string.String"]
|
|
20
|
+
reason: NotRequired["capo_lambda_core.types.throttle_reason.ThrottleReason"]
|
|
21
|
+
"""<p>The reason for the throttling.</p>"""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# --- restJson1 ser/de ---
|
|
25
|
+
def serialize_json(value: TooManyRequestsException_) -> dict:
|
|
26
|
+
out: dict = {}
|
|
27
|
+
if "type" in value:
|
|
28
|
+
out["Type"] = value["type"]
|
|
29
|
+
if "message" in value:
|
|
30
|
+
out["message"] = value["message"]
|
|
31
|
+
if "reason" in value:
|
|
32
|
+
import capo_lambda_core.types.throttle_reason
|
|
33
|
+
|
|
34
|
+
out["Reason"] = capo_lambda_core.types.throttle_reason.serialize_json(
|
|
35
|
+
value["reason"]
|
|
36
|
+
)
|
|
37
|
+
return out
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def deserialize_json(data: dict) -> TooManyRequestsException_:
|
|
41
|
+
out: TooManyRequestsException_ = {} # type: ignore[typeddict-item]
|
|
42
|
+
if data.get("Type") is not None:
|
|
43
|
+
out["type"] = data["Type"]
|
|
44
|
+
if data.get("message") is not None:
|
|
45
|
+
out["message"] = data["message"]
|
|
46
|
+
if data.get("Reason") is not None:
|
|
47
|
+
import capo_lambda_core.types.throttle_reason
|
|
48
|
+
|
|
49
|
+
out["reason"] = capo_lambda_core.types.throttle_reason.deserialize_json(
|
|
50
|
+
data["Reason"]
|
|
51
|
+
)
|
|
52
|
+
return out
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class TooManyRequestsException(ServiceError):
|
|
56
|
+
"""Modeled error for Smithy shape ``com.amazonaws.lambdacore#TooManyRequestsException``."""
|
|
57
|
+
|
|
58
|
+
code: str | None = "TooManyRequestsException"
|
|
59
|
+
|
|
60
|
+
def __init__(self, data: TooManyRequestsException_, message: str | None = None):
|
|
61
|
+
super().__init__(
|
|
62
|
+
"client",
|
|
63
|
+
is_throttling_error=False,
|
|
64
|
+
is_retryable=False,
|
|
65
|
+
code="TooManyRequestsException",
|
|
66
|
+
message=message,
|
|
67
|
+
)
|
|
68
|
+
self.data = data
|
|
69
|
+
|
|
70
|
+
@classmethod
|
|
71
|
+
def from_json(
|
|
72
|
+
cls, data: dict, message: str | None = None
|
|
73
|
+
) -> "TooManyRequestsException":
|
|
74
|
+
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,31 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdacore#AssociatedComputeResourceTypesList``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_lambda_core.types.compute_resource_type
|
|
7
|
+
|
|
8
|
+
AssociatedComputeResourceTypesList: TypeAlias = list[
|
|
9
|
+
"capo_lambda_core.types.compute_resource_type.ComputeResourceType"
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# --- restJson1 ser/de ---
|
|
14
|
+
def serialize_json(value: AssociatedComputeResourceTypesList) -> list:
|
|
15
|
+
import capo_lambda_core.types.compute_resource_type
|
|
16
|
+
|
|
17
|
+
out: list = []
|
|
18
|
+
for item in value:
|
|
19
|
+
out.append(capo_lambda_core.types.compute_resource_type.serialize_json(item))
|
|
20
|
+
return out
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def deserialize_json(data: list) -> AssociatedComputeResourceTypesList:
|
|
24
|
+
import capo_lambda_core.types.compute_resource_type
|
|
25
|
+
|
|
26
|
+
out: AssociatedComputeResourceTypesList = []
|
|
27
|
+
for item in data:
|
|
28
|
+
if item is None:
|
|
29
|
+
continue
|
|
30
|
+
out.append(capo_lambda_core.types.compute_resource_type.deserialize_json(item))
|
|
31
|
+
return out
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdacore#ComputeResourceType``."""
|
|
2
|
+
|
|
3
|
+
from typing import Literal, TypeAlias, cast
|
|
4
|
+
|
|
5
|
+
ComputeResourceType: TypeAlias = Literal["MicroVm",]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# --- restJson1 ser/de ---
|
|
9
|
+
def serialize_json(value: ComputeResourceType) -> str:
|
|
10
|
+
return value
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def deserialize_json(data: str) -> ComputeResourceType:
|
|
14
|
+
return cast(ComputeResourceType, data)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdacore#CoreTimestamp``."""
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
from typing import TypeAlias
|
|
5
|
+
|
|
6
|
+
CoreTimestamp: TypeAlias = datetime.datetime
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# --- restJson1 ser/de ---
|
|
10
|
+
def serialize_json(value: CoreTimestamp) -> str:
|
|
11
|
+
value = (
|
|
12
|
+
value.astimezone(datetime.timezone.utc)
|
|
13
|
+
if value.tzinfo
|
|
14
|
+
else value.replace(tzinfo=datetime.timezone.utc)
|
|
15
|
+
)
|
|
16
|
+
return value.isoformat().replace("+00:00", "Z")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def deserialize_json(data: str) -> CoreTimestamp:
|
|
20
|
+
return datetime.datetime.fromisoformat(data.replace("Z", "+00:00"))
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdacore#CreateNetworkConnectorRequest``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_lambda_core.errors import DeserializationError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_lambda_core.types.client_token_string
|
|
11
|
+
import capo_lambda_core.types.network_connector_configuration
|
|
12
|
+
import capo_lambda_core.types.network_connector_name
|
|
13
|
+
import capo_lambda_core.types.network_connector_role_arn
|
|
14
|
+
import capo_lambda_core.types.network_connector_tags
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class CreateNetworkConnectorRequest(TypedDict, closed=True):
|
|
18
|
+
name: "capo_lambda_core.types.network_connector_name.NetworkConnectorName"
|
|
19
|
+
"""<p>A unique name for the network connector within your account and Region. You can use the name to identify the connector in subsequent API calls.</p>"""
|
|
20
|
+
configuration: "capo_lambda_core.types.network_connector_configuration.NetworkConnectorConfiguration"
|
|
21
|
+
"""<p>The network configuration for the connector. Specify a <code>VpcEgressConfiguration</code> to enable outbound traffic routing through your VPC.</p>"""
|
|
22
|
+
operator_role: NotRequired[
|
|
23
|
+
"capo_lambda_core.types.network_connector_role_arn.NetworkConnectorRoleArn"
|
|
24
|
+
]
|
|
25
|
+
"""<p>The ARN of the IAM role that Lambda assumes to manage elastic network interfaces in your VPC. This role must have permissions for <code>ec2:CreateNetworkInterface</code>, <code>ec2:DeleteNetworkInterface</code>, and related describe operations.</p>"""
|
|
26
|
+
client_token: NotRequired[
|
|
27
|
+
"capo_lambda_core.types.client_token_string.ClientTokenString"
|
|
28
|
+
]
|
|
29
|
+
"""<p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request with the same client token, the API returns the existing connector without creating a duplicate.</p>"""
|
|
30
|
+
tags: NotRequired[
|
|
31
|
+
"capo_lambda_core.types.network_connector_tags.NetworkConnectorTags"
|
|
32
|
+
]
|
|
33
|
+
"""<p>A map of key-value pairs to associate with the network connector for organization, cost allocation, or access control.</p>"""
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# --- restJson1 ser/de ---
|
|
37
|
+
def serialize_json(value: CreateNetworkConnectorRequest) -> dict:
|
|
38
|
+
out: dict = {}
|
|
39
|
+
out["Name"] = value["name"]
|
|
40
|
+
import capo_lambda_core.types.network_connector_configuration
|
|
41
|
+
|
|
42
|
+
out["Configuration"] = (
|
|
43
|
+
capo_lambda_core.types.network_connector_configuration.serialize_json(
|
|
44
|
+
value["configuration"]
|
|
45
|
+
)
|
|
46
|
+
)
|
|
47
|
+
if "operator_role" in value:
|
|
48
|
+
out["OperatorRole"] = value["operator_role"]
|
|
49
|
+
if "client_token" in value:
|
|
50
|
+
out["ClientToken"] = value["client_token"]
|
|
51
|
+
if "tags" in value:
|
|
52
|
+
import capo_lambda_core.types.network_connector_tags
|
|
53
|
+
|
|
54
|
+
out["Tags"] = capo_lambda_core.types.network_connector_tags.serialize_json(
|
|
55
|
+
value["tags"]
|
|
56
|
+
)
|
|
57
|
+
return out
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def deserialize_json(data: dict) -> CreateNetworkConnectorRequest:
|
|
61
|
+
out: CreateNetworkConnectorRequest = {} # type: ignore[typeddict-item]
|
|
62
|
+
if data.get("Name") is not None:
|
|
63
|
+
out["name"] = data["Name"]
|
|
64
|
+
else:
|
|
65
|
+
raise DeserializationError("CreateNetworkConnectorRequest.name required")
|
|
66
|
+
if data.get("Configuration") is not None:
|
|
67
|
+
import capo_lambda_core.types.network_connector_configuration
|
|
68
|
+
|
|
69
|
+
out["configuration"] = (
|
|
70
|
+
capo_lambda_core.types.network_connector_configuration.deserialize_json(
|
|
71
|
+
data["Configuration"]
|
|
72
|
+
)
|
|
73
|
+
)
|
|
74
|
+
else:
|
|
75
|
+
raise DeserializationError(
|
|
76
|
+
"CreateNetworkConnectorRequest.configuration required"
|
|
77
|
+
)
|
|
78
|
+
if data.get("OperatorRole") is not None:
|
|
79
|
+
out["operator_role"] = data["OperatorRole"]
|
|
80
|
+
if data.get("ClientToken") is not None:
|
|
81
|
+
out["client_token"] = data["ClientToken"]
|
|
82
|
+
if data.get("Tags") is not None:
|
|
83
|
+
import capo_lambda_core.types.network_connector_tags
|
|
84
|
+
|
|
85
|
+
out["tags"] = capo_lambda_core.types.network_connector_tags.deserialize_json(
|
|
86
|
+
data["Tags"]
|
|
87
|
+
)
|
|
88
|
+
return out
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdacore#CreateNetworkConnectorResponse``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_lambda_core.errors import DeserializationError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_lambda_core.types.network_connector_arn
|
|
11
|
+
import capo_lambda_core.types.network_connector_configuration
|
|
12
|
+
import capo_lambda_core.types.network_connector_id
|
|
13
|
+
import capo_lambda_core.types.network_connector_name
|
|
14
|
+
import capo_lambda_core.types.network_connector_role_arn
|
|
15
|
+
import capo_lambda_core.types.network_connector_state
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class CreateNetworkConnectorResponse(TypedDict, closed=True):
|
|
19
|
+
arn: "capo_lambda_core.types.network_connector_arn.NetworkConnectorArn"
|
|
20
|
+
"""<p>The Amazon Resource Name (ARN) of the network connector.</p>"""
|
|
21
|
+
name: "capo_lambda_core.types.network_connector_name.NetworkConnectorName"
|
|
22
|
+
"""<p>The name of the network connector.</p>"""
|
|
23
|
+
id: "capo_lambda_core.types.network_connector_id.NetworkConnectorId"
|
|
24
|
+
configuration: NotRequired[
|
|
25
|
+
"capo_lambda_core.types.network_connector_configuration.NetworkConnectorConfiguration"
|
|
26
|
+
]
|
|
27
|
+
"""<p>The network configuration of the connector, including VPC subnets and security groups.</p>"""
|
|
28
|
+
operator_role: NotRequired[
|
|
29
|
+
"capo_lambda_core.types.network_connector_role_arn.NetworkConnectorRoleArn"
|
|
30
|
+
]
|
|
31
|
+
"""<p>The ARN of the IAM role that Lambda uses to manage the underlying ENI resources for this connector.</p>"""
|
|
32
|
+
state: NotRequired[
|
|
33
|
+
"capo_lambda_core.types.network_connector_state.NetworkConnectorState"
|
|
34
|
+
]
|
|
35
|
+
"""<p>The current state of the network connector.</p>"""
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# --- restJson1 ser/de ---
|
|
39
|
+
def serialize_json(value: CreateNetworkConnectorResponse) -> dict:
|
|
40
|
+
out: dict = {}
|
|
41
|
+
out["Arn"] = value["arn"]
|
|
42
|
+
out["Name"] = value["name"]
|
|
43
|
+
out["Id"] = value["id"]
|
|
44
|
+
if "configuration" in value:
|
|
45
|
+
import capo_lambda_core.types.network_connector_configuration
|
|
46
|
+
|
|
47
|
+
out["Configuration"] = (
|
|
48
|
+
capo_lambda_core.types.network_connector_configuration.serialize_json(
|
|
49
|
+
value["configuration"]
|
|
50
|
+
)
|
|
51
|
+
)
|
|
52
|
+
if "operator_role" in value:
|
|
53
|
+
out["OperatorRole"] = value["operator_role"]
|
|
54
|
+
if "state" in value:
|
|
55
|
+
import capo_lambda_core.types.network_connector_state
|
|
56
|
+
|
|
57
|
+
out["State"] = capo_lambda_core.types.network_connector_state.serialize_json(
|
|
58
|
+
value["state"]
|
|
59
|
+
)
|
|
60
|
+
return out
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def deserialize_json(data: dict) -> CreateNetworkConnectorResponse:
|
|
64
|
+
out: CreateNetworkConnectorResponse = {} # type: ignore[typeddict-item]
|
|
65
|
+
if data.get("Arn") is not None:
|
|
66
|
+
out["arn"] = data["Arn"]
|
|
67
|
+
else:
|
|
68
|
+
raise DeserializationError("CreateNetworkConnectorResponse.arn required")
|
|
69
|
+
if data.get("Name") is not None:
|
|
70
|
+
out["name"] = data["Name"]
|
|
71
|
+
else:
|
|
72
|
+
raise DeserializationError("CreateNetworkConnectorResponse.name required")
|
|
73
|
+
if data.get("Id") is not None:
|
|
74
|
+
out["id"] = data["Id"]
|
|
75
|
+
else:
|
|
76
|
+
raise DeserializationError("CreateNetworkConnectorResponse.id required")
|
|
77
|
+
if data.get("Configuration") is not None:
|
|
78
|
+
import capo_lambda_core.types.network_connector_configuration
|
|
79
|
+
|
|
80
|
+
out["configuration"] = (
|
|
81
|
+
capo_lambda_core.types.network_connector_configuration.deserialize_json(
|
|
82
|
+
data["Configuration"]
|
|
83
|
+
)
|
|
84
|
+
)
|
|
85
|
+
if data.get("OperatorRole") is not None:
|
|
86
|
+
out["operator_role"] = data["OperatorRole"]
|
|
87
|
+
if data.get("State") is not None:
|
|
88
|
+
import capo_lambda_core.types.network_connector_state
|
|
89
|
+
|
|
90
|
+
out["state"] = capo_lambda_core.types.network_connector_state.deserialize_json(
|
|
91
|
+
data["State"]
|
|
92
|
+
)
|
|
93
|
+
return out
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdacore#DeleteNetworkConnectorRequest``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
import capo_lambda_core.types.network_connector_identifier
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class DeleteNetworkConnectorRequest(TypedDict, closed=True):
|
|
12
|
+
identifier: (
|
|
13
|
+
"capo_lambda_core.types.network_connector_identifier.NetworkConnectorIdentifier"
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# --- restJson1 ser/de ---
|
|
18
|
+
def serialize_json(value: DeleteNetworkConnectorRequest) -> dict:
|
|
19
|
+
out: dict = {}
|
|
20
|
+
return out
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def deserialize_json(data: dict) -> DeleteNetworkConnectorRequest:
|
|
24
|
+
out: DeleteNetworkConnectorRequest = {} # type: ignore[typeddict-item]
|
|
25
|
+
return out
|