forked from docs/doc-exports
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>
78 lines
5.3 KiB
HTML
78 lines
5.3 KiB
HTML
<a name="nosql_05_0011"></a><a name="nosql_05_0011"></a>
|
|
|
|
<h1 class="topictitle1">Quick Start</h1>
|
|
<div id="body0000001405217925"><p id="nosql_05_0011__en-us_topic_0121682346_p51148444524">This section describes how to create a <span id="nosql_05_0011__text20711320386">GeminiDB Cassandra</span><span id="nosql_05_0011__text99489254812"></span> instance by calling APIs.</p>
|
|
<div class="note" id="nosql_05_0011__en-us_topic_0121682346_note44222521746"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="nosql_05_0011__p1911091510238">The token obtained from IAM is valid for only 24 hours. If you want to use a token for authentication, you can cache it to avoid frequently obtaining the token.</p>
|
|
</div></div>
|
|
<div class="section" id="nosql_05_0011__en-us_topic_0121682346_section872994"><h4 class="sectiontitle">Involved APIs</h4><p class="litext" id="nosql_05_0011__en-us_topic_0121682346_p23385131">If you use a token for authentication, you must obtain the user's token and add <strong id="nosql_05_0011__b1373319353202">X-Auth-Token</strong> to the request message header of the service API when making an API call.</p>
|
|
<ul id="nosql_05_0011__en-us_topic_0121682346_ul15147458"><li id="nosql_05_0011__en-us_topic_0121682346_li2109397">API for obtaining tokens from IAM</li><li id="nosql_05_0011__en-us_topic_0121682346_li18984577">API for creating a <span id="nosql_05_0011__text68371333682">GeminiDB Cassandra</span><span id="nosql_05_0011__text4308238688"></span> instance</li></ul>
|
|
</div>
|
|
<div class="section" id="nosql_05_0011__en-us_topic_0121682346_section7856948"><h4 class="sectiontitle">Procedure</h4><ol id="nosql_05_0011__en-us_topic_0121682346_ol61355793"><li id="nosql_05_0011__en-us_topic_0121682346_li1837051910476">Use a token for authentication by referring to <a href="nosql_05_0009.html">Authentication</a>.</li><li class="msonormal" id="nosql_05_0011__en-us_topic_0121682346_li8863205171315">Send <strong id="nosql_05_0011__b45221916205817">POST https://{<em id="nosql_05_0011__i13519916105813">Endpoint</em>}/v3/{<em id="nosql_05_0011__i25201316145818">project_id</em>}/instances</strong>.</li><li class="msonormal" id="nosql_05_0011__en-us_topic_0121682346_li108635517130">Add <strong id="nosql_05_0011__b578715220583">X-Auth-Token</strong> to the request header.</li><li class="msonormal" id="nosql_05_0011__en-us_topic_0121682346_li1586314581311">Transfer the following parameters in the request body:<div class="note" id="nosql_05_0011__note997910579171"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="nosql_05_0011__p13980105715175">Values of <strong id="nosql_05_0011__b137574519589">region</strong> and <strong id="nosql_05_0011__b20376345105810">availability_zone</strong> are only for reference.</p>
|
|
<p id="nosql_05_0011__p16641171680">For details about the API for creating instances, see <a href="nosql_05_0014.html">Creating an Instance</a>.</p>
|
|
</div></div>
|
|
<pre class="codeblock" id="nosql_05_0011__codeblock48031929115">{
|
|
"name": "test-cassandra-01",//Instance name
|
|
"datastore": {
|
|
"type": "cassandra",//Database type
|
|
"version": "3.11", //DB engine version
|
|
"storage_engine": "rocksDB"//Storage engine
|
|
},
|
|
"region": "aaa",//Region
|
|
"availability_zone": "bbb", //AZ
|
|
"vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961",//VPC ID
|
|
"subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b",//Subnet ID
|
|
"security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58",//Security group ID
|
|
"password": "xxxx",//Administrator password
|
|
"mode": "Cluster", //Instance type
|
|
"flavor": [
|
|
{
|
|
"num": 3,//Nodes
|
|
"size": 500,//Storage space
|
|
"storage": "ULTRAHIGH", //Disk type
|
|
"spec_code": "geminidb.cassandra.4xlarge.4" //Resource specification code
|
|
}
|
|
],
|
|
"backup_strategy": {
|
|
"start_time": "08:00-09:00",//Backup time window
|
|
"keep_days": "8"//Retention period of backup files
|
|
},
|
|
"enterprise_project_id": "0"//Enterprise project ID
|
|
}</pre>
|
|
<p id="nosql_05_0011__p177519401282">If the following information is displayed, the request is successful:</p>
|
|
<pre class="codeblock" id="nosql_05_0011__codeblock15959941171518">{
|
|
"id": "39b6a1a278844ac48119d86512e0000bin06",
|
|
"name": "test-cassandra-01",
|
|
"datastore": {
|
|
"type": "cassandra",
|
|
"version": "3.11",
|
|
"storage_engine": "rocksDB"
|
|
},
|
|
"created": "2019-10-28 14:10:54",
|
|
"status": "creating",
|
|
"region": "aaa",
|
|
"availability_zone": "bbb",
|
|
"vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961",
|
|
"subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b",
|
|
"security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58",
|
|
"mode": "Cluster",
|
|
"flavor": [
|
|
{
|
|
"num": 3,
|
|
"size": 500,
|
|
"storage": "ULTRAHIGH",
|
|
"spec_code": "geminidb.cassandra.4xlarge.4"
|
|
}
|
|
],
|
|
"backup_strategy": {
|
|
"start_time": "08:00-09:00",
|
|
"keep_days": "8"
|
|
},
|
|
"job_id": "c010abd0-48cf-4fa8-8cbc-090f093eaa2f",
|
|
"enterprise_project_id": "0"
|
|
}</pre>
|
|
<p id="nosql_05_0011__p137584018285">If the request fails, an error code and error information are returned. For details, see <a href="nosql_error_code.html">Error Codes</a>.</p>
|
|
</li></ol>
|
|
</div>
|
|
</div>
|
|
|