forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Qin Ying, Fan <fanqinying@huawei.com> Co-committed-by: Qin Ying, Fan <fanqinying@huawei.com>
32 lines
7.6 KiB
HTML
32 lines
7.6 KiB
HTML
<a name="rts_faq_0004"></a><a name="rts_faq_0004"></a>
|
|
|
|
<h1 class="topictitle1">How to Obtain the flavor Value of Resource OSE::RDS::Instance?</h1>
|
|
<div id="body1535618365330"><div class="section" id="rts_faq_0004__section1536163784219"><h4 class="sectiontitle">Method 1: By Using the Console</h4><ol id="rts_faq_0004__ol176661819555"><li id="rts_faq_0004__li1166688165511">Log in to the management console.<p id="rts_faq_0004__p7656205110559"><a name="rts_faq_0004__li1166688165511"></a><a name="li1166688165511"></a>Google Chrome is recommended.</p>
|
|
</li><li id="rts_faq_0004__li9651814195512">Choose <strong id="rts_faq_0004__b1747114211248">Database</strong> > <strong id="rts_faq_0004__b44716429244">Relational Database Service</strong>.</li><li id="rts_faq_0004__li279177175911">In the upper right corner of the displayed page, click <strong id="rts_faq_0004__b14255155312416">Create DB Instance</strong>.</li><li id="rts_faq_0004__li5268121255518">Press <strong id="rts_faq_0004__b45055311258">F12</strong> and click <strong id="rts_faq_0004__b115051302513">Network</strong>.</li><li id="rts_faq_0004__li696514301013">Refresh the page, find <strong id="rts_faq_0004__b194121113257">createInfo?regionCode=eu-de</strong> in the request list, and click <strong id="rts_faq_0004__b69419119256">Preview</strong>. Choose <strong id="rts_faq_0004__b1694611152511">constant</strong> > <strong id="rts_faq_0004__b1794171118251">flavors</strong> to obtain the flavor IDs and other information.<div class="fignone" id="rts_faq_0004__fig1228102711414"><span class="figcap"><b>Figure 1 </b>Obtaining flavor information</span><br><span><img id="rts_faq_0004__image5283102715416" src="en-us_image_0128465684.png"></span></div>
|
|
</li><li id="rts_faq_0004__li1527617115554">Select the flavor ID based on the selected database type, backup policy, and required memory and CPU.<p id="rts_faq_0004__p1420884020511"><a name="rts_faq_0004__li1527617115554"></a><a name="li1527617115554"></a>Determine the database type and HA policy based on field <strong id="rts_faq_0004__b659011342615">code</strong> of the flavor. For example, if field <strong id="rts_faq_0004__b1059013313265">code</strong> of the flavor is <strong id="rts_faq_0004__b95908362618">rds.mysql.m1.large.ha</strong>, you can create MySQL primary/standby DB instances.</p>
|
|
</li></ol>
|
|
</div>
|
|
<div class="section" id="rts_faq_0004__section7567415174319"><h4 class="sectiontitle">Method 2: By Calling the API</h4><ol id="rts_faq_0004__ol454719561995"><li id="rts_faq_0004__li7547856798"><a name="rts_faq_0004__li7547856798"></a><a name="li7547856798"></a>Call the IAM API to obtain the token.<p id="rts_faq_0004__p163501521191016"><a name="rts_faq_0004__li7547856798"></a><a name="li7547856798"></a><strong id="rts_faq_0004__b125484922610">curl -i -k -X POST </strong><em id="rts_faq_0004__i225418495261">https://auth.otc-tsi.de:31943/v3/auth/tokens</em><strong id="rts_faq_0004__b22541449112613"> -d '{"auth": {"identity": {"methods": ["password"],"password": {"user": {"name": "</strong><em id="rts_faq_0004__i425418492264">*****</em><strong id="rts_faq_0004__b11254114911263">","domain": {"name": "</strong><em id="rts_faq_0004__i15254204911261">****</em><strong id="rts_faq_0004__b112541849132619">"},"password": "</strong><em id="rts_faq_0004__i8254124922613">****</em><strong id="rts_faq_0004__b2025564916265">"}}},"scope": {"project": {"name": "</strong><em id="rts_faq_0004__i3255849142612">eu-de</em><strong id="rts_faq_0004__b6255949112619">"}}}}' -H "Content-Type: application/json"</strong></p>
|
|
</li><li id="rts_faq_0004__li4820910151013">Save the token information.<p id="rts_faq_0004__p92694468101"><a name="rts_faq_0004__li4820910151013"></a><a name="li4820910151013"></a>Save the token obtained in <a href="#rts_faq_0004__li7547856798">1</a> and import variables.</p>
|
|
<p id="rts_faq_0004__p1231815117">The following is an example command:</p>
|
|
<p id="rts_faq_0004__p176136114116"><strong id="rts_faq_0004__b5997424162715">export token=</strong><em id="rts_faq_0004__i89971224152710">MIIF5gY*******cNxyvq4=</em></p>
|
|
</li><li id="rts_faq_0004__li164268420109"><a name="rts_faq_0004__li164268420109"></a><a name="li164268420109"></a>Invoke the RDS API for obtaining the database version.<p id="rts_faq_0004__p252135601119"><a name="rts_faq_0004__li164268420109"></a><a name="li164268420109"></a>URI format: <strong id="rts_faq_0004__b139971541182712">GET /rds/{versionId}/{project_id}/datastores/{datastore_name}/versions</strong></p>
|
|
<p id="rts_faq_0004__p1062814420123">The following is an example command:</p>
|
|
<p id="rts_faq_0004__p1569819111215"><strong id="rts_faq_0004__b2258115172714">curl -i -X GET </strong><em id="rts_faq_0004__i16258751162716">https://rds.eu-de.otc.t-systems.com/rds/v1/3160d79af34b45e78fad478a046d7615/datastores/PostgreSQL/versions </em><strong id="rts_faq_0004__b13258951102711">-H 'Content-Type: application/json' -H 'Accept: application/json' -H 'User-Agent: python-heatclient' -k -H "X-Auth-Token: $token" -H 'X-Language: en-us'</strong></p>
|
|
<div class="note" id="rts_faq_0004__note15127972286"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="rts_faq_0004__p153151951171215">In the URI, <em id="rts_faq_0004__i12209198142812">datastore_name</em> indicates the type of the database to be created. Currently, the following database types are supported: MySQL, PostgreSQL, and SQLServer. These types are case sensitive.</p>
|
|
</div></div>
|
|
</li><li id="rts_faq_0004__li1745118815108">Invoke the RDS API for obtaining specifications of all DB instances.<p id="rts_faq_0004__p1118190151516"><a name="rts_faq_0004__li1745118815108"></a><a name="li1745118815108"></a>URI format: GET /rds/{versionId}/{project_id}/flavors</p>
|
|
<p id="rts_faq_0004__p110519151513">Example command: <strong id="rts_faq_0004__b112911937192814">curl -i -k -X GET "</strong><em id="rts_faq_0004__i19291437112817">https://rds.eu-de.otc.t-systems.com</em><strong id="rts_faq_0004__b52911372281">/rds/v1/</strong><em id="rts_faq_0004__i19291123782818">3160d79af34b45e78fad478a046d7615</em><strong id="rts_faq_0004__b1291163719289">/flavors?dbId=</strong><em id="rts_faq_0004__i1291837152819">c66772dd-bd7a-11e7-a4c9-00ffa8375c2a</em><strong id="rts_faq_0004__b13291143711285">&region=</strong><em id="rts_faq_0004__i82912037122817">eu-de</em><strong id="rts_faq_0004__b132911737162818">" -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'User-Agent: python-heatclient' -H "X-Auth-Token: $token" -H "X-Language: en-us"</strong></p>
|
|
<div class="note" id="rts_faq_0004__note1211145214283"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="rts_faq_0004__p07651842181514"><strong id="rts_faq_0004__b203569535281">dbId</strong> indicates the ID of the DB engine version ID obtained in <a href="#rts_faq_0004__li164268420109">3</a>.</p>
|
|
</div></div>
|
|
</li><li id="rts_faq_0004__li1615354711711">Select the flavor ID based on the selected backup policy and required memory and CPU.<p id="rts_faq_0004__p730434833017"><a name="rts_faq_0004__li1615354711711"></a><a name="li1615354711711"></a>Determine the database type and HA policy based on field <strong id="rts_faq_0004__b16309021162917">specCode</strong> of the flavor. For example, if field <strong id="rts_faq_0004__b930972110299">specCode</strong> of the flavor is <strong id="rts_faq_0004__b173091821122913">rds.mysql.m1.large.ha</strong>, you can create MySQL primary/standby DB instances.</p>
|
|
</li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0078604095.html">FAQ</a></div>
|
|
</div>
|
|
</div>
|
|
|