delete_subnet
async
¶
delete_subnet(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = 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/async_ec2.py
18911 18912 18913 18914 18915 18916 18917 18918 18919 18920 18921 18922 18923 18924 18925 18926 18927 18928 18929 18930 18931 18932 18933 18934 18935 18936 18937 18938 18939 18940 18941 18942 18943 18944 18945 18946 18947 18948 18949 18950 18951 18952 18953 18954 18955 18956 18957 18958 18959 18960 18961 18962 | |