forked from docs/doc-exports
Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: Qin Ying, Fan <fanqinying@huawei.com> Co-committed-by: Qin Ying, Fan <fanqinying@huawei.com>
200 lines
17 KiB
HTML
200 lines
17 KiB
HTML
<a name="vpc_flow_0003"></a><a name="vpc_flow_0003"></a>
|
|
|
|
<h1 class="topictitle1">Querying a VPC Flow Log</h1>
|
|
<div id="body1548225405722"><div class="section" id="vpc_flow_0003__section16284153465111"><h4 class="sectiontitle">Function</h4><p id="vpc_flow_0003__p144092346513">This API is used to query a VPC flow log.</p>
|
|
</div>
|
|
<div class="section" id="vpc_flow_0003__section1828473425111"><h4 class="sectiontitle">URI</h4><p id="vpc_flow_0003__p940953475114">GET /v1/{project_id}/fl/flow_logs/{flowlog_id}</p>
|
|
<p id="vpc_flow_0003__p17789155311512"><a href="#vpc_flow_0003__table152848346516">Table 1</a> describes the parameters.</p>
|
|
|
|
<div class="tablenoborder"><a name="vpc_flow_0003__table152848346516"></a><a name="table152848346516"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_flow_0003__table152848346516" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="vpc_flow_0003__row540910347514"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.4.2.5.1.1"><p id="vpc_flow_0003__p140923405110"><strong id="vpc_flow_0003__b8828713185411">Name</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.4.2.5.1.2"><p id="vpc_flow_0003__p24091234175119"><strong id="vpc_flow_0003__b96034145547">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.4.2.5.1.3"><p id="vpc_flow_0003__p94091034205117"><strong id="vpc_flow_0003__b3510181513543">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.4.2.5.1.4"><p id="vpc_flow_0003__p144091344518"><strong id="vpc_flow_0003__b02181616195415">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_flow_0003__row15409143495116"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.1 "><p id="vpc_flow_0003__p840923411517">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.2 "><p id="vpc_flow_0003__p194091934115116">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.3 "><p id="vpc_flow_0003__p16409203465120">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.4 "><p id="vpc_flow_0003__p10487112">Project ID. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_flow_0003__row17409234195116"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.1 "><p id="vpc_flow_0003__p84091634135115">flowlog_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.2 "><p id="vpc_flow_0003__p3409123455117">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.3 "><p id="vpc_flow_0003__p3409123418514">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.4 "><p id="vpc_flow_0003__p640920345511">Flow log ID</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="vpc_flow_0003__section2284934175115"><h4 class="sectiontitle">Request Parameters</h4><p id="vpc_flow_0003__p10409133412517">None</p>
|
|
</div>
|
|
<div class="section" id="vpc_flow_0003__section787420212110"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="vpc_flow_0003__screen162446521497">GET https://{Endpoint}/v1/b2782e6708b8475c993e6064bc456bf8/fl/flow_logs/1e10cd9d-742a-4d36-a9fd-aee9784336ff</pre>
|
|
</div>
|
|
<div class="section" id="vpc_flow_0003__section1629919342519"><h4 class="sectiontitle">Response Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_flow_0003__table9299113405110" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameter</caption><thead align="left"><tr id="vpc_flow_0003__row11409334115117"><th align="left" class="cellrowborder" valign="top" width="18.18%" id="mcps1.3.5.2.2.4.1.1"><p id="vpc_flow_0003__p14409103419511"><strong id="vpc_flow_0003__b1488141212551">Name</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25.25%" id="mcps1.3.5.2.2.4.1.2"><p id="vpc_flow_0003__p34093341512"><strong id="vpc_flow_0003__b12466413195518">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="56.57%" id="mcps1.3.5.2.2.4.1.3"><p id="vpc_flow_0003__p240915343512"><strong id="vpc_flow_0003__b1333431495510">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_flow_0003__row940963413519"><td class="cellrowborder" valign="top" width="18.18%" headers="mcps1.3.5.2.2.4.1.1 "><p id="vpc_flow_0003__p84095341513">flow_log</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25.25%" headers="mcps1.3.5.2.2.4.1.2 "><p id="vpc_flow_0003__p540943475116"><a href="#vpc_flow_0003__table17299234185110">flow_log</a> object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.57%" headers="mcps1.3.5.2.2.4.1.3 "><p id="vpc_flow_0003__p34092034125118"><strong id="vpc_flow_0003__b38591633228">FlowLog</strong> objects. For details, see <a href="#vpc_flow_0003__table17299234185110">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="vpc_flow_0003__table17299234185110"></a><a name="table17299234185110"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_flow_0003__table17299234185110" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Description of the <strong id="vpc_flow_0003__b826315202216">FlowLog</strong> field</caption><thead align="left"><tr id="vpc_flow_0003__en-us_topic_0151499961_row1993725815391"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.5.3.2.4.1.1"><p id="vpc_flow_0003__en-us_topic_0151499961_p293714582397"><strong id="vpc_flow_0003__b20527172319424">Name</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="21%" id="mcps1.3.5.3.2.4.1.2"><p id="vpc_flow_0003__en-us_topic_0151499961_p149371458113917"><strong id="vpc_flow_0003__b2145532687">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="54%" id="mcps1.3.5.3.2.4.1.3"><p id="vpc_flow_0003__en-us_topic_0151499961_p159376583395"><strong id="vpc_flow_0003__b7527152304213">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_flow_0003__en-us_topic_0151499961_row29378583393"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_flow_0003__en-us_topic_0151499961_p1937205819397">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_flow_0003__en-us_topic_0151499961_p5937105873915">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_flow_0003__ul2042752118339"><li id="vpc_flow_0003__li1642742112337">Flow log ID</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_flow_0003__en-us_topic_0151499961_row1293725816394"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_flow_0003__en-us_topic_0151499961_p20937145883911">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_flow_0003__en-us_topic_0151499961_p10937105813391">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_flow_0003__ul1573649133311"><li id="vpc_flow_0003__li65731149133314">Flow log name</li><li id="vpc_flow_0003__li15573349113313">The value can contain no more than 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.).</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_flow_0003__en-us_topic_0151499961_row6937758193914"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_flow_0003__en-us_topic_0151499961_p1793711586397">tenant_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_flow_0003__en-us_topic_0151499961_p15937135818397">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_flow_0003__ul095835923313"><li id="vpc_flow_0003__li1995812591333">Project ID</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_flow_0003__en-us_topic_0151499961_row8937258173912"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_flow_0003__en-us_topic_0151499961_p593705817390">description</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_flow_0003__en-us_topic_0151499961_p093712588392">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_flow_0003__ul9605816153419"><li id="vpc_flow_0003__li146051916133410">Flow log description</li><li id="vpc_flow_0003__li1560519167342">The value can contain no more than 255 characters and cannot contain angle brackets (< or >).</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_flow_0003__en-us_topic_0151499961_row7937205883910"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_flow_0003__en-us_topic_0151499961_p1393795823920">resource_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_flow_0003__en-us_topic_0151499961_p10937858133920">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_flow_0003__ul065112543412"><li id="vpc_flow_0003__li26511625133413">Type of the resource for which that the logs to be collected.</li><li id="vpc_flow_0003__li206511825153419">The value can be:<ul id="vpc_flow_0003__ul176511125113415"><li id="vpc_flow_0003__li186511225103416"><strong id="vpc_flow_0003__b53988474718">port</strong>: NIC</li><li id="vpc_flow_0003__li2651625143412"><strong id="vpc_flow_0003__b357212520479">vpc</strong>: All NICs in a VPC</li><li id="vpc_flow_0003__li106511625173410"><strong id="vpc_flow_0003__b142719684713">network</strong>: All NICs in a subnet</li></ul>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_flow_0003__en-us_topic_0151499961_row189371758133919"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_flow_0003__en-us_topic_0151499961_p693745853910">resource_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_flow_0003__en-us_topic_0151499961_p1893725843915">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_flow_0003__ul1785754473419"><li id="vpc_flow_0003__li7857164415346">ID of the resource for which that the logs to be collected.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_flow_0003__en-us_topic_0151499961_row19371458163912"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_flow_0003__en-us_topic_0151499961_p11937135813399">traffic_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_flow_0003__en-us_topic_0151499961_p159371058143918">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_flow_0003__ul1366295614347"><li id="vpc_flow_0003__li2662175620343">Type of the traffic for which that the logs to be collected.</li><li id="vpc_flow_0003__li36621356143413">The value can be:<ul id="vpc_flow_0003__ul1766205616345"><li id="vpc_flow_0003__li16626563348"><strong id="vpc_flow_0003__b1670883794719">all</strong>: specifies that both accepted and rejected traffic of the specified resource will be logged.</li><li id="vpc_flow_0003__li366215613342"><strong id="vpc_flow_0003__b1183219382472">accept</strong>: specifies that only accepted inbound and outbound traffic of the specified resource will be logged.</li><li id="vpc_flow_0003__li1666215653413"><strong id="vpc_flow_0003__b360953910475">reject</strong>: specifies that only rejected inbound and outbound traffic of the specified resource will be logged.</li></ul>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_flow_0003__en-us_topic_0151499961_row1993795813391"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_flow_0003__en-us_topic_0151499961_p11937258153912">log_group_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_flow_0003__en-us_topic_0151499961_p1593716589399">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_flow_0003__ul187751810203512"><li id="vpc_flow_0003__li1577501010350">Log group ID</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_flow_0003__en-us_topic_0151499961_row69371358193919"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_flow_0003__en-us_topic_0151499961_p9937105811399">log_topic_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_flow_0003__en-us_topic_0151499961_p3937195853911">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_flow_0003__ul1232516177351"><li id="vpc_flow_0003__li193251417103511">Log topic ID</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_flow_0003__en-us_topic_0151499961_row149526285714"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_flow_0003__en-us_topic_0151499961_p1948613611718">admin_state</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_flow_0003__en-us_topic_0151499961_p11486936674">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_flow_0003__ul1051945714220"><li id="vpc_flow_0003__li19519157154213">Whether to enable the flow log function</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_flow_0003__en-us_topic_0151499961_row102334258716"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_flow_0003__en-us_topic_0151499961_p74861036479">status</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_flow_0003__en-us_topic_0151499961_p1948613361478">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_flow_0003__ul12491821389"><li id="vpc_flow_0003__li20841825204218">Flow log status</li><li id="vpc_flow_0003__li109721541134211">The value can be:<ul id="vpc_flow_0003__ul697204113425"><li id="vpc_flow_0003__li199711441164218"><strong id="vpc_flow_0003__b146184854920">ACTIVE</strong>: Enabled</li><li id="vpc_flow_0003__li209713415421"><strong id="vpc_flow_0003__b84235270619274">DOWN</strong>: Disabled</li><li id="vpc_flow_0003__li597216412420"><strong id="vpc_flow_0003__b1797003117215">ERROR</strong>: Abnormal</li></ul>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_flow_0003__en-us_topic_0151499961_row593715813910"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_flow_0003__en-us_topic_0151499961_p6937125803920">created_at</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_flow_0003__en-us_topic_0151499961_p6937105823914">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_flow_0003__ul1227113165412"><li id="vpc_flow_0003__li10271531155411">Time when the flow log is created</li><li id="vpc_flow_0003__li490133325417">UTC time in the format of yyyy-MM-ddTHH:mmss</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_flow_0003__en-us_topic_0151499961_row0937358193913"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_flow_0003__en-us_topic_0151499961_p1793713589392">updated_at</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_flow_0003__en-us_topic_0151499961_p15937458113912">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_flow_0003__ul16087498548"><li id="vpc_flow_0003__li5608184915547">Time when the flow log is updated</li><li id="vpc_flow_0003__li121143521542">UTC time in the format of yyyy-MM-ddTHH:mmss</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="vpc_flow_0003__section16815161911117"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="vpc_flow_0003__screen14721916185116">{
|
|
"flow_log": {
|
|
"id": "35868d55-443e-4d5c-90a4-ac618dc45c1a",
|
|
"name": "flow",
|
|
"description": "just a test",
|
|
"tenant_id": "b2782e6708b8475c993e6064bc456bf8",
|
|
"resource_type": "port",
|
|
"resource_id": "05c4052d-8d14-488f-aa00-19fea5a25fde",
|
|
"traffic_type": "reject",
|
|
"log_group_id": "05c4052d-8d14-488f-aa00-19fea5a25fff",
|
|
"log_topic_id": "a9d7dee7-37d2-4cba-a208-a016252aaa63",
|
|
"created_at": "2019-01-14T11:03:02",
|
|
"updated_at": "2019-01-14T11:03:02",
|
|
"status": "ACTIVE",
|
|
"admin_state": true
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="vpc_flow_0003__section31981619"><h4 class="sectiontitle">Status Code</h4><p id="vpc_flow_0003__p18112112662914">See <a href="vpc_api_0002.html">Status Codes</a>.</p>
|
|
</div>
|
|
<div class="section" id="vpc_flow_0003__section85821649202813"><h4 class="sectiontitle">Error Code</h4><p id="vpc_flow_0003__p17281622133910">See <a href="vpc_api_0003.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="vpc_flow_0000.html">VPC Flow Log</a></div>
|
|
</div>
|
|
</div>
|
|
|