describeFlowLog

产品文档

私有网络

2023-09-18 12:10:57

describeFlowLog

描述

本接口用于查询流日志资源详情

请求方式

GET

请求地址

https://flowlog.jdcloud-api.com/v1/regions/{regionId}/flowLogs/{flowLogId}

名称 类型 是否必需 默认值 描述
regionId String True 地域 ID
flowLogId String True 流日志ID

请求参数

返回参数

名称 类型 描述
result Result 返回结果
requestId String 请求ID

Result

名称 类型 描述
flowLog FlowLog 流日志信息

FlowLog

名称 类型 描述
flowLogId String 流日志ID
flowLogName String 流日志名称,只允许输入中文、数字、大小写字母、英文下划线“_”及中划线“-”,不允许为空且不超过32字符
description String 描述,允许输入UTF-8编码下的全部字符,不超过256字符
flowLogType String 流日志类型
PORT:采集资源包括云主机、弹性网卡
NATGW:NAT网关
flowLogStatus String 流日志的状态
RUNNING:采集中
STOPPED:已停止采集
collectResources CollectResource[] 采集资源列表
collectTrafficType String 采集流量类型
ALL:记录指定资源的全部流量。
ACCEPT:记录指定资源被安全组、网络ACL均接受的流量。
REJECT:记录指定资源被安全组或网络ACL拒绝的流量。
collectInterval Integer 流日志采集时间间隔。单位:分钟。取值:1、5、10
storageRegionId String 流日志的存储服务所在地域
storageType String 流日志的存储服务类型
LOG:日志服务
storageId String 流日志数据存储服务ID
createdTime String 流日志创建时间

CollectResource

名称 类型 描述
collectResourceId String 采集资源ID
vpcId String 采集资源所属私有网络(VPC)的ID
subnetId String 采集资源所属子网的ID
collectResourceType String 采集资源类型
VM: 云主机
ENI: 弹性网卡
NATGW:NAT网关
addedTime String 采集资源添加时间

返回码

HTTP状态码 错误码 描述 错误解析
200 OK
400 Bad request Parameter 'xx' is required. 'xx'必传参数未传递
400 Bad request validate failed: 'xx' invalid or unsupported. 'xx'参数不可用或者不支持
400 Bad request The collectResourceType must correspond to the flowLogType. collectResourceType必须要关联flowLogType
401 Authentication failed Authentication failed 鉴权失败,检查pin
404 Not found 'xx' flowLog not existed 流日志不存在
404 Not found 'xx' flowLogResource not existed 选择绑定流日志资源不存在
400 Bad request storageId 'xx' is not found. storageId不存在
500 Internal server error Internal server error 系统内部错误,请稍后重试。如果多次尝试失败,请提交工单

请求示例

GET

调用方法、签名算法及公共请求参数请参考[京东云OpenAPI公共说明](https://docs.jdcloud.com/common-declaration/api/introduction)。
- 请求示例: 查询id是flog-w5cbr4l8u4的流日志信息


  /v1/regions/cn-east-2/flowLogs/flog-w5cbr4l8u4
  {
    
  }

返回示例

{
    "requestId": "a85a1a3d-39d5-4fd9-a0a1-912c29f49842", 
    "result": {
        "flowLog": {
            "collectInterval": 10, 
            "collectResources": [
                {
                    "addedTime": "2023-06-02T08:21:11Z", 
                    "collectResourceId": "i-c4nehkfcaa", 
                    "collectResourceType": "VM", 
                    "subnetId": "subnet-1pyqdrj0qm", 
                    "vpcId": "vpc-pg51d58ypc"
                }
            ], 
            "collectTrafficType": "ALL", 
            "createdTime": "2023-06-02T08:21:11Z", 
            "description": "", 
            "flowLogId": "flog-w5cbr4l8u4", 
            "flowLogName": "testset", 
            "flowLogStatus": "RUNNING", 
            "flowLogType": "PORT", 
            "storageId": "logtopic-5sk0cmiyxd", 
            "storageRegionId": "cn-east-2", 
            "storageType": "LOG"
        }
    }
}
文档反馈

开始与售前顾问沟通

可直接拨打电话 400-098-8505转1

我们的产品专家为您找到最合适的产品/解决⽅案

在线咨询 5*8⼩时

1v1线上咨询获取售前专业咨询

点击咨询
企微服务助手

专业产品顾问,随时随地沟通