Deleting a NAT Service
You can delete a specified NAT service that you no longer need.
This action disassociates the public IP from the NAT service, but does not release this public IP from your account. It does not delete any NAT service routes in your route tables.
Deleting a NAT Service Using Cockpit v2
-
In the NAT Services dashboard, check the box of the NAT service you want to delete.
The NAT service is selected. -
Click Delete.
The DELETE NAT SERVICE dialog box appears. -
Click Delete.
The NAT service is deleted.Deleted resources remain visible for 1 hour.
Deleting a NAT Service Using OSC CLI
The DeleteNatService command deletes a specified network address translation (NAT) service.
This action disassociates the public IP from the NAT service, but does not release this public IP from your account. However, it does not delete any NAT service routes in your route tables.
$ osc-cli api DeleteNatService --profile "default" \
--NatServiceId "nat-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. -
NatServiceId
: The ID of the NAT service you want to delete.
The DeleteNatService 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 NAT Service Using oapi-cli
The DeleteNatService command deletes a specified network address translation (NAT) service.
This action disassociates the public IP from the NAT service, but does not release this public IP from your account. However, it does not delete any NAT service routes in your route tables.
$ oapi-cli --profile "default" DeleteNatService \
--NatServiceId "nat-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. -
NatServiceId
: The ID of the NAT service you want to delete.
The DeleteNatService 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 NAT Gateway Using AWS CLI
Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI. |
To delete a NAT gateway, use the delete-nat-gateway command following this syntax:
$ aws ec2 delete-nat-gateway \
--profile YOUR_PROFILE \
--nat-gateway-id nat-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. -
nat-gateway-id
: The ID of the NAT gateway. -
endpoint
: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.
The delete-nat-gateway command returns the following element:
-
NatGatewayId
: The ID of the NAT gateway.
{
"NatGatewayId": "nat-12345678"
}
The NAT gateway is deleted.
Deleted resources remain visible for 1 hour. |
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.