Manage networks
Use cloud networks to transmit information between cloud resources and connect them.
Note that a list of networks in DoubleCloud is created automatically when you allocate a resource in an internal network or create an external network. You can select a network when you create ClickHouse® and Apache Kafka® clusters in DoubleCloud.
See the list of networks
-
Go to the VPC
-
The Networks tab lists all the networks in your project.
Use the NetworkService
list method
Delete networks
Before you delete a network, you need to delete all the resources located in this network.
Resources in this case are Managed ClickHouse® and Managed Service for Apache Kafka® clusters, and also virtual machines used for Transfer with the dedicated runtime.
-
Delete a Transfer. Alternatively, you can change your virtual machine's network.
Delete an internal network
-
Go to the VPC
-
On the Networks tab, select a network you want to delete and click
-
In the popup window, check the confirmation box and click Delete.
Delete an external network
The process of the external network deletion is similar to the deletion of an internal network. You need to delete it in the DoubleCloud console and then delete the CloudFormation stack you used to create the associated resources.
-
Go to the VPC
-
On the Networks tab, select a network you want to delete and click
-
In the popup window, check the confirmation box and click Delete.
Use the NetworkService
delete method and pass the network ID in the network_id
request parameter.
To find the network ID, get a list of networks in the project.
import json
import logging
import doublecloud
from doublecloud.network.v1.network_service_pb2 import DeleteNetworkRequest
from doublecloud.network.v1.network_service_pb2_grpc import NetworkServiceStub
def delete_network(sdk, network_id):
network_service = sdk.client(NetworkServiceStub)
return network_service.Delete(DeleteNetworkRequest(network_id=<your_network_id>))
For more in-depth examples, check out DoubleCloud API Python SDK repository
The process is complete on the DoubleCloud side.
Now you need to go to the AWS console
-
Go to the CloudFormation
-
Select your stack from the list and click Delete:
-
In the popup window, click Delete stack.
This will run the stack deletion process that will purge all the stack resources - VPC with all its elements and IAM roles.