LambdaCore / Client / update_network_connector
update_network_connector¶
- LambdaCore.Client.update_network_connector(**kwargs)¶
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
ACTIVEstate to accept updates.This operation is asynchronous. The connector remains in
ACTIVEstate during the update — existing workloads that reference this connector are not disrupted. UseGetNetworkConnectorto monitor theLastUpdateStatusfield, which transitions throughInProgresstoSuccessfulorFailed. If the update fails, theLastUpdateStatusReasonCodefield provides a specific error code for troubleshooting. This operation is idempotent when you provide aClientToken.Each successful configuration change creates a new immutable version. A connector can have a limited number of versions; once that limit is reached, further updates fail with
NetworkConnectorLimitExceededExceptionuntil you delete older versions.See also: AWS API Documentation
Request Syntax
response = client.update_network_connector( Identifier='string', Configuration={ 'VpcEgressConfiguration': { 'SubnetIds': [ 'string', ], 'SecurityGroupIds': [ 'string', ], 'NetworkProtocol': 'IPv4'|'DualStack', 'AssociatedComputeResourceTypes': [ 'MicroVm'|'WebFunction', ] } }, OperatorRole='string', ClientToken='string' )
- Parameters:
Identifier (string) –
[REQUIRED]
The identifier of the network connector to update. You can specify the connector ID, name, or full ARN.
Configuration (dict) –
The updated network configuration for the connector. Provide the full
VpcEgressConfigurationincluding all subnet IDs and security group IDs — this replaces the existing configuration.Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
VpcEgressConfiguration.VpcEgressConfiguration (dict) –
Configuration for a VPC egress network connector. Specifies the subnets, security groups, and network protocol for routing outbound traffic through your VPC.
SubnetIds (list) –
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.
(string) –
SecurityGroupIds (list) –
The IDs of the VPC security groups to attach to the ENIs. All security groups must be in the same VPC as the subnets.
(string) –
NetworkProtocol (string) –
The network protocol for the connector. Specify
IPv4for IPv4-only networking, orDualStackfor both IPv4 and IPv6.AssociatedComputeResourceTypes (list) –
The types of Lambda compute resources that can use this connector. Valid values are
MicroVmandWebFunction. Specify exactly one value.(string) –
The type of Lambda compute resource that can use a network connector.
OperatorRole (string) – The updated ARN of the IAM role that Lambda assumes to manage ENIs. Use this to change the operator role without recreating the connector.
ClientToken (string) –
A unique, case-sensitive identifier to ensure idempotency of the update request.
This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{ 'Arn': 'string', 'Name': 'string', 'Id': 'string', 'VersionArn': 'string', 'Version': 123, 'OperatorRole': 'string', 'Configuration': { 'VpcEgressConfiguration': { 'SubnetIds': [ 'string', ], 'SecurityGroupIds': [ 'string', ], 'NetworkProtocol': 'IPv4'|'DualStack', 'AssociatedComputeResourceTypes': [ 'MicroVm'|'WebFunction', ] } }, 'State': 'PENDING'|'ACTIVE'|'INACTIVE'|'FAILED'|'DELETING'|'DELETE_FAILED', 'LastUpdateStatus': 'Successful'|'Failed'|'InProgress', 'LastUpdateStatusReason': 'string', 'LastModified': datetime(2015, 1, 1) }
Response Structure
(dict) –
Arn (string) –
The Amazon Resource Name (ARN) of the network connector.
Name (string) –
The name of the network connector.
Id (string) –
The unique identifier of the network connector.
VersionArn (string) –
The qualified ARN of the connector version resulting from this update, including the immutable version suffix.
Version (integer) –
The version number of the connector version resulting from this update. A configuration change creates a new, incremented version; a no-op update returns the current version number.
OperatorRole (string) –
The ARN of the IAM role that Lambda uses to manage the underlying ENI resources for this connector.
Configuration (dict) –
The network configuration of the connector, including VPC subnets and security groups.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
VpcEgressConfiguration. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
VpcEgressConfiguration (dict) –
Configuration for a VPC egress network connector. Specifies the subnets, security groups, and network protocol for routing outbound traffic through your VPC.
SubnetIds (list) –
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.
(string) –
SecurityGroupIds (list) –
The IDs of the VPC security groups to attach to the ENIs. All security groups must be in the same VPC as the subnets.
(string) –
NetworkProtocol (string) –
The network protocol for the connector. Specify
IPv4for IPv4-only networking, orDualStackfor both IPv4 and IPv6.AssociatedComputeResourceTypes (list) –
The types of Lambda compute resources that can use this connector. Valid values are
MicroVmandWebFunction. Specify exactly one value.(string) –
The type of Lambda compute resource that can use a network connector.
State (string) –
The current state of the network connector.
LastUpdateStatus (string) –
The status of this update operation (typically
InProgressimmediately after the call).LastUpdateStatusReason (string) –
A human-readable explanation of the update status.
LastModified (datetime) –
The timestamp of this update.
Exceptions
LambdaCore.Client.exceptions.InvalidParameterValueExceptionLambdaCore.Client.exceptions.ResourceConflictExceptionLambdaCore.Client.exceptions.NetworkConnectorLimitExceededExceptionLambdaCore.Client.exceptions.ServiceExceptionLambdaCore.Client.exceptions.TooManyRequestsExceptionLambdaCore.Client.exceptions.ResourceNotFoundException