The content of this article is about how to authorize security group permissions when only instances in the security group are allowed to access each other. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you. helped.
CreateSecurityGroup
Create a new security group. By default, a newly created security group only allows instances within the security group to access each other, and all communication requests outside the security group will be rejected. If you want to allow communication requests from other security group instances or access requests from the Internet, you need to authorize the security group permissions (AuthorizeSecurityGroup).
Description
When calling this interface, you need to pay attention to:
In an Alibaba Cloud region, you can have up to Create 100 security groups.
When creating a VPC type security group, you must specify the parameter VpcId.
Request parameters
##Return parameters
Example
Request example
https://ecs.aliyuncs.com/?Action=CreateSecurityGroup &RegionId=cn-hangzhou &Description=for_demo &<公共请求参数>
Return example
XML format
<CreateSecurityGroupResponse> <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId> <SecurityGroupId>sg-F876FF7BA</SecurityGroupId> </CreateSecurityGroupResponse>
JSON format
{ "RequestId":"CEF72CEB-54B6-4AE8-B225-F876FF7BA984", "SecurityGroupId":"sg-F876FF7BA" }
Error code
The following are error codes unique to this interface. For more error codes, please visit the API Error Center.The above is the detailed content of How to authorize security group permissions while only allowing instances within the security group to access each other. For more information, please follow other related articles on the PHP Chinese website!