描述安全组信息

最近更新时间:2018-01-30 16:12:00

DescribeSecurityGroups(描述安全组)

Request Parameters(请求参数)

SecurityGroupId.N

  • 一个或多个安全组的ID
  • 类型: String List
  • 是否可缺省: 是
  • 缺省值: 查询region下所有的安全组信息

Filter.N

  • vpc-id,VPC的ID
  • 类型: Filter list
  • 是否可缺省: 是

Response Elements(返回值)

RequestId

  • 请求ID
  • 类型: String

SecurityGroupSet

Examples(例子)

Sample Request(请求)
http://vpc.region.api.ksyun.com/?Action=DescribeSecurityGroups
&Version=2016-03-04
&SecurityGroupId.1=9fa539c7-2e58-47f1-a8d3-d3eaaf843774
Sample Response(返回)
<DescribeSecurityGroupsResponse xmlns="http://vpc.api.ksyun.com/doc/2016-03-04/">
    <RequestId>84d2a8f6-19ca-4ba2-a34c-46933219478d</RequestId>
    <SecurityGroupSet>
        <item>
            <CreateTime>2016-04-28 10:32:18</CreateTime>
            <VpcId>4e8d1f11-264a-468b-ae37-09b465477415</VpcId>
            <SecurityGroupName>test_name</SecurityGroupName>
            <SecurityGroupEntrySet>
                <item>
                    <CidrBlock>20.20.20.0/26</CidrBlock>
                    <Direction>in</Direction>
                    <Protocol>ip</Protocol>
                    <SecurityGroupEntryId>4b85948b-73cf-4019-bfae-d06f85c1fe9e</SecurityGroupEntryId>
                </item>
                <item>
                    <CidrBlock>0.0.0.0/0</CidrBlock>
                    <Direction>out</Direction>
                    <Protocol>ip</Protocol>
                    <SecurityGroupEntryId>688bc79a-708e-4bbb-9503-4135e70015c7</SecurityGroupEntryId>
                </item>
                <item>
                    <CidrBlock>0.0.0.0/0</CidrBlock>
                    <Direction>in</Direction>
                    <PortRangeTo>22</PortRangeTo>
                    <PortRangeFrom>22</PortRangeFrom>
                    <Protocol>tcp</Protocol>
                    <SecurityGroupEntryId>ce1e65cb-0888-4856-83e0-0c8025285a53</SecurityGroupEntryId>
                </item>
                <item>
                    <CidrBlock>0.0.0.0/0</CidrBlock>
                    <Direction>in</Direction>
                    <PortRangeTo>22</PortRangeTo>
                    <PortRangeFrom>22</PortRangeFrom>
                    <Protocol>udp</Protocol>
                    <SecurityGroupEntryId>e8600cd3-0800-4eef-bd1f-d33d62d1d4a0</SecurityGroupEntryId>
                </item>
            </SecurityGroupEntrySet>
            <SecurityGroupType>default</SecurityGroupType>
            <SecurityGroupId>9fa539c7-2e58-47f1-a8d3-d3eaaf843774</SecurityGroupId>
        </item>
    </SecurityGroupSet>
</DescribeSecurityGroupsResponse>

金山云,开启您的云计算之旅

注册有礼