forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com> Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
164 lines
12 KiB
HTML
164 lines
12 KiB
HTML
<a name="dli_02_0260"></a><a name="dli_02_0260"></a>
|
|
|
|
<h1 class="topictitle1">Modifying a Global Variable</h1>
|
|
<div id="body1586938061410"><div class="section" id="dli_02_0260__s89ff8bc59cba4c3b94dc17e85c8fa1ea"><h4 class="sectiontitle">Function</h4><p id="dli_02_0260__p106667148209">This API is used to modify a global variable.</p>
|
|
</div>
|
|
<div class="section" id="dli_02_0260__sef21e3efc2a44a84a03adad33a1ae006"><h4 class="sectiontitle">URI</h4><ul id="dli_02_0260__uf99c5b2f64a44669a611cae56296b336"><li id="dli_02_0260__l02802a572cd14322a9edb44c392d1063">URI format<p id="dli_02_0260__ab9f59a1049d24cb2a9c51b9ed06e59d4"><a name="dli_02_0260__l02802a572cd14322a9edb44c392d1063"></a><a name="l02802a572cd14322a9edb44c392d1063"></a>PUT /v1.0/{project_id}/variables/{var_name}</p>
|
|
</li><li id="dli_02_0260__lab001edff5ca4cde843db03812f0979d">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0260__t219b031199884ac1bb9e91158ddc9efb" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="dli_02_0260__r04005eeda24e4db9b06516450d4d56af"><th align="left" class="cellrowborder" valign="top" width="13.11%" id="mcps1.3.2.2.2.1.2.5.1.1"><p id="dli_02_0260__a80847df5e5dc448caa46a2ff258fa2c4">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.44%" id="mcps1.3.2.2.2.1.2.5.1.2"><p id="dli_02_0260__af54fc16087b049c98f748c1a2faace17">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="10.79%" id="mcps1.3.2.2.2.1.2.5.1.3"><p id="dli_02_0260__p2256104661116">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="63.660000000000004%" id="mcps1.3.2.2.2.1.2.5.1.4"><p id="dli_02_0260__a484a3e0ce14846799c727ccbd4075d6c">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0260__r8022e11be3f54ad290cf8c848a56a550"><td class="cellrowborder" valign="top" width="13.11%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="dli_02_0260__p1262440203315">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.44%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="dli_02_0260__p1016041415356">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.79%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="dli_02_0260__p5256114631115">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.660000000000004%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="dli_02_0260__p1768719515356">Project ID, which is used for resource isolation. For details about how to obtain its value, see <a href="dli_02_0183.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0260__row1266684418111"><td class="cellrowborder" valign="top" width="13.11%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="dli_02_0260__p56232715474">var_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.44%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="dli_02_0260__p1062182764720">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.79%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="dli_02_0260__p10257946161112">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.660000000000004%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="dli_02_0260__p162727174719">A global variable name can contain a maximum of 128 characters, including only digits, letters, and underscores (_), but cannot start with an underscore (_) or contain only digits. </p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_02_0260__s3afece1037ea4f62aeffb3db49b97f70"><h4 class="sectiontitle">Request</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0260__tcedd9d5bece544898da42c15fe855a72" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="dli_02_0260__r263212cfc24b4f7ab11ba179dc95f8d5"><th align="left" class="cellrowborder" valign="top" width="20.849999999999998%" id="mcps1.3.3.2.2.5.1.1"><p id="dli_02_0260__aa71bb56aa6ba48488d66e68a44744488">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.120000000000001%" id="mcps1.3.3.2.2.5.1.2"><p id="dli_02_0260__adfb457c202dc4709b315aa6d0a384fdf">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="11.64%" id="mcps1.3.3.2.2.5.1.3"><p id="dli_02_0260__a07ad11538b854ab4997a0c69b2fa1ff5">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="55.38999999999999%" id="mcps1.3.3.2.2.5.1.4"><p id="dli_02_0260__a27603242143846be8ed4173686b0b27b">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0260__rd59ae95756ea47c28d7aa24b2a057881"><td class="cellrowborder" valign="top" width="20.849999999999998%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_02_0260__p60911214151446">var_value</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.120000000000001%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_02_0260__a3db6910eff34455caa5af7c1be07ff39">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.64%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_02_0260__a3b4b1f2ddd81469dbc22dc9de316fc9b">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.38999999999999%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_02_0260__p196511317147">Global variable value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="dli_02_0260__se2bf80cdb76541308f69f258ea4b1bd6"><h4 class="sectiontitle">Response</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0260__table864065813431" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response parameters</caption><thead align="left"><tr id="dli_02_0260__row17641185813437"><th align="left" class="cellrowborder" valign="top" width="16.439999999999998%" id="mcps1.3.4.2.2.5.1.1"><p id="dli_02_0260__p1164195820435">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.370000000000001%" id="mcps1.3.4.2.2.5.1.2"><p id="dli_02_0260__p66412588434">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.86%" id="mcps1.3.4.2.2.5.1.3"><p id="dli_02_0260__p9641458194311">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="54.33%" id="mcps1.3.4.2.2.5.1.4"><p id="dli_02_0260__p186411358194312">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0260__row2418154742"><td class="cellrowborder" valign="top" width="16.439999999999998%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0260__p10253165219311">is_success</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.370000000000001%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0260__p8253115273111">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.86%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0260__p7253352153116">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54.33%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0260__p8253152103110">Indicates whether the request is successfully executed. Value <strong id="dli_02_0260__b170962543117">true</strong> indicates that the request is successfully executed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0260__row64180541741"><td class="cellrowborder" valign="top" width="16.439999999999998%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0260__p17641165884319">message</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.370000000000001%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0260__p1064295812435">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.86%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0260__p4642058174318">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54.33%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0260__p146421758194310">Message content.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="dli_02_0260__section14769144211244"><h4 class="sectiontitle">Example Request</h4><p id="dli_02_0260__p1381614615593">Change the value of a sensitive variable.</p>
|
|
<pre class="screen" id="dli_02_0260__sabcf8723ba2d4d3c912b17feda88f427">{
|
|
"var_value": "string"
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="dli_02_0260__section8528115415245"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="dli_02_0260__s6d0d234a671f4e618d1a2b5e746cff26">{
|
|
"is_success": true,
|
|
"message": "string"
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="dli_02_0260__s1b495ba11cd9411c9ad2ee50103334a7"><h4 class="sectiontitle">Status Codes</h4><p id="dli_02_0260__acef1445366354016b2ed90921927a555"><a href="#dli_02_0260__t43c1f1c0ba344f4cbcb270953d9cca2a">Table 4</a> describes status codes.</p>
|
|
|
|
<div class="tablenoborder"><a name="dli_02_0260__t43c1f1c0ba344f4cbcb270953d9cca2a"></a><a name="t43c1f1c0ba344f4cbcb270953d9cca2a"></a><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0260__t43c1f1c0ba344f4cbcb270953d9cca2a" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Status codes</caption><thead align="left"><tr id="dli_02_0260__r2ad0f008ce2248a1800a3e8b77226a56"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.7.3.2.3.1.1"><p id="dli_02_0260__afa33b7f5b0ac4d008ebcf6493f629b24">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="70%" id="mcps1.3.7.3.2.3.1.2"><p id="dli_02_0260__af801170b350b4f8ba3b575c7ddb8b13e">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0260__r0b449b1d3b8c498ea3e6cce16c80a14c"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.7.3.2.3.1.1 "><p id="dli_02_0260__a8c63a97e3bad402ebaead0bd99cad632">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.7.3.2.3.1.2 "><p id="dli_02_0260__af86844c7bb364c48b6300df1af164af2">A variable is modified successfully.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0260__row642813610440"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.7.3.2.3.1.1 "><p id="dli_02_0260__p104285674412">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.7.3.2.3.1.2 "><p id="dli_02_0260__p154287617445">The input parameter is invalid.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="dli_02_0260__section13596141025715"><h4 class="sectiontitle">Error Codes</h4><p id="dli_02_0260__dli_02_0225_p420584425712">If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see <a href="dli_02_0056.html">Error Codes</a>.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0260__dli_02_0225_table847819307387" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Error codes</caption><thead align="left"><tr id="dli_02_0260__dli_02_0225_row2479163016383"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.8.3.2.3.1.1"><p id="dli_02_0260__dli_02_0225_p114796309389">Error Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="70%" id="mcps1.3.8.3.2.3.1.2"><p id="dli_02_0260__dli_02_0225_p1647973053817">Error Message</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0260__row17906192173118"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.8.3.2.3.1.1 "><p id="dli_02_0260__p590622117314">DLI.0001</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.8.3.2.3.1.2 "><p id="dli_02_0260__p189071421183115">Parameter check errors occur.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0260__row19550101910317"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.8.3.2.3.1.1 "><p id="dli_02_0260__p6551519133119">DLI.0999</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.8.3.2.3.1.2 "><p id="dli_02_0260__p2551181910318">Server-side errors occur.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0260__dli_02_0225_row1047920308387"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.8.3.2.3.1.1 "><p id="dli_02_0260__p2263159341">DLI.12004</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.8.3.2.3.1.2 "><p id="dli_02_0260__p10393839143411">The job does not exist. Check the reason or create a job.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dli_02_0257.html">Global Variable-related APIs</a></div>
|
|
</div>
|
|
</div>
|
|
|