Skip to content

delete_network_connector

delete_network_connector(
    identifier: NetworkConnectorIdentifier,
    *,
    config_overrides: Optional[LambdaCoreClientConfig] = None,
) -> DeleteNetworkConnectorResponse

Initiates deletion of a network connector. The connector transitions to DELETING state while elastic network interfaces are cleaned up asynchronously. After deletion completes, subsequent calls to GetNetworkConnector return ResourceNotFoundException.

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 ACTIVE or FAILED states. Before deleting a connector, ensure that no Lambda compute resources are using it, as they will lose VPC egress connectivity immediately.

Deleting with an unqualified identifier removes the connector and all of its versions. To remove a single historical version, supply its version-qualified ARN; the connector and its remaining versions are unaffected. You can't delete the latest version on its own — delete the connector to remove it.

Parameters:

  • identifier (NetworkConnectorIdentifier) –

    The identifier of the network connector to delete. Provide an unqualified ARN (or an ID or name) to delete the entire connector and all of its versions, or a version-qualified ARN — one that includes the immutable version suffix — to delete a specific historical version. You can't delete the latest version with a version-qualified identifier; delete the connector instead.

Raises:

  • InvalidParameterValueException –

    One of the parameters in the request is not valid. Check the error message for details about which parameter failed validation.

  • ResourceConflictException –

    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 ACTIVE state.

  • ResourceNotFoundException –

    The specified network connector does not exist. Verify the identifier (ID, name, or ARN) and Region.

  • ServiceException –

    An internal service error occurred. Retry the request with exponential backoff.

  • TooManyRequestsException –

    The request was throttled due to exceeding the allowed request rate. Retry the request after a brief wait using exponential backoff.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_lambda_core/_services/lambda_core.py
def delete_network_connector(
    self,
    identifier: "capo_lambda_core.types.network_connector_identifier.NetworkConnectorIdentifier",
    *,
    config_overrides: Optional[LambdaCoreClientConfig] = None,
) -> "capo_lambda_core.types.delete_network_connector_response.DeleteNetworkConnectorResponse":
    """<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 compute resources are using it, as they will lose VPC egress connectivity immediately.</p> <p>Deleting with an unqualified identifier removes the connector and all of its versions. To remove a single historical version, supply its version-qualified ARN; the connector and its remaining versions are unaffected. You can't delete the latest version on its own — delete the connector to remove it.</p>

    Args:
        identifier: <p>The identifier of the network connector to delete. Provide an unqualified ARN (or an ID or name) to delete the entire connector and all of its versions, or a version-qualified ARN — one that includes the immutable version suffix — to delete a specific historical version. You can't delete the latest version with a version-qualified identifier; delete the connector instead.</p>

    Raises:
        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>
        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>
        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>
        capo_lambda_core.errors.service_exception.ServiceException: <p>An internal service error occurred. Retry the request with exponential backoff.</p>
        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>
        capo_lambda_core.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_lambda_core.types.delete_network_connector_request.DeleteNetworkConnectorRequest]",
    ) -> OperationResponse[
        "capo_lambda_core.types.delete_network_connector_response.DeleteNetworkConnectorResponse"
    ]:
        import capo_lambda_core._operations.lambda_core_api_service.delete_network_connector

        output, http_response = (
            capo_lambda_core._operations.lambda_core_api_service.delete_network_connector.delete_network_connector(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteNetworkConnector")
    )
    input_: capo_lambda_core.types.delete_network_connector_request.DeleteNetworkConnectorRequest = {
        "identifier": identifier
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output