查询企业安全组列表
更新时间:2025-04-30
描述
该接口用于查询用户的企业安全组信息。
请求结构
                Plain Text
                
            
            1GET /v{version}/enterprise/security?marker={marker}&maxKeys={maxKeys}&instanceId={instanceId} HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: authorization string
            请求头域
除公共头域外,无其它特殊头域。
请求参数
| 参数名称 | 类型 | 是否必选 | 参数位置 | 描述 | 
|---|---|---|---|---|
| version | String | 是 | URL参数 | API版本号,当前取值为1 | 
| marker | String | 否 | Query参数 | 批量获取列表的查询的起始位置,是一个由系统生成的字符串 | 
| maxKeys | Integer | 否 | Query参数 | 每页包含的最大数量,最大数量通常不超过1000,缺省值为1000 | 
| instanceId | String | 否 | Query参数 | 实例ID,可查询实例关联的企业安全组列表。如需查询所有创建的企业安全组信息,不填写此参数。 | 
返回头域
除公共头域,无其它特殊头域。
返回参数
| 参数名称 | 类型 | 描述 | 
|---|---|---|
| marker | String | 标记查询的起始位置 | 
| isTruncated | Boolean | true表示后面还有数据,false表示已经是最后一页。 | 
| nextMarker | String | 获取下一页所需要传递的marker值。当isTruncated为false时,该域不出现。 | 
| maxKeys | Integer | 每页包含的最大数量 | 
| enterpriseSecurityGroups | List<EnterpriseSecurityGroupModel> | 企业安全组信息,由EnterpriseSecurityGroupModel组成的集合 | 
请求示例
                Plain Text
                
            
            1GET /v1/enterprise/security?instanceId=i-kjuinbcd HTTP/1.1
2Host: bcc.bj.baidubce.com
3Content-Type: application/json;charset=UTF-8
4Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
            返回示例
                Plain Text
                
            
            1HTTP/1.1 200 OK
2x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3Date: Wed, 03 Dec 2014 06:42:19 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS
6
7{
8    "nextMarker": "",
9    "marker": "",
10    "maxKeys": 1000,
11    "enterpriseSecurityGroups": [
12        {
13        "desc": "", 
14        "id": "esg-4NxWoxeq", 
15        "name": "test enterprise sg",
16        "createdTime":"2019-09-24T08:25:59Z",
17        "updatedTime":"2019-09-24T08:25:59Z",
18        "rules": [
19            {
20                "destIp": "all", 
21                "localIp": "all", 
22                "direction": "egress", 
23                "ethertype": "IPv4", 
24                "portRange": "1-65535",
25                "sourcePortRange": "1-65535",
26                "action":"allow",
27                "priority":"1000",
28                "protocol": "all", 
29                "remark": "备注", 
30                "enterpriseSecurityGroupRuleId": "esgr-gkv8yupumvx2",
31                "createdTime": "2020-07-27T13:00:52Z",
32                "updatedTime": "2020-07-27T13:00:52Z"
33            }
34        ],
35        "tags":[
36           {
37            "tagKey": "tagKey",
38            "tagValue": "tagValue"
39           }
40        ]
41      }
42    ],
43    "isTruncated": false
44}  
            