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,616 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import uuid
|
|
4
|
+
from typing import TYPE_CHECKING, Optional
|
|
5
|
+
|
|
6
|
+
import capo_lambda_core._auth._signers
|
|
7
|
+
import capo_lambda_core._auth._sigv4
|
|
8
|
+
from capo_lambda_core._services._pipeline import (
|
|
9
|
+
AsyncOperationRequest,
|
|
10
|
+
AsyncOperationResponse,
|
|
11
|
+
OperationRequest,
|
|
12
|
+
OperationResponse,
|
|
13
|
+
aexecute_pipeline,
|
|
14
|
+
execute_pipeline,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
if TYPE_CHECKING:
|
|
18
|
+
import capo_lambda_core.types.client_token_string
|
|
19
|
+
import capo_lambda_core.types.create_network_connector_request
|
|
20
|
+
import capo_lambda_core.types.create_network_connector_response
|
|
21
|
+
import capo_lambda_core.types.delete_network_connector_request
|
|
22
|
+
import capo_lambda_core.types.delete_network_connector_response
|
|
23
|
+
import capo_lambda_core.types.get_network_connector_request
|
|
24
|
+
import capo_lambda_core.types.get_network_connector_response
|
|
25
|
+
import capo_lambda_core.types.list_network_connectors_request
|
|
26
|
+
import capo_lambda_core.types.list_network_connectors_response
|
|
27
|
+
import capo_lambda_core.types.max_hundred_list_items
|
|
28
|
+
import capo_lambda_core.types.network_connector_configuration
|
|
29
|
+
import capo_lambda_core.types.network_connector_identifier
|
|
30
|
+
import capo_lambda_core.types.network_connector_name
|
|
31
|
+
import capo_lambda_core.types.network_connector_role_arn
|
|
32
|
+
import capo_lambda_core.types.network_connector_state
|
|
33
|
+
import capo_lambda_core.types.network_connector_summary
|
|
34
|
+
import capo_lambda_core.types.network_connector_tags
|
|
35
|
+
import capo_lambda_core.types.string
|
|
36
|
+
import capo_lambda_core.types.update_network_connector_request
|
|
37
|
+
import capo_lambda_core.types.update_network_connector_response
|
|
38
|
+
from capo_lambda_core._services.async_lambda_core import (
|
|
39
|
+
AsyncLambdaCoreClient,
|
|
40
|
+
AsyncLambdaCoreClientConfig,
|
|
41
|
+
)
|
|
42
|
+
from capo_lambda_core._services.lambda_core import (
|
|
43
|
+
LambdaCoreClient,
|
|
44
|
+
LambdaCoreClientConfig,
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class NetworkConnector:
|
|
49
|
+
def __init__(self, service: LambdaCoreClient) -> None:
|
|
50
|
+
self._service = service
|
|
51
|
+
|
|
52
|
+
def create(
|
|
53
|
+
self,
|
|
54
|
+
name: "capo_lambda_core.types.network_connector_name.NetworkConnectorName",
|
|
55
|
+
configuration: "capo_lambda_core.types.network_connector_configuration.NetworkConnectorConfiguration",
|
|
56
|
+
*,
|
|
57
|
+
config_overrides: Optional[LambdaCoreClientConfig] = None,
|
|
58
|
+
operator_role: Optional[
|
|
59
|
+
"capo_lambda_core.types.network_connector_role_arn.NetworkConnectorRoleArn"
|
|
60
|
+
] = None,
|
|
61
|
+
client_token: Optional[
|
|
62
|
+
"capo_lambda_core.types.client_token_string.ClientTokenString"
|
|
63
|
+
] = None,
|
|
64
|
+
tags: Optional[
|
|
65
|
+
"capo_lambda_core.types.network_connector_tags.NetworkConnectorTags"
|
|
66
|
+
] = None,
|
|
67
|
+
) -> "capo_lambda_core.types.create_network_connector_response.CreateNetworkConnectorResponse":
|
|
68
|
+
"""<p>Creates a network connector that enables Lambda compute resources to route outbound traffic through your Amazon VPC. The network connector provisions elastic network interfaces (ENIs) in the subnets you specify, providing a managed network path to private resources such as databases, caches, and internal APIs.</p> <p>This operation is asynchronous. The network connector starts in <code>PENDING</code> state while ENIs are provisioned in your VPC (provisioning typically takes up to 10 minutes). Use <code>GetNetworkConnector</code> to poll the connector state until it reaches <code>ACTIVE</code>. Once active, you can attach the connector to Lambda MicroVMs at run time using the <code>egressNetworkConnectors</code> parameter on <code>RunMicroVm</code>.</p> <p>This operation is idempotent when you provide a <code>ClientToken</code> — if you retry a request that completed successfully using the same client token, the operation returns the existing connector without creating a duplicate.</p>
|
|
69
|
+
|
|
70
|
+
Args:
|
|
71
|
+
name: <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>
|
|
72
|
+
configuration: <p>The network configuration for the connector. Specify a <code>VpcEgressConfiguration</code> to enable outbound traffic routing through your VPC.</p>
|
|
73
|
+
operator_role: <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>
|
|
74
|
+
client_token: <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>
|
|
75
|
+
tags: <p>A map of key-value pairs to associate with the network connector for organization, cost allocation, or access control.</p>
|
|
76
|
+
|
|
77
|
+
Raises:
|
|
78
|
+
capo_lambda_core.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid. Check the error message for details about which parameter failed validation.</p>
|
|
79
|
+
capo_lambda_core.errors.network_connector_limit_exceeded_exception.NetworkConnectorLimitExceededException: <p>The account has reached the maximum number of network connectors allowed. Delete unused connectors or request a limit increase through Service Quotas.</p>
|
|
80
|
+
capo_lambda_core.errors.resource_conflict_exception.ResourceConflictException: <p>The request could not be completed due to a conflict with the current state of the resource. For example, attempting to update a connector that is not in <code>ACTIVE</code> state.</p>
|
|
81
|
+
capo_lambda_core.errors.service_exception.ServiceException: <p>An internal service error occurred. Retry the request with exponential backoff.</p>
|
|
82
|
+
capo_lambda_core.errors.too_many_requests_exception.TooManyRequestsException: <p>The request was throttled due to exceeding the allowed request rate. Retry the request after a brief wait using exponential backoff.</p>
|
|
83
|
+
capo_lambda_core.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
84
|
+
"""
|
|
85
|
+
|
|
86
|
+
def _handler(
|
|
87
|
+
req: "OperationRequest[capo_lambda_core.types.create_network_connector_request.CreateNetworkConnectorRequest]",
|
|
88
|
+
) -> OperationResponse[
|
|
89
|
+
"capo_lambda_core.types.create_network_connector_response.CreateNetworkConnectorResponse"
|
|
90
|
+
]:
|
|
91
|
+
import capo_lambda_core._operations.lambda_core_api_service.create_network_connector
|
|
92
|
+
|
|
93
|
+
output, http_response = (
|
|
94
|
+
capo_lambda_core._operations.lambda_core_api_service.create_network_connector.create_network_connector(
|
|
95
|
+
req.options, req.input
|
|
96
|
+
)
|
|
97
|
+
)
|
|
98
|
+
return OperationResponse(output=output, response=http_response)
|
|
99
|
+
|
|
100
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
101
|
+
input_: capo_lambda_core.types.create_network_connector_request.CreateNetworkConnectorRequest = {
|
|
102
|
+
"name": name,
|
|
103
|
+
"configuration": configuration,
|
|
104
|
+
}
|
|
105
|
+
if operator_role is not None:
|
|
106
|
+
input_["operator_role"] = operator_role
|
|
107
|
+
if client_token is None:
|
|
108
|
+
client_token = str(uuid.uuid4())
|
|
109
|
+
input_["client_token"] = client_token
|
|
110
|
+
if tags is not None:
|
|
111
|
+
input_["tags"] = tags
|
|
112
|
+
|
|
113
|
+
response = execute_pipeline(
|
|
114
|
+
OperationRequest(input=input_, options=options_),
|
|
115
|
+
handler=_handler,
|
|
116
|
+
interceptors=list(interceptors_),
|
|
117
|
+
)
|
|
118
|
+
response.response.close()
|
|
119
|
+
return response.output
|
|
120
|
+
|
|
121
|
+
def read(
|
|
122
|
+
self,
|
|
123
|
+
identifier: "capo_lambda_core.types.network_connector_identifier.NetworkConnectorIdentifier",
|
|
124
|
+
*,
|
|
125
|
+
config_overrides: Optional[LambdaCoreClientConfig] = None,
|
|
126
|
+
) -> "capo_lambda_core.types.get_network_connector_response.GetNetworkConnectorResponse":
|
|
127
|
+
"""<p>Retrieves the current configuration, state, and metadata of a network connector. The <code>Identifier</code> parameter accepts the connector ID, name, or full ARN. Use this operation to poll connector state after creation or update, or to inspect the current VPC configuration and any failure reasons.</p> <p>The response includes the full connector configuration, current state, and — if the connector has been updated — the <code>LastUpdateStatus</code> and <code>LastUpdateStatusReasonCode</code> fields that indicate whether the most recent update succeeded or failed.</p>
|
|
128
|
+
|
|
129
|
+
Raises:
|
|
130
|
+
capo_lambda_core.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid. Check the error message for details about which parameter failed validation.</p>
|
|
131
|
+
capo_lambda_core.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified network connector does not exist. Verify the identifier (ID, name, or ARN) and Region.</p>
|
|
132
|
+
capo_lambda_core.errors.service_exception.ServiceException: <p>An internal service error occurred. Retry the request with exponential backoff.</p>
|
|
133
|
+
capo_lambda_core.errors.too_many_requests_exception.TooManyRequestsException: <p>The request was throttled due to exceeding the allowed request rate. Retry the request after a brief wait using exponential backoff.</p>
|
|
134
|
+
capo_lambda_core.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
135
|
+
"""
|
|
136
|
+
|
|
137
|
+
def _handler(
|
|
138
|
+
req: "OperationRequest[capo_lambda_core.types.get_network_connector_request.GetNetworkConnectorRequest]",
|
|
139
|
+
) -> OperationResponse[
|
|
140
|
+
"capo_lambda_core.types.get_network_connector_response.GetNetworkConnectorResponse"
|
|
141
|
+
]:
|
|
142
|
+
import capo_lambda_core._operations.lambda_core_api_service.get_network_connector
|
|
143
|
+
|
|
144
|
+
output, http_response = (
|
|
145
|
+
capo_lambda_core._operations.lambda_core_api_service.get_network_connector.get_network_connector(
|
|
146
|
+
req.options, req.input
|
|
147
|
+
)
|
|
148
|
+
)
|
|
149
|
+
return OperationResponse(output=output, response=http_response)
|
|
150
|
+
|
|
151
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
152
|
+
input_: capo_lambda_core.types.get_network_connector_request.GetNetworkConnectorRequest = {
|
|
153
|
+
"identifier": identifier
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
response = execute_pipeline(
|
|
157
|
+
OperationRequest(input=input_, options=options_),
|
|
158
|
+
handler=_handler,
|
|
159
|
+
interceptors=list(interceptors_),
|
|
160
|
+
)
|
|
161
|
+
response.response.close()
|
|
162
|
+
return response.output
|
|
163
|
+
|
|
164
|
+
def update(
|
|
165
|
+
self,
|
|
166
|
+
identifier: "capo_lambda_core.types.network_connector_identifier.NetworkConnectorIdentifier",
|
|
167
|
+
*,
|
|
168
|
+
config_overrides: Optional[LambdaCoreClientConfig] = None,
|
|
169
|
+
configuration: Optional[
|
|
170
|
+
"capo_lambda_core.types.network_connector_configuration.NetworkConnectorConfiguration"
|
|
171
|
+
] = None,
|
|
172
|
+
operator_role: Optional[
|
|
173
|
+
"capo_lambda_core.types.network_connector_role_arn.NetworkConnectorRoleArn"
|
|
174
|
+
] = None,
|
|
175
|
+
client_token: Optional[
|
|
176
|
+
"capo_lambda_core.types.client_token_string.ClientTokenString"
|
|
177
|
+
] = None,
|
|
178
|
+
) -> "capo_lambda_core.types.update_network_connector_response.UpdateNetworkConnectorResponse":
|
|
179
|
+
"""<p>Updates the VPC configuration or operator role of an existing network connector. You can modify the subnet IDs, security group IDs, network protocol, or operator role. The connector must be in <code>ACTIVE</code> state to accept updates.</p> <p>This operation is asynchronous. The connector remains in <code>ACTIVE</code> state during the update — existing workloads that reference this connector are not disrupted. Use <code>GetNetworkConnector</code> to monitor the <code>LastUpdateStatus</code> field, which transitions through <code>InProgress</code> to <code>Successful</code> or <code>Failed</code>. If the update fails, the <code>LastUpdateStatusReasonCode</code> field provides a specific error code for troubleshooting. This operation is idempotent when you provide a <code>ClientToken</code>.</p>
|
|
180
|
+
|
|
181
|
+
Args:
|
|
182
|
+
configuration: <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>
|
|
183
|
+
operator_role: <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>
|
|
184
|
+
client_token: <p>A unique, case-sensitive identifier to ensure idempotency of the update request.</p>
|
|
185
|
+
|
|
186
|
+
Raises:
|
|
187
|
+
capo_lambda_core.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid. Check the error message for details about which parameter failed validation.</p>
|
|
188
|
+
capo_lambda_core.errors.resource_conflict_exception.ResourceConflictException: <p>The request could not be completed due to a conflict with the current state of the resource. For example, attempting to update a connector that is not in <code>ACTIVE</code> state.</p>
|
|
189
|
+
capo_lambda_core.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified network connector does not exist. Verify the identifier (ID, name, or ARN) and Region.</p>
|
|
190
|
+
capo_lambda_core.errors.service_exception.ServiceException: <p>An internal service error occurred. Retry the request with exponential backoff.</p>
|
|
191
|
+
capo_lambda_core.errors.too_many_requests_exception.TooManyRequestsException: <p>The request was throttled due to exceeding the allowed request rate. Retry the request after a brief wait using exponential backoff.</p>
|
|
192
|
+
capo_lambda_core.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
193
|
+
"""
|
|
194
|
+
|
|
195
|
+
def _handler(
|
|
196
|
+
req: "OperationRequest[capo_lambda_core.types.update_network_connector_request.UpdateNetworkConnectorRequest]",
|
|
197
|
+
) -> OperationResponse[
|
|
198
|
+
"capo_lambda_core.types.update_network_connector_response.UpdateNetworkConnectorResponse"
|
|
199
|
+
]:
|
|
200
|
+
import capo_lambda_core._operations.lambda_core_api_service.update_network_connector
|
|
201
|
+
|
|
202
|
+
output, http_response = (
|
|
203
|
+
capo_lambda_core._operations.lambda_core_api_service.update_network_connector.update_network_connector(
|
|
204
|
+
req.options, req.input
|
|
205
|
+
)
|
|
206
|
+
)
|
|
207
|
+
return OperationResponse(output=output, response=http_response)
|
|
208
|
+
|
|
209
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
210
|
+
input_: capo_lambda_core.types.update_network_connector_request.UpdateNetworkConnectorRequest = {
|
|
211
|
+
"identifier": identifier
|
|
212
|
+
}
|
|
213
|
+
if configuration is not None:
|
|
214
|
+
input_["configuration"] = configuration
|
|
215
|
+
if operator_role is not None:
|
|
216
|
+
input_["operator_role"] = operator_role
|
|
217
|
+
if client_token is None:
|
|
218
|
+
client_token = str(uuid.uuid4())
|
|
219
|
+
input_["client_token"] = client_token
|
|
220
|
+
|
|
221
|
+
response = execute_pipeline(
|
|
222
|
+
OperationRequest(input=input_, options=options_),
|
|
223
|
+
handler=_handler,
|
|
224
|
+
interceptors=list(interceptors_),
|
|
225
|
+
)
|
|
226
|
+
response.response.close()
|
|
227
|
+
return response.output
|
|
228
|
+
|
|
229
|
+
def delete(
|
|
230
|
+
self,
|
|
231
|
+
identifier: "capo_lambda_core.types.network_connector_identifier.NetworkConnectorIdentifier",
|
|
232
|
+
*,
|
|
233
|
+
config_overrides: Optional[LambdaCoreClientConfig] = None,
|
|
234
|
+
) -> "capo_lambda_core.types.delete_network_connector_response.DeleteNetworkConnectorResponse":
|
|
235
|
+
"""<p>Initiates deletion of a network connector. The connector transitions to <code>DELETING</code> state while elastic network interfaces are cleaned up asynchronously. After deletion completes, subsequent calls to <code>GetNetworkConnector</code> return <code>ResourceNotFoundException</code>.</p> <p>This operation is idempotent — calling delete on a connector that is already deleting or has been deleted succeeds without error. You can delete connectors in <code>ACTIVE</code> or <code>FAILED</code> states. Before deleting a connector, ensure that no Lambda MicroVMs are using it, as they will lose VPC egress connectivity immediately.</p>
|
|
236
|
+
|
|
237
|
+
Raises:
|
|
238
|
+
capo_lambda_core.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid. Check the error message for details about which parameter failed validation.</p>
|
|
239
|
+
capo_lambda_core.errors.resource_conflict_exception.ResourceConflictException: <p>The request could not be completed due to a conflict with the current state of the resource. For example, attempting to update a connector that is not in <code>ACTIVE</code> state.</p>
|
|
240
|
+
capo_lambda_core.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified network connector does not exist. Verify the identifier (ID, name, or ARN) and Region.</p>
|
|
241
|
+
capo_lambda_core.errors.service_exception.ServiceException: <p>An internal service error occurred. Retry the request with exponential backoff.</p>
|
|
242
|
+
capo_lambda_core.errors.too_many_requests_exception.TooManyRequestsException: <p>The request was throttled due to exceeding the allowed request rate. Retry the request after a brief wait using exponential backoff.</p>
|
|
243
|
+
capo_lambda_core.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
244
|
+
"""
|
|
245
|
+
|
|
246
|
+
def _handler(
|
|
247
|
+
req: "OperationRequest[capo_lambda_core.types.delete_network_connector_request.DeleteNetworkConnectorRequest]",
|
|
248
|
+
) -> OperationResponse[
|
|
249
|
+
"capo_lambda_core.types.delete_network_connector_response.DeleteNetworkConnectorResponse"
|
|
250
|
+
]:
|
|
251
|
+
import capo_lambda_core._operations.lambda_core_api_service.delete_network_connector
|
|
252
|
+
|
|
253
|
+
output, http_response = (
|
|
254
|
+
capo_lambda_core._operations.lambda_core_api_service.delete_network_connector.delete_network_connector(
|
|
255
|
+
req.options, req.input
|
|
256
|
+
)
|
|
257
|
+
)
|
|
258
|
+
return OperationResponse(output=output, response=http_response)
|
|
259
|
+
|
|
260
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
261
|
+
input_: capo_lambda_core.types.delete_network_connector_request.DeleteNetworkConnectorRequest = {
|
|
262
|
+
"identifier": identifier
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
response = execute_pipeline(
|
|
266
|
+
OperationRequest(input=input_, options=options_),
|
|
267
|
+
handler=_handler,
|
|
268
|
+
interceptors=list(interceptors_),
|
|
269
|
+
)
|
|
270
|
+
response.response.close()
|
|
271
|
+
return response.output
|
|
272
|
+
|
|
273
|
+
def list(
|
|
274
|
+
self,
|
|
275
|
+
*,
|
|
276
|
+
config_overrides: Optional[LambdaCoreClientConfig] = None,
|
|
277
|
+
state: Optional[
|
|
278
|
+
"capo_lambda_core.types.network_connector_state.NetworkConnectorState"
|
|
279
|
+
] = None,
|
|
280
|
+
marker: Optional["capo_lambda_core.types.string.String"] = None,
|
|
281
|
+
max_items: Optional[
|
|
282
|
+
"capo_lambda_core.types.max_hundred_list_items.MaxHundredListItems"
|
|
283
|
+
] = None,
|
|
284
|
+
) -> "capo_lambda_core.types.list_network_connectors_response.ListNetworkConnectorsResponse":
|
|
285
|
+
"""<p>Returns a paginated list of network connectors in your account for the current Region. You can optionally filter results by connector state. Use the <code>Marker</code> parameter from a previous response to retrieve the next page of results.</p> <p>Each item in the response includes the connector ARN, name, ID, type, current state, and last modified timestamp. To retrieve full configuration details for a specific connector, use <code>GetNetworkConnector</code>.</p>
|
|
286
|
+
|
|
287
|
+
Args:
|
|
288
|
+
state: <p>Optional filter to return only connectors in the specified state (for example, <code>ACTIVE</code> or <code>FAILED</code>).</p>
|
|
289
|
+
marker: <p>The pagination token from a previous <code>ListNetworkConnectors</code> response. Use this value to retrieve the next page of results.</p>
|
|
290
|
+
max_items: <p>The maximum number of connectors to return per page. Valid range: 1 to 100.</p>
|
|
291
|
+
|
|
292
|
+
Raises:
|
|
293
|
+
capo_lambda_core.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid. Check the error message for details about which parameter failed validation.</p>
|
|
294
|
+
capo_lambda_core.errors.service_exception.ServiceException: <p>An internal service error occurred. Retry the request with exponential backoff.</p>
|
|
295
|
+
capo_lambda_core.errors.too_many_requests_exception.TooManyRequestsException: <p>The request was throttled due to exceeding the allowed request rate. Retry the request after a brief wait using exponential backoff.</p>
|
|
296
|
+
capo_lambda_core.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
297
|
+
"""
|
|
298
|
+
|
|
299
|
+
def _handler(
|
|
300
|
+
req: "OperationRequest[capo_lambda_core.types.list_network_connectors_request.ListNetworkConnectorsRequest]",
|
|
301
|
+
) -> OperationResponse[
|
|
302
|
+
"capo_lambda_core.types.list_network_connectors_response.ListNetworkConnectorsResponse"
|
|
303
|
+
]:
|
|
304
|
+
import capo_lambda_core._operations.lambda_core_api_service.list_network_connectors
|
|
305
|
+
|
|
306
|
+
output, http_response = (
|
|
307
|
+
capo_lambda_core._operations.lambda_core_api_service.list_network_connectors.list_network_connectors(
|
|
308
|
+
req.options, req.input
|
|
309
|
+
)
|
|
310
|
+
)
|
|
311
|
+
return OperationResponse(output=output, response=http_response)
|
|
312
|
+
|
|
313
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
314
|
+
input_: capo_lambda_core.types.list_network_connectors_request.ListNetworkConnectorsRequest = {}
|
|
315
|
+
if state is not None:
|
|
316
|
+
input_["state"] = state
|
|
317
|
+
if marker is not None:
|
|
318
|
+
input_["marker"] = marker
|
|
319
|
+
if max_items is not None:
|
|
320
|
+
input_["max_items"] = max_items
|
|
321
|
+
|
|
322
|
+
response = execute_pipeline(
|
|
323
|
+
OperationRequest(input=input_, options=options_),
|
|
324
|
+
handler=_handler,
|
|
325
|
+
interceptors=list(interceptors_),
|
|
326
|
+
)
|
|
327
|
+
response.response.close()
|
|
328
|
+
return response.output
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
class AsyncNetworkConnector:
|
|
332
|
+
def __init__(self, service: AsyncLambdaCoreClient) -> None:
|
|
333
|
+
self._service = service
|
|
334
|
+
|
|
335
|
+
async def create(
|
|
336
|
+
self,
|
|
337
|
+
name: "capo_lambda_core.types.network_connector_name.NetworkConnectorName",
|
|
338
|
+
configuration: "capo_lambda_core.types.network_connector_configuration.NetworkConnectorConfiguration",
|
|
339
|
+
*,
|
|
340
|
+
config_overrides: Optional[AsyncLambdaCoreClientConfig] = None,
|
|
341
|
+
operator_role: Optional[
|
|
342
|
+
"capo_lambda_core.types.network_connector_role_arn.NetworkConnectorRoleArn"
|
|
343
|
+
] = None,
|
|
344
|
+
client_token: Optional[
|
|
345
|
+
"capo_lambda_core.types.client_token_string.ClientTokenString"
|
|
346
|
+
] = None,
|
|
347
|
+
tags: Optional[
|
|
348
|
+
"capo_lambda_core.types.network_connector_tags.NetworkConnectorTags"
|
|
349
|
+
] = None,
|
|
350
|
+
) -> "capo_lambda_core.types.create_network_connector_response.CreateNetworkConnectorResponse":
|
|
351
|
+
"""<p>Creates a network connector that enables Lambda compute resources to route outbound traffic through your Amazon VPC. The network connector provisions elastic network interfaces (ENIs) in the subnets you specify, providing a managed network path to private resources such as databases, caches, and internal APIs.</p> <p>This operation is asynchronous. The network connector starts in <code>PENDING</code> state while ENIs are provisioned in your VPC (provisioning typically takes up to 10 minutes). Use <code>GetNetworkConnector</code> to poll the connector state until it reaches <code>ACTIVE</code>. Once active, you can attach the connector to Lambda MicroVMs at run time using the <code>egressNetworkConnectors</code> parameter on <code>RunMicroVm</code>.</p> <p>This operation is idempotent when you provide a <code>ClientToken</code> — if you retry a request that completed successfully using the same client token, the operation returns the existing connector without creating a duplicate.</p>
|
|
352
|
+
|
|
353
|
+
Args:
|
|
354
|
+
name: <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>
|
|
355
|
+
configuration: <p>The network configuration for the connector. Specify a <code>VpcEgressConfiguration</code> to enable outbound traffic routing through your VPC.</p>
|
|
356
|
+
operator_role: <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>
|
|
357
|
+
client_token: <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>
|
|
358
|
+
tags: <p>A map of key-value pairs to associate with the network connector for organization, cost allocation, or access control.</p>
|
|
359
|
+
|
|
360
|
+
Raises:
|
|
361
|
+
capo_lambda_core.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid. Check the error message for details about which parameter failed validation.</p>
|
|
362
|
+
capo_lambda_core.errors.network_connector_limit_exceeded_exception.NetworkConnectorLimitExceededException: <p>The account has reached the maximum number of network connectors allowed. Delete unused connectors or request a limit increase through Service Quotas.</p>
|
|
363
|
+
capo_lambda_core.errors.resource_conflict_exception.ResourceConflictException: <p>The request could not be completed due to a conflict with the current state of the resource. For example, attempting to update a connector that is not in <code>ACTIVE</code> state.</p>
|
|
364
|
+
capo_lambda_core.errors.service_exception.ServiceException: <p>An internal service error occurred. Retry the request with exponential backoff.</p>
|
|
365
|
+
capo_lambda_core.errors.too_many_requests_exception.TooManyRequestsException: <p>The request was throttled due to exceeding the allowed request rate. Retry the request after a brief wait using exponential backoff.</p>
|
|
366
|
+
capo_lambda_core.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
367
|
+
"""
|
|
368
|
+
|
|
369
|
+
async def _handler(
|
|
370
|
+
req: "AsyncOperationRequest[capo_lambda_core.types.create_network_connector_request.CreateNetworkConnectorRequest]",
|
|
371
|
+
) -> AsyncOperationResponse[
|
|
372
|
+
"capo_lambda_core.types.create_network_connector_response.CreateNetworkConnectorResponse"
|
|
373
|
+
]:
|
|
374
|
+
import capo_lambda_core._operations.lambda_core_api_service.create_network_connector
|
|
375
|
+
|
|
376
|
+
(
|
|
377
|
+
output,
|
|
378
|
+
http_response,
|
|
379
|
+
) = await capo_lambda_core._operations.lambda_core_api_service.create_network_connector.async_create_network_connector(
|
|
380
|
+
req.options, req.input
|
|
381
|
+
)
|
|
382
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
383
|
+
|
|
384
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
385
|
+
input_: capo_lambda_core.types.create_network_connector_request.CreateNetworkConnectorRequest = {
|
|
386
|
+
"name": name,
|
|
387
|
+
"configuration": configuration,
|
|
388
|
+
}
|
|
389
|
+
if operator_role is not None:
|
|
390
|
+
input_["operator_role"] = operator_role
|
|
391
|
+
if client_token is None:
|
|
392
|
+
client_token = str(uuid.uuid4())
|
|
393
|
+
input_["client_token"] = client_token
|
|
394
|
+
if tags is not None:
|
|
395
|
+
input_["tags"] = tags
|
|
396
|
+
|
|
397
|
+
response = await aexecute_pipeline(
|
|
398
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
399
|
+
handler=_handler,
|
|
400
|
+
interceptors=list(interceptors_),
|
|
401
|
+
)
|
|
402
|
+
await response.response.aclose()
|
|
403
|
+
return response.output
|
|
404
|
+
|
|
405
|
+
async def read(
|
|
406
|
+
self,
|
|
407
|
+
identifier: "capo_lambda_core.types.network_connector_identifier.NetworkConnectorIdentifier",
|
|
408
|
+
*,
|
|
409
|
+
config_overrides: Optional[AsyncLambdaCoreClientConfig] = None,
|
|
410
|
+
) -> "capo_lambda_core.types.get_network_connector_response.GetNetworkConnectorResponse":
|
|
411
|
+
"""<p>Retrieves the current configuration, state, and metadata of a network connector. The <code>Identifier</code> parameter accepts the connector ID, name, or full ARN. Use this operation to poll connector state after creation or update, or to inspect the current VPC configuration and any failure reasons.</p> <p>The response includes the full connector configuration, current state, and — if the connector has been updated — the <code>LastUpdateStatus</code> and <code>LastUpdateStatusReasonCode</code> fields that indicate whether the most recent update succeeded or failed.</p>
|
|
412
|
+
|
|
413
|
+
Raises:
|
|
414
|
+
capo_lambda_core.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid. Check the error message for details about which parameter failed validation.</p>
|
|
415
|
+
capo_lambda_core.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified network connector does not exist. Verify the identifier (ID, name, or ARN) and Region.</p>
|
|
416
|
+
capo_lambda_core.errors.service_exception.ServiceException: <p>An internal service error occurred. Retry the request with exponential backoff.</p>
|
|
417
|
+
capo_lambda_core.errors.too_many_requests_exception.TooManyRequestsException: <p>The request was throttled due to exceeding the allowed request rate. Retry the request after a brief wait using exponential backoff.</p>
|
|
418
|
+
capo_lambda_core.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
419
|
+
"""
|
|
420
|
+
|
|
421
|
+
async def _handler(
|
|
422
|
+
req: "AsyncOperationRequest[capo_lambda_core.types.get_network_connector_request.GetNetworkConnectorRequest]",
|
|
423
|
+
) -> AsyncOperationResponse[
|
|
424
|
+
"capo_lambda_core.types.get_network_connector_response.GetNetworkConnectorResponse"
|
|
425
|
+
]:
|
|
426
|
+
import capo_lambda_core._operations.lambda_core_api_service.get_network_connector
|
|
427
|
+
|
|
428
|
+
(
|
|
429
|
+
output,
|
|
430
|
+
http_response,
|
|
431
|
+
) = await capo_lambda_core._operations.lambda_core_api_service.get_network_connector.async_get_network_connector(
|
|
432
|
+
req.options, req.input
|
|
433
|
+
)
|
|
434
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
435
|
+
|
|
436
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
437
|
+
input_: capo_lambda_core.types.get_network_connector_request.GetNetworkConnectorRequest = {
|
|
438
|
+
"identifier": identifier
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
response = await aexecute_pipeline(
|
|
442
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
443
|
+
handler=_handler,
|
|
444
|
+
interceptors=list(interceptors_),
|
|
445
|
+
)
|
|
446
|
+
await response.response.aclose()
|
|
447
|
+
return response.output
|
|
448
|
+
|
|
449
|
+
async def update(
|
|
450
|
+
self,
|
|
451
|
+
identifier: "capo_lambda_core.types.network_connector_identifier.NetworkConnectorIdentifier",
|
|
452
|
+
*,
|
|
453
|
+
config_overrides: Optional[AsyncLambdaCoreClientConfig] = None,
|
|
454
|
+
configuration: Optional[
|
|
455
|
+
"capo_lambda_core.types.network_connector_configuration.NetworkConnectorConfiguration"
|
|
456
|
+
] = None,
|
|
457
|
+
operator_role: Optional[
|
|
458
|
+
"capo_lambda_core.types.network_connector_role_arn.NetworkConnectorRoleArn"
|
|
459
|
+
] = None,
|
|
460
|
+
client_token: Optional[
|
|
461
|
+
"capo_lambda_core.types.client_token_string.ClientTokenString"
|
|
462
|
+
] = None,
|
|
463
|
+
) -> "capo_lambda_core.types.update_network_connector_response.UpdateNetworkConnectorResponse":
|
|
464
|
+
"""<p>Updates the VPC configuration or operator role of an existing network connector. You can modify the subnet IDs, security group IDs, network protocol, or operator role. The connector must be in <code>ACTIVE</code> state to accept updates.</p> <p>This operation is asynchronous. The connector remains in <code>ACTIVE</code> state during the update — existing workloads that reference this connector are not disrupted. Use <code>GetNetworkConnector</code> to monitor the <code>LastUpdateStatus</code> field, which transitions through <code>InProgress</code> to <code>Successful</code> or <code>Failed</code>. If the update fails, the <code>LastUpdateStatusReasonCode</code> field provides a specific error code for troubleshooting. This operation is idempotent when you provide a <code>ClientToken</code>.</p>
|
|
465
|
+
|
|
466
|
+
Args:
|
|
467
|
+
configuration: <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>
|
|
468
|
+
operator_role: <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>
|
|
469
|
+
client_token: <p>A unique, case-sensitive identifier to ensure idempotency of the update request.</p>
|
|
470
|
+
|
|
471
|
+
Raises:
|
|
472
|
+
capo_lambda_core.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid. Check the error message for details about which parameter failed validation.</p>
|
|
473
|
+
capo_lambda_core.errors.resource_conflict_exception.ResourceConflictException: <p>The request could not be completed due to a conflict with the current state of the resource. For example, attempting to update a connector that is not in <code>ACTIVE</code> state.</p>
|
|
474
|
+
capo_lambda_core.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified network connector does not exist. Verify the identifier (ID, name, or ARN) and Region.</p>
|
|
475
|
+
capo_lambda_core.errors.service_exception.ServiceException: <p>An internal service error occurred. Retry the request with exponential backoff.</p>
|
|
476
|
+
capo_lambda_core.errors.too_many_requests_exception.TooManyRequestsException: <p>The request was throttled due to exceeding the allowed request rate. Retry the request after a brief wait using exponential backoff.</p>
|
|
477
|
+
capo_lambda_core.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
478
|
+
"""
|
|
479
|
+
|
|
480
|
+
async def _handler(
|
|
481
|
+
req: "AsyncOperationRequest[capo_lambda_core.types.update_network_connector_request.UpdateNetworkConnectorRequest]",
|
|
482
|
+
) -> AsyncOperationResponse[
|
|
483
|
+
"capo_lambda_core.types.update_network_connector_response.UpdateNetworkConnectorResponse"
|
|
484
|
+
]:
|
|
485
|
+
import capo_lambda_core._operations.lambda_core_api_service.update_network_connector
|
|
486
|
+
|
|
487
|
+
(
|
|
488
|
+
output,
|
|
489
|
+
http_response,
|
|
490
|
+
) = await capo_lambda_core._operations.lambda_core_api_service.update_network_connector.async_update_network_connector(
|
|
491
|
+
req.options, req.input
|
|
492
|
+
)
|
|
493
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
494
|
+
|
|
495
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
496
|
+
input_: capo_lambda_core.types.update_network_connector_request.UpdateNetworkConnectorRequest = {
|
|
497
|
+
"identifier": identifier
|
|
498
|
+
}
|
|
499
|
+
if configuration is not None:
|
|
500
|
+
input_["configuration"] = configuration
|
|
501
|
+
if operator_role is not None:
|
|
502
|
+
input_["operator_role"] = operator_role
|
|
503
|
+
if client_token is None:
|
|
504
|
+
client_token = str(uuid.uuid4())
|
|
505
|
+
input_["client_token"] = client_token
|
|
506
|
+
|
|
507
|
+
response = await aexecute_pipeline(
|
|
508
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
509
|
+
handler=_handler,
|
|
510
|
+
interceptors=list(interceptors_),
|
|
511
|
+
)
|
|
512
|
+
await response.response.aclose()
|
|
513
|
+
return response.output
|
|
514
|
+
|
|
515
|
+
async def delete(
|
|
516
|
+
self,
|
|
517
|
+
identifier: "capo_lambda_core.types.network_connector_identifier.NetworkConnectorIdentifier",
|
|
518
|
+
*,
|
|
519
|
+
config_overrides: Optional[AsyncLambdaCoreClientConfig] = None,
|
|
520
|
+
) -> "capo_lambda_core.types.delete_network_connector_response.DeleteNetworkConnectorResponse":
|
|
521
|
+
"""<p>Initiates deletion of a network connector. The connector transitions to <code>DELETING</code> state while elastic network interfaces are cleaned up asynchronously. After deletion completes, subsequent calls to <code>GetNetworkConnector</code> return <code>ResourceNotFoundException</code>.</p> <p>This operation is idempotent — calling delete on a connector that is already deleting or has been deleted succeeds without error. You can delete connectors in <code>ACTIVE</code> or <code>FAILED</code> states. Before deleting a connector, ensure that no Lambda MicroVMs are using it, as they will lose VPC egress connectivity immediately.</p>
|
|
522
|
+
|
|
523
|
+
Raises:
|
|
524
|
+
capo_lambda_core.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid. Check the error message for details about which parameter failed validation.</p>
|
|
525
|
+
capo_lambda_core.errors.resource_conflict_exception.ResourceConflictException: <p>The request could not be completed due to a conflict with the current state of the resource. For example, attempting to update a connector that is not in <code>ACTIVE</code> state.</p>
|
|
526
|
+
capo_lambda_core.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified network connector does not exist. Verify the identifier (ID, name, or ARN) and Region.</p>
|
|
527
|
+
capo_lambda_core.errors.service_exception.ServiceException: <p>An internal service error occurred. Retry the request with exponential backoff.</p>
|
|
528
|
+
capo_lambda_core.errors.too_many_requests_exception.TooManyRequestsException: <p>The request was throttled due to exceeding the allowed request rate. Retry the request after a brief wait using exponential backoff.</p>
|
|
529
|
+
capo_lambda_core.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
530
|
+
"""
|
|
531
|
+
|
|
532
|
+
async def _handler(
|
|
533
|
+
req: "AsyncOperationRequest[capo_lambda_core.types.delete_network_connector_request.DeleteNetworkConnectorRequest]",
|
|
534
|
+
) -> AsyncOperationResponse[
|
|
535
|
+
"capo_lambda_core.types.delete_network_connector_response.DeleteNetworkConnectorResponse"
|
|
536
|
+
]:
|
|
537
|
+
import capo_lambda_core._operations.lambda_core_api_service.delete_network_connector
|
|
538
|
+
|
|
539
|
+
(
|
|
540
|
+
output,
|
|
541
|
+
http_response,
|
|
542
|
+
) = await capo_lambda_core._operations.lambda_core_api_service.delete_network_connector.async_delete_network_connector(
|
|
543
|
+
req.options, req.input
|
|
544
|
+
)
|
|
545
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
546
|
+
|
|
547
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
548
|
+
input_: capo_lambda_core.types.delete_network_connector_request.DeleteNetworkConnectorRequest = {
|
|
549
|
+
"identifier": identifier
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
response = await aexecute_pipeline(
|
|
553
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
554
|
+
handler=_handler,
|
|
555
|
+
interceptors=list(interceptors_),
|
|
556
|
+
)
|
|
557
|
+
await response.response.aclose()
|
|
558
|
+
return response.output
|
|
559
|
+
|
|
560
|
+
async def list(
|
|
561
|
+
self,
|
|
562
|
+
*,
|
|
563
|
+
config_overrides: Optional[AsyncLambdaCoreClientConfig] = None,
|
|
564
|
+
state: Optional[
|
|
565
|
+
"capo_lambda_core.types.network_connector_state.NetworkConnectorState"
|
|
566
|
+
] = None,
|
|
567
|
+
marker: Optional["capo_lambda_core.types.string.String"] = None,
|
|
568
|
+
max_items: Optional[
|
|
569
|
+
"capo_lambda_core.types.max_hundred_list_items.MaxHundredListItems"
|
|
570
|
+
] = None,
|
|
571
|
+
) -> "capo_lambda_core.types.list_network_connectors_response.ListNetworkConnectorsResponse":
|
|
572
|
+
"""<p>Returns a paginated list of network connectors in your account for the current Region. You can optionally filter results by connector state. Use the <code>Marker</code> parameter from a previous response to retrieve the next page of results.</p> <p>Each item in the response includes the connector ARN, name, ID, type, current state, and last modified timestamp. To retrieve full configuration details for a specific connector, use <code>GetNetworkConnector</code>.</p>
|
|
573
|
+
|
|
574
|
+
Args:
|
|
575
|
+
state: <p>Optional filter to return only connectors in the specified state (for example, <code>ACTIVE</code> or <code>FAILED</code>).</p>
|
|
576
|
+
marker: <p>The pagination token from a previous <code>ListNetworkConnectors</code> response. Use this value to retrieve the next page of results.</p>
|
|
577
|
+
max_items: <p>The maximum number of connectors to return per page. Valid range: 1 to 100.</p>
|
|
578
|
+
|
|
579
|
+
Raises:
|
|
580
|
+
capo_lambda_core.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid. Check the error message for details about which parameter failed validation.</p>
|
|
581
|
+
capo_lambda_core.errors.service_exception.ServiceException: <p>An internal service error occurred. Retry the request with exponential backoff.</p>
|
|
582
|
+
capo_lambda_core.errors.too_many_requests_exception.TooManyRequestsException: <p>The request was throttled due to exceeding the allowed request rate. Retry the request after a brief wait using exponential backoff.</p>
|
|
583
|
+
capo_lambda_core.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
584
|
+
"""
|
|
585
|
+
|
|
586
|
+
async def _handler(
|
|
587
|
+
req: "AsyncOperationRequest[capo_lambda_core.types.list_network_connectors_request.ListNetworkConnectorsRequest]",
|
|
588
|
+
) -> AsyncOperationResponse[
|
|
589
|
+
"capo_lambda_core.types.list_network_connectors_response.ListNetworkConnectorsResponse"
|
|
590
|
+
]:
|
|
591
|
+
import capo_lambda_core._operations.lambda_core_api_service.list_network_connectors
|
|
592
|
+
|
|
593
|
+
(
|
|
594
|
+
output,
|
|
595
|
+
http_response,
|
|
596
|
+
) = await capo_lambda_core._operations.lambda_core_api_service.list_network_connectors.async_list_network_connectors(
|
|
597
|
+
req.options, req.input
|
|
598
|
+
)
|
|
599
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
600
|
+
|
|
601
|
+
interceptors_, options_ = self._service.operation_options(config_overrides)
|
|
602
|
+
input_: capo_lambda_core.types.list_network_connectors_request.ListNetworkConnectorsRequest = {}
|
|
603
|
+
if state is not None:
|
|
604
|
+
input_["state"] = state
|
|
605
|
+
if marker is not None:
|
|
606
|
+
input_["marker"] = marker
|
|
607
|
+
if max_items is not None:
|
|
608
|
+
input_["max_items"] = max_items
|
|
609
|
+
|
|
610
|
+
response = await aexecute_pipeline(
|
|
611
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
612
|
+
handler=_handler,
|
|
613
|
+
interceptors=list(interceptors_),
|
|
614
|
+
)
|
|
615
|
+
await response.response.aclose()
|
|
616
|
+
return response.output
|
|
File without changes
|