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 ACTIVE state to accept updates.

This operation is asynchronous. The connector remains in ACTIVE state during the update — existing workloads that reference this connector are not disrupted. Use GetNetworkConnector to monitor the LastUpdateStatus field, which transitions through InProgress to Successful or Failed. If the update fails, the LastUpdateStatusReasonCode field provides a specific error code for troubleshooting. This operation is idempotent when you provide a ClientToken.

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',
            ]
        }
    },
    OperatorRole='string',
    ClientToken='string'
)
Parameters:
  • Identifier (string) –

    [REQUIRED]

    A flexible identifier that accepts a network connector ID, name, or ARN

  • Configuration (dict) –

    The updated network configuration for the connector. Provide the full VpcEgressConfiguration including 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. Specify 0 to 5 security groups. All security groups must be in the same VPC as the subnets.

        • (string) –

      • NetworkProtocol (string) –

        The network protocol for the connector. Specify IPv4 for IPv4-only networking, or DualStack for both IPv4 and IPv6.

      • AssociatedComputeResourceTypes (list) –

        The types of Lambda compute resources that can use this connector. Currently, only MicroVm is supported.

        • (string) –

  • 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',
    'OperatorRole': 'string',
    'Configuration': {
        'VpcEgressConfiguration': {
            'SubnetIds': [
                'string',
            ],
            'SecurityGroupIds': [
                'string',
            ],
            'NetworkProtocol': 'IPv4'|'DualStack',
            'AssociatedComputeResourceTypes': [
                'MicroVm',
            ]
        }
    },
    '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 for a network connector, assigned by the service at creation time

    • 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 set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is 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. Specify 0 to 5 security groups. All security groups must be in the same VPC as the subnets.

          • (string) –

        • NetworkProtocol (string) –

          The network protocol for the connector. Specify IPv4 for IPv4-only networking, or DualStack for both IPv4 and IPv6.

        • AssociatedComputeResourceTypes (list) –

          The types of Lambda compute resources that can use this connector. Currently, only MicroVm is supported.

          • (string) –

    • State (string) –

      The current state of the network connector.

    • LastUpdateStatus (string) –

      The status of this update operation (typically InProgress immediately after the call).

    • LastUpdateStatusReason (string) –

      A human-readable explanation of the update status.

    • LastModified (datetime) –

      The timestamp of this update.

Exceptions

  • LambdaCore.Client.exceptions.InvalidParameterValueException

  • LambdaCore.Client.exceptions.ResourceConflictException

  • LambdaCore.Client.exceptions.ServiceException

  • LambdaCore.Client.exceptions.TooManyRequestsException

  • LambdaCore.Client.exceptions.ResourceNotFoundException