forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Chen, Junjie <chenjunjie@huawei.com> Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
454 lines
33 KiB
HTML
454 lines
33 KiB
HTML
<a name="functiongraph_06_0125"></a><a name="functiongraph_06_0125"></a>
|
|
|
|
<h1 class="topictitle1">Executing a Function Synchronously</h1>
|
|
<div id="body1515710388325"><div class="section" id="functiongraph_06_0125__section19158133810320"><h4 class="sectiontitle">Function</h4><p id="functiongraph_06_0125__p715893816323">This API is used to execute a function synchronously. Clients must wait for explicit responses to their requests from the function. Responses are returned only after function invocation is complete.</p>
|
|
</div>
|
|
<div class="section" id="functiongraph_06_0125__section31593381322"><h4 class="sectiontitle">URI</h4><p id="functiongraph_06_0125__p11159113823213">POST /v2/{project_id}/fgs/functions/{function_urn}/invocations</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="functiongraph_06_0125__table71623388321" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="functiongraph_06_0125__row1516110381321"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="functiongraph_06_0125__p7163438173213">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="functiongraph_06_0125__p11634388325">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="functiongraph_06_0125__p1316320388322">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="functiongraph_06_0125__p111641838133219">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="functiongraph_06_0125__row6161123813329"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="functiongraph_06_0125__p6164173813210">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="functiongraph_06_0125__p5164103863214">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="functiongraph_06_0125__p191651638183217">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="functiongraph_06_0125__p201656386327">Project ID. For details, see <a href="functiongraph_06_0260.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row9161183893211"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="functiongraph_06_0125__p151651038143219">function_urn</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="functiongraph_06_0125__p131661838153211">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="functiongraph_06_0125__p7166133812322">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="functiongraph_06_0125__p51661038173213">Function URN. For details, see the function model description.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="functiongraph_06_0125__section11166103814327"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="functiongraph_06_0125__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="functiongraph_06_0125__row0167238103216"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="functiongraph_06_0125__p916923853213">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="functiongraph_06_0125__p7169103811329">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="functiongraph_06_0125__p216973893213">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="functiongraph_06_0125__p16169163893216">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="functiongraph_06_0125__row1916723803213"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="functiongraph_06_0125__p20170438143215">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="functiongraph_06_0125__p12170538163218">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="functiongraph_06_0125__p151702038113215">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="functiongraph_06_0125__p121715387324">User token.</p>
|
|
<p id="functiongraph_06_0125__p21717383322">It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row4167338143214"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="functiongraph_06_0125__p191713384323">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="functiongraph_06_0125__p417163823219">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="functiongraph_06_0125__p12172183812320">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="functiongraph_06_0125__p1317203893210">Message body type (format).</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row216893817326"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="functiongraph_06_0125__p21725388321">X-Cff-Log-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="functiongraph_06_0125__p4173193843219">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="functiongraph_06_0125__p20173438193216">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="functiongraph_06_0125__p81731838193211">Options: tail (4 KB logs will be returned) and null (no logs will be returned).</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row1316893823214"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="functiongraph_06_0125__p717323812323">X-CFF-Request-Version</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="functiongraph_06_0125__p61741738183214">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="functiongraph_06_0125__p11741038103213">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="functiongraph_06_0125__p1174163810329">Response body format. Options: v0 and v1.</p>
|
|
<ul id="functiongraph_06_0125__ul4175173819323"><li id="functiongraph_06_0125__li2017523853217">v0: text format.</li><li id="functiongraph_06_0125__li1817510384326">v1: JSON format. Select this format when using an SDK.</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="functiongraph_06_0125__request_InvokeFunctionRequestBody" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="functiongraph_06_0125__row1017623816327"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="functiongraph_06_0125__p181771838113219">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="functiongraph_06_0125__p15177133883217">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="functiongraph_06_0125__p14177203863215">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="functiongraph_06_0125__p1717853820325">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="functiongraph_06_0125__row2176153883216"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="functiongraph_06_0125__p817853813327">{Customized_key}</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="functiongraph_06_0125__p10178338143219">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="functiongraph_06_0125__p1217853813210">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="functiongraph_06_0125__p117903811325">Request body for executing a function.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="functiongraph_06_0125__section8179113803212"><h4 class="sectiontitle">Response Parameters</h4><p id="functiongraph_06_0125__p1617913388322"><strong id="functiongraph_06_0125__b917993819327">Status code: 200</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="functiongraph_06_0125__ResponseHeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response header parameters</caption><thead align="left"><tr id="functiongraph_06_0125__row101801638133213"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.4.3.2.4.1.1"><p id="functiongraph_06_0125__p20181138133219">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="functiongraph_06_0125__p61811338193218">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.3.2.4.1.3"><p id="functiongraph_06_0125__p12181173811328">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="functiongraph_06_0125__row1618013382325"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.4.3.2.4.1.1 "><p id="functiongraph_06_0125__p101811838103217">X-Cff-Invoke-Summary</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="functiongraph_06_0125__p121826389324">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="functiongraph_06_0125__p2182113863210">Execution summary of the synchronous invocation.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row2180193814327"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.4.3.2.4.1.1 "><p id="functiongraph_06_0125__p71821838163219">X-Cff-Request-Id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="functiongraph_06_0125__p1518215387323">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="functiongraph_06_0125__p718383863212">Request ID of the synchronous invocation.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row741311714333"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.4.3.2.4.1.1 "><p id="functiongraph_06_0125__p1252213384206">X-Cff-Function-Log</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="functiongraph_06_0125__p11522123816208">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="functiongraph_06_0125__p184135173339">User log of the synchronous invocation. Set X-Cff-Log-Type:tail in the request header. Intercept and encode the last 2,000 bytes of the log using Base64.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row764361914330"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.4.3.2.4.1.1 "><p id="functiongraph_06_0125__p076511405203">X-CFF-Billing-Duration</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="functiongraph_06_0125__p167651040142011">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="functiongraph_06_0125__p1164420195335">Billing information of the synchronous invocation.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row8925152115335"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.4.3.2.4.1.1 "><p id="functiongraph_06_0125__p139754372017">X-Cff-Response-Version</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="functiongraph_06_0125__p169784314202">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="functiongraph_06_0125__p164919211369">Response format:</p>
|
|
<p id="functiongraph_06_0125__p14491621123610">v0: text format</p>
|
|
<p id="functiongraph_06_0125__p1649182114360">v1: JSON format</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row927119241333"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.4.3.2.4.1.1 "><p id="functiongraph_06_0125__p35321345192016">X-Func-Err-Code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="functiongraph_06_0125__p14532545122016">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="functiongraph_06_0125__p1227132433316">Error code of the synchronous invocation. The value is 0 if the execution is successful.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row1898910309337"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.4.3.2.4.1.1 "><p id="functiongraph_06_0125__p1549176172218">X-Is-Func-Err</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="functiongraph_06_0125__p114914616227">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="functiongraph_06_0125__p1598912307332">Indicates whether the error occurs in a user function.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="functiongraph_06_0125__response_InvokeFunctionResponseBody" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="functiongraph_06_0125__row10183113863215"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="functiongraph_06_0125__p81853382328">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p id="functiongraph_06_0125__p1218511385323">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.4.2.4.1.3"><p id="functiongraph_06_0125__p161871938143214">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="functiongraph_06_0125__row01834383325"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="functiongraph_06_0125__p161871738113216">request_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="functiongraph_06_0125__p10188173811324">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="functiongraph_06_0125__p31886383323">Request ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row1418393853216"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="functiongraph_06_0125__p161882038153218">result</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="functiongraph_06_0125__p1718963812326">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="functiongraph_06_0125__p81891838143219">Function execution result.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row1318417385328"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="functiongraph_06_0125__p1189173853215">log</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="functiongraph_06_0125__p151891738123220">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="functiongraph_06_0125__p1619016380329">Function execution log.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row19184173814328"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="functiongraph_06_0125__p1119716388320">status</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="functiongraph_06_0125__p019773817321">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="functiongraph_06_0125__p2198143819320">Function execution status.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="functiongraph_06_0125__p201988385327"><strong id="functiongraph_06_0125__b219817386321">Status code: 400</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="functiongraph_06_0125__response_ErrorResp" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Response body parameters</caption><thead align="left"><tr id="functiongraph_06_0125__row20198938153219"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.4.1.1"><p id="functiongraph_06_0125__p5200938163219">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.4.1.2"><p id="functiongraph_06_0125__p220083816327">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.6.2.4.1.3"><p id="functiongraph_06_0125__p02011938133211">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="functiongraph_06_0125__row31991038123216"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p id="functiongraph_06_0125__p1420213383323">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p id="functiongraph_06_0125__p15202103813329">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><p id="functiongraph_06_0125__p142025389325">Error code.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row1319919381329"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p id="functiongraph_06_0125__p3202143815327">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p id="functiongraph_06_0125__p102031138173218">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><p id="functiongraph_06_0125__p18203738193216">Error message.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="functiongraph_06_0125__p2203133814329"><strong id="functiongraph_06_0125__b15203183817326">Status code: 401</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="functiongraph_06_0125__table15203838143212" frame="border" border="1" rules="all"><caption><b>Table 7 </b>Response body parameters</caption><thead align="left"><tr id="functiongraph_06_0125__row1520420384327"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.8.2.4.1.1"><p id="functiongraph_06_0125__p5205123823218">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.8.2.4.1.2"><p id="functiongraph_06_0125__p1820543893217">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.8.2.4.1.3"><p id="functiongraph_06_0125__p1820583813329">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="functiongraph_06_0125__row1204193816326"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.4.1.1 "><p id="functiongraph_06_0125__p12206133813327">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.4.1.2 "><p id="functiongraph_06_0125__p52061538203217">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.8.2.4.1.3 "><p id="functiongraph_06_0125__p142063383329">Error code.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row42042038173210"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.4.1.1 "><p id="functiongraph_06_0125__p18206238173210">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.4.1.2 "><p id="functiongraph_06_0125__p14207193813327">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.8.2.4.1.3 "><p id="functiongraph_06_0125__p14207103833212">Error message.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="functiongraph_06_0125__p17207123811321"><strong id="functiongraph_06_0125__b2207193853211">Status code: 403</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="functiongraph_06_0125__table15207338183213" frame="border" border="1" rules="all"><caption><b>Table 8 </b>Response body parameters</caption><thead align="left"><tr id="functiongraph_06_0125__row16208438133214"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.10.2.4.1.1"><p id="functiongraph_06_0125__p15209113833219">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.10.2.4.1.2"><p id="functiongraph_06_0125__p12092385320">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.10.2.4.1.3"><p id="functiongraph_06_0125__p12209203853214">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="functiongraph_06_0125__row10208138163218"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.10.2.4.1.1 "><p id="functiongraph_06_0125__p1921063813218">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.10.2.4.1.2 "><p id="functiongraph_06_0125__p721033833216">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.10.2.4.1.3 "><p id="functiongraph_06_0125__p521012389321">Error code.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row10208838113212"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.10.2.4.1.1 "><p id="functiongraph_06_0125__p8211338103212">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.10.2.4.1.2 "><p id="functiongraph_06_0125__p152111438163215">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.10.2.4.1.3 "><p id="functiongraph_06_0125__p1321153813328">Error message.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="functiongraph_06_0125__p17212133813211"><strong id="functiongraph_06_0125__b152121438103216">Status code: 404</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="functiongraph_06_0125__table1721293818324" frame="border" border="1" rules="all"><caption><b>Table 9 </b>Response body parameters</caption><thead align="left"><tr id="functiongraph_06_0125__row6212838123212"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.12.2.4.1.1"><p id="functiongraph_06_0125__p1021323823210">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.12.2.4.1.2"><p id="functiongraph_06_0125__p32136385329">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.12.2.4.1.3"><p id="functiongraph_06_0125__p132148386324">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="functiongraph_06_0125__row62121838203216"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.12.2.4.1.1 "><p id="functiongraph_06_0125__p11214133811325">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.12.2.4.1.2 "><p id="functiongraph_06_0125__p14215838183211">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.12.2.4.1.3 "><p id="functiongraph_06_0125__p221643813326">Error code.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row132121383327"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.12.2.4.1.1 "><p id="functiongraph_06_0125__p42165386321">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.12.2.4.1.2 "><p id="functiongraph_06_0125__p15216123823213">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.12.2.4.1.3 "><p id="functiongraph_06_0125__p19218173833216">Error message.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="functiongraph_06_0125__p132185383327"><strong id="functiongraph_06_0125__b821983817328">Status code: 500</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="functiongraph_06_0125__table821983810327" frame="border" border="1" rules="all"><caption><b>Table 10 </b>Response body parameters</caption><thead align="left"><tr id="functiongraph_06_0125__row1221910380326"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.14.2.4.1.1"><p id="functiongraph_06_0125__p1222073814323">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.14.2.4.1.2"><p id="functiongraph_06_0125__p6221138193210">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.14.2.4.1.3"><p id="functiongraph_06_0125__p17221438183213">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="functiongraph_06_0125__row4219238173216"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.14.2.4.1.1 "><p id="functiongraph_06_0125__p522133823212">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.14.2.4.1.2 "><p id="functiongraph_06_0125__p1222193812320">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.14.2.4.1.3 "><p id="functiongraph_06_0125__p0222163814324">Error code.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row102199386324"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.14.2.4.1.1 "><p id="functiongraph_06_0125__p20222183813322">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.14.2.4.1.2 "><p id="functiongraph_06_0125__p18223438103211">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.14.2.4.1.3 "><p id="functiongraph_06_0125__p1222303817326">Error message.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="functiongraph_06_0125__p722383817328"><strong id="functiongraph_06_0125__b4224838153214">Status code: 503</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="functiongraph_06_0125__table162241638103214" frame="border" border="1" rules="all"><caption><b>Table 11 </b>Response body parameters</caption><thead align="left"><tr id="functiongraph_06_0125__row17224738173219"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.16.2.4.1.1"><p id="functiongraph_06_0125__p822553873214">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.16.2.4.1.2"><p id="functiongraph_06_0125__p112265387329">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.16.2.4.1.3"><p id="functiongraph_06_0125__p922633843212">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="functiongraph_06_0125__row122411384320"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.16.2.4.1.1 "><p id="functiongraph_06_0125__p92269385324">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.16.2.4.1.2 "><p id="functiongraph_06_0125__p16226143803218">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.16.2.4.1.3 "><p id="functiongraph_06_0125__p1722873813324">Error code.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row17225123818323"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.16.2.4.1.1 "><p id="functiongraph_06_0125__p10228438193218">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.16.2.4.1.2 "><p id="functiongraph_06_0125__p6228438113214">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.16.2.4.1.3 "><p id="functiongraph_06_0125__p1722883819329">Error message.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="functiongraph_06_0125__section922953810325"><h4 class="sectiontitle">Example Requests</h4><p id="functiongraph_06_0125__p1522923815328">Execute a function synchronously with the request parameter as a key pair ("k":"v").</p>
|
|
<pre class="screen" id="functiongraph_06_0125__screen4229238163219">POST /v2/{project_id}/fgs/functions/{function_urn}/invocations
|
|
|
|
{
|
|
"k" : "v"
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="functiongraph_06_0125__section7231203863212"><h4 class="sectiontitle">Example Responses</h4><p id="functiongraph_06_0125__p723110384322"><strong id="functiongraph_06_0125__b123114388329">Status code: 200</strong></p>
|
|
<p id="functiongraph_06_0125__p623112381320">OK</p>
|
|
<pre class="screen" id="functiongraph_06_0125__screen023118386329">{
|
|
"result" : "{\"statusCode\": 200, \"isBase64Encoded\": false, \"body\": \"{\\\"key\\\": \\\"value\\\"}\", \"headers\": {\"Content-Type\": \"application/json\"}}",
|
|
"log" : "2022-09-20T11:43:57Z Start invoke request '1cbe80f3-3c65-475e-ad88-76ac518d386a', version: v1\nHello, World!\n\n2022-09-20T11:43:58Z Finish invoke request '1cbe80f3-3c65-475e-ad88-76ac518d386a', duration: 65.828ms, billing duration: 66ms, memory used: 21.473MB, billing memory: 128MB",
|
|
"status" : 200,
|
|
"request_id" : "1cbe80f3-3c65-475e-ad88-76ac518d386x"
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="functiongraph_06_0125__section9232163812324"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="functiongraph_06_0125__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="functiongraph_06_0125__row9233038133218"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="functiongraph_06_0125__p1023520382324">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="functiongraph_06_0125__p223510381323">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="functiongraph_06_0125__row2233103812329"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="functiongraph_06_0125__p11237183853210">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="functiongraph_06_0125__p2237103813328">OK</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row923353843217"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="functiongraph_06_0125__p523743812329">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="functiongraph_06_0125__p13238838143213">Bad request.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row11233163815328"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="functiongraph_06_0125__p02387389324">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="functiongraph_06_0125__p323810389328">Unauthorized.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row1423483813212"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="functiongraph_06_0125__p2238238143215">403</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="functiongraph_06_0125__p14239203810326">Forbidden.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row14234103811326"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="functiongraph_06_0125__p18239143863213">404</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="functiongraph_06_0125__p9239838133215">Not found.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row723483883216"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="functiongraph_06_0125__p182401938193218">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="functiongraph_06_0125__p62407386329">Internal server error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="functiongraph_06_0125__row8234103893216"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="functiongraph_06_0125__p11240113819325">503</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="functiongraph_06_0125__p124073817327">Service unavailable.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="functiongraph_06_0125__section142411338113217"><h4 class="sectiontitle">Error Codes</h4><p id="functiongraph_06_0125__p1724133863217">See <a href="ErrorCode.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="FunctionInvocation.html">Function Invocation</a></div>
|
|
</div>
|
|
</div>
|
|
|