Files
doc-exports/docs/wafd/api-ref/CreateCloudWafPostPaidResource.html
qinweiwei 14cbe51752 wafd API 20260210 version
Reviewed-by: Belejkanic, Lukas <lukas.belejkanic@t-systems.com>
Co-authored-by: qinweiwei <qinweiwei@huawei.com>
Co-committed-by: qinweiwei <qinweiwei@huawei.com>
2026-04-21 11:31:19 +00:00

397 lines
32 KiB
HTML

<a name="CreateCloudWafPostPaidResource"></a><a name="CreateCloudWafPostPaidResource"></a>
<h1 class="topictitle1">Enabling Pay-Per-Use Billing for Cloud WAF</h1>
<div id="body1708331107508"><div class="section" id="CreateCloudWafPostPaidResource__topic1831000000"><h4 class="sectiontitle">Function</h4><p id="CreateCloudWafPostPaidResource__topic1831000002">This API is used to enable the pay-per-use billing mode for cloud WAF.</p>
</div>
<div class="section" id="CreateCloudWafPostPaidResource__atuogenerate_1"><h4 class="sectiontitle">URI</h4><p id="CreateCloudWafPostPaidResource__topic1831000004">POST /v1/{project_id}/waf/postpaid</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateCloudWafPostPaidResource__topic1831000005" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="CreateCloudWafPostPaidResource__topic1831000013"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="CreateCloudWafPostPaidResource__topic1831000015">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="CreateCloudWafPostPaidResource__topic1831000017">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="CreateCloudWafPostPaidResource__topic1831000019">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="CreateCloudWafPostPaidResource__topic1831000021">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateCloudWafPostPaidResource__topic1831000023"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000025">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000027">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000029">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="CreateCloudWafPostPaidResource__topic1831000031">Project ID. To obtain it, go to console and hover the cursor over your username. On the displayed window, choose <strong id="CreateCloudWafPostPaidResource__topic1831000032">My Credentials</strong>. Then, in the <strong id="CreateCloudWafPostPaidResource__topic1831000033">Projects</strong> area, view <strong id="CreateCloudWafPostPaidResource__topic1831000034">Project ID</strong> of the corresponding project.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateCloudWafPostPaidResource__topic1831000035" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Query Parameters</caption><thead align="left"><tr id="CreateCloudWafPostPaidResource__topic1831000043"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.1"><p id="CreateCloudWafPostPaidResource__topic1831000045">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.2"><p id="CreateCloudWafPostPaidResource__topic1831000047">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.3"><p id="CreateCloudWafPostPaidResource__topic1831000049">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.4.2.5.1.4"><p id="CreateCloudWafPostPaidResource__topic1831000051">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateCloudWafPostPaidResource__topic1831000053"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000055">enterprise_project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000057">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000059">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p id="CreateCloudWafPostPaidResource__topic1831000061">You can obtain the ID by calling the <strong id="CreateCloudWafPostPaidResource__topic1831000062">ListEnterpriseProject</strong> API of EPS.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateCloudWafPostPaidResource__topic1831000063"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateCloudWafPostPaidResource__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request header parameters</caption><thead align="left"><tr id="CreateCloudWafPostPaidResource__topic1831000072"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="CreateCloudWafPostPaidResource__topic1831000074">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="CreateCloudWafPostPaidResource__topic1831000076">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="CreateCloudWafPostPaidResource__topic1831000078">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="CreateCloudWafPostPaidResource__topic1831000080">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateCloudWafPostPaidResource__topic1831000082"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000084">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000086">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000088">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CreateCloudWafPostPaidResource__topic1831000090">User token. It can be obtained by calling the IAM API (value of <strong id="CreateCloudWafPostPaidResource__topic1831000091">X-Subject-Token</strong> in the response header).</p>
</td>
</tr>
<tr id="CreateCloudWafPostPaidResource__topic1831000092"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000094">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000096">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000098">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CreateCloudWafPostPaidResource__topic1831000100">Content type.</p>
</td>
</tr>
<tr id="CreateCloudWafPostPaidResource__topic1831000101"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000103">region</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000105">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000107">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CreateCloudWafPostPaidResource__topic1831000109">Region ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateCloudWafPostPaidResource__request_CreateCloudWafPostPaidResourceRequestbody" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Request body parameters</caption><thead align="left"><tr id="CreateCloudWafPostPaidResource__topic1831000117"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="CreateCloudWafPostPaidResource__topic1831000119">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="CreateCloudWafPostPaidResource__topic1831000121">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="CreateCloudWafPostPaidResource__topic1831000123">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="CreateCloudWafPostPaidResource__topic1831000125">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateCloudWafPostPaidResource__topic1831000127"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000129">console_area</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000131">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000133">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateCloudWafPostPaidResource__topic1831000135">Website the account belongs to. The value is <strong id="CreateCloudWafPostPaidResource__topic1831000136">dt</strong> for Cloud website.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateCloudWafPostPaidResource__topic1831000137"><h4 class="sectiontitle">Response Parameters</h4><p id="CreateCloudWafPostPaidResource__topic1831000139"><strong id="CreateCloudWafPostPaidResource__topic1831000140">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateCloudWafPostPaidResource__response_CreateCloudWafPostPaidResourceResponsebody" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="CreateCloudWafPostPaidResource__topic1831000147"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.1"><p id="CreateCloudWafPostPaidResource__topic1831000149">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.2"><p id="CreateCloudWafPostPaidResource__topic1831000151">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.3.2.4.1.3"><p id="CreateCloudWafPostPaidResource__topic1831000153">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateCloudWafPostPaidResource__topic1831000155"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000157">type</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000159">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000161">The edition for the cloud WAF instance.By default, 22 is returned when the CreateCloudWafPostPaidResource API is called.</p>
<ul id="CreateCloudWafPostPaidResource__topic1831000162"><li id="CreateCloudWafPostPaidResource__topic1831000163"><p id="CreateCloudWafPostPaidResource__topic1831000164"><a name="CreateCloudWafPostPaidResource__topic1831000163"></a><a name="topic1831000163"></a><strong id="CreateCloudWafPostPaidResource__topic1831000165">22</strong>: The pay-per-use edition.</p>
</li></ul>
</td>
</tr>
<tr id="CreateCloudWafPostPaidResource__topic1831000166"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000168">resources</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000170">Array of <a href="#CreateCloudWafPostPaidResource__response_ResourceResponse">ResourceResponse</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000173">The resource list.</p>
</td>
</tr>
<tr id="CreateCloudWafPostPaidResource__topic1831000174"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000176">isNewUser</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000178">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000180">New user or not.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateCloudWafPostPaidResource__response_ResourceResponse"></a><a name="response_ResourceResponse"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateCloudWafPostPaidResource__response_ResourceResponse" frame="border" border="1" rules="all"><caption><b>Table 6 </b>ResourceResponse</caption><thead align="left"><tr id="CreateCloudWafPostPaidResource__topic1831000187"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.4.2.4.1.1"><p id="CreateCloudWafPostPaidResource__topic1831000189">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.4.2.4.1.2"><p id="CreateCloudWafPostPaidResource__topic1831000191">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.4.2.4.1.3"><p id="CreateCloudWafPostPaidResource__topic1831000193">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateCloudWafPostPaidResource__topic1831000195"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000197">resourceId</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000199">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000201">Resource ID.</p>
</td>
</tr>
<tr id="CreateCloudWafPostPaidResource__topic1831000202"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000204">cloudServiceType</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000206">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000208">Cloud service type.</p>
</td>
</tr>
<tr id="CreateCloudWafPostPaidResource__topic1831000209"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000211">resourceType</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000213">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000215">Cloud service resource type.</p>
<ul id="CreateCloudWafPostPaidResource__topic1831000216"><li id="CreateCloudWafPostPaidResource__topic1831000217"><p id="CreateCloudWafPostPaidResource__topic1831000218"><a name="CreateCloudWafPostPaidResource__topic1831000217"></a><a name="topic1831000217"></a>hws.resource.type.waf: yearly/monthly cloud-mode WAF</p>
</li><li id="CreateCloudWafPostPaidResource__topic1831000219"><p id="CreateCloudWafPostPaidResource__topic1831000220"><a name="CreateCloudWafPostPaidResource__topic1831000219"></a><a name="topic1831000219"></a>hws.resource.type.waf.domain: domain name expansion packages in yearly/monthly cloud-mode WAF</p>
</li><li id="CreateCloudWafPostPaidResource__topic1831000221"><p id="CreateCloudWafPostPaidResource__topic1831000222"><a name="CreateCloudWafPostPaidResource__topic1831000221"></a><a name="topic1831000221"></a>hws.resource.type.waf.domain: bandwidth expansion packages in yearly/monthly cloud-mode WAF</p>
</li><li id="CreateCloudWafPostPaidResource__topic1831000223"><p id="CreateCloudWafPostPaidResource__topic1831000224"><a name="CreateCloudWafPostPaidResource__topic1831000223"></a><a name="topic1831000223"></a>hws.resource.type.waf.domain: rule expansion packages in yearly/monthly cloud-mode WAF</p>
</li><li id="CreateCloudWafPostPaidResource__topic1831000225"><p id="CreateCloudWafPostPaidResource__topic1831000226"><a name="CreateCloudWafPostPaidResource__topic1831000225"></a><a name="topic1831000225"></a>hws.resource.type.waf.instance: dedicated WAF instances</p>
</li><li id="CreateCloudWafPostPaidResource__topic1831000227"><p id="CreateCloudWafPostPaidResource__topic1831000228"><a name="CreateCloudWafPostPaidResource__topic1831000227"></a><a name="topic1831000227"></a>hws.resource.type.waf.payperuserequest: requests to pay-per-use WAF instances</p>
</li><li id="CreateCloudWafPostPaidResource__topic1831000229"><p id="CreateCloudWafPostPaidResource__topic1831000230"><a name="CreateCloudWafPostPaidResource__topic1831000229"></a><a name="topic1831000229"></a>hws.resource.type.waf.payperusedomain: domain names protected with pay-per-use WAF instances</p>
</li><li id="CreateCloudWafPostPaidResource__topic1831000231"><p id="CreateCloudWafPostPaidResource__topic1831000232"><a name="CreateCloudWafPostPaidResource__topic1831000231"></a><a name="topic1831000231"></a>hws.resource.type.waf.payperuserule: rules created in pay-per-use WAF instances</p>
</li></ul>
</td>
</tr>
<tr id="CreateCloudWafPostPaidResource__topic1831000233"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000235">resourceSpecCode</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000237">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000239">Cloud resource specifications.</p>
</td>
</tr>
<tr id="CreateCloudWafPostPaidResource__topic1831000240"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000242">status</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000244">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000246">Resource status. The value can be:</p>
<ul id="CreateCloudWafPostPaidResource__topic1831000247"><li id="CreateCloudWafPostPaidResource__topic1831000248"><p id="CreateCloudWafPostPaidResource__topic1831000249"><a name="CreateCloudWafPostPaidResource__topic1831000248"></a><a name="topic1831000248"></a><strong id="CreateCloudWafPostPaidResource__topic1831000250">0</strong>: Unfrozen/Normal.</p>
</li><li id="CreateCloudWafPostPaidResource__topic1831000251"><p id="CreateCloudWafPostPaidResource__topic1831000252"><a name="CreateCloudWafPostPaidResource__topic1831000251"></a><a name="topic1831000251"></a><strong id="CreateCloudWafPostPaidResource__topic1831000253">1</strong>: Frozen.</p>
</li><li id="CreateCloudWafPostPaidResource__topic1831000254"><p id="CreateCloudWafPostPaidResource__topic1831000255"><a name="CreateCloudWafPostPaidResource__topic1831000254"></a><a name="topic1831000254"></a><strong id="CreateCloudWafPostPaidResource__topic1831000256">2</strong>: Deleted.</p>
</li></ul>
</td>
</tr>
<tr id="CreateCloudWafPostPaidResource__topic1831000257"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000259">expireTime</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000261">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000263">Resource expiration time.</p>
</td>
</tr>
<tr id="CreateCloudWafPostPaidResource__topic1831000264"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000266">resourceSize</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000268">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000270">Resource quantity of your resourceType.</p>
</td>
</tr>
<tr id="CreateCloudWafPostPaidResource__topic1831000271"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000273">relativeType</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000275">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000277">This parameter can be ignored.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateCloudWafPostPaidResource__topic1831000278"><strong id="CreateCloudWafPostPaidResource__topic1831000279">Status code: 400</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateCloudWafPostPaidResource__response_RestErrorResponse" frame="border" border="1" rules="all"><caption><b>Table 7 </b>Response body parameters</caption><thead align="left"><tr id="CreateCloudWafPostPaidResource__topic1831000286"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.6.2.4.1.1"><p id="CreateCloudWafPostPaidResource__topic1831000288">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.6.2.4.1.2"><p id="CreateCloudWafPostPaidResource__topic1831000290">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.6.2.4.1.3"><p id="CreateCloudWafPostPaidResource__topic1831000292">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateCloudWafPostPaidResource__topic1831000294"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000296">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000298">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.6.2.4.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000300">Error code</p>
</td>
</tr>
<tr id="CreateCloudWafPostPaidResource__topic1831000301"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000303">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000305">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.6.2.4.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000307">Error message</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateCloudWafPostPaidResource__topic1831000308"><strong id="CreateCloudWafPostPaidResource__topic1831000309">Status code: 401</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateCloudWafPostPaidResource__response_RestErrorResponse_1" frame="border" border="1" rules="all"><caption><b>Table 8 </b>Response body parameters</caption><thead align="left"><tr id="CreateCloudWafPostPaidResource__topic1831000316"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.8.2.4.1.1"><p id="CreateCloudWafPostPaidResource__topic1831000318">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.8.2.4.1.2"><p id="CreateCloudWafPostPaidResource__topic1831000320">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.8.2.4.1.3"><p id="CreateCloudWafPostPaidResource__topic1831000322">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateCloudWafPostPaidResource__topic1831000324"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.8.2.4.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000326">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.8.2.4.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000328">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.8.2.4.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000330">Error code</p>
</td>
</tr>
<tr id="CreateCloudWafPostPaidResource__topic1831000331"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.8.2.4.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000333">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.8.2.4.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000335">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.8.2.4.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000337">Error message</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateCloudWafPostPaidResource__topic1831000338"><strong id="CreateCloudWafPostPaidResource__topic1831000339">Status code: 500</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateCloudWafPostPaidResource__response_RestErrorResponse_2" frame="border" border="1" rules="all"><caption><b>Table 9 </b>Response body parameters</caption><thead align="left"><tr id="CreateCloudWafPostPaidResource__topic1831000346"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.10.2.4.1.1"><p id="CreateCloudWafPostPaidResource__topic1831000348">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.10.2.4.1.2"><p id="CreateCloudWafPostPaidResource__topic1831000350">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.10.2.4.1.3"><p id="CreateCloudWafPostPaidResource__topic1831000352">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateCloudWafPostPaidResource__topic1831000354"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.10.2.4.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000356">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.10.2.4.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000358">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.10.2.4.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000360">Error code</p>
</td>
</tr>
<tr id="CreateCloudWafPostPaidResource__topic1831000361"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.10.2.4.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000363">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.10.2.4.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000365">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.10.2.4.1.3 "><p id="CreateCloudWafPostPaidResource__topic1831000367">Error message</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateCloudWafPostPaidResource__topic1831000368"><h4 class="sectiontitle">Example Requests</h4><p id="CreateCloudWafPostPaidResource__topic1831000370">The following example shows how to enable pay-per-use billing for cloud WAF in a specific project. The project ID is specified by project_id.</p>
<pre class="screen" id="CreateCloudWafPostPaidResource__topic1831000371">POST https://{Endpoint}/v1/{project_id}/waf/postpaid?enterprise_project_id=0
{
"console_area" : "dt"
}</pre>
</div>
<div class="section" id="CreateCloudWafPostPaidResource__topic1831000372"><h4 class="sectiontitle">Example Responses</h4><p id="CreateCloudWafPostPaidResource__topic1831000374"><strong id="CreateCloudWafPostPaidResource__topic1831000375">Status code: 200</strong></p>
<p id="CreateCloudWafPostPaidResource__topic1831000376">OK</p>
<pre class="screen" id="CreateCloudWafPostPaidResource__topic1831000377">{
"type" : 22,
"resources" : [ {
"resourceId" : "71f5de5f03414225b79be43ee3dc6bae",
"cloudServiceType" : "hws.service.type.waf",
"resourceType" : "hws.resource.type.waf.payperusedomain",
"resourceSpecCode" : "waf.payperuse.domain",
"resourceSize" : null,
"expireTime" : null,
"status" : 0
}, {
"resourceId" : "eb0760007a0b43fd9e445f5ce810f4c4",
"cloudServiceType" : "hws.service.type.waf",
"resourceType" : "hws.resource.type.waf.payperuserequest",
"resourceSpecCode" : "waf.payperuse.request",
"resourceSize" : null,
"expireTime" : null,
"status" : 0
}, {
"resourceId" : "6cae8a4d8074499d8c3bda687d63c4f9",
"cloudServiceType" : "hws.service.type.waf",
"resourceType" : "hws.resource.type.waf.payperuserule",
"resourceSpecCode" : "waf.payperuse.rule",
"resourceSize" : null,
"expireTime" : null,
"status" : 0
} ],
"isNewUser" : false
}</pre>
</div>
<div class="section" id="CreateCloudWafPostPaidResource__topic1831000378"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateCloudWafPostPaidResource__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="CreateCloudWafPostPaidResource__topic1831000384"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="CreateCloudWafPostPaidResource__topic1831000386">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="CreateCloudWafPostPaidResource__topic1831000388">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateCloudWafPostPaidResource__topic1831000390"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000392">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000394">OK</p>
</td>
</tr>
<tr id="CreateCloudWafPostPaidResource__topic1831000395"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000397">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000399">Request failed.</p>
</td>
</tr>
<tr id="CreateCloudWafPostPaidResource__topic1831000400"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000402">401</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000404">The token does not have required permissions.</p>
</td>
</tr>
<tr id="CreateCloudWafPostPaidResource__topic1831000405"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateCloudWafPostPaidResource__topic1831000407">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateCloudWafPostPaidResource__topic1831000409">Internal server error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateCloudWafPostPaidResource__topic1831000410"><h4 class="sectiontitle">Error Codes</h4><p id="CreateCloudWafPostPaidResource__topic1831000412">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_300000007.html">Managing Your Subscriptions</a></div>
</div>
</div>