doc-exports/docs/vpc/api-ref/vpc_flow_0002.html
fanqinying 9e7606681c VPC API 20241009 version
Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: fanqinying <fanqinying@huawei.com>
Co-committed-by: fanqinying <fanqinying@huawei.com>
2024-11-21 09:26:53 +00:00

310 lines
30 KiB
HTML

<a name="vpc_flow_0002"></a><a name="vpc_flow_0002"></a>
<h1 class="topictitle1">Querying VPC Flow Logs</h1>
<div id="body1548225405722"><div class="section" id="vpc_flow_0002__section638721504117"><h4 class="sectiontitle">Function</h4><p id="vpc_flow_0002__p1266921544114">This API is used to query all VPC flow logs of the tenant submitting the request. The VPC flow logs are filtered based on the filtering condition.</p>
</div>
<div class="section" id="vpc_flow_0002__section1838713156413"><h4 class="sectiontitle">URI</h4><p id="vpc_flow_0002__p366971564114">GET /v1/{project_id}/fl/flow_logs</p>
<p id="vpc_flow_0002__p107651815220">Example:</p>
<pre class="screen" id="vpc_flow_0002__screen19478144803918">GET https://{Endpoint}/v1/b2782e6708b8475c993e6064bc456bf8/fl/flow_logs?name=flowlog</pre>
<p id="vpc_flow_0002__p17789155311512"><a href="#vpc_flow_0002__table238711153416">Table 1</a> describes the parameters.</p>
<div class="tablenoborder"><a name="vpc_flow_0002__table238711153416"></a><a name="table238711153416"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_flow_0002__table238711153416" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="vpc_flow_0002__row14669101554118"><th align="left" class="cellrowborder" valign="top" width="32.993299329932995%" id="mcps1.3.2.6.2.5.1.1"><p id="vpc_flow_0002__p166911154415"><strong id="vpc_flow_0002__b1912452434917">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.431443144314432%" id="mcps1.3.2.6.2.5.1.2"><p id="vpc_flow_0002__p18669101519419"><strong id="vpc_flow_0002__b28922248495">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.46154615461546%" id="mcps1.3.2.6.2.5.1.3"><p id="vpc_flow_0002__p26694151414"><strong id="vpc_flow_0002__b516511278495">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="37.11371137113711%" id="mcps1.3.2.6.2.5.1.4"><p id="vpc_flow_0002__p176841515164110"><strong id="vpc_flow_0002__b155321728194918">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_flow_0002__row4684415134110"><td class="cellrowborder" valign="top" width="32.993299329932995%" headers="mcps1.3.2.6.2.5.1.1 "><p id="vpc_flow_0002__p1168471519417">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.431443144314432%" headers="mcps1.3.2.6.2.5.1.2 "><p id="vpc_flow_0002__p15684715104120">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15.46154615461546%" headers="mcps1.3.2.6.2.5.1.3 "><p id="vpc_flow_0002__p17684121514416">String</p>
</td>
<td class="cellrowborder" valign="top" width="37.11371137113711%" headers="mcps1.3.2.6.2.5.1.4 "><ul id="vpc_flow_0002__ul095835923313"><li id="vpc_flow_0002__li1995812591333">Project ID. </li></ul>
</td>
</tr>
<tr id="vpc_flow_0002__row20684415194112"><td class="cellrowborder" valign="top" width="32.993299329932995%" headers="mcps1.3.2.6.2.5.1.1 "><p id="vpc_flow_0002__p15684815104119">id</p>
</td>
<td class="cellrowborder" valign="top" width="14.431443144314432%" headers="mcps1.3.2.6.2.5.1.2 "><p id="vpc_flow_0002__p176846156418">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.46154615461546%" headers="mcps1.3.2.6.2.5.1.3 "><p id="vpc_flow_0002__p196847155410">String</p>
</td>
<td class="cellrowborder" valign="top" width="37.11371137113711%" headers="mcps1.3.2.6.2.5.1.4 "><ul id="vpc_flow_0002__ul2042752118339"><li id="vpc_flow_0002__li1642742112337">Flow log ID</li></ul>
</td>
</tr>
<tr id="vpc_flow_0002__row468461544117"><td class="cellrowborder" valign="top" width="32.993299329932995%" headers="mcps1.3.2.6.2.5.1.1 "><p id="vpc_flow_0002__p8684121518411">name</p>
</td>
<td class="cellrowborder" valign="top" width="14.431443144314432%" headers="mcps1.3.2.6.2.5.1.2 "><p id="vpc_flow_0002__p868411153419">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.46154615461546%" headers="mcps1.3.2.6.2.5.1.3 "><p id="vpc_flow_0002__p268441514413">String</p>
</td>
<td class="cellrowborder" valign="top" width="37.11371137113711%" headers="mcps1.3.2.6.2.5.1.4 "><ul id="vpc_flow_0002__ul16841015174115"><li id="vpc_flow_0002__li1768491564117">Flow log name</li><li id="vpc_flow_0002__li8684131514113">The value can contain up to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.).</li></ul>
</td>
</tr>
<tr id="vpc_flow_0002__row76602004444"><td class="cellrowborder" valign="top" width="32.993299329932995%" headers="mcps1.3.2.6.2.5.1.1 "><p id="vpc_flow_0002__p866013064420">tenant_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.431443144314432%" headers="mcps1.3.2.6.2.5.1.2 "><p id="vpc_flow_0002__p16601034418">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.46154615461546%" headers="mcps1.3.2.6.2.5.1.3 "><p id="vpc_flow_0002__p106601044417">String</p>
</td>
<td class="cellrowborder" valign="top" width="37.11371137113711%" headers="mcps1.3.2.6.2.5.1.4 "><ul id="vpc_flow_0002__ul18526444444"><li id="vpc_flow_0002__li1852104411443">Project ID</li></ul>
</td>
</tr>
<tr id="vpc_flow_0002__row138288824511"><td class="cellrowborder" valign="top" width="32.993299329932995%" headers="mcps1.3.2.6.2.5.1.1 "><p id="vpc_flow_0002__p1582811819455">description</p>
</td>
<td class="cellrowborder" valign="top" width="14.431443144314432%" headers="mcps1.3.2.6.2.5.1.2 "><p id="vpc_flow_0002__p882911816456">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.46154615461546%" headers="mcps1.3.2.6.2.5.1.3 "><p id="vpc_flow_0002__p198293884510">String</p>
</td>
<td class="cellrowborder" valign="top" width="37.11371137113711%" headers="mcps1.3.2.6.2.5.1.4 "><ul id="vpc_flow_0002__ul6982132913472"><li id="vpc_flow_0002__li11982729164713">Flow log description</li><li id="vpc_flow_0002__li398217296475">The value can contain no more than 255 characters and cannot contain angle brackets (&lt; or &gt;).</li></ul>
</td>
</tr>
<tr id="vpc_flow_0002__row1368431515411"><td class="cellrowborder" valign="top" width="32.993299329932995%" headers="mcps1.3.2.6.2.5.1.1 "><p id="vpc_flow_0002__p1668491518416">resource_type</p>
</td>
<td class="cellrowborder" valign="top" width="14.431443144314432%" headers="mcps1.3.2.6.2.5.1.2 "><p id="vpc_flow_0002__p18684161519419">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.46154615461546%" headers="mcps1.3.2.6.2.5.1.3 "><p id="vpc_flow_0002__p1968419159414">String</p>
</td>
<td class="cellrowborder" valign="top" width="37.11371137113711%" headers="mcps1.3.2.6.2.5.1.4 "><ul id="vpc_flow_0002__ul065112543412"><li id="vpc_flow_0002__li26511625133413">Type of the resource for which that the logs to be collected.</li><li id="vpc_flow_0002__li206511825153419">The value can be:<ul id="vpc_flow_0002__ul176511125113415"><li id="vpc_flow_0002__li186511225103416"><strong id="vpc_flow_0002__b12180524141410">port</strong>: a single network interface.</li><li id="vpc_flow_0002__li2651625143412"><strong id="vpc_flow_0002__b4539183615142">vpc</strong>: All network interfaces in a VPC.</li><li id="vpc_flow_0002__li106511625173410"><strong id="vpc_flow_0002__b7873163817145">network</strong>: All network interfaces in a subnet.</li></ul>
</li></ul>
</td>
</tr>
<tr id="vpc_flow_0002__row11684121574118"><td class="cellrowborder" valign="top" width="32.993299329932995%" headers="mcps1.3.2.6.2.5.1.1 "><p id="vpc_flow_0002__p968411564111">resource_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.431443144314432%" headers="mcps1.3.2.6.2.5.1.2 "><p id="vpc_flow_0002__p66847153416">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.46154615461546%" headers="mcps1.3.2.6.2.5.1.3 "><p id="vpc_flow_0002__p1368431518417">String</p>
</td>
<td class="cellrowborder" valign="top" width="37.11371137113711%" headers="mcps1.3.2.6.2.5.1.4 "><ul id="vpc_flow_0002__ul1785754473419"><li id="vpc_flow_0002__li7857164415346">ID of the resource for which that the logs to be collected.</li></ul>
</td>
</tr>
<tr id="vpc_flow_0002__row1568431515411"><td class="cellrowborder" valign="top" width="32.993299329932995%" headers="mcps1.3.2.6.2.5.1.1 "><p id="vpc_flow_0002__p146841715144111">traffic_type</p>
</td>
<td class="cellrowborder" valign="top" width="14.431443144314432%" headers="mcps1.3.2.6.2.5.1.2 "><p id="vpc_flow_0002__p8684111518413">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.46154615461546%" headers="mcps1.3.2.6.2.5.1.3 "><p id="vpc_flow_0002__p15684171513416">String</p>
</td>
<td class="cellrowborder" valign="top" width="37.11371137113711%" headers="mcps1.3.2.6.2.5.1.4 "><ul id="vpc_flow_0002__ul1366295614347"><li id="vpc_flow_0002__li2662175620343">Type of the traffic for which that the logs to be collected.</li><li id="vpc_flow_0002__li36621356143413">The value can be:<ul id="vpc_flow_0002__ul1766205616345"><li id="vpc_flow_0002__li16626563348"><strong id="vpc_flow_0002__b076017914373">all</strong>: specifies that both accepted and rejected traffic of the specified resource will be logged.</li><li id="vpc_flow_0002__li366215613342"><strong id="vpc_flow_0002__b163761311133719">accept</strong>: specifies that only accepted inbound and outbound traffic of the specified resource will be logged.</li><li id="vpc_flow_0002__li1666215653413"><strong id="vpc_flow_0002__b3762131243717">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_0002__row368416157412"><td class="cellrowborder" valign="top" width="32.993299329932995%" headers="mcps1.3.2.6.2.5.1.1 "><p id="vpc_flow_0002__p1968451514411">log_group_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.431443144314432%" headers="mcps1.3.2.6.2.5.1.2 "><p id="vpc_flow_0002__p7684015114118">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.46154615461546%" headers="mcps1.3.2.6.2.5.1.3 "><p id="vpc_flow_0002__p4684115144113">String</p>
</td>
<td class="cellrowborder" valign="top" width="37.11371137113711%" headers="mcps1.3.2.6.2.5.1.4 "><ul id="vpc_flow_0002__ul187751810203512"><li id="vpc_flow_0002__li1577501010350">Log group ID</li></ul>
</td>
</tr>
<tr id="vpc_flow_0002__row166842015104110"><td class="cellrowborder" valign="top" width="32.993299329932995%" headers="mcps1.3.2.6.2.5.1.1 "><p id="vpc_flow_0002__p19684171534116">log_topic_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.431443144314432%" headers="mcps1.3.2.6.2.5.1.2 "><p id="vpc_flow_0002__p1684191516418">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.46154615461546%" headers="mcps1.3.2.6.2.5.1.3 "><p id="vpc_flow_0002__p1568411564116">String</p>
</td>
<td class="cellrowborder" valign="top" width="37.11371137113711%" headers="mcps1.3.2.6.2.5.1.4 "><ul id="vpc_flow_0002__ul1232516177351"><li id="vpc_flow_0002__li193251417103511">Log topic ID</li></ul>
</td>
</tr>
<tr id="vpc_flow_0002__row121318184513"><td class="cellrowborder" valign="top" width="32.993299329932995%" headers="mcps1.3.2.6.2.5.1.1 "><p id="vpc_flow_0002__p1613216181558">status</p>
</td>
<td class="cellrowborder" valign="top" width="14.431443144314432%" headers="mcps1.3.2.6.2.5.1.2 "><p id="vpc_flow_0002__p43114521558">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.46154615461546%" headers="mcps1.3.2.6.2.5.1.3 "><p id="vpc_flow_0002__p10311125217516">String</p>
</td>
<td class="cellrowborder" valign="top" width="37.11371137113711%" headers="mcps1.3.2.6.2.5.1.4 "><p id="vpc_flow_0002__p12311152556">Flow log status</p>
<ul id="vpc_flow_0002__ul12491821389"><li id="vpc_flow_0002__li1649621783"><strong id="vpc_flow_0002__b842352706192644">ACTIVE</strong>: Enabled</li><li id="vpc_flow_0002__li94915211488"><strong id="vpc_flow_0002__b84235270619274">DOWN</strong>: Disabled</li><li id="vpc_flow_0002__li8498211781"><strong id="vpc_flow_0002__b842352706192830">ERROR</strong>: Abnormal</li></ul>
</td>
</tr>
<tr id="vpc_flow_0002__row9684201574115"><td class="cellrowborder" valign="top" width="32.993299329932995%" headers="mcps1.3.2.6.2.5.1.1 "><p id="vpc_flow_0002__p1768418154410">limit</p>
</td>
<td class="cellrowborder" valign="top" width="14.431443144314432%" headers="mcps1.3.2.6.2.5.1.2 "><p id="vpc_flow_0002__p16684715144119">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.46154615461546%" headers="mcps1.3.2.6.2.5.1.3 "><p id="vpc_flow_0002__p116841415164112">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="37.11371137113711%" headers="mcps1.3.2.6.2.5.1.4 "><p id="vpc_flow_0002__p2017153116589">Specifies the number of records that will be returned on each page. The value is from 0 to intmax (2^31-1). The default value is 2000.</p>
<p id="vpc_flow_0002__p125192338584"><strong id="vpc_flow_0002__vpc_api01_0003_b7164124258">limit</strong> can be used together with <strong id="vpc_flow_0002__vpc_api01_0003_b15985310854">marker</strong>. For details, see the parameter description of <strong id="vpc_flow_0002__vpc_api01_0003_b193281854847">marker</strong>.</p>
</td>
</tr>
<tr id="vpc_flow_0002__row3684171513419"><td class="cellrowborder" valign="top" width="32.993299329932995%" headers="mcps1.3.2.6.2.5.1.1 "><p id="vpc_flow_0002__p1684161564111">marker</p>
</td>
<td class="cellrowborder" valign="top" width="14.431443144314432%" headers="mcps1.3.2.6.2.5.1.2 "><p id="vpc_flow_0002__p26841315104116">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.46154615461546%" headers="mcps1.3.2.6.2.5.1.3 "><p id="vpc_flow_0002__p1968481564115">String</p>
</td>
<td class="cellrowborder" valign="top" width="37.11371137113711%" headers="mcps1.3.2.6.2.5.1.4 "><p id="vpc_flow_0002__p28526205175853">Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID.</p>
<p id="vpc_flow_0002__p538818488578">This parameter can work together with the parameter <strong id="vpc_flow_0002__vpc_api01_0003_b650614119446">limit</strong>.</p>
<ul id="vpc_flow_0002__ul12704811125810"><li id="vpc_flow_0002__vpc_api01_0003_li325418407124">If parameters <strong id="vpc_flow_0002__vpc_api01_0003_b736582413514">marker</strong> and <strong id="vpc_flow_0002__vpc_api01_0003_b17435293518">limit</strong> are not passed, resource records on the first page will be returned.</li><li id="vpc_flow_0002__vpc_api01_0003_li1923817171338">If the parameter <strong id="vpc_flow_0002__vpc_api01_0003_b1505159195414">marker</strong> is not passed and the value of parameter <strong id="vpc_flow_0002__vpc_api01_0003_b14146122925417">limit</strong> is set to <strong id="vpc_flow_0002__vpc_api01_0003_b13594516546">10</strong>, the first 10 resource records will be returned.</li><li id="vpc_flow_0002__vpc_api01_0003_li2076741203417">If the value of the parameter <strong id="vpc_flow_0002__vpc_api01_0003_b13589356163415">marker</strong> is set to the resource ID of the 10th record and the value of parameter <strong id="vpc_flow_0002__vpc_api01_0003_b1557415118357">limit</strong> is set to <strong id="vpc_flow_0002__vpc_api01_0003_b10574171193511">10</strong>, the 11th to 20th resource records will be returned.</li><li id="vpc_flow_0002__vpc_api01_0003_li108512113551">If the value of the parameter <strong id="vpc_flow_0002__vpc_api01_0003_b9403193716543">marker</strong> is set to the resource ID of the 10th record and the parameter <strong id="vpc_flow_0002__vpc_api01_0003_b10358823165519">limit</strong> is not passed, 11th to 2,000th resource records will be returned. The default value of <strong id="vpc_flow_0002__vpc_api01_0003_b112010101639">limit</strong> is <strong id="vpc_flow_0002__vpc_api01_0003_b206061121438">2000</strong>.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="vpc_flow_0002__section15450181516413"><h4 class="sectiontitle">Request Parameters</h4><p id="vpc_flow_0002__p13684131519419">None</p>
</div>
<div class="section" id="vpc_flow_0002__section790402341011"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="vpc_flow_0002__screen10455103843412">GET https://{Endpoint}/v1/b2782e6708b8475c993e6064bc456bf8/fl/flow_logs?name=flowlog</pre>
</div>
<div class="section" id="vpc_flow_0002__section18465111518417"><h4 class="sectiontitle">Response Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_flow_0002__table1346521554119" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameter</caption><thead align="left"><tr id="vpc_flow_0002__row4684115164112"><th align="left" class="cellrowborder" valign="top" width="18.18%" id="mcps1.3.5.2.2.4.1.1"><p id="vpc_flow_0002__p136841215114112"><strong id="vpc_flow_0002__b167561740165013">Parameter</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_0002__p11684181510415"><strong id="vpc_flow_0002__b145886415502">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_0002__p16847153414"><strong id="vpc_flow_0002__b941164245018">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_flow_0002__row9684215134119"><td class="cellrowborder" valign="top" width="18.18%" headers="mcps1.3.5.2.2.4.1.1 "><p id="vpc_flow_0002__p3684121513412">flow_logs</p>
</td>
<td class="cellrowborder" valign="top" width="25.25%" headers="mcps1.3.5.2.2.4.1.2 "><p id="vpc_flow_0002__p13684101534119">Array of <a href="#vpc_flow_0002__table34811015184118">FlowLog</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="56.57%" headers="mcps1.3.5.2.2.4.1.3 "><p id="vpc_flow_0002__p668481574120"><strong id="vpc_flow_0002__b1287253319279">FlowLog</strong> object list. For details, see <a href="#vpc_flow_0002__table34811015184118">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="p" id="vpc_flow_0002__p7684131510416">
<div class="tablenoborder"><a name="vpc_flow_0002__table34811015184118"></a><a name="table34811015184118"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_flow_0002__table34811015184118" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Description of the <strong id="vpc_flow_0002__b1327717276111">FlowLog</strong> field</caption><thead align="left"><tr id="vpc_flow_0002__en-us_topic_0151499961_row1993725815391"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.5.3.1.2.4.1.1"><p id="vpc_flow_0002__en-us_topic_0151499961_p293714582397"><strong id="vpc_flow_0002__b1330213314352">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21%" id="mcps1.3.5.3.1.2.4.1.2"><p id="vpc_flow_0002__en-us_topic_0151499961_p149371458113917"><strong id="vpc_flow_0002__b1494549852">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="54%" id="mcps1.3.5.3.1.2.4.1.3"><p id="vpc_flow_0002__en-us_topic_0151499961_p159376583395"><strong id="vpc_flow_0002__b330313183519">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_flow_0002__en-us_topic_0151499961_row29378583393"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.1.2.4.1.1 "><p id="vpc_flow_0002__en-us_topic_0151499961_p1937205819397">id</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.1.2.4.1.2 "><p id="vpc_flow_0002__en-us_topic_0151499961_p5937105873915">String</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.1.2.4.1.3 "><ul id="vpc_flow_0002__ul7411122710216"><li id="vpc_flow_0002__li44111927142115">Flow log ID</li></ul>
</td>
</tr>
<tr id="vpc_flow_0002__en-us_topic_0151499961_row1293725816394"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.1.2.4.1.1 "><p id="vpc_flow_0002__en-us_topic_0151499961_p20937145883911">name</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.1.2.4.1.2 "><p id="vpc_flow_0002__en-us_topic_0151499961_p10937105813391">String</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.1.2.4.1.3 "><ul id="vpc_flow_0002__ul1573649133311"><li id="vpc_flow_0002__li65731149133314">Flow log name</li><li id="vpc_flow_0002__li15573349113313">The value can contain up to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.).</li></ul>
</td>
</tr>
<tr id="vpc_flow_0002__en-us_topic_0151499961_row6937758193914"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.1.2.4.1.1 "><p id="vpc_flow_0002__en-us_topic_0151499961_p1793711586397">tenant_id</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.1.2.4.1.2 "><p id="vpc_flow_0002__en-us_topic_0151499961_p15937135818397">String</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.1.2.4.1.3 "><ul id="vpc_flow_0002__ul167511739142114"><li id="vpc_flow_0002__li11751133952111">Project ID</li></ul>
</td>
</tr>
<tr id="vpc_flow_0002__en-us_topic_0151499961_row8937258173912"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.1.2.4.1.1 "><p id="vpc_flow_0002__en-us_topic_0151499961_p593705817390">description</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.1.2.4.1.2 "><p id="vpc_flow_0002__en-us_topic_0151499961_p093712588392">String</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.1.2.4.1.3 "><ul id="vpc_flow_0002__ul9605816153419"><li id="vpc_flow_0002__li146051916133410">Flow log description</li><li id="vpc_flow_0002__li1560519167342">The value can contain no more than 255 characters and cannot contain angle brackets (&lt; or &gt;).</li></ul>
</td>
</tr>
<tr id="vpc_flow_0002__en-us_topic_0151499961_row7937205883910"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.1.2.4.1.1 "><p id="vpc_flow_0002__en-us_topic_0151499961_p1393795823920">resource_type</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.1.2.4.1.2 "><p id="vpc_flow_0002__en-us_topic_0151499961_p10937858133920">String</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.1.2.4.1.3 "><ul id="vpc_flow_0002__ul1658111513216"><li id="vpc_flow_0002__li2581105118214">Type of the resource for which that the logs to be collected.</li><li id="vpc_flow_0002__li95821451142120">The value can be:<ul id="vpc_flow_0002__ul3582155117219"><li id="vpc_flow_0002__li05821510215"><strong id="vpc_flow_0002__b1553176320">port</strong>: a single network interface.</li><li id="vpc_flow_0002__li20582451162117"><strong id="vpc_flow_0002__b478161431510">vpc</strong>: All network interfaces in a VPC.</li><li id="vpc_flow_0002__li55821451122110"><strong id="vpc_flow_0002__b17491316161511">network</strong>: All network interfaces in a subnet.</li></ul>
</li></ul>
</td>
</tr>
<tr id="vpc_flow_0002__en-us_topic_0151499961_row189371758133919"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.1.2.4.1.1 "><p id="vpc_flow_0002__en-us_topic_0151499961_p693745853910">resource_id</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.1.2.4.1.2 "><p id="vpc_flow_0002__en-us_topic_0151499961_p1893725843915">String</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.1.2.4.1.3 "><ul id="vpc_flow_0002__ul950219232218"><li id="vpc_flow_0002__li45021219222">ID of the resource for which that the logs to be collected.</li></ul>
</td>
</tr>
<tr id="vpc_flow_0002__en-us_topic_0151499961_row19371458163912"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.1.2.4.1.1 "><p id="vpc_flow_0002__en-us_topic_0151499961_p11937135813399">traffic_type</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.1.2.4.1.2 "><p id="vpc_flow_0002__en-us_topic_0151499961_p159371058143918">String</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.1.2.4.1.3 "><ul id="vpc_flow_0002__ul526909182210"><li id="vpc_flow_0002__li5269898229">Type of the traffic for which that the logs to be collected.</li><li id="vpc_flow_0002__li182691293223">The value can be:<ul id="vpc_flow_0002__ul22691593222"><li id="vpc_flow_0002__li5269691224"><strong id="vpc_flow_0002__b1090612174112">all</strong>: specifies that both accepted and rejected traffic of the specified resource will be logged.</li><li id="vpc_flow_0002__li152691592229"><strong id="vpc_flow_0002__b1390631244119">accept</strong>: specifies that only accepted inbound and outbound traffic of the specified resource will be logged.</li><li id="vpc_flow_0002__li1426919918226"><strong id="vpc_flow_0002__b6731513114112">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_0002__en-us_topic_0151499961_row1993795813391"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.1.2.4.1.1 "><p id="vpc_flow_0002__en-us_topic_0151499961_p11937258153912">log_group_id</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.1.2.4.1.2 "><p id="vpc_flow_0002__en-us_topic_0151499961_p1593716589399">String</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.1.2.4.1.3 "><ul id="vpc_flow_0002__ul55423173228"><li id="vpc_flow_0002__li1254291715220">Log group ID</li></ul>
</td>
</tr>
<tr id="vpc_flow_0002__en-us_topic_0151499961_row69371358193919"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.1.2.4.1.1 "><p id="vpc_flow_0002__en-us_topic_0151499961_p9937105811399">log_topic_id</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.1.2.4.1.2 "><p id="vpc_flow_0002__en-us_topic_0151499961_p3937195853911">String</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.1.2.4.1.3 "><ul id="vpc_flow_0002__ul14560132392215"><li id="vpc_flow_0002__li1856092382214">Log topic ID</li></ul>
</td>
</tr>
<tr id="vpc_flow_0002__en-us_topic_0151499961_row149526285714"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.1.2.4.1.1 "><p id="vpc_flow_0002__en-us_topic_0151499961_p1948613611718">admin_state</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.1.2.4.1.2 "><p id="vpc_flow_0002__en-us_topic_0151499961_p11486936674">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.1.2.4.1.3 "><ul id="vpc_flow_0002__ul1051945714220"><li id="vpc_flow_0002__li19519157154213">Whether to enable the flow log function</li></ul>
</td>
</tr>
<tr id="vpc_flow_0002__en-us_topic_0151499961_row102334258716"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.1.2.4.1.1 "><p id="vpc_flow_0002__en-us_topic_0151499961_p74861036479">status</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.1.2.4.1.2 "><p id="vpc_flow_0002__en-us_topic_0151499961_p1948613361478">String</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.1.2.4.1.3 "><ul id="vpc_flow_0002__ul31381139142212"><li id="vpc_flow_0002__li20841825204218">Flow log status</li><li id="vpc_flow_0002__li109721541134211">The value can be:<ul id="vpc_flow_0002__ul697204113425"><li id="vpc_flow_0002__li199711441164218"><strong id="vpc_flow_0002__b132991143114116">ACTIVE</strong>: Enabled</li><li id="vpc_flow_0002__li209713415421"><strong id="vpc_flow_0002__b1558213655">DOWN</strong>: Disabled</li><li id="vpc_flow_0002__li597216412420"><strong id="vpc_flow_0002__b291912460410">ERROR</strong>: Abnormal</li></ul>
</li></ul>
</td>
</tr>
<tr id="vpc_flow_0002__en-us_topic_0151499961_row593715813910"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.1.2.4.1.1 "><p id="vpc_flow_0002__en-us_topic_0151499961_p6937125803920">created_at</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.1.2.4.1.2 "><p id="vpc_flow_0002__en-us_topic_0151499961_p6937105823914">String</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.1.2.4.1.3 "><ul id="vpc_flow_0002__ul1227113165412"><li id="vpc_flow_0002__li10271531155411">Time when the flow log is created</li><li id="vpc_flow_0002__li490133325417">UTC time in the format of yyyy-MM-ddTHH:mm:ss</li></ul>
</td>
</tr>
<tr id="vpc_flow_0002__en-us_topic_0151499961_row0937358193913"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.1.2.4.1.1 "><p id="vpc_flow_0002__en-us_topic_0151499961_p1793713589392">updated_at</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.5.3.1.2.4.1.2 "><p id="vpc_flow_0002__en-us_topic_0151499961_p15937458113912">String</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.5.3.1.2.4.1.3 "><ul id="vpc_flow_0002__ul16087498548"><li id="vpc_flow_0002__li5608184915547">Time when the flow log is updated</li><li id="vpc_flow_0002__li121143521542">UTC time in the format of yyyy-MM-ddTHH:mm:ss</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="vpc_flow_0002__section888819424103"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="vpc_flow_0002__screen1227124514484">{
"flow_logs": [
{
"id": "35868d55-443e-4d5c-90a4-ac618dc45c1a",
"name": "flowlog",
"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_0002__section31981619"><h4 class="sectiontitle">Status Code</h4><p id="vpc_flow_0002__p18112112662914">See <a href="vpc_api_0002.html">Status Codes</a>.</p>
</div>
<div class="section" id="vpc_flow_0002__section85821649202813"><h4 class="sectiontitle">Error Code</h4><p id="vpc_flow_0002__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>