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>
282 lines
21 KiB
HTML
282 lines
21 KiB
HTML
<a name="dli_02_0245"></a><a name="dli_02_0245"></a>
|
|
|
|
<h1 class="topictitle1">Creating a Template</h1>
|
|
<div id="body1575014860431"><div class="section" id="dli_02_0245__s89ff8bc59cba4c3b94dc17e85c8fa1ea"><h4 class="sectiontitle">Function</h4><p id="dli_02_0245__a4deaa8ebc392424e869c47835399ab23">This API is used to create a user template for the DLI service. A maximum of 100 user templates can be created.</p>
|
|
</div>
|
|
<div class="section" id="dli_02_0245__sef21e3efc2a44a84a03adad33a1ae006"><h4 class="sectiontitle">URI</h4><ul id="dli_02_0245__uf99c5b2f64a44669a611cae56296b336"><li id="dli_02_0245__l02802a572cd14322a9edb44c392d1063">URI format<p id="dli_02_0245__ab9f59a1049d24cb2a9c51b9ed06e59d4"><a name="dli_02_0245__l02802a572cd14322a9edb44c392d1063"></a><a name="l02802a572cd14322a9edb44c392d1063"></a>POST /v1.0/{project_id}/streaming/job-templates</p>
|
|
</li><li id="dli_02_0245__lab001edff5ca4cde843db03812f0979d">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0245__t219b031199884ac1bb9e91158ddc9efb" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameter</caption><thead align="left"><tr id="dli_02_0245__r04005eeda24e4db9b06516450d4d56af"><th align="left" class="cellrowborder" valign="top" width="13.278672132786722%" id="mcps1.3.2.2.2.1.2.5.1.1"><p id="dli_02_0245__a80847df5e5dc448caa46a2ff258fa2c4">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.62873712628737%" id="mcps1.3.2.2.2.1.2.5.1.2"><p id="dli_02_0245__af54fc16087b049c98f748c1a2faace17">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="10.97890210978902%" id="mcps1.3.2.2.2.1.2.5.1.3"><p id="dli_02_0245__p20639174817115">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="63.11368863113689%" id="mcps1.3.2.2.2.1.2.5.1.4"><p id="dli_02_0245__a484a3e0ce14846799c727ccbd4075d6c">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0245__r8022e11be3f54ad290cf8c848a56a550"><td class="cellrowborder" valign="top" width="13.278672132786722%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="dli_02_0245__p1262440203315">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.62873712628737%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="dli_02_0245__p1016041415356">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.97890210978902%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="dli_02_0245__p164074811119">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.11368863113689%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="dli_02_0245__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>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_02_0245__s3afece1037ea4f62aeffb3db49b97f70"><h4 class="sectiontitle">Request</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0245__tcedd9d5bece544898da42c15fe855a72" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="dli_02_0245__r263212cfc24b4f7ab11ba179dc95f8d5"><th align="left" class="cellrowborder" valign="top" width="13.320000000000002%" id="mcps1.3.3.2.2.5.1.1"><p id="dli_02_0245__aa71bb56aa6ba48488d66e68a44744488">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.09%" id="mcps1.3.3.2.2.5.1.2"><p id="dli_02_0245__adfb457c202dc4709b315aa6d0a384fdf">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="11.700000000000001%" id="mcps1.3.3.2.2.5.1.3"><p id="dli_02_0245__a07ad11538b854ab4997a0c69b2fa1ff5">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="62.89%" id="mcps1.3.3.2.2.5.1.4"><p id="dli_02_0245__a27603242143846be8ed4173686b0b27b">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0245__rab514ea502754f9d88a6ca5cd27e6f9b"><td class="cellrowborder" valign="top" width="13.320000000000002%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_02_0245__a4e36e26cea1148349f5b1d99665ec74c">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.09%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_02_0245__a3f01c30693ef41f9ab8913a733a8dcae">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.700000000000001%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_02_0245__a4c806296e81547638d0ed294d9a3ca63">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.89%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_02_0245__ace897a9e7d9d47a1895664dd49e10fe5">Template name. The value can contain 1 to 64 characters.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0245__rd59ae95756ea47c28d7aa24b2a057881"><td class="cellrowborder" valign="top" width="13.320000000000002%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_02_0245__a71daee1cc06048ae818e104254c9166d">desc</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.09%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_02_0245__a3db6910eff34455caa5af7c1be07ff39">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.700000000000001%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_02_0245__a3b4b1f2ddd81469dbc22dc9de316fc9b">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.89%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_02_0245__a4de8fb2d168546a9adf40df6d59ce095">Template description. Length range: 0 to 512 characters.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0245__rc32461e6ae584faebd86e6a27d35ad52"><td class="cellrowborder" valign="top" width="13.320000000000002%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_02_0245__a78edaa1801254949b38999fa2b76cb9b">sql_body</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.09%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_02_0245__aa5ebc166527543019d7799ddf643663f">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.700000000000001%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_02_0245__ad6a32cc0ba694cea9fe5f132dd482a0b">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.89%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_02_0245__a6311275524c844f4aa133f8f5818d0c0">Stream SQL statement, which includes at least the following three parts: source, query, and sink. Length range: 0 to 2,048 characters.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0245__row21511546018"><td class="cellrowborder" valign="top" width="13.320000000000002%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_02_0245__p17683531113">tags</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.09%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_02_0245__p56841232018">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.700000000000001%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_02_0245__p196861831817">Array of objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.89%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_02_0245__p36871831719">Label of a Flink job template. For details, see <a href="#dli_02_0245__table9391124139">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0245__row338010201314"><td class="cellrowborder" valign="top" width="13.320000000000002%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_02_0245__p73802207111">job_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.09%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_02_0245__p33802201718">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.700000000000001%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_02_0245__p2380142019115">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.89%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_02_0245__p19380220112">Flink job template type. </p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="dli_02_0245__table9391124139"></a><a name="table9391124139"></a><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0245__table9391124139" frame="border" border="1" rules="all"><caption><b>Table 3 </b>tags parameter</caption><thead align="left"><tr id="dli_02_0245__row1440020130"><th align="left" class="cellrowborder" valign="top" width="14.899999999999999%" id="mcps1.3.3.3.2.5.1.1"><p id="dli_02_0245__p194012219139">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="10.9%" id="mcps1.3.3.3.2.5.1.2"><p id="dli_02_0245__p540724136">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16.400000000000002%" id="mcps1.3.3.3.2.5.1.3"><p id="dli_02_0245__p840162161315">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="57.8%" id="mcps1.3.3.3.2.5.1.4"><p id="dli_02_0245__p16401271318">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0245__row194013231317"><td class="cellrowborder" valign="top" width="14.899999999999999%" headers="mcps1.3.3.3.2.5.1.1 "><p id="dli_02_0245__p13401329138">key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.9%" headers="mcps1.3.3.3.2.5.1.2 "><p id="dli_02_0245__p940102141313">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.400000000000002%" headers="mcps1.3.3.3.2.5.1.3 "><p id="dli_02_0245__p64019231317">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="57.8%" headers="mcps1.3.3.3.2.5.1.4 "><p id="dli_02_0245__p5401021139">Tag key.</p>
|
|
<div class="note" id="dli_02_0245__note0301141034716"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="dli_02_0245__p103021210124719">A tag key can contain a maximum of 36 characters. Special characters (=*<>\|) are not allowed, and the key cannot start with a space.</p>
|
|
</div></div>
|
|
<div class="note" id="dli_02_0245__note17482201612452"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="dli_02_0245__p16482171618455">A tag key can contain a maximum of 128 characters. Only letters, digits, spaces, and special characters (_.:=+-@) are allowed, but the value cannot start or end with a space or start with <strong id="dli_02_0245__b6695114915522">_sys_</strong>.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0245__row1141142181320"><td class="cellrowborder" valign="top" width="14.899999999999999%" headers="mcps1.3.3.3.2.5.1.1 "><p id="dli_02_0245__p164118215134">value</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.9%" headers="mcps1.3.3.3.2.5.1.2 "><p id="dli_02_0245__p1141112181317">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.400000000000002%" headers="mcps1.3.3.3.2.5.1.3 "><p id="dli_02_0245__p174114281318">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="57.8%" headers="mcps1.3.3.3.2.5.1.4 "><p id="dli_02_0245__p16411125137">Tag key.</p>
|
|
<div class="note" id="dli_02_0245__note1889312310474"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="dli_02_0245__p1789316312479">A tag value can contain a maximum of 43 characters. Special characters (=*<>\|) are not allowed, and the value cannot start with a space.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="dli_02_0245__se2bf80cdb76541308f69f258ea4b1bd6"><h4 class="sectiontitle">Response</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0245__t5995d65f65ba4ebca8606202112b407e" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response parameters</caption><thead align="left"><tr id="dli_02_0245__ra7acea51e4b4437e917d21fe99f130a3"><th align="left" class="cellrowborder" valign="top" width="15.950000000000001%" id="mcps1.3.4.2.2.5.1.1"><p id="dli_02_0245__a5af940f2267747ef871c67c86a0be82e">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="9.78%" id="mcps1.3.4.2.2.5.1.2"><p id="dli_02_0245__abcfbd3a651704d539626f3a41cc744f5">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="21.77%" id="mcps1.3.4.2.2.5.1.3"><p id="dli_02_0245__a2351d8d266444ad3ad1c09540d6d81cc">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="52.5%" id="mcps1.3.4.2.2.5.1.4"><p id="dli_02_0245__af7ea6a3f59844bdf99d51e90d570be4c">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0245__row49141910165112"><td class="cellrowborder" valign="top" width="15.950000000000001%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0245__p2129517155116">is_success</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.78%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0245__p4129617145117">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.77%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0245__p2129131720513">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.5%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0245__p1554052945214">Indicates whether the request is successful.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0245__rca1bdb55f4dc497ca8fee7537232f274"><td class="cellrowborder" valign="top" width="15.950000000000001%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0245__p1812921717516">message</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.78%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0245__p101291517115112">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.77%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0245__p8129191711514">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.5%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0245__p1035794055218">Message content.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0245__r3900d023a26e45dea9a0ad9dd60d8ab1"><td class="cellrowborder" valign="top" width="15.950000000000001%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0245__p4129111785119">template</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.78%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0245__p1112912178512">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.77%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0245__p16130517175114">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.5%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0245__p1828864915216">Information about job update. For details, see <a href="#dli_02_0245__table14147151125319">Table 5</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="dli_02_0245__table14147151125319"></a><a name="table14147151125319"></a><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0245__table14147151125319" frame="border" border="1" rules="all"><caption><b>Table 5 </b><strong id="dli_02_0245__b1094532118493">template</strong> parameters</caption><thead align="left"><tr id="dli_02_0245__row1148121155318"><th align="left" class="cellrowborder" valign="top" width="16.3%" id="mcps1.3.4.3.2.5.1.1"><p id="dli_02_0245__p6148313534">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.590000000000002%" id="mcps1.3.4.3.2.5.1.2"><p id="dli_02_0245__p814891125315">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.15%" id="mcps1.3.4.3.2.5.1.3"><p id="dli_02_0245__p21484111538">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="52.959999999999994%" id="mcps1.3.4.3.2.5.1.4"><p id="dli_02_0245__p81481014535">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0245__row614912114531"><td class="cellrowborder" valign="top" width="16.3%" headers="mcps1.3.4.3.2.5.1.1 "><p id="dli_02_0245__p11495115538">template_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.590000000000002%" headers="mcps1.3.4.3.2.5.1.2 "><p id="dli_02_0245__p20150151125313">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.15%" headers="mcps1.3.4.3.2.5.1.3 "><p id="dli_02_0245__p1315041115318">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.959999999999994%" headers="mcps1.3.4.3.2.5.1.4 "><p id="dli_02_0245__p1015061115311">Template ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0245__row1115041115318"><td class="cellrowborder" valign="top" width="16.3%" headers="mcps1.3.4.3.2.5.1.1 "><p id="dli_02_0245__p41502115531">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.590000000000002%" headers="mcps1.3.4.3.2.5.1.2 "><p id="dli_02_0245__p1150181175317">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.15%" headers="mcps1.3.4.3.2.5.1.3 "><p id="dli_02_0245__p515017116532">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.959999999999994%" headers="mcps1.3.4.3.2.5.1.4 "><p id="dli_02_0245__p13150111195317">Template name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0245__row715041195316"><td class="cellrowborder" valign="top" width="16.3%" headers="mcps1.3.4.3.2.5.1.1 "><p id="dli_02_0245__p13150121165319">desc</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.590000000000002%" headers="mcps1.3.4.3.2.5.1.2 "><p id="dli_02_0245__p1515071145312">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.15%" headers="mcps1.3.4.3.2.5.1.3 "><p id="dli_02_0245__p19150161155313">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.959999999999994%" headers="mcps1.3.4.3.2.5.1.4 "><p id="dli_02_0245__p9150101165320">Template description.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0245__row121501812538"><td class="cellrowborder" valign="top" width="16.3%" headers="mcps1.3.4.3.2.5.1.1 "><p id="dli_02_0245__p171501511531">create_time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.590000000000002%" headers="mcps1.3.4.3.2.5.1.2 "><p id="dli_02_0245__p61501611534">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.15%" headers="mcps1.3.4.3.2.5.1.3 "><p id="dli_02_0245__p151507125315">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.959999999999994%" headers="mcps1.3.4.3.2.5.1.4 "><p id="dli_02_0245__p41511114537">Time when the template is created.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0245__row18179122391719"><td class="cellrowborder" valign="top" width="16.3%" headers="mcps1.3.4.3.2.5.1.1 "><p id="dli_02_0245__p101809236174">job_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.590000000000002%" headers="mcps1.3.4.3.2.5.1.2 "><p id="dli_02_0245__p818022320176">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.15%" headers="mcps1.3.4.3.2.5.1.3 "><p id="dli_02_0245__p171801723151716">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.959999999999994%" headers="mcps1.3.4.3.2.5.1.4 "><p id="dli_02_0245__p19180112391711">Job template type</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="dli_02_0245__section1217010661112"><h4 class="sectiontitle">Example Request</h4><p id="dli_02_0245__p1087329104620">Create a job template named <strong id="dli_02_0245__b814529131314">simple_stream_sql</strong>.</p>
|
|
<pre class="screen" id="dli_02_0245__sabcf8723ba2d4d3c912b17feda88f427">{
|
|
"name": "simple_stream_sql",
|
|
"desc": "Example of quick start",
|
|
"sql_body": "select * from source_table",
|
|
"job_type": "flink_sql_job"
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="dli_02_0245__section1238144417526"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="dli_02_0245__s6d0d234a671f4e618d1a2b5e746cff26">{
|
|
"is_success": true,
|
|
"message": "A template is created successfully.",
|
|
"template": {
|
|
"template_id": 0,
|
|
"name": "IoT_example",
|
|
"desc": "Example of quick start",
|
|
"create_time": 1516952710040,
|
|
"job_type": "flink_opensource_sql_job"
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="dli_02_0245__s1b495ba11cd9411c9ad2ee50103334a7"><h4 class="sectiontitle">Status Codes</h4><p id="dli_02_0245__acef1445366354016b2ed90921927a555"><a href="#dli_02_0245__t43c1f1c0ba344f4cbcb270953d9cca2a">Table 6</a> describes status codes.</p>
|
|
|
|
<div class="tablenoborder"><a name="dli_02_0245__t43c1f1c0ba344f4cbcb270953d9cca2a"></a><a name="t43c1f1c0ba344f4cbcb270953d9cca2a"></a><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0245__t43c1f1c0ba344f4cbcb270953d9cca2a" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Status codes</caption><thead align="left"><tr id="dli_02_0245__r2ad0f008ce2248a1800a3e8b77226a56"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.7.3.2.3.1.1"><p id="dli_02_0245__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_0245__af801170b350b4f8ba3b575c7ddb8b13e">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0245__r0b449b1d3b8c498ea3e6cce16c80a14c"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.7.3.2.3.1.1 "><p id="dli_02_0245__a8c63a97e3bad402ebaead0bd99cad632">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.7.3.2.3.1.2 "><p id="dli_02_0245__af86844c7bb364c48b6300df1af164af2">A template is created successfully.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0245__row1391284310379"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.7.3.2.3.1.1 "><p id="dli_02_0245__p1591294310378">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.7.3.2.3.1.2 "><p id="dli_02_0245__p1691211432373">The input parameter is invalid.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="dli_02_0245__section13596141025715"><h4 class="sectiontitle">Error Codes</h4><p id="dli_02_0245__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>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dli_02_0244.html">APIs Related to Flink Job Templates</a></div>
|
|
</div>
|
|
</div>
|
|
|