Home >Operation and Maintenance >Linux Operation and Maintenance >How to query the basic information of a created security group and return a list sorted in descending order by security group ID
This article introduces how to query the basic information of the created security group and return the list in descending order according to the security group ID. It focuses on the specific steps. The content of this article is compact and I hope you can gain something from it.
DescribeSecurityGroups
Request Parameters
Return Parameters
Example
Request Example
https://ecs.aliyuncs.com/?Action=DescribeSecurityGroups &RegionId=cn-hangzhou &<公共请求参数>
Return example
XML format
<DescribeSecurityGroupsResponse> <RequestId>94D38899-626D-434A-891F-7E1F77A81525</RequestId> <TotalCount>4</TotalCount> <PageNumber>1</PageNumber> <PageSize>10</PageSize> <RegionId>cn-hangzhou</RegionId> <SecurityGroups> <SecurityGroup> <SecurityGroupId>sg-F876FF7BA</SecurityGroupId> <Description>Test</Description> </SecurityGroup> <SecurityGroup> <SecurityGroupId>sg-086FFC27A</SecurityGroupId> <Description>test00212</Description> </SecurityGroup> <SecurityGroup> <SecurityGroupId>sg-BA4B7975B</SecurityGroupId> <Description>cn-hangzhou test group</Description> </SecurityGroup> <SecurityGroup> <SecurityGroupId>sg-35F20777C</SecurityGroupId> <Description>cn-hangzhou test group</Description> </SecurityGroup> </SecurityGroups> </DescribeSecurityGroupsResponse>
JSON format
{ "RequestId": "94D38899-626D-434A-891F-7E1F77A81525", "TotalCount": 4, "PageSize": "10", "RegionId": "cn-hangzhou", "PageNumber": "1", "SecurityGroups": { "SecurityGroup": [{ "SecurityGroupId": "sg-F876FF7BA", "Description": "TestByXcf" }, { "SecurityGroupId": "sg-086FFC27A", "Description": "test00212" }, { "SecurityGroupId": "sg-BA4B7975B", "Description": "cn-hangzhou test group" }, { "SecurityGroupId": "sg-35F20777C", "Description": "cn-hangzhou test group" }] } }
Error codes
are all public error codes. For more error codes, please visit the API Error Center.
The above is the detailed content of How to query the basic information of a created security group and return a list sorted in descending order by security group ID. For more information, please follow other related articles on the PHP Chinese website!