forked from docs/doc-exports
Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: qiaoli <qiaoli@huawei.com> Co-committed-by: qiaoli <qiaoli@huawei.com>
233 lines
18 KiB
HTML
233 lines
18 KiB
HTML
<a name="ListLogConfig"></a><a name="ListLogConfig"></a>
|
|
|
|
<h1 class="topictitle1">Obtaining Log Configurations</h1>
|
|
<div id="body1708331107508"><div class="section" id="ListLogConfig__section1720087143320"><h4 class="sectiontitle">Function</h4><p id="ListLogConfig__p9200197193314">This API is used to obtain log configurations.</p>
|
|
</div>
|
|
<div class="section" id="ListLogConfig__section1320127133311"><h4 class="sectiontitle">URI</h4><p id="ListLogConfig__p2020287103314">GET /v1/{project_id}/cfw/logs/configuration</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListLogConfig__table1320315703319" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="ListLogConfig__row8202107123310"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="ListLogConfig__p620347113317">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="ListLogConfig__p1220313713317">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="ListLogConfig__p920411716335">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="ListLogConfig__p120420719334">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ListLogConfig__row152026712332"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="ListLogConfig__p1620419733315">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="ListLogConfig__p92055710334">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="ListLogConfig__p5205573332">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="ListLogConfig__p142061713333">Project ID, which can be obtained by calling an API or from the console. For details, see <a href="cfw_02_0015.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListLogConfig__table1620713723312" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Query Parameters</caption><thead align="left"><tr id="ListLogConfig__row52061977337"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.1"><p id="ListLogConfig__p82071674332">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.2"><p id="ListLogConfig__p1207074335">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.3"><p id="ListLogConfig__p1208872335">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.4.2.5.1.4"><p id="ListLogConfig__p1220814713337">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ListLogConfig__row182063718337"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p id="ListLogConfig__p82083717335">fw_instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p id="ListLogConfig__p15209574334">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p id="ListLogConfig__p1720918719337">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p id="ListLogConfig__p20210373337">Firewall ID, which can be obtained by referring to <a href="cfw_02_0028.html">Obtaining a Firewall ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListLogConfig__row22065717338"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p id="ListLogConfig__p421013719336">enterprise_project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p id="ListLogConfig__p02102071333">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p id="ListLogConfig__p172111793316">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p id="ListLogConfig__p621197153312">Enterprise project ID, which is the ID of a project planned based on organizations. You can obtain the enterprise project ID by referring to <a href="cfw_02_0027.html">Obtaining an Enterprise Project ID</a>. If the enterprise project function is not enabled, the value is <strong id="ListLogConfig__b17211107203310">0</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ListLogConfig__section4212187113320"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListLogConfig__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request header parameters</caption><thead align="left"><tr id="ListLogConfig__row20212167173311"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="ListLogConfig__p142131673334">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="ListLogConfig__p2213117163316">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="ListLogConfig__p1721413783311">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="ListLogConfig__p202147711337">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ListLogConfig__row1921297103312"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="ListLogConfig__p1621413717337">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="ListLogConfig__p1021514733319">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="ListLogConfig__p10215975331">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="ListLogConfig__p32161077335">User token. You can obtain the token by referring to <a href="cfw_02_0029.html">Obtaining a User Token</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListLogConfig__row1644229173319"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="ListLogConfig__p16987185572214">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="ListLogConfig__p1453216872313">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="ListLogConfig__p598785514223">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="ListLogConfig__p1821149193417">Content type. It can only be set to application/json.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ListLogConfig__section721617113318"><h4 class="sectiontitle">Response Parameters</h4><p id="ListLogConfig__p121615719334"><strong id="ListLogConfig__b122171071337">Status code: 200</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListLogConfig__response_ListLogConfigResponseBody" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameters</caption><thead align="left"><tr id="ListLogConfig__row92171275335"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="ListLogConfig__p14218177123315">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="ListLogConfig__p12189713336">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="ListLogConfig__p42192711331">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ListLogConfig__row1821737163312"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ListLogConfig__p10219187143313">data</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ListLogConfig__p102193712337"><a href="#ListLogConfig__response_LogConfigDto">LogConfigDto</a> object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ListLogConfig__p1322019718335">Log configurations.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="ListLogConfig__response_LogConfigDto"></a><a name="response_LogConfigDto"></a><table cellpadding="4" cellspacing="0" summary="" id="ListLogConfig__response_LogConfigDto" frame="border" border="1" rules="all"><caption><b>Table 5 </b>LogConfigDto</caption><thead align="left"><tr id="ListLogConfig__row322017713318"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="ListLogConfig__p17221675332">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p id="ListLogConfig__p422211711332">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.4.2.4.1.3"><p id="ListLogConfig__p722210773315">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ListLogConfig__row13220127143312"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListLogConfig__p132222710334">fw_instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListLogConfig__p17223147173311">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListLogConfig__p7223127183313">Firewall ID, which can be obtained by referring to <a href="cfw_02_0028.html">Obtaining a Firewall ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListLogConfig__row322037153319"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListLogConfig__p52241779337">lts_enable</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListLogConfig__p202247715334">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListLogConfig__p1122516716332">Whether to enable LTS: <strong id="ListLogConfig__b3225077336">1</strong> (yes), <strong id="ListLogConfig__b112254711338">0</strong> (no).</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListLogConfig__row15220471337"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListLogConfig__p322511723313">lts_log_group_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListLogConfig__p192256716339">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListLogConfig__p192261743310">Log Tank Service (LTS) log group ID, which can be obtained by calling the API for querying all the log groups of an account in LTS. Find the value in <strong id="ListLogConfig__b122667103318">log_groups.log_group_id</strong> (The period [.] is used to separate different levels of objects).</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListLogConfig__row922018711331"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListLogConfig__p1122618733315">lts_attack_log_stream_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListLogConfig__p9227137183314">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListLogConfig__p142276723317">Attack log stream ID, which can be obtained by calling the API for querying all the log streams in a specified log group in LTS. Find the value in <strong id="ListLogConfig__b1422711793310">log_streams.log_stream_id</strong> (The period [.] is used to separate different levels of objects).</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListLogConfig__row52208743313"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListLogConfig__p1022810743315">lts_attack_log_stream_enable</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListLogConfig__p922847193316">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListLogConfig__p10229157203311">Whether to enable the attack log stream: <strong id="ListLogConfig__b132295714336">1</strong> (yes), <strong id="ListLogConfig__b1022918773311">0</strong> (no).</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListLogConfig__row182207713314"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListLogConfig__p112291572334">lts_access_log_stream_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListLogConfig__p223012717330">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListLogConfig__p17230174338">Access control log stream ID, which can be obtained by calling the API for querying all the log streams in a specified log group in LTS. Find the value in <strong id="ListLogConfig__b42301723317">log_streams.log_stream_id</strong> (The period [.] is used to separate different levels of objects).</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListLogConfig__row1122007163317"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListLogConfig__p62311974331">lts_access_log_stream_enable</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListLogConfig__p102311172334">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListLogConfig__p1323114743319">Whether to enable the access control stream: <strong id="ListLogConfig__b42329716334">1</strong> (yes), <strong id="ListLogConfig__b13232574334">0</strong> (no).</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListLogConfig__row142214733318"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListLogConfig__p1823212713330">lts_flow_log_stream_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListLogConfig__p32328773319">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListLogConfig__p523314719334">Traffic log ID, which can be obtained by calling the API for querying all the log streams in a specified log group in LTS. Find the value in <strong id="ListLogConfig__b1423317133320">log_streams.log_stream_id</strong> (The period [.] is used to separate different levels of objects).</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListLogConfig__row1922114743312"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListLogConfig__p1523318718330">lts_flow_log_stream_enable</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListLogConfig__p1923357143318">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListLogConfig__p1523415713313">Whether to enable the traffic log function: <strong id="ListLogConfig__b1723416703310">1</strong> (yes), <strong id="ListLogConfig__b182344773312">0</strong> (no).</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ListLogConfig__section10235187103313"><h4 class="sectiontitle">Example Requests</h4><p id="ListLogConfig__p02356711334">Query the log configuration of the firewall 4e113415-7811-4bb3-bf5e-eb835953f7d4 in project 408972e72dcd4c1a9b033e955802a36b.</p>
|
|
<pre class="screen" id="ListLogConfig__screen123587113313">https://{Endpoint}/v1/408972e72dcd4c1a9b033e955802a36b/cfw/logs/configuration?fw_instance_id=4e113415-7811-4bb3-bf5e-eb835953f7d4&enterprise_project_id=default</pre>
|
|
</div>
|
|
<div class="section" id="ListLogConfig__section7236475331"><h4 class="sectiontitle">Example Responses</h4><p id="ListLogConfig__p132363717333"><strong id="ListLogConfig__b19236137163318">Status code: 200</strong></p>
|
|
<p id="ListLogConfig__p19236776332">Return value for querying log configurations.</p>
|
|
<pre class="screen" id="ListLogConfig__screen223715783312">{
|
|
"data" : {
|
|
"fw_instance_id" : "4df2bcd1-6299-4fba-8e71-8d50ea807090",
|
|
"lts_access_log_stream_enable" : 0,
|
|
"lts_attack_log_stream_enable" : 0,
|
|
"lts_enable" : 0,
|
|
"lts_flow_log_stream_enable" : 0,
|
|
"lts_log_group_id" : "d783ce42-7f56-4c2d-9a96-b1043d016f5a"
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="ListLogConfig__section140127113319"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListLogConfig__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="ListLogConfig__row1928119783312"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="ListLogConfig__p17401207113315">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="ListLogConfig__p1740110714332">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ListLogConfig__row142815773313"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="ListLogConfig__p8401107203311">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="ListLogConfig__p144011977335">Return value for querying log configurations.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ListLogConfig__section24021570331"><h4 class="sectiontitle">Error Codes</h4><p id="ListLogConfig__p24026713335">See <a href="ErrorCode.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="topic_300000008.html">Log Management</a></div>
|
|
</div>
|
|
</div>
|
|
|