Ensure that there is no instance in the security group how to delete a security group
This article will explain in detail how to delete a security group to ensure that there are no instances in the security group. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.
DeleteSecurityGroup
Delete a security group. Before deleting a security group, make sure that no instance exists in the security group and that no other security group has authorized behavior (DescribeSecurityGroupReferences) with the security group, otherwise the DeleteSecurityGroup request fails.
Request parameter
Return parameters
All are common return parameters. See common parameters.
Example
Request example
Https://ecs.aliyuncs.com/?Action=DeleteSecurityGroup&RegionId=cn-hangzhou&SecurityGroupId=sg-F876FF7BA&
Return the example
XML format
CEF72CEB-54B6-4AE8-B225-F876FF7BA984
JSON format
{
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
}
Error code
The following are the error codes specific to this API. For more error codes, please visit the API error Center.
This is the end of how to delete a security group to ensure that there are no instances in the security group. I hope the above content can be helpful to you and learn more. If you think the article is good, you can share it for more people to see.