1
0
forked from docs/doc-exports
doc-exports/docs/ddm/api-ref/ddm_16_0001.html
Ru, Li Yi d804d7d1be ddm_api
Reviewed-by: Boka, Ladislav <ladislav.boka@t-systems.com>
Co-authored-by: Ru, Li Yi <liyiru7@huawei.com>
Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
2024-04-09 12:27:54 +00:00

374 lines
28 KiB
HTML

<a name="ddm_16_0001"></a><a name="ddm_16_0001"></a>
<h1 class="topictitle1">Creating a Schema</h1>
<div id="body0000001306989589"><div class="section" id="ddm_16_0001__section10297814132411"><h4 class="sectiontitle">Function</h4><p id="ddm_16_0001__p430581417240">This API is used to create a schema.</p>
</div>
<div class="section" id="ddm_16_0001__section331301418241"><h4 class="sectiontitle">Constraints</h4><p id="ddm_16_0001__p17321101472417">Before creating a schema, ensure that you have associated RDS instances with your DDM instance and that the RDS instances are not associated with other DDM instances.</p>
</div>
<div class="section" id="ddm_16_0001__section73488147242"><h4 class="sectiontitle">URI</h4><p id="ddm_16_0001__p43571414182418">POST /v1/{project_id}/instances/{instance_id}/databases</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ddm_16_0001__table163727148243" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="ddm_16_0001__row113631514132416"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="ddm_16_0001__p1337621462417"><strong id="ddm_16_0001__b201946916616">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="ddm_16_0001__p1383914102413"><strong id="ddm_16_0001__b112760103612">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="ddm_16_0001__p193916144246"><strong id="ddm_16_0001__b182436114619">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="ddm_16_0001__p13399111432413"><strong id="ddm_16_0001__b1333612263">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="ddm_16_0001__row1336381412245"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="ddm_16_0001__p13406614102412">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="ddm_16_0001__p14414141414244">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="ddm_16_0001__p134221714142415">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="ddm_16_0001__p1343001402417">Project ID of a tenant in a region</p>
</td>
</tr>
<tr id="ddm_16_0001__row18363191418246"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="ddm_16_0001__p343841418240">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="ddm_16_0001__p14445171452418">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="ddm_16_0001__p3452111411245">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="ddm_16_0001__p144606144242">DDM instance ID</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="ddm_16_0001__section8471161432413"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ddm_16_0001__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="ddm_16_0001__row34792141241"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="ddm_16_0001__p94911114142415"><strong id="ddm_16_0001__b4798173810221">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p id="ddm_16_0001__p9499181432418"><strong id="ddm_16_0001__b57351440182219">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p id="ddm_16_0001__p16507151482415"><strong id="ddm_16_0001__b578034117223">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p id="ddm_16_0001__p1751641402411"><strong id="ddm_16_0001__b9801342202220">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="ddm_16_0001__row348019142249"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="ddm_16_0001__p18524514172420">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="ddm_16_0001__p153171412247">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="ddm_16_0001__p1854216144245">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="ddm_16_0001__p125521214132410">User token</p>
<p id="ddm_16_0001__p185591314182415">It can be obtained by calling an IAM API. The value of <strong id="ddm_16_0001__b27911508222">X-Subject-Token</strong> in the response header is the user token.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ddm_16_0001__request_CreateDatabaseReq" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="ddm_16_0001__row2056661416241"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.1"><p id="ddm_16_0001__p357751442416"><strong id="ddm_16_0001__b2319183613339">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.2"><p id="ddm_16_0001__p17586191414244"><strong id="ddm_16_0001__b3602153719335">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.3"><p id="ddm_16_0001__p145930146249"><strong id="ddm_16_0001__b17865173863320">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.3.2.5.1.4"><p id="ddm_16_0001__p660151412413"><strong id="ddm_16_0001__b141781040103320">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="ddm_16_0001__row156691415240"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="ddm_16_0001__p1960951462416">databases</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="ddm_16_0001__p2061771442418">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="ddm_16_0001__p76269146242">Array of <a href="#ddm_16_0001__request_CreateDatabaseDetail">CreateDatabaseDetail</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="ddm_16_0001__p9635111419249">Schema information</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="ddm_16_0001__request_CreateDatabaseDetail"></a><a name="request_CreateDatabaseDetail"></a><table cellpadding="4" cellspacing="0" summary="" id="ddm_16_0001__request_CreateDatabaseDetail" frame="border" border="1" rules="all"><caption><b>Table 4 </b>CreateDatabaseDetail</caption><thead align="left"><tr id="ddm_16_0001__row1864310140243"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.1"><p id="ddm_16_0001__p565811442411"><strong id="ddm_16_0001__b13626159173417">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.2"><p id="ddm_16_0001__p186669142243"><strong id="ddm_16_0001__b16269151719349">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.3"><p id="ddm_16_0001__p767515147243"><strong id="ddm_16_0001__b4841151511349">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.4.2.5.1.4"><p id="ddm_16_0001__p868341412417"><strong id="ddm_16_0001__b18983161917348">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="ddm_16_0001__row664315143242"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="ddm_16_0001__p1869261411245">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="ddm_16_0001__p136991614182416">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="ddm_16_0001__p370711144243">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="ddm_16_0001__p17719201415241">Schema name, which:</p>
<ul id="ddm_16_0001__ul47291214152416"><li id="ddm_16_0001__li18731121418241">Can include 2 to 48 characters.</li><li id="ddm_16_0001__li107409142248">Must start with a letter.</li><li id="ddm_16_0001__li774916145242">Contains only lowercase letters, digits, and underscores (_).</li><li id="ddm_16_0001__li1475861412413">Cannot contain keywords <strong id="ddm_16_0001__b1897193793418">information_schema</strong>, <strong id="ddm_16_0001__b5972103716342">mysql, performance_schema</strong>, or <strong id="ddm_16_0001__b997343714344">sys</strong>.</li></ul>
<p id="ddm_16_0001__p12767161482419">Minimum length: 2 characters</p>
<p id="ddm_16_0001__p1877591492414">Maximum length: 48 characters</p>
</td>
</tr>
<tr id="ddm_16_0001__row146431614132419"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="ddm_16_0001__p3784171482419">shard_mode</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="ddm_16_0001__p37911214102419">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="ddm_16_0001__p18799101432412">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="ddm_16_0001__p78102148248">Sharding mode of the schema. The value can be:</p>
<ul id="ddm_16_0001__ul681811418248"><li id="ddm_16_0001__li58192146242"><strong id="ddm_16_0001__b342516203359">cluster</strong>: indicates that the schema is in sharded mode.</li><li id="ddm_16_0001__li1827614202412"><strong id="ddm_16_0001__b597872319351">single</strong>: indicates that the schema is in unsharded mode.</li></ul>
<p id="ddm_16_0001__p188361014182412">Enumerated values:</p>
<ul id="ddm_16_0001__ul584351419245"><li id="ddm_16_0001__li484510142247"><strong id="ddm_16_0001__b285110141249">cluster</strong></li><li id="ddm_16_0001__li585411141243"><strong id="ddm_16_0001__b1786012148247">single</strong></li></ul>
</td>
</tr>
<tr id="ddm_16_0001__row10643214112417"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="ddm_16_0001__p19864101410249">shard_number</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="ddm_16_0001__p1687371432413">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="ddm_16_0001__p68801714202416">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="ddm_16_0001__p1689041417248">Number of shards in the same working mode</p>
<ul id="ddm_16_0001__ul1898111413247"><li id="ddm_16_0001__li10900114142414">If <strong id="ddm_16_0001__b9619410418">shard_unit</strong> is not empty, the value is the product of <strong id="ddm_16_0001__b187940415">shard_unit</strong> multiplied by the associated RDS instances.</li><li id="ddm_16_0001__li16908614192418">If <strong id="ddm_16_0001__b17976910124112">shard_unit</strong> is left blank, the value must be greater than the number of associated RDS instances and less than or equal to the product of the associated RDS instances multiplied by 64.</li></ul>
</td>
</tr>
<tr id="ddm_16_0001__row17643111422412"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="ddm_16_0001__p491851442411">shard_unit</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="ddm_16_0001__p89261214192417">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="ddm_16_0001__p393521472413">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="ddm_16_0001__p694521422412">Number of shards per RDS instance This parameter is optional.</p>
<ul id="ddm_16_0001__ul5953614142413"><li id="ddm_16_0001__li59552014132410">The value is <strong id="ddm_16_0001__b238813294118">1</strong> if the schema is unsharded.</li><li id="ddm_16_0001__li9963214112417">The value ranges from <strong id="ddm_16_0001__b19153437104117">1</strong> to <strong id="ddm_16_0001__b8154133718419">64</strong> if the schema is sharded.</li></ul>
<p id="ddm_16_0001__p12973201472411">Minimum value: <strong id="ddm_16_0001__b172433417413">1</strong></p>
<p id="ddm_16_0001__p8982614152417">Maximum value: <strong id="ddm_16_0001__b1158716515417">64</strong></p>
</td>
</tr>
<tr id="ddm_16_0001__row56441514162414"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="ddm_16_0001__p499121414244">used_rds</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="ddm_16_0001__p14999101416245">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="ddm_16_0001__p1486155248">Array of <a href="#ddm_16_0001__request_DatabaseInstabcesParam">DatabaseInstabcesParam</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="ddm_16_0001__p31712157249">RDS instances associated with the schema</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="ddm_16_0001__request_DatabaseInstabcesParam"></a><a name="request_DatabaseInstabcesParam"></a><table cellpadding="4" cellspacing="0" summary="" id="ddm_16_0001__request_DatabaseInstabcesParam" frame="border" border="1" rules="all"><caption><b>Table 5 </b>DatabaseInstabcesParam</caption><thead align="left"><tr id="ddm_16_0001__row1324111511244"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.5.1.1"><p id="ddm_16_0001__p1537715202411"><strong id="ddm_16_0001__b21362344217">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.5.1.2"><p id="ddm_16_0001__p14467152249"><strong id="ddm_16_0001__b02331248428">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.5.1.3"><p id="ddm_16_0001__p153101502411"><strong id="ddm_16_0001__b336792534216">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.5.2.5.1.4"><p id="ddm_16_0001__p262415122410"><strong id="ddm_16_0001__b16490026174216">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="ddm_16_0001__row224201592419"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.1 "><p id="ddm_16_0001__p1369215132418">id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.2 "><p id="ddm_16_0001__p6781515142411">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.3 "><p id="ddm_16_0001__p686171552419">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.5.2.5.1.4 "><p id="ddm_16_0001__p09414154242">ID of the RDS instance associated with the schema</p>
</td>
</tr>
<tr id="ddm_16_0001__row82471562415"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.1 "><p id="ddm_16_0001__p1610251511247">adminUser</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.2 "><p id="ddm_16_0001__p111041514242">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.3 "><p id="ddm_16_0001__p711961513248">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.5.2.5.1.4 "><p id="ddm_16_0001__p91269159245">Username for logging in to the associated RDS instance</p>
</td>
</tr>
<tr id="ddm_16_0001__row152416151241"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.1 "><p id="ddm_16_0001__p13134315162411">adminPassword</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.2 "><p id="ddm_16_0001__p1114381516247">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.3 "><p id="ddm_16_0001__p10152141552412">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.5.2.5.1.4 "><p id="ddm_16_0001__p131601715122416">Password for logging in to the associated RDS instance</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="ddm_16_0001__section11741151243"><h4 class="sectiontitle">Response Parameters</h4><p id="ddm_16_0001__p118471592416"><strong id="ddm_16_0001__b466416512424">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ddm_16_0001__response_CreateDatabaseResponses" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Response body parameters</caption><thead align="left"><tr id="ddm_16_0001__row131892152243"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.1"><p id="ddm_16_0001__p4202111519245"><strong id="ddm_16_0001__b194731354114215">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.2"><p id="ddm_16_0001__p3210181517247"><strong id="ddm_16_0001__b177334550425">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.3.2.4.1.3"><p id="ddm_16_0001__p12181515182420"><strong id="ddm_16_0001__b2491657134210">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="ddm_16_0001__row51901315152416"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="ddm_16_0001__p14226201511245">databases</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="ddm_16_0001__p323621592418">Array of <a href="#ddm_16_0001__response_CreateDatabaseDetailResponses">CreateDatabaseDetailResponses</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="ddm_16_0001__p182446157243">Schema information</p>
</td>
</tr>
<tr id="ddm_16_0001__row11410934494"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="ddm_16_0001__p417019311456">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="ddm_16_0001__p41707316459">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="ddm_16_0001__p617053104517">ID of the job for creating a schema.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="ddm_16_0001__response_CreateDatabaseDetailResponses"></a><a name="response_CreateDatabaseDetailResponses"></a><table cellpadding="4" cellspacing="0" summary="" id="ddm_16_0001__response_CreateDatabaseDetailResponses" frame="border" border="1" rules="all"><caption><b>Table 7 </b>CreateDatabaseDetailResponses</caption><thead align="left"><tr id="ddm_16_0001__row5250171519247"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.1"><p id="ddm_16_0001__p5262115162410"><strong id="ddm_16_0001__b1243112213430">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.2"><p id="ddm_16_0001__p1270115132418"><strong id="ddm_16_0001__b128831731438">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.4.2.4.1.3"><p id="ddm_16_0001__p13278111512244"><strong id="ddm_16_0001__b2095613419439">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="ddm_16_0001__row152501715112417"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="ddm_16_0001__p1228721513247">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="ddm_16_0001__p1929661516242">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="ddm_16_0001__p6304915202412">Schema name</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="ddm_16_0001__p631161510249"><strong id="ddm_16_0001__b115528104431">Status code: 400</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ddm_16_0001__response_ExceptionResponses" frame="border" border="1" rules="all"><caption><b>Table 8 </b>Response body parameters</caption><thead align="left"><tr id="ddm_16_0001__row33181515112415"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.6.2.4.1.1"><p id="ddm_16_0001__p7330615192410"><strong id="ddm_16_0001__b0748181334314">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.6.2.4.1.2"><p id="ddm_16_0001__p833811562417"><strong id="ddm_16_0001__b1710318165434">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.6.2.4.1.3"><p id="ddm_16_0001__p16346615142420"><strong id="ddm_16_0001__b17227121714312">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="ddm_16_0001__row10318131572416"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="ddm_16_0001__p15354115192416">errCode</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="ddm_16_0001__p436315156245">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="ddm_16_0001__p123714158243">Service error code</p>
</td>
</tr>
<tr id="ddm_16_0001__row031811542411"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="ddm_16_0001__p7379181552420">externalMessage</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="ddm_16_0001__p133881815152414">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="ddm_16_0001__p439631532414">Error message</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="ddm_16_0001__p4404101582411"><strong id="ddm_16_0001__b17142182534315">Status code: 500</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ddm_16_0001__table19410101513247" frame="border" border="1" rules="all"><caption><b>Table 9 </b>Response body parameters</caption><thead align="left"><tr id="ddm_16_0001__row5411015132411"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.8.2.4.1.1"><p id="ddm_16_0001__p2423815152416"><strong id="ddm_16_0001__b69832337436">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.8.2.4.1.2"><p id="ddm_16_0001__p84312156246"><strong id="ddm_16_0001__b15959163713431">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.8.2.4.1.3"><p id="ddm_16_0001__p54392159243"><strong id="ddm_16_0001__b1029911397431">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="ddm_16_0001__row4411101522413"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.1 "><p id="ddm_16_0001__p1644621582418">errCode</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.2 "><p id="ddm_16_0001__p10455201512248">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.8.2.4.1.3 "><p id="ddm_16_0001__p146371562415">Service error code</p>
</td>
</tr>
<tr id="ddm_16_0001__row34111715132410"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.1 "><p id="ddm_16_0001__p1247113150244">externalMessage</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.2 "><p id="ddm_16_0001__p5479915152417">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.8.2.4.1.3 "><p id="ddm_16_0001__p14871215202410">Error message</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="ddm_16_0001__section18496121519244"><h4 class="sectiontitle">Example Request</h4><p id="ddm_16_0001__p3505181515243">The following is an example request of creating a schema and associating it with an existing DDM account.</p>
<pre class="screen" id="ddm_16_0001__screen14528615142419">POST https://{endpoint}/v1/{project_id}/instances/{instance_id}/databases
{
"databases" : [ {
"name" : "mytestdb",
"shard_mode" : "cluster",
"shard_number" : 8,
"shard_unit" : 8,
"used_rds" : [ {
"id" : "f296c394f13f48449d715bf99af07e59in01",
"adminUser" : "root",
"adminPassword" : "PassWord_234"
} ]
} ]
}</pre>
</div>
<div class="section" id="ddm_16_0001__section16396158245"><h4 class="sectiontitle">Example Response</h4><p id="ddm_16_0001__p1864771515247"><strong id="ddm_16_0001__b17250942447">Status code: 200</strong></p>
<p id="ddm_16_0001__p1265451518247">OK</p>
<pre class="screen" id="ddm_16_0001__screen176659158248">{
"databases" : [ {
"name" : "mytestdb"
} ],
"job_id" : "68a55553-4057-4d05-b074-d6&pound;090e08a50"
}</pre>
<p id="ddm_16_0001__p77021151241"><strong id="ddm_16_0001__b939149444">Status code: 400</strong></p>
<p id="ddm_16_0001__p7708215192420">bad request</p>
<pre class="screen" id="ddm_16_0001__screen147191515102412">{
"externalMessage" : "Parameter error.",
"errCode" : "DBS.280001"
}</pre>
<p id="ddm_16_0001__p197479156242"><strong id="ddm_16_0001__b5399617104418">Status code: 500</strong></p>
<p id="ddm_16_0001__p137549155242">server error</p>
<pre class="screen" id="ddm_16_0001__screen177671215112420">{
"externalMessage" : "Server failure.",
"errCode" : "DBS.200412"
}</pre>
</div>
<div class="section" id="ddm_16_0001__section17799115142418"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ddm_16_0001__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="ddm_16_0001__row5811715192413"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="ddm_16_0001__p128211115102416">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.8.2.1.3.1.2"><p id="ddm_16_0001__p168291415152412"><strong id="ddm_16_0001__b15556132694416">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="ddm_16_0001__row581119157248"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="ddm_16_0001__p183941542414">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="ddm_16_0001__p1984991515241">OK</p>
</td>
</tr>
<tr id="ddm_16_0001__row1581181513245"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="ddm_16_0001__p386013158242">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="ddm_16_0001__p1087021518245">bad request</p>
</td>
</tr>
<tr id="ddm_16_0001__row7811151512417"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="ddm_16_0001__p168801315162419">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="ddm_16_0001__p9890171512242">server error</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="ddm_16_0001__section14901915102412"><h4 class="sectiontitle">Error Codes</h4><p id="ddm_16_0001__p091491552415">For details, see <a href="ddm_api_01_0061.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm_api_01_0027.html">Schemas</a></div>
</div>
</div>