首頁  >  文章  >  運維  >  如何查詢建立的安全群組的基本資訊並且返回清單按照安全群組ID降序排列

如何查詢建立的安全群組的基本資訊並且返回清單按照安全群組ID降序排列

坏嘻嘻
坏嘻嘻原創
2018-09-25 14:19:122419瀏覽

本文在介紹如何查詢創建的安全群組的基本資訊並且返回清單按照安全群組ID降序排列的基礎上,重點探討了其具體步驟,本文內容緊湊,希望大家可以有所收穫。

DescribeSecurityGroups

請求參數

如何查詢建立的安全群組的基本資訊並且返回清單按照安全群組ID降序排列

回傳參數

如何查詢建立的安全群組的基本資訊並且返回清單按照安全群組ID降序排列

範例

請求範例

#
https://ecs.aliyuncs.com/?Action=DescribeSecurityGroups
&RegionId=cn-hangzhou
&<公共请求参数>

返回範例

XML格式

<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格式

{
    "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"
        }]
    }
}

###################################### #####錯誤碼############全是公共錯誤碼。更多錯誤碼,請造訪 API錯誤中心。 ###

以上是如何查詢建立的安全群組的基本資訊並且返回清單按照安全群組ID降序排列的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn