doc-exports/docs/mrs/api-ref/mrs_02_0034.html
Yang, Tong bd2b57f749 MRS API 2.0.38.SP20 version
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2022-11-16 15:06:08 +00:00

222 lines
15 KiB
HTML

<a name="mrs_02_0034"></a><a name="mrs_02_0034"></a>
<h1 class="topictitle1">Creating a Job Binary Object</h1>
<div id="body1484186386751"><div class="section" id="mrs_02_0034__section13541137101416"><h4 class="sectiontitle">Function</h4><p id="mrs_02_0034__p63692365101419">This API is used to create a job binary object. This API is compatible with Sahara.</p>
</div>
<div class="section" id="mrs_02_0034__section49980811101439"><h4 class="sectiontitle">URI</h4><ul id="mrs_02_0034__ul8991848101834"><li id="mrs_02_0034__li60342219101834">Format<p id="mrs_02_0034__p39653901101859"><a name="mrs_02_0034__li60342219101834"></a><a name="li60342219101834"></a>POST /v1.1/{project_id}/job-binaries</p>
</li><li id="mrs_02_0034__li57455633101840">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0034__table49499141194754" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameter description</caption><thead align="left"><tr id="mrs_02_0034__row33700024194754"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.2.2.1.2.4.1.1"><p id="mrs_02_0034__p16571835194812">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.2.2.1.2.4.1.2"><p id="mrs_02_0034__p141410194812">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.2.2.2.1.2.4.1.3"><p id="mrs_02_0034__p11454278194812">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_02_0034__row6505449415356"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="mrs_02_0034__p3492262515356">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="mrs_02_0034__p1016041415356">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="mrs_02_0034__p1768719515356">Project ID. For details on how to obtain the project ID, see <a href="mrs_02_0011.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="mrs_02_0034__section7976792193238"><h4 class="sectiontitle">Request</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0034__table51257841151049" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameter description</caption><thead align="left"><tr id="mrs_02_0034__row8480851151049"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.2.2.5.1.1"><p id="mrs_02_0034__p15860319151049">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.3.2.2.5.1.2"><p id="mrs_02_0034__p9617423151049">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.3.2.2.5.1.3"><p id="mrs_02_0034__p40813771151049">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45%" id="mcps1.3.3.2.2.5.1.4"><p id="mrs_02_0034__p17581180151049">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_02_0034__row33862023103039"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.2.5.1.1 "><p id="mrs_02_0034__p66764558103051">name</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.2 "><p id="mrs_02_0034__p39220083103051">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.3 "><p id="mrs_02_0034__p22710132103051">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="mrs_02_0034__p27581435103051">Binary object name</p>
<p id="mrs_02_0034__p3904672811352">Contains 1 to 80 characters and consists of letters, digits, hyphens (-), and underscores (_) only.</p>
</td>
</tr>
<tr id="mrs_02_0034__row4719796510464"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.2.5.1.1 "><p id="mrs_02_0034__p6521450910469">url</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.2 "><p id="mrs_02_0034__p4788387310469">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.3 "><p id="mrs_02_0034__p5338853410469">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="mrs_02_0034__p2950402010469">Binary object URL, which contains of 1 to 255 characters.</p>
<p id="mrs_02_0034__p4805152516398">The URL must start with <strong id="mrs_02_0034__b1932717215405">s3a://</strong> or <strong id="mrs_02_0034__b1066213397426">/</strong>.</p>
</td>
</tr>
<tr id="mrs_02_0034__row60274821103112"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.2.5.1.1 "><p id="mrs_02_0034__p16682465103121">is_protected</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.2 "><p id="mrs_02_0034__p653385121120">No</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.3 "><p id="mrs_02_0034__p66208658103121">Bool</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="mrs_02_0034__p61301077103121">Whether a binary object is protected</p>
<ul id="mrs_02_0034__ul24233663152954"><li id="mrs_02_0034__li16776383152954">true</li><li id="mrs_02_0034__li16769724152954">false</li></ul>
<p id="mrs_02_0034__p16709791152954">The current version does not support this function.</p>
</td>
</tr>
<tr id="mrs_02_0034__row6726034151222"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.2.5.1.1 "><p id="mrs_02_0034__p20438892151640">is_public</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.2 "><p id="mrs_02_0034__p378209391120">No</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.3 "><p id="mrs_02_0034__p16062920151640">Bool</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="mrs_02_0034__p26028163151640">Whether a binary object is public</p>
<ul id="mrs_02_0034__ul2283053116435"><li id="mrs_02_0034__li414819216435">true</li><li id="mrs_02_0034__li3733373516435">false</li></ul>
<p id="mrs_02_0034__p45929516435">The current version does not support this function.</p>
</td>
</tr>
<tr id="mrs_02_0034__row1546567016045"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.2.5.1.1 "><p id="mrs_02_0034__p2185314916152">description</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.2 "><p id="mrs_02_0034__p79012551120">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.3 "><p id="mrs_02_0034__p3397791716152">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="mrs_02_0034__p74792916152">Binary object description</p>
<p id="mrs_02_0034__p163088710188">Contains a maximum of 65535 characters.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="mrs_02_0034__section38599577193858"><h4 class="sectiontitle">Response</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0034__table2520777103924" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response parameter description</caption><thead align="left"><tr id="mrs_02_0034__row18797656103924"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.2.4.1.1"><p id="mrs_02_0034__p46215177103924">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.2.4.1.2"><p id="mrs_02_0034__p19932140103924">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.2.2.4.1.3"><p id="mrs_02_0034__p3890671103924">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_02_0034__row55511969104214"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.1 "><p id="mrs_02_0034__p47996474104221">description</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.2 "><p id="mrs_02_0034__p30078601104221">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.2.4.1.3 "><p id="mrs_02_0034__p20447634104221">Binary object description</p>
</td>
</tr>
<tr id="mrs_02_0034__row46708914103924"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.1 "><p id="mrs_02_0034__p25325661103924">url</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.2 "><p id="mrs_02_0034__p118157103924">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.2.4.1.3 "><p id="mrs_02_0034__p9570786103924">Binary object URL</p>
</td>
</tr>
<tr id="mrs_02_0034__row6386960010401"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.1 "><p id="mrs_02_0034__p605514510401">tenant_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.2 "><p id="mrs_02_0034__p18350161104059">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.2.4.1.3 "><p id="mrs_02_0034__p657412272348">Project ID. For details on how to obtain the project ID, see <a href="mrs_02_0011.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="mrs_02_0034__row25442097104010"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.1 "><p id="mrs_02_0034__p47543995104010">created_at</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.2 "><p id="mrs_02_0034__p16046984104059">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.2.4.1.3 "><p id="mrs_02_0034__p5606803104010">Binary object creation time</p>
</td>
</tr>
<tr id="mrs_02_0034__row35926613153722"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.1 "><p id="mrs_02_0034__p24374572153722">updated_at</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.2 "><p id="mrs_02_0034__p1144197153722">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.2.4.1.3 "><p id="mrs_02_0034__p25571161153722">Binary object update time</p>
</td>
</tr>
<tr id="mrs_02_0034__row40943146103924"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.1 "><p id="mrs_02_0034__p28060554103924">is_protected</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.2 "><p id="mrs_02_0034__p25685468103924">Bool</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.2.4.1.3 "><p id="mrs_02_0034__p148125103924">Whether a binary object is protected</p>
<ul id="mrs_02_0034__ul230560601655"><li id="mrs_02_0034__li61779551655">true</li><li id="mrs_02_0034__li556016001655">false</li></ul>
<p id="mrs_02_0034__p306523561655">The current version does not support this function.</p>
</td>
</tr>
<tr id="mrs_02_0034__row32326809103924"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.1 "><p id="mrs_02_0034__p1225892103924">is_public</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.2 "><p id="mrs_02_0034__p57126811103924">Bool</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.2.4.1.3 "><p id="mrs_02_0034__p63869016103924">Whether a binary object is public</p>
<ul id="mrs_02_0034__ul393051701659"><li id="mrs_02_0034__li182022161659">true</li><li id="mrs_02_0034__li296022201659">false</li></ul>
<p id="mrs_02_0034__p650933911659">The current version does not support this function.</p>
</td>
</tr>
<tr id="mrs_02_0034__row16869530103924"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.1 "><p id="mrs_02_0034__p18189813104253">id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.2 "><p id="mrs_02_0034__p56316713104253">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.2.4.1.3 "><p id="mrs_02_0034__p2201971104253">Binary object ID</p>
</td>
</tr>
<tr id="mrs_02_0034__row17526607103924"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.1 "><p id="mrs_02_0034__p45390223104325">name</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.2 "><p id="mrs_02_0034__p43225188104325">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.2.4.1.3 "><p id="mrs_02_0034__p11579305104325">Binary object name</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="mrs_02_0034__section1210015461189"><h4 class="sectiontitle">Example</h4><ul id="mrs_02_0034__ul1958913536182"><li id="mrs_02_0034__li41093305102349">Example request<pre class="screen" id="mrs_02_0034__screen4888209111439">{
"name": "my-job-binary",
"url": "/simple/mapreduce/program",
"is_protected": false,
"is_public": false,
"description": "this is the job binary template"
}</pre>
</li><li id="mrs_02_0034__li60083258103718">Example response<pre class="screen" id="mrs_02_0034__screen3539847011535">{
"job_binary": {
"name": "my-job-binary",
"url": "/simple/mapreduce/program",
"description": "this is the job binary template",
"created_at": "2017-06-22T09:04:53",
"updated_at": null,
"id": "da37b581-042f-4d7a-9378-f628f32bd9ae",
"tenant_id": "5a3314075bfa49b9ae360f4ecd333695",
"is_public": false,
"is_protected": false
}
}</pre>
</li></ul>
</div>
<div class="section" id="mrs_02_0034__section19688788101519"><h4 class="sectiontitle">Status Code</h4><p id="mrs_02_0034__p5547365016031"><a href="#mrs_02_0034__table1584477916050">Table 4</a> describes the status code of this API.</p>
<div class="tablenoborder"><a name="mrs_02_0034__table1584477916050"></a><a name="table1584477916050"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0034__table1584477916050" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Status code</caption><thead align="left"><tr id="mrs_02_0034__row1339492016050"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.6.3.2.3.1.1"><p id="mrs_02_0034__p3411176516050">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="70%" id="mcps1.3.6.3.2.3.1.2"><p id="mrs_02_0034__p1158961516050">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_02_0034__row3719767816050"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.6.3.2.3.1.1 "><p id="mrs_02_0034__p6022194016050">202</p>
</td>
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.6.3.2.3.1.2 "><p id="mrs_02_0034__p4613894216050">The job binary object has been successfully created.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="mrs_02_0034__p5269577518">For the description about error status codes, see <a href="mrs_02_0015.html">Status Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_02_0033.html">Job Binary Object APIs</a></div>
</div>
</div>