delete_subnet
¶
delete_subnet(
*,
config_overrides: Optional[EC2ClientConfig] = None,
subnet_id: Optional[SubnetId] = None,
dry_run: Optional[Boolean] = None,
) -> None
Deletes the specified subnet. You must terminate all running instances in the subnet before you can delete the subnet.
Parameters:
-
subnet_id(Optional[SubnetId], default:None) –The ID of the subnet.
-
dry_run(Optional[Boolean], default:None) –Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation. Otherwise, it isUnauthorizedOperation.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To delete a subnet This example deletes the specified subnet.
Source code in docs_src/capo_ec2/_services/ec2.py
18661 18662 18663 18664 18665 18666 18667 18668 18669 18670 18671 18672 18673 18674 18675 18676 18677 18678 18679 18680 18681 18682 18683 18684 18685 18686 18687 18688 18689 18690 18691 18692 18693 18694 18695 18696 18697 18698 18699 18700 18701 18702 18703 18704 18705 18706 18707 18708 18709 18710 18711 | |