In virtual private cloud (VPC) configurations for Function Compute, you can enable or disable Internet access for your functions. If you enable Internet access, Function Compute can access the Internet. You can enable or disable Internet access by setting the Access to Internet parameter in the Function Compute console. For more information, see Configure network settings.
You can also create an Internet NAT gateway in your VPC and set Access to Internet to No. This way, functions can access the Internet through the Internet NAT gateway of the VPC.