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,94 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdacore#NetworkConnectorSummary``."""
|
|
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.core_timestamp
|
|
11
|
+
import capo_lambda_core.types.network_connector_arn
|
|
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_state
|
|
15
|
+
import capo_lambda_core.types.network_connector_type
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class NetworkConnectorSummary(TypedDict, closed=True):
|
|
19
|
+
arn: "capo_lambda_core.types.network_connector_arn.NetworkConnectorArn"
|
|
20
|
+
"""<p>The 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
|
+
type: "capo_lambda_core.types.network_connector_type.NetworkConnectorType"
|
|
25
|
+
"""<p>The type of the network connector (<code>VPC_EGRESS</code>).</p>"""
|
|
26
|
+
state: NotRequired[
|
|
27
|
+
"capo_lambda_core.types.network_connector_state.NetworkConnectorState"
|
|
28
|
+
]
|
|
29
|
+
"""<p>The current state of the network connector.</p>"""
|
|
30
|
+
last_modified: NotRequired["capo_lambda_core.types.core_timestamp.CoreTimestamp"]
|
|
31
|
+
"""<p>The date and time when the connector was last modified.</p>"""
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# --- restJson1 ser/de ---
|
|
35
|
+
def serialize_json(value: NetworkConnectorSummary) -> dict:
|
|
36
|
+
out: dict = {}
|
|
37
|
+
out["Arn"] = value["arn"]
|
|
38
|
+
out["Name"] = value["name"]
|
|
39
|
+
out["Id"] = value["id"]
|
|
40
|
+
import capo_lambda_core.types.network_connector_type
|
|
41
|
+
|
|
42
|
+
out["Type"] = capo_lambda_core.types.network_connector_type.serialize_json(
|
|
43
|
+
value["type"]
|
|
44
|
+
)
|
|
45
|
+
if "state" in value:
|
|
46
|
+
import capo_lambda_core.types.network_connector_state
|
|
47
|
+
|
|
48
|
+
out["State"] = capo_lambda_core.types.network_connector_state.serialize_json(
|
|
49
|
+
value["state"]
|
|
50
|
+
)
|
|
51
|
+
if "last_modified" in value:
|
|
52
|
+
import capo_lambda_core.types.core_timestamp
|
|
53
|
+
|
|
54
|
+
out["LastModified"] = capo_lambda_core.types.core_timestamp.serialize_json(
|
|
55
|
+
value["last_modified"]
|
|
56
|
+
)
|
|
57
|
+
return out
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def deserialize_json(data: dict) -> NetworkConnectorSummary:
|
|
61
|
+
out: NetworkConnectorSummary = {} # type: ignore[typeddict-item]
|
|
62
|
+
if data.get("Arn") is not None:
|
|
63
|
+
out["arn"] = data["Arn"]
|
|
64
|
+
else:
|
|
65
|
+
raise DeserializationError("NetworkConnectorSummary.arn required")
|
|
66
|
+
if data.get("Name") is not None:
|
|
67
|
+
out["name"] = data["Name"]
|
|
68
|
+
else:
|
|
69
|
+
raise DeserializationError("NetworkConnectorSummary.name required")
|
|
70
|
+
if data.get("Id") is not None:
|
|
71
|
+
out["id"] = data["Id"]
|
|
72
|
+
else:
|
|
73
|
+
raise DeserializationError("NetworkConnectorSummary.id required")
|
|
74
|
+
if data.get("Type") is not None:
|
|
75
|
+
import capo_lambda_core.types.network_connector_type
|
|
76
|
+
|
|
77
|
+
out["type"] = capo_lambda_core.types.network_connector_type.deserialize_json(
|
|
78
|
+
data["Type"]
|
|
79
|
+
)
|
|
80
|
+
else:
|
|
81
|
+
raise DeserializationError("NetworkConnectorSummary.type required")
|
|
82
|
+
if data.get("State") is not None:
|
|
83
|
+
import capo_lambda_core.types.network_connector_state
|
|
84
|
+
|
|
85
|
+
out["state"] = capo_lambda_core.types.network_connector_state.deserialize_json(
|
|
86
|
+
data["State"]
|
|
87
|
+
)
|
|
88
|
+
if data.get("LastModified") is not None:
|
|
89
|
+
import capo_lambda_core.types.core_timestamp
|
|
90
|
+
|
|
91
|
+
out["last_modified"] = capo_lambda_core.types.core_timestamp.deserialize_json(
|
|
92
|
+
data["LastModified"]
|
|
93
|
+
)
|
|
94
|
+
return out
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdacore#NetworkConnectorTags``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_lambda_core.types.network_connector_tag_key
|
|
7
|
+
import capo_lambda_core.types.network_connector_tag_value
|
|
8
|
+
|
|
9
|
+
NetworkConnectorTags: TypeAlias = dict[
|
|
10
|
+
"capo_lambda_core.types.network_connector_tag_key.NetworkConnectorTagKey",
|
|
11
|
+
"capo_lambda_core.types.network_connector_tag_value.NetworkConnectorTagValue",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# --- restJson1 ser/de ---
|
|
16
|
+
def serialize_json(input_to_serialize: NetworkConnectorTags) -> dict:
|
|
17
|
+
out: dict = {}
|
|
18
|
+
for key, value in input_to_serialize.items():
|
|
19
|
+
out[key] = value
|
|
20
|
+
return out
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def deserialize_json(data: dict) -> NetworkConnectorTags:
|
|
24
|
+
out: NetworkConnectorTags = {}
|
|
25
|
+
for key, value in data.items():
|
|
26
|
+
if value is None:
|
|
27
|
+
continue
|
|
28
|
+
out[key] = value
|
|
29
|
+
return out
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdacore#NetworkConnectorType``."""
|
|
2
|
+
|
|
3
|
+
from typing import Literal, TypeAlias, cast
|
|
4
|
+
|
|
5
|
+
NetworkConnectorType: TypeAlias = Literal["VPC_EGRESS",]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# --- restJson1 ser/de ---
|
|
9
|
+
def serialize_json(value: NetworkConnectorType) -> str:
|
|
10
|
+
return value
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def deserialize_json(data: str) -> NetworkConnectorType:
|
|
14
|
+
return cast(NetworkConnectorType, data)
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdacore#NetworkConnectorVpcEgressConfiguration``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
import capo_lambda_core.types.associated_compute_resource_types_list
|
|
9
|
+
import capo_lambda_core.types.network_connector_security_group_ids
|
|
10
|
+
import capo_lambda_core.types.network_connector_subnet_ids
|
|
11
|
+
import capo_lambda_core.types.network_protocol
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class NetworkConnectorVpcEgressConfiguration(TypedDict, closed=True):
|
|
15
|
+
subnet_ids: NotRequired[
|
|
16
|
+
"capo_lambda_core.types.network_connector_subnet_ids.NetworkConnectorSubnetIds"
|
|
17
|
+
]
|
|
18
|
+
"""<p>The IDs of the VPC subnets where Lambda provisions elastic network interfaces (ENIs). Specify 1 to 16 subnets. All subnets must be in the same VPC.</p>"""
|
|
19
|
+
security_group_ids: NotRequired[
|
|
20
|
+
"capo_lambda_core.types.network_connector_security_group_ids.NetworkConnectorSecurityGroupIds"
|
|
21
|
+
]
|
|
22
|
+
"""<p>The IDs of the VPC security groups to attach to the ENIs. Specify 0 to 5 security groups. All security groups must be in the same VPC as the subnets.</p>"""
|
|
23
|
+
network_protocol: NotRequired[
|
|
24
|
+
"capo_lambda_core.types.network_protocol.NetworkProtocol"
|
|
25
|
+
]
|
|
26
|
+
"""<p>The network protocol for the connector. Specify <code>IPv4</code> for IPv4-only networking, or <code>DualStack</code> for both IPv4 and IPv6.</p>"""
|
|
27
|
+
associated_compute_resource_types: NotRequired[
|
|
28
|
+
"capo_lambda_core.types.associated_compute_resource_types_list.AssociatedComputeResourceTypesList"
|
|
29
|
+
]
|
|
30
|
+
"""<p>The types of Lambda compute resources that can use this connector. Currently, only <code>MicroVm</code> is supported.</p>"""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# --- restJson1 ser/de ---
|
|
34
|
+
def serialize_json(value: NetworkConnectorVpcEgressConfiguration) -> dict:
|
|
35
|
+
out: dict = {}
|
|
36
|
+
if "subnet_ids" in value:
|
|
37
|
+
import capo_lambda_core.types.network_connector_subnet_ids
|
|
38
|
+
|
|
39
|
+
out["SubnetIds"] = (
|
|
40
|
+
capo_lambda_core.types.network_connector_subnet_ids.serialize_json(
|
|
41
|
+
value["subnet_ids"]
|
|
42
|
+
)
|
|
43
|
+
)
|
|
44
|
+
if "security_group_ids" in value:
|
|
45
|
+
import capo_lambda_core.types.network_connector_security_group_ids
|
|
46
|
+
|
|
47
|
+
out["SecurityGroupIds"] = (
|
|
48
|
+
capo_lambda_core.types.network_connector_security_group_ids.serialize_json(
|
|
49
|
+
value["security_group_ids"]
|
|
50
|
+
)
|
|
51
|
+
)
|
|
52
|
+
if "network_protocol" in value:
|
|
53
|
+
import capo_lambda_core.types.network_protocol
|
|
54
|
+
|
|
55
|
+
out["NetworkProtocol"] = capo_lambda_core.types.network_protocol.serialize_json(
|
|
56
|
+
value["network_protocol"]
|
|
57
|
+
)
|
|
58
|
+
if "associated_compute_resource_types" in value:
|
|
59
|
+
import capo_lambda_core.types.associated_compute_resource_types_list
|
|
60
|
+
|
|
61
|
+
out["AssociatedComputeResourceTypes"] = (
|
|
62
|
+
capo_lambda_core.types.associated_compute_resource_types_list.serialize_json(
|
|
63
|
+
value["associated_compute_resource_types"]
|
|
64
|
+
)
|
|
65
|
+
)
|
|
66
|
+
return out
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def deserialize_json(data: dict) -> NetworkConnectorVpcEgressConfiguration:
|
|
70
|
+
out: NetworkConnectorVpcEgressConfiguration = {} # type: ignore[typeddict-item]
|
|
71
|
+
if data.get("SubnetIds") is not None:
|
|
72
|
+
import capo_lambda_core.types.network_connector_subnet_ids
|
|
73
|
+
|
|
74
|
+
out["subnet_ids"] = (
|
|
75
|
+
capo_lambda_core.types.network_connector_subnet_ids.deserialize_json(
|
|
76
|
+
data["SubnetIds"]
|
|
77
|
+
)
|
|
78
|
+
)
|
|
79
|
+
if data.get("SecurityGroupIds") is not None:
|
|
80
|
+
import capo_lambda_core.types.network_connector_security_group_ids
|
|
81
|
+
|
|
82
|
+
out["security_group_ids"] = (
|
|
83
|
+
capo_lambda_core.types.network_connector_security_group_ids.deserialize_json(
|
|
84
|
+
data["SecurityGroupIds"]
|
|
85
|
+
)
|
|
86
|
+
)
|
|
87
|
+
if data.get("NetworkProtocol") is not None:
|
|
88
|
+
import capo_lambda_core.types.network_protocol
|
|
89
|
+
|
|
90
|
+
out["network_protocol"] = (
|
|
91
|
+
capo_lambda_core.types.network_protocol.deserialize_json(
|
|
92
|
+
data["NetworkProtocol"]
|
|
93
|
+
)
|
|
94
|
+
)
|
|
95
|
+
if data.get("AssociatedComputeResourceTypes") is not None:
|
|
96
|
+
import capo_lambda_core.types.associated_compute_resource_types_list
|
|
97
|
+
|
|
98
|
+
out["associated_compute_resource_types"] = (
|
|
99
|
+
capo_lambda_core.types.associated_compute_resource_types_list.deserialize_json(
|
|
100
|
+
data["AssociatedComputeResourceTypes"]
|
|
101
|
+
)
|
|
102
|
+
)
|
|
103
|
+
return out
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdacore#NetworkConnectorsList``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_lambda_core.types.network_connector_summary
|
|
7
|
+
|
|
8
|
+
NetworkConnectorsList: TypeAlias = list[
|
|
9
|
+
"capo_lambda_core.types.network_connector_summary.NetworkConnectorSummary"
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# --- restJson1 ser/de ---
|
|
14
|
+
def serialize_json(value: NetworkConnectorsList) -> list:
|
|
15
|
+
import capo_lambda_core.types.network_connector_summary
|
|
16
|
+
|
|
17
|
+
out: list = []
|
|
18
|
+
for item in value:
|
|
19
|
+
out.append(
|
|
20
|
+
capo_lambda_core.types.network_connector_summary.serialize_json(item)
|
|
21
|
+
)
|
|
22
|
+
return out
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def deserialize_json(data: list) -> NetworkConnectorsList:
|
|
26
|
+
import capo_lambda_core.types.network_connector_summary
|
|
27
|
+
|
|
28
|
+
out: NetworkConnectorsList = []
|
|
29
|
+
for item in data:
|
|
30
|
+
if item is None:
|
|
31
|
+
continue
|
|
32
|
+
out.append(
|
|
33
|
+
capo_lambda_core.types.network_connector_summary.deserialize_json(item)
|
|
34
|
+
)
|
|
35
|
+
return out
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdacore#NetworkProtocol``."""
|
|
2
|
+
|
|
3
|
+
from typing import Literal, TypeAlias, cast
|
|
4
|
+
|
|
5
|
+
NetworkProtocol: TypeAlias = Literal[
|
|
6
|
+
"IPv4",
|
|
7
|
+
"DualStack",
|
|
8
|
+
]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- restJson1 ser/de ---
|
|
12
|
+
def serialize_json(value: NetworkProtocol) -> str:
|
|
13
|
+
return value
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def deserialize_json(data: str) -> NetworkProtocol:
|
|
17
|
+
return cast(NetworkProtocol, data)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdacore#ThrottleReason``."""
|
|
2
|
+
|
|
3
|
+
from typing import Literal, TypeAlias, cast
|
|
4
|
+
|
|
5
|
+
ThrottleReason: TypeAlias = Literal[
|
|
6
|
+
"ConcurrentInvocationLimitExceeded",
|
|
7
|
+
"FunctionInvocationRateLimitExceeded",
|
|
8
|
+
"ReservedFunctionConcurrentInvocationLimitExceeded",
|
|
9
|
+
"ReservedFunctionInvocationRateLimitExceeded",
|
|
10
|
+
"CallerRateLimitExceeded",
|
|
11
|
+
"ConcurrentSnapshotCreateLimitExceeded",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# --- restJson1 ser/de ---
|
|
16
|
+
def serialize_json(value: ThrottleReason) -> str:
|
|
17
|
+
return value
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def deserialize_json(data: str) -> ThrottleReason:
|
|
21
|
+
return cast(ThrottleReason, data)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdacore#UpdateNetworkConnectorRequest``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
import capo_lambda_core.types.client_token_string
|
|
9
|
+
import capo_lambda_core.types.network_connector_configuration
|
|
10
|
+
import capo_lambda_core.types.network_connector_identifier
|
|
11
|
+
import capo_lambda_core.types.network_connector_role_arn
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class UpdateNetworkConnectorRequest(TypedDict, closed=True):
|
|
15
|
+
identifier: (
|
|
16
|
+
"capo_lambda_core.types.network_connector_identifier.NetworkConnectorIdentifier"
|
|
17
|
+
)
|
|
18
|
+
configuration: NotRequired[
|
|
19
|
+
"capo_lambda_core.types.network_connector_configuration.NetworkConnectorConfiguration"
|
|
20
|
+
]
|
|
21
|
+
"""<p>The updated network configuration for the connector. Provide the full <code>VpcEgressConfiguration</code> including all subnet IDs and security group IDs — this replaces the existing configuration.</p>"""
|
|
22
|
+
operator_role: NotRequired[
|
|
23
|
+
"capo_lambda_core.types.network_connector_role_arn.NetworkConnectorRoleArn"
|
|
24
|
+
]
|
|
25
|
+
"""<p>The updated ARN of the IAM role that Lambda assumes to manage ENIs. Use this to change the operator role without recreating the connector.</p>"""
|
|
26
|
+
client_token: NotRequired[
|
|
27
|
+
"capo_lambda_core.types.client_token_string.ClientTokenString"
|
|
28
|
+
]
|
|
29
|
+
"""<p>A unique, case-sensitive identifier to ensure idempotency of the update request.</p>"""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# --- restJson1 ser/de ---
|
|
33
|
+
def serialize_json(value: UpdateNetworkConnectorRequest) -> dict:
|
|
34
|
+
out: dict = {}
|
|
35
|
+
if "configuration" in value:
|
|
36
|
+
import capo_lambda_core.types.network_connector_configuration
|
|
37
|
+
|
|
38
|
+
out["Configuration"] = (
|
|
39
|
+
capo_lambda_core.types.network_connector_configuration.serialize_json(
|
|
40
|
+
value["configuration"]
|
|
41
|
+
)
|
|
42
|
+
)
|
|
43
|
+
if "operator_role" in value:
|
|
44
|
+
out["OperatorRole"] = value["operator_role"]
|
|
45
|
+
if "client_token" in value:
|
|
46
|
+
out["ClientToken"] = value["client_token"]
|
|
47
|
+
return out
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def deserialize_json(data: dict) -> UpdateNetworkConnectorRequest:
|
|
51
|
+
out: UpdateNetworkConnectorRequest = {} # type: ignore[typeddict-item]
|
|
52
|
+
if data.get("Configuration") is not None:
|
|
53
|
+
import capo_lambda_core.types.network_connector_configuration
|
|
54
|
+
|
|
55
|
+
out["configuration"] = (
|
|
56
|
+
capo_lambda_core.types.network_connector_configuration.deserialize_json(
|
|
57
|
+
data["Configuration"]
|
|
58
|
+
)
|
|
59
|
+
)
|
|
60
|
+
if data.get("OperatorRole") is not None:
|
|
61
|
+
out["operator_role"] = data["OperatorRole"]
|
|
62
|
+
if data.get("ClientToken") is not None:
|
|
63
|
+
out["client_token"] = data["ClientToken"]
|
|
64
|
+
return out
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdacore#UpdateNetworkConnectorResponse``."""
|
|
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.core_timestamp
|
|
11
|
+
import capo_lambda_core.types.network_connector_arn
|
|
12
|
+
import capo_lambda_core.types.network_connector_configuration
|
|
13
|
+
import capo_lambda_core.types.network_connector_id
|
|
14
|
+
import capo_lambda_core.types.network_connector_last_update_status
|
|
15
|
+
import capo_lambda_core.types.network_connector_last_update_status_reason
|
|
16
|
+
import capo_lambda_core.types.network_connector_name
|
|
17
|
+
import capo_lambda_core.types.network_connector_role_arn
|
|
18
|
+
import capo_lambda_core.types.network_connector_state
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class UpdateNetworkConnectorResponse(TypedDict, closed=True):
|
|
22
|
+
arn: "capo_lambda_core.types.network_connector_arn.NetworkConnectorArn"
|
|
23
|
+
"""<p>The Amazon Resource Name (ARN) of the network connector.</p>"""
|
|
24
|
+
name: "capo_lambda_core.types.network_connector_name.NetworkConnectorName"
|
|
25
|
+
"""<p>The name of the network connector.</p>"""
|
|
26
|
+
id: "capo_lambda_core.types.network_connector_id.NetworkConnectorId"
|
|
27
|
+
operator_role: NotRequired[
|
|
28
|
+
"capo_lambda_core.types.network_connector_role_arn.NetworkConnectorRoleArn"
|
|
29
|
+
]
|
|
30
|
+
"""<p>The ARN of the IAM role that Lambda uses to manage the underlying ENI resources for this connector.</p>"""
|
|
31
|
+
configuration: NotRequired[
|
|
32
|
+
"capo_lambda_core.types.network_connector_configuration.NetworkConnectorConfiguration"
|
|
33
|
+
]
|
|
34
|
+
"""<p>The network configuration of the connector, including VPC subnets and security groups.</p>"""
|
|
35
|
+
state: NotRequired[
|
|
36
|
+
"capo_lambda_core.types.network_connector_state.NetworkConnectorState"
|
|
37
|
+
]
|
|
38
|
+
"""<p>The current state of the network connector.</p>"""
|
|
39
|
+
last_update_status: NotRequired[
|
|
40
|
+
"capo_lambda_core.types.network_connector_last_update_status.NetworkConnectorLastUpdateStatus"
|
|
41
|
+
]
|
|
42
|
+
"""<p>The status of this update operation (typically <code>InProgress</code> immediately after the call).</p>"""
|
|
43
|
+
last_update_status_reason: NotRequired[
|
|
44
|
+
"capo_lambda_core.types.network_connector_last_update_status_reason.NetworkConnectorLastUpdateStatusReason"
|
|
45
|
+
]
|
|
46
|
+
"""<p>A human-readable explanation of the update status.</p>"""
|
|
47
|
+
last_modified: NotRequired["capo_lambda_core.types.core_timestamp.CoreTimestamp"]
|
|
48
|
+
"""<p>The timestamp of this update.</p>"""
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
# --- restJson1 ser/de ---
|
|
52
|
+
def serialize_json(value: UpdateNetworkConnectorResponse) -> dict:
|
|
53
|
+
out: dict = {}
|
|
54
|
+
out["Arn"] = value["arn"]
|
|
55
|
+
out["Name"] = value["name"]
|
|
56
|
+
out["Id"] = value["id"]
|
|
57
|
+
if "operator_role" in value:
|
|
58
|
+
out["OperatorRole"] = value["operator_role"]
|
|
59
|
+
if "configuration" in value:
|
|
60
|
+
import capo_lambda_core.types.network_connector_configuration
|
|
61
|
+
|
|
62
|
+
out["Configuration"] = (
|
|
63
|
+
capo_lambda_core.types.network_connector_configuration.serialize_json(
|
|
64
|
+
value["configuration"]
|
|
65
|
+
)
|
|
66
|
+
)
|
|
67
|
+
if "state" in value:
|
|
68
|
+
import capo_lambda_core.types.network_connector_state
|
|
69
|
+
|
|
70
|
+
out["State"] = capo_lambda_core.types.network_connector_state.serialize_json(
|
|
71
|
+
value["state"]
|
|
72
|
+
)
|
|
73
|
+
if "last_update_status" in value:
|
|
74
|
+
import capo_lambda_core.types.network_connector_last_update_status
|
|
75
|
+
|
|
76
|
+
out["LastUpdateStatus"] = (
|
|
77
|
+
capo_lambda_core.types.network_connector_last_update_status.serialize_json(
|
|
78
|
+
value["last_update_status"]
|
|
79
|
+
)
|
|
80
|
+
)
|
|
81
|
+
if "last_update_status_reason" in value:
|
|
82
|
+
out["LastUpdateStatusReason"] = value["last_update_status_reason"]
|
|
83
|
+
if "last_modified" in value:
|
|
84
|
+
import capo_lambda_core.types.core_timestamp
|
|
85
|
+
|
|
86
|
+
out["LastModified"] = capo_lambda_core.types.core_timestamp.serialize_json(
|
|
87
|
+
value["last_modified"]
|
|
88
|
+
)
|
|
89
|
+
return out
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def deserialize_json(data: dict) -> UpdateNetworkConnectorResponse:
|
|
93
|
+
out: UpdateNetworkConnectorResponse = {} # type: ignore[typeddict-item]
|
|
94
|
+
if data.get("Arn") is not None:
|
|
95
|
+
out["arn"] = data["Arn"]
|
|
96
|
+
else:
|
|
97
|
+
raise DeserializationError("UpdateNetworkConnectorResponse.arn required")
|
|
98
|
+
if data.get("Name") is not None:
|
|
99
|
+
out["name"] = data["Name"]
|
|
100
|
+
else:
|
|
101
|
+
raise DeserializationError("UpdateNetworkConnectorResponse.name required")
|
|
102
|
+
if data.get("Id") is not None:
|
|
103
|
+
out["id"] = data["Id"]
|
|
104
|
+
else:
|
|
105
|
+
raise DeserializationError("UpdateNetworkConnectorResponse.id required")
|
|
106
|
+
if data.get("OperatorRole") is not None:
|
|
107
|
+
out["operator_role"] = data["OperatorRole"]
|
|
108
|
+
if data.get("Configuration") is not None:
|
|
109
|
+
import capo_lambda_core.types.network_connector_configuration
|
|
110
|
+
|
|
111
|
+
out["configuration"] = (
|
|
112
|
+
capo_lambda_core.types.network_connector_configuration.deserialize_json(
|
|
113
|
+
data["Configuration"]
|
|
114
|
+
)
|
|
115
|
+
)
|
|
116
|
+
if data.get("State") is not None:
|
|
117
|
+
import capo_lambda_core.types.network_connector_state
|
|
118
|
+
|
|
119
|
+
out["state"] = capo_lambda_core.types.network_connector_state.deserialize_json(
|
|
120
|
+
data["State"]
|
|
121
|
+
)
|
|
122
|
+
if data.get("LastUpdateStatus") is not None:
|
|
123
|
+
import capo_lambda_core.types.network_connector_last_update_status
|
|
124
|
+
|
|
125
|
+
out["last_update_status"] = (
|
|
126
|
+
capo_lambda_core.types.network_connector_last_update_status.deserialize_json(
|
|
127
|
+
data["LastUpdateStatus"]
|
|
128
|
+
)
|
|
129
|
+
)
|
|
130
|
+
if data.get("LastUpdateStatusReason") is not None:
|
|
131
|
+
out["last_update_status_reason"] = data["LastUpdateStatusReason"]
|
|
132
|
+
if data.get("LastModified") is not None:
|
|
133
|
+
import capo_lambda_core.types.core_timestamp
|
|
134
|
+
|
|
135
|
+
out["last_modified"] = capo_lambda_core.types.core_timestamp.deserialize_json(
|
|
136
|
+
data["LastModified"]
|
|
137
|
+
)
|
|
138
|
+
return out
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: capo-lambda-core
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python SDK for Lambda Core.
|
|
5
|
+
Classifier: Development Status :: 4 - Beta
|
|
6
|
+
Classifier: Intended Audience :: Developers
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
16
|
+
Classifier: Typing :: Typed
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: zapros>=0.13.0
|
|
21
|
+
Provides-Extra: anyio
|
|
22
|
+
Requires-Dist: anyio>=3.0; extra == "anyio"
|
|
23
|
+
Provides-Extra: sso
|
|
24
|
+
Requires-Dist: capo-sso>=0.2.0; extra == "sso"
|
|
25
|
+
Requires-Dist: capo-sso-oidc>=0.2.0; extra == "sso"
|
|
26
|
+
Requires-Dist: capo-sts>=0.3.0; extra == "sso"
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# Getting Started
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
pip install capo-lambda-core
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
from capo_lambda_core import AsyncLambdaCoreClient
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
async def main():
|
|
44
|
+
async with AsyncLambdaCoreClient() as lambda_core:
|
|
45
|
+
# Example: call the create_network_connector operation
|
|
46
|
+
response = await lambda_core.create_network_connector()
|
|
47
|
+
print(response["arn"])
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Pagination
|
|
51
|
+
|
|
52
|
+
Some operations in this SDK support pagination. If the operation supports pagination it will have an `iter_` prefixed method that returns an async iterator.
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
from capo_lambda_core import AsyncLambdaCoreClient
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
async def main():
|
|
59
|
+
async with AsyncLambdaCoreClient() as lambda_core:
|
|
60
|
+
# Example: paginate over list_network_connectors
|
|
61
|
+
async for item in lambda_core.iter_list_network_connectors():
|
|
62
|
+
print(item)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Error Handling
|
|
66
|
+
|
|
67
|
+
The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
|
|
68
|
+
|
|
69
|
+
```python
|
|
70
|
+
from capo_lambda_core import AsyncLambdaCoreClient
|
|
71
|
+
from capo_lambda_core.error import InvalidParameterValueException
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
async def main():
|
|
75
|
+
async with AsyncLambdaCoreClient() as lambda_core:
|
|
76
|
+
try:
|
|
77
|
+
await lambda_core.create_network_connector()
|
|
78
|
+
except InvalidParameterValueException as e:
|
|
79
|
+
print(f"Error: {e}")
|
|
80
|
+
print(e.data) # additional error data
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Retrying
|
|
84
|
+
|
|
85
|
+
The SDK retries failed operations automatically. Retry behaviour follows the Smithy specification: errors are retried based on their `is_retryable` and `is_throttling_error` attributes. Throttling errors use a longer base delay. Network-level failures (connection errors and timeouts) are also retried. Non-retryable errors, such as client errors without the `@retryable` trait, are raised immediately without further attempts.
|
|
86
|
+
|
|
87
|
+
The number of attempts defaults to 3 and can be changed at the client level via `retry_max_attempts`, or per call via `config_overrides`.
|
|
88
|
+
|
|
89
|
+
```python
|
|
90
|
+
from capo_lambda_core import AsyncLambdaCoreClient
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
async def main():
|
|
94
|
+
async with AsyncLambdaCoreClient() as lambda_core:
|
|
95
|
+
# Default: 3 attempts for every operation
|
|
96
|
+
response = await lambda_core.create_network_connector()
|
|
97
|
+
|
|
98
|
+
# Override per operation
|
|
99
|
+
response = await lambda_core.create_network_connector(config_overrides={"retry_max_attempts": 5})
|
|
100
|
+
|
|
101
|
+
# Disable retries for this call
|
|
102
|
+
response = await lambda_core.create_network_connector(config_overrides={"retry_max_attempts": 1})
|
|
103
|
+
```
|