Deleting a Net
You can delete an empty Net that you no longer need. With Cockpit, you can choose to delete the Net only, or to delete it and all its associated resources at the same time.
Deleting a Net Using Cockpit v2
Deleting a Net Only
Before you begin: Delete or unlink all resources associated with the Net:
|
-
In the Nets dashboard, check the box of the Net you want to delete.
The Net is selected.You can delete multiple Nets by selecting several at a time.
-
Click Delete.
A confirmation dialog box appears. -
Click Delete.
The DHCP options set associated with the Net is disassociated and the Net is deleted.
Deleting a Net and its Associated Resources
-
In the Nets dashboard, check the box of the Net you want to tear down.
The Net is selected. -
Click Tear Down.
A confirmation dialog box appears. -
In the confirmation dialog box, type "DELETE" in the text field and click Tear Down.
The DHCP options set associated with the Net is disassociated.
The following resources are deleted with the Net:-
Virtual machines (VMs)
This action automatically deletes BSU volumes with the
DeleteOnVmDeletion
attribute set totrue
that are attached to the virtual machines.To prevent data loss, you can:
- Create backups of the volumes using snapshots. For more information, see Creating a Snapshot of a Volume.
- Set theDeleteOnVmDeletion
attribute tofalse
for each volume to prevent its deletion. For more information, see Modifying a VM Attribute. -
Internet services, virtual gateways, and NAT services
-
Custom route tables and their routes
-
Network interface cards (NICs)
-
Load balancers
-
Security groups
-
Subnets
-
Net peerings
-
Net access points
-
VPN connections
-
Public IPs
A summary of the deleted resources and their IDs appears.
-
Deleting a Net Using OSC CLI
Before you begin: Delete or detach all resources associated with the Net:
|
The DeleteNet command deletes a specified Net.
Before deleting the Net, you need to delete or detach all the resources associated with the Net:
-
Virtual machines (VMs)
-
Net peerings
-
Custom route tables
-
Public IPs allocated to resources in the Net
-
Network Interface Cards (NICs) created in the Subnets
-
Virtual gateways, Internet services and NAT services
-
Load balancers
-
Security groups
-
Subnets
$ osc-cli api DeleteNet --profile "default" \
--NetId "vpc-12345678"
This command contains the following attributes that you need to specify:
-
DryRun
: (optional) If true, checks whether you have the required permissions to perform the action. -
NetId
: The ID of the Net you want to delete.
The DeleteNet command returns the following elements:
-
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
}
}
Deleting a VPC Using AWS CLI
Before you begin:
|
To delete a VPC, use the delete-vpc command following this syntax:
$ aws ec2 delete-vpc \
--profile YOUR_PROFILE \
--vpc-id vpc-12345678 \
--endpoint https://fcu.eu-west-2.outscale.com
This command contains the following attributes that you need to specify:
-
(optional)
profile
: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI. -
vpc-id
: The ID of the VPC. -
endpoint
: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.
The specified VPC is deleted.
Related Pages
Corresponding API Methods
AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.