Files
doc-exports/docs/cfw/api-ref/UpdateDomainSet.html
qiaoli 9776db0ee8 First version of the CFW API
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>
2025-01-21 07:59:01 +00:00

226 lines
16 KiB
HTML

<a name="UpdateDomainSet"></a><a name="UpdateDomainSet"></a>
<h1 class="topictitle1">Updating a Domain Name Group</h1>
<div id="body1708331107508"><div class="section" id="UpdateDomainSet__section15655759123116"><h4 class="sectiontitle">Function</h4><p id="UpdateDomainSet__p1465555963113">This API is used to update a domain name group.</p>
</div>
<div class="section" id="UpdateDomainSet__section465695910311"><h4 class="sectiontitle">URI</h4><p id="UpdateDomainSet__p186564594318">PUT /v1/{project_id}/domain-set/{set_id}</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateDomainSet__table86571659133117" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="UpdateDomainSet__row1065725912318"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="UpdateDomainSet__p26575594313">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="UpdateDomainSet__p565795917310">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="UpdateDomainSet__p665875917312">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="UpdateDomainSet__p3658559113116">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateDomainSet__row265715973113"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="UpdateDomainSet__p46581859133115">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="UpdateDomainSet__p1565813594314">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="UpdateDomainSet__p13658115914311">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="UpdateDomainSet__p36595596316">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>
<tr id="UpdateDomainSet__row56571659163113"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="UpdateDomainSet__p4659959143112">set_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="UpdateDomainSet__p965925912319">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="UpdateDomainSet__p1965912595317">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="UpdateDomainSet__p76601259103113">Domain name group ID, which can be obtained by calling the <a href="ListDomainSets.html">API for querying the domain name group list</a>. Find the value in <strong id="UpdateDomainSet__b46601259193116">data.records.set_id</strong> (The period [.] is used to separate different levels of objects).</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateDomainSet__table6660185912311" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Query Parameters</caption><thead align="left"><tr id="UpdateDomainSet__row86603594311"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.1"><p id="UpdateDomainSet__p196611159143116">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.2"><p id="UpdateDomainSet__p1866165911311">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.3"><p id="UpdateDomainSet__p1066175910319">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.4.2.5.1.4"><p id="UpdateDomainSet__p866135911315">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateDomainSet__row66606599314"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p id="UpdateDomainSet__p18661155910315">enterprise_project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p id="UpdateDomainSet__p1266155983111">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p id="UpdateDomainSet__p96621659193118">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p id="UpdateDomainSet__p1266217596318">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="UpdateDomainSet__b126621259163119">0</strong>.</p>
</td>
</tr>
<tr id="UpdateDomainSet__row766015943116"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p id="UpdateDomainSet__p066205903113">fw_instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p id="UpdateDomainSet__p14662125963114">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p id="UpdateDomainSet__p566315933111">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p id="UpdateDomainSet__p366314593319">Firewall instance ID, which is automatically generated after a CFW instance is created. You can obtain the ID by calling the <a href="ListFirewallDetail.html">API for querying a firewall instance</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="UpdateDomainSet__section1663165914313"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateDomainSet__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request header parameters</caption><thead align="left"><tr id="UpdateDomainSet__row3663175919319"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="UpdateDomainSet__p06646593316">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="UpdateDomainSet__p186649591314">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="UpdateDomainSet__p966425993113">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="UpdateDomainSet__p966415593310">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateDomainSet__row266310592316"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="UpdateDomainSet__p6664195917310">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="UpdateDomainSet__p10665959143110">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="UpdateDomainSet__p10665759133117">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="UpdateDomainSet__p2665165913317">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="UpdateDomainSet__row3461191463214"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="UpdateDomainSet__p16987185572214">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="UpdateDomainSet__p1453216872313">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="UpdateDomainSet__p598785514223">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="UpdateDomainSet__p1821149193417">Content type. It can only be set to application/json.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateDomainSet__request_UpdateDomainSetInfoDto" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Request body parameters</caption><thead align="left"><tr id="UpdateDomainSet__row16665175910312"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="UpdateDomainSet__p1466635910311">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="UpdateDomainSet__p12666145993113">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="UpdateDomainSet__p1966645918317">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="UpdateDomainSet__p166635915319">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateDomainSet__row15665559133119"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="UpdateDomainSet__p16674592311">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="UpdateDomainSet__p1667159123118">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="UpdateDomainSet__p3667185953115">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="UpdateDomainSet__p666755993115">Domain name group name.</p>
</td>
</tr>
<tr id="UpdateDomainSet__row16654593312"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="UpdateDomainSet__p196671959173120">description</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="UpdateDomainSet__p4668059203110">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="UpdateDomainSet__p3668185993110">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="UpdateDomainSet__p36682593319">Domain name group description.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="UpdateDomainSet__section1566875993111"><h4 class="sectiontitle">Response Parameters</h4><p id="UpdateDomainSet__p1666825918311"><strong id="UpdateDomainSet__b166815903114">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateDomainSet__response_UpdateDomainSetResponseBody" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="UpdateDomainSet__row16668125983112"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="UpdateDomainSet__p16669145953119">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="UpdateDomainSet__p86691859123112">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="UpdateDomainSet__p266955953118">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateDomainSet__row14669859113119"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="UpdateDomainSet__p266919598313">data</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="UpdateDomainSet__p567085963116"><a href="#UpdateDomainSet__response_DomainSetResponseData">DomainSetResponseData</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="UpdateDomainSet__p067011598313">Returned data of for updating a domain name group.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="UpdateDomainSet__response_DomainSetResponseData"></a><a name="response_DomainSetResponseData"></a><table cellpadding="4" cellspacing="0" summary="" id="UpdateDomainSet__response_DomainSetResponseData" frame="border" border="1" rules="all"><caption><b>Table 6 </b>DomainSetResponseData</caption><thead align="left"><tr id="UpdateDomainSet__row106702592317"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="UpdateDomainSet__p667116596316">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p id="UpdateDomainSet__p166711959183117">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.4.2.4.1.3"><p id="UpdateDomainSet__p46718591319">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateDomainSet__row467025918318"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="UpdateDomainSet__p4671459183113">id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="UpdateDomainSet__p116720592311">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="UpdateDomainSet__p166721059113117">Domain name group ID.</p>
</td>
</tr>
<tr id="UpdateDomainSet__row967095973118"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="UpdateDomainSet__p367218593317">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="UpdateDomainSet__p15672559183115">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="UpdateDomainSet__p5672359173116">Domain name group name.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="UpdateDomainSet__section867318592312"><h4 class="sectiontitle">Example Requests</h4><p id="UpdateDomainSet__p18673115910317">Change the name of the domain name group 94da194d-24b2-4f60-919e-cf0bc76c75b3 of firewall 7a004e79-0b8b-4679-ab20-267f3946e8ba in project 9d80d070b6d44942af73c9c3d38e0429 to <strong id="UpdateDomainSet__b1567385910318">test</strong>.</p>
<pre class="screen" id="UpdateDomainSet__screen10673759163111">https://{Endpoint}/v1/9d80d070b6d44942af73c9c3d38e0429/domain-set/94da194d-24b2-4f60-919e-cf0bc76c75b3?fw_instance_id=7a004e79-0b8b-4679-ab20-267f3946e8ba&amp;enterprise_project_id=default
{
"name" : "test",
"description" : ""
}</pre>
</div>
<div class="section" id="UpdateDomainSet__section1067412597319"><h4 class="sectiontitle">Example Responses</h4><p id="UpdateDomainSet__p18674125913316"><strong id="UpdateDomainSet__b36741059153117">Status code: 200</strong></p>
<p id="UpdateDomainSet__p1567416596316">Return value for updating a domain name group.</p>
<pre class="screen" id="UpdateDomainSet__screen17675259123115">{
"data" : {
"id" : "94da194d-24b2-4f60-919e-cf0bc76c75b3",
"name" : "test"
}
}</pre>
</div>
<div class="section" id="UpdateDomainSet__section198141559113118"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateDomainSet__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="UpdateDomainSet__row166982592318"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="UpdateDomainSet__p11814759183113">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="UpdateDomainSet__p168151359133110">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateDomainSet__row1169817594312"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="UpdateDomainSet__p19815145903110">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="UpdateDomainSet__p148150594317">Return value for updating a domain name group.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="UpdateDomainSet__section118151459143116"><h4 class="sectiontitle">Error Codes</h4><p id="UpdateDomainSet__p198151659143114">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_300000006.html">Domain Name Resolution and Domain Name Group Management</a></div>
</div>
</div>