| « PreviousNext » | |
![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Deletes a subnet from a VPC. You must terminate all running instances in the subnet before deleting it, otherwise the API action returns an error.
SubnetIdThe ID of the subnet.
Type: String
Default: None
Required: Yes
The following elements are returned in a
DeleteSubnetResponse element.
requestIdThe ID of the request.
Type: xsd:string
returnReturns true if the request succeeds. Otherwise, returns an error.
Type: xsd:boolean
This example deletes the subnet with ID subnet-9d4a7b6c.
https://ec2.amazonaws.com/?Action=DeleteSubnet &SubnetId=subnet-9d4a7b6c &AUTHPARAMS
<DeleteSubnetResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-01/"> <requestId>7a62c49f-347e-4fc4-9331-6e8eEXAMPLE</requestId> <return>true</return> </DeleteSubnetResponse>