doc-exports/docs/ecs/dev/en-us_topic_0134192987.html
Zaoxu, Li 57dcff6915 ECS DEV DOC
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com>
Co-authored-by: Zaoxu, Li <lizaoxu@huawei.com>
Co-committed-by: Zaoxu, Li <lizaoxu@huawei.com>
2024-05-15 14:15:46 +00:00

298 lines
23 KiB
HTML

<a name="EN-US_TOPIC_0134192987"></a><a name="EN-US_TOPIC_0134192987"></a>
<h1 class="topictitle1">Creating an ECS</h1>
<div id="body57396612"><div class="section" id="EN-US_TOPIC_0134192987__section127254112211"><h4 class="sectiontitle">Scenarios</h4><p id="EN-US_TOPIC_0134192987__p165434414714">An ECS with EVS disks is required.</p>
<p id="EN-US_TOPIC_0134192987__p2052911461826">An ECS can be created using a disk or image. This section uses an image as an example to describe how to create an ECS.</p>
</div>
<div class="section" id="EN-US_TOPIC_0134192987__section014217120412"><h4 class="sectiontitle">Involved APIs</h4><p id="EN-US_TOPIC_0134192987__p6878391044">Creating an ECS involves viewing flavors and AZs as well as creating EVS disks. The following APIs are required:</p>
<ul id="EN-US_TOPIC_0134192987__ul208171747441"><li id="EN-US_TOPIC_0134192987__li1481717471849">API for viewing details about ECS flavors</li><li id="EN-US_TOPIC_0134192987__li11565518517">API for viewing details about images</li><li id="EN-US_TOPIC_0134192987__li98363501801">API for viewing networks</li><li id="EN-US_TOPIC_0134192987__li8704156165717">API for creating and importing an SSH key pair</li><li id="EN-US_TOPIC_0134192987__li2820132215288">API for creating an ECS</li><li id="EN-US_TOPIC_0134192987__li3604040192815">API for viewing details about an ECS</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0134192987__section191821428611"><h4 class="sectiontitle">Procedure</h4><ol id="EN-US_TOPIC_0134192987__ol12296639205116"><li id="EN-US_TOPIC_0134192987__li15843552537"><span>Determine the ECS flavor.</span><p><ol type="a" id="EN-US_TOPIC_0134192987__ol1894182415536"><li id="EN-US_TOPIC_0134192987__li13296113918515">View ECS flavors.<ul id="EN-US_TOPIC_0134192987__ul142966392518"><li id="EN-US_TOPIC_0134192987__li1129663915518">API<p id="EN-US_TOPIC_0134192987__p172965392516"><a name="EN-US_TOPIC_0134192987__li1129663915518"></a><a name="li1129663915518"></a>URI format: GET /v2/{tenant_id}/flavors/detail{?minDisk,minRam,is_public,sort_key,sort_dir}</p>
<p id="EN-US_TOPIC_0134192987__p7658656173811">The fields following the question mark (?) are optional for viewing flavors. For details, see section <a href="https://docs.otc.t-systems.com/en-us/api/ecs/en-us_topic_0020212658.html" target="_blank" rel="noopener noreferrer">Querying Details About ECS Flavors</a>.</p>
</li><li id="EN-US_TOPIC_0134192987__li15296739145115">Request example<p id="EN-US_TOPIC_0134192987__p162598164013"><a name="EN-US_TOPIC_0134192987__li15296739145115"></a><a name="li15296739145115"></a>GET: https://<em id="EN-US_TOPIC_0134192987__i183041136164014">{endpoint}</em>/v2/74610f3a5ad941998e91f076297ecf27/flavors/detail</p>
<p id="EN-US_TOPIC_0134192987__p184501625164012">Obtain the endpoint from <a href="https://docs.otc.t-systems.com/en-us/endpoint/index.html" target="_blank" rel="noopener noreferrer">Regions and Endpoints</a>.</p>
</li><li id="EN-US_TOPIC_0134192987__li1229613917517">Response example<pre class="screen" id="EN-US_TOPIC_0134192987__screen28862509311">{
"flavors": [
{
"name": "c3.2xlarge.2",
"links": [
{
"href": "https://compute.region.xxx.com/v2.1/743b4c0428d94531b9f2add666642e6b/flavors/c3.2xlarge.2",
"rel": "self"
},
{
"href": "https://compute.region.xxx.com/743b4c0428d94531b9f2add666642e6b/flavors/c3.2xlarge.2",
"rel": "bookmark"
}
],
"ram": 16384,
"OS-FLV-DISABLED:disabled": false,
"vcpus": 8,
"swap": "",
"os-flavor-access:is_public": true,
"rxtx_factor": 1,
"OS-FLV-EXT-DATA:ephemeral": 0,
"disk": 0,
"id": "c3.2xlarge.2"
}
]
}</pre>
</li></ul>
</li><li id="EN-US_TOPIC_0134192987__li4521173045311">Select a flavor based on site requirements and record the flavor ID.</li></ol>
</p></li><li id="EN-US_TOPIC_0134192987__li1285212380536"><span>Determine the image.</span><p><ol type="a" id="EN-US_TOPIC_0134192987__ol136811076547"><li id="EN-US_TOPIC_0134192987__li132965391517">View images.<ul id="EN-US_TOPIC_0134192987__ul129614391515"><li id="EN-US_TOPIC_0134192987__li22968396511">API<p id="EN-US_TOPIC_0134192987__p52963398516"><a name="EN-US_TOPIC_0134192987__li22968396511"></a><a name="li22968396511"></a>URI format: GET /v2/{tenant_id}/images/detail</p>
<p id="EN-US_TOPIC_0134192987__p4118175164211">For details, see section "Querying Image Details" in <em id="EN-US_TOPIC_0134192987__i8423526979148_1">Elastic Cloud Server API Reference</em>.</p>
</li><li id="EN-US_TOPIC_0134192987__li529613985118">Request example<p class="subitemlist" id="EN-US_TOPIC_0134192987__p19352547174211"><a name="EN-US_TOPIC_0134192987__li529613985118"></a><a name="li529613985118"></a>GET: https://<em id="EN-US_TOPIC_0134192987__i44541427144719">{endpoint</em><em id="EN-US_TOPIC_0134192987__i12454162716477">}</em>/v2/74610f3a5ad941998e91f076297ecf27/images/detail</p>
<p id="EN-US_TOPIC_0134192987__p141307585424">Obtain the endpoint from <a href="https://docs.otc.t-systems.com/en-us/endpoint/index.html" target="_blank" rel="noopener noreferrer">Regions and Endpoints</a>.</p>
</li><li id="EN-US_TOPIC_0134192987__li18296103910512">Response example<pre class="screen" id="EN-US_TOPIC_0134192987__screen1296739185117">{
"images": [
{
"OS-EXT-IMG-SIZE:size": 0,
"metadata": {
"__os_type": "Linux",
"hw_vif_multiqueue_enabled": "true",
"__imagetype": "gold",
"__quick_start": "true",
"virtual_env_type": "FusionCompute",
"__support_xen": "true",
"__support_kvm": "true",
"__image_source_type": "uds",
"__platform": "EulerOS",
"__os_version": "EulerOS 2.2 64bit",
"__os_bit": "64",
"__isregistered": "false"
},
"created": "2018-05-14T06:13:50Z",
"minRam": 0,
"name": "DBS-MySQL-Image_2.1.3.3",
"progress": 100,
"links": [
{
"rel": "self",
"href": "https://None/v2/74610f3a5ad941998e91f076297ecf27/images/11e8f727-d439-4ed1-b3b8-33f46c0379c4"
},
{
"rel": "bookmark",
"href": "https://None/74610f3a5ad941998e91f076297ecf27/images/11e8f727-d439-4ed1-b3b8-33f46c0379c4"
},
{
"rel": "alternate",
"href": "https://None/images/11e8f727-d439-4ed1-b3b8-33f46c0379c4",
"type": "application/vnd.openstack.image"
}
],
"id": "11e8f727-d439-4ed1-b3b8-33f46c0379c4",
"updated": "2018-05-14T06:13:52Z",
"minDisk": 40,
"status": "ACTIVE"
}
]
}</pre>
</li></ul>
</li><li id="EN-US_TOPIC_0134192987__li155834285542">Select an image based on site requirements and record the image ID.</li></ol>
</p></li><li id="EN-US_TOPIC_0134192987__li123521935105519"><span>Determine the network configuration.</span><p><ol type="a" id="EN-US_TOPIC_0134192987__ol20358135111556"><li id="EN-US_TOPIC_0134192987__li13296123985112">View networks.<ul id="EN-US_TOPIC_0134192987__ul1129616399514"><li id="EN-US_TOPIC_0134192987__li629614398518">API<p id="EN-US_TOPIC_0134192987__p529673910511"><a name="EN-US_TOPIC_0134192987__li629614398518"></a><a name="li629614398518"></a>URI format: GET /v2/{tenant_id}/os-networks</p>
<p id="EN-US_TOPIC_0134192987__p188988141445">For details, see section "Querying Networks" in <em id="EN-US_TOPIC_0134192987__i8423526979148_3">Elastic Cloud Server API Reference</em>.</p>
</li><li id="EN-US_TOPIC_0134192987__li10296439155119">Request example<p class="subitemlist" id="EN-US_TOPIC_0134192987__p126942401505"><a name="EN-US_TOPIC_0134192987__li10296439155119"></a><a name="li10296439155119"></a>GET: https://<em id="EN-US_TOPIC_0134192987__i154288514474">{endpoint</em><em id="EN-US_TOPIC_0134192987__i15428175114716">}</em>/v2/74610f3a5ad941998e91f076297ecf27/os-networks</p>
<p id="EN-US_TOPIC_0134192987__p1667331012439">Obtain the endpoint from <a href="https://docs.otc.t-systems.com/en-us/endpoint/index.html" target="_blank" rel="noopener noreferrer">Regions and Endpoints</a>.</p>
</li><li id="EN-US_TOPIC_0134192987__li152961393519">Response example<pre class="screen" id="EN-US_TOPIC_0134192987__screen629693919516">{
"networks": [
{
"id": "07a9557d-4256-48ae-847c-415a9c8f7ff6",
"label": "b_tt3_td1b",
"broadcast": null,
"cidr": null,
"dns1": null,
"dns2": null,
"gateway": null,
"netmask": null,
"cidr_v6": null,
"gateway_v6": null,
"netmask_v6": null
}
]
}</pre>
</li></ul>
</li><li id="EN-US_TOPIC_0134192987__li44115576555">Select a network based on site requirements and record the network ID.</li></ol>
</p></li><li id="EN-US_TOPIC_0134192987__li1829613914513"><span>Set the login mode to key pair.</span><p><ol type="a" id="EN-US_TOPIC_0134192987__ol9498131115614"><li id="EN-US_TOPIC_0134192987__li9498161185616">Create a key pair.<ul id="EN-US_TOPIC_0134192987__ul122965398515"><li id="EN-US_TOPIC_0134192987__li16296113912513">API<p id="EN-US_TOPIC_0134192987__p52961439125117"><a name="EN-US_TOPIC_0134192987__li16296113912513"></a><a name="li16296113912513"></a>URI format: POST /v2/{tenant_id}/os-keypairs</p>
<p id="EN-US_TOPIC_0134192987__p123392216459">For details, see section "Creating and Importing an SSH Key Pair" in <em id="EN-US_TOPIC_0134192987__i84235269792538_1">Elastic Cloud Server API Reference</em>.</p>
</li><li id="EN-US_TOPIC_0134192987__li12296639135116">Request example<p id="EN-US_TOPIC_0134192987__p1652071115588"><a name="EN-US_TOPIC_0134192987__li12296639135116"></a><a name="li12296639135116"></a>POST: https://<em id="EN-US_TOPIC_0134192987__i47001837125619">{endpoint}</em>/v2/74610f3a5ad941998e91f076297ecf27/os-keypairs</p>
<p id="EN-US_TOPIC_0134192987__p1974121710436">Obtain the endpoint from <a href="https://docs.otc.t-systems.com/en-us/endpoint/index.html" target="_blank" rel="noopener noreferrer">Regions and Endpoints</a>.</p>
<p id="EN-US_TOPIC_0134192987__p14379174925814">Body</p>
<pre class="screen" id="EN-US_TOPIC_0134192987__screen13541316175914">{
"keypair": {
"type": "ssh",
"name": "demo1",
"user_id": "fake"
}
}</pre>
</li><li id="EN-US_TOPIC_0134192987__li429615395517">Response example<pre class="screen" id="EN-US_TOPIC_0134192987__screen867041014019">{
"keypair": {
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCrR5Gcwlh5ih7JOvzIUuQxS5qzWWPMYHeDXkDKSQ9W5pumOV05SiO3WCswnaQ5xMdOl31mNiHtwlwq9dJi7X6jJBB2shTD+00G5WuwkBbFU4CLvt1B44u0NUiaTJ35NAvW2/4XvpXm9OwiQ3B5ge6ZY7Esi38Unh+pkbhPkYxNBCK8yoOlojQhWs75abdxZBi811/8RwLcNiFiocA2RGxtRjBdpEScj+1TU+OcfZdQnr0AFbO11z7yxfIygwwzVTgUuJNbMbKHStQqRbklfMlHY4RBPQgb7RN/YaXKTQSXT84k+D9xlDNo7Wj4fwOJTOz/s/PvbIOqjRHt9D6Y4IKd Generated-by-Nova\n",
"private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEAq0eRnMJYeYoeyTr8yFLkMUuas1ljzGB3g15AykkPVuabpjld\nOUojt1grMJ2kOcTHTpd9ZjYh7cJcKvXSYu1+oyQQdrIUw/tNBuVrsJAWxVOAi77d\nQeOLtDVImkyd+TQL1tv+F76V5vTsIkNweYHumWOxLIt/FJ4fqZG4T5GMTQQivMqD\npaI0IVrO+Wm3cWQYvNdf/EcC3DYhYqHANkRsbUYwXaREnI/tU1PjnH2XUJ69ABWz\ntdc+8sXyMoMMM1U4FLiTWzGyh0rUKkW5JXzJR2OEQT0IG+0Tf2Glyk0El0/OJPg/\ncZQzaO1o+H8DiUzs/7Pz72yDqo0R7fQ+mOCCnQIDAQABAoIBAA6/c9dGmK2mae4z\nyQ5KrOFdvC1TNhej+sZx+CwyzEJUSvSuHcvQCXFBAz8FY92hhvPKcX66jINXZ+4/\nCmWAQ5YyhcRiow0Y91HvsS0bywoknX3q6kxBFodmyyCWFkgd5iMTADb1Lx0a27Y7\njlS4Dl5gyiGmxUN2Ng24wWEAjE8ZNuI0lrtr5IZKp+s5IAi/rb5AG/mL7EzicE8c\nmGP+QAa+nzwhAwNhFwVID230xen/ZcoL1d77hxeARNqJUxoR25gwJd6Ebg2y9pDW\nVu6cbbzgdGUCfQYlMEoAamAkCswOsDpVDBXwQnt2A537n6Wq2bgYIKusHr9thtxP\n/5ubQLUCgYEA4zYuBG2vtLHnvce26P8o2j1xcJS9K0ozkah9JFl3hqFN0sAqLlz7\n/Fm1jA4kzHJS3d0UqP3AMDxY3HkIqCn4Be7lqeAAe2AfqkOZpt9MDNv4VwKe9sPb\nViW1qjL3FxziLC/YWTRNSlpwRjqJJGhA+UQt8rOia1k/zXmrEs7bXLcCgYEAwPsu\nK3j5QoAiziYVMYf5iCzWwAM9Ljpf9gw23lefTdIzhhfFtJplVRSyxRGU0UZ84GMI\nTd5zmcIF/1KUfhqmeiQzz6NIPEYEReahjpQ/sOH/Gk5Rwr3QwYPrwAu5x+kk/SRi\nKPkqw7APTR0sMQBcUq+ZYwGYLGPMdd1zUdLfb0sCgYBkuz11iydtxb3G/obSD2WO\nM9VaIycmzRPFzNwGRH/gOR0mhTluKp0wyJjbSd34oeqpH/2r2ivddrOysxoqa8jg\n4IQDZyLvj7MaKjQxrieqP89+y9Or9TMFo1xB46x2G8EN8/xHuA9YGnZSPFtWv72m\nhRqV0hv82amWsA0vHnRUSwKBgDsKHXvrTMbNkNhkykMXCH5iyWiBFSyZa1ZJMlgf\nknsqfdzeVPwF6E55QKAN2uuTlwzG/3ljPxahR1hvmUJjQN9JSBiUKbtW6GPCRVbr\nf/jLi1Iu99COZdluVKeybqn8Z/aSNP24DR9FM8kxzZ1IMPaTBmhFypp6BclhcLBt\nxTG1AoGAfcrkVbV1SOy7fECUtMpUECcw0yU4GWj3sR2RbII63C500RVYQlUpUaRR\naANbASHTVR4myOKtGSxEUhAQHlxFDwsDL7W3gzAqTFbEDp1xAAUyT/nkOAhQjEm4\nORFdDETeXLQG1KMUj+8AdnhfYp3JTdft6rmPpZEBUFiCAUMAvb0=\n-----END RSA PRIVATE KEY-----\n",
"user_id": "f79791beca3c48159ac2553fff22e166",
"name": "demo1",
"fingerprint": "57:a7:a2:ed:5f:aa:e7:54:62:2e:bb:e7:92:22:cb:40"
}
}</pre>
</li></ul>
</li><li id="EN-US_TOPIC_0134192987__li5819429016">Import the key pair.<ul id="EN-US_TOPIC_0134192987__ul391220341813"><li id="EN-US_TOPIC_0134192987__li1991283141812">API<p id="EN-US_TOPIC_0134192987__p169121636182"><a name="EN-US_TOPIC_0134192987__li1991283141812"></a><a name="li1991283141812"></a>URI format: POST /v2/{tenant_id}/os-keypairs</p>
<p id="EN-US_TOPIC_0134192987__p563193120461">For details, see section "Creating and Importing an SSH Key Pair" in <em id="EN-US_TOPIC_0134192987__i84235269792538_3">Elastic Cloud Server API Reference</em>.</p>
</li><li id="EN-US_TOPIC_0134192987__li199124331811">Request example<p class="subitemlist" id="EN-US_TOPIC_0134192987__p189288312186"><a name="EN-US_TOPIC_0134192987__li199124331811"></a><a name="li199124331811"></a>POST: https://<em id="EN-US_TOPIC_0134192987__i17707145005710">{endpoint}</em>/v2/74610f3a5ad941998e91f076297ecf27/os-keypairs</p>
<p id="EN-US_TOPIC_0134192987__p1701022164315">Obtain the endpoint from <a href="https://docs.otc.t-systems.com/en-us/endpoint/index.html" target="_blank" rel="noopener noreferrer">Regions and Endpoints</a>.</p>
<p id="EN-US_TOPIC_0134192987__p395920301817">Body</p>
<pre class="screen" id="EN-US_TOPIC_0134192987__screen1697412315182">{
"keypair": {
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDY8wMTdBYiJgi62o6eShoOlSKx3CZ3cE6PHisDblfK3Y0Bg7EHV7iV9c74pqsrIhK0xuGUuO1NxDQWbkwLTPN4F9Iy5CIYohLuMIpbln6LDtfRPpdhEh3lxL8MM61gyfpKzeKkwkEpSFj27Rgh6zCyJgBpkA2A0HTP737UlitahL4faCWDIS+Vj6mbcfkWiMhuMCzTZgSKAZ4PfoG4B5HJhR52C6A4XLiQFT9heh9gnIsIG+uTogTKUbcJKuN7M6AraJpul6eHhV9YI4433sDmuiBF/njvreVPWwAHlAkgT9I8q1T/cfEFiwzXpdGbkK5O8NC7K+qNbbdKihlahONt Generated-by-Nova\n",
"type": "ssh",
"name": "demo2",
"user_id": "fake"
}
}</pre>
</li><li id="EN-US_TOPIC_0134192987__li169906391810">Response example<pre class="screen" id="EN-US_TOPIC_0134192987__screen599073101812">{
"keypair": {
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDY8wMTdBYiJgi62o6eShoOlSKx3CZ3cE6PHisDblfK3Y0Bg7EHV7iV9c74pqsrIhK0xuGUuO1NxDQWbkwLTPN4F9Iy5CIYohLuMIpbln6LDtfRPpdhEh3lxL8MM61gyfpKzeKkwkEpSFj27Rgh6zCyJgBpkA2A0HTP737UlitahL4faCWDIS+Vj6mbcfkWiMhuMCzTZgSKAZ4PfoG4B5HJhR52C6A4XLiQFT9heh9gnIsIG+uTogTKUbcJKuN7M6AraJpul6eHhV9YI4433sDmuiBF/njvreVPWwAHlAkgT9I8q1T/cfEFiwzXpdGbkK5O8NC7K+qNbbdKihlahONt Generated-by-Nova\n",
"user_id": "f79791beca3c48159ac2553fff22e166",
"name": "demo2",
"fingerprint": "dd:44:45:49:d9:f6:4f:c0:24:2d:81:aa:c4:4b:83:c2"
}
}</pre>
</li></ul>
</li><li id="EN-US_TOPIC_0134192987__li16597933131811">Record the name in the response body, for example, <strong id="EN-US_TOPIC_0134192987__b842352706145616">demo2</strong>.</li></ol>
</p></li><li id="EN-US_TOPIC_0134192987__li1320313439275"><span>Create an ECS authenticated using the key pair.</span><p><ul id="EN-US_TOPIC_0134192987__ul6203843192719"><li id="EN-US_TOPIC_0134192987__li92192043102712">API<p id="EN-US_TOPIC_0134192987__p521904315270"><a name="EN-US_TOPIC_0134192987__li92192043102712"></a><a name="li92192043102712"></a>URI format: POST /v2/{tenant_id}/servers</p>
<p id="EN-US_TOPIC_0134192987__p1599312494710">For details about API constraints and request parameters, see section "Creating an ECS" in <em id="EN-US_TOPIC_0134192987__i84235269792742">Elastic Cloud Server API Reference</em>.</p>
<div class="note" id="EN-US_TOPIC_0134192987__note6402193519816"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0134192987__p10418635582">In this example, the ECS is created using a specified image. Therefore,</p>
<ul id="EN-US_TOPIC_0134192987__ul04189350820"><li class="subitemlist" id="EN-US_TOPIC_0134192987__li341863518814">In <strong id="EN-US_TOPIC_0134192987__b842352706145839_1">block_device_mapping_v2</strong>, set <strong id="EN-US_TOPIC_0134192987__b842352706145845_1">source_type</strong> to <strong id="EN-US_TOPIC_0134192987__b842352706145850_1">image</strong>, <strong id="EN-US_TOPIC_0134192987__b842352706145854_1">uuid</strong> to the image ID, <strong id="EN-US_TOPIC_0134192987__b84235270614591_1">destination_type</strong> to <strong id="EN-US_TOPIC_0134192987__b84235270614596_1">volume</strong>, and <strong id="EN-US_TOPIC_0134192987__b842352706145911_1">boot_index</strong> to <strong id="EN-US_TOPIC_0134192987__b842352706145913_1">0</strong>.</li><li id="EN-US_TOPIC_0134192987__li20434635786">The <strong id="EN-US_TOPIC_0134192987__b842352706145930_1">volume_size</strong> must be greater than or equal to the minimum value specified in the image metadata.</li></ul>
</div></div>
</li><li id="EN-US_TOPIC_0134192987__li1621914312273">Request example<p class="subitemlist" id="EN-US_TOPIC_0134192987__p13234643102715"><a name="EN-US_TOPIC_0134192987__li1621914312273"></a><a name="li1621914312273"></a>POST: https://<em id="EN-US_TOPIC_0134192987__i7340131906">{endpoint}</em>/v2/74610f3a5ad941998e91f076297ecf27/servers</p>
<p id="EN-US_TOPIC_0134192987__p86872814431">Obtain the endpoint from <a href="https://docs.otc.t-systems.com/en-us/endpoint/index.html" target="_blank" rel="noopener noreferrer">Regions and Endpoints</a>.</p>
<p id="EN-US_TOPIC_0134192987__p32811943192714">Body</p>
<pre class="screen" id="EN-US_TOPIC_0134192987__screen97711544192913">{
"server": {
"flavorRef": "c3.2xlarge.2",
"name": "zttestvm1",
"block_device_mapping_v2": [{
"source_type": "image",
"destination_type": "volume",
"volume_type": "SATA",
"volume_size": "40",
"delete_on_termination": "true",
"uuid": "11e8f727-d439-4ed1-b3b8-33f46c0379c4",
"boot_index": "0"
}],
"networks": [{
"uuid": "fb68519f-a7c0-476e-98d4-2e4cf6de6def"
}],
"key_name": "demo2",
"availability_zone": "eu-de-01"
}
}</pre>
</li><li id="EN-US_TOPIC_0134192987__li103126434279">Response example<pre class="screen" id="EN-US_TOPIC_0134192987__screen13855119203013">{
"server": {
"security_groups": [
{
"name": "default"
}
],
"OS-DCF:diskConfig": "MANUAL",
"links": [
{
"rel": "self",
"href": "https://None/v2/74610f3a5ad941998e91f076297ecf27/servers/6d311127-bce1-48db-bf0f-cac9f8f7f077"
},
{
"rel": "bookmark",
"href": "https://None/74610f3a5ad941998e91f076297ecf27/servers/6d311127-bce1-48db-bf0f-cac9f8f7f077"
}
],
"id": "6d311127-bce1-48db-bf0f-cac9f8f7f077",
"adminPass": "WcC4QoVZPXpV"
}
}</pre>
</li></ul>
</p></li><li id="EN-US_TOPIC_0134192987__li44614293347"><span>Verify the ECS creation.</span><p><ul id="EN-US_TOPIC_0134192987__ul1778911313454"><li id="EN-US_TOPIC_0134192987__li1178917319459">API<p id="EN-US_TOPIC_0134192987__p98051031459"><a name="EN-US_TOPIC_0134192987__li1178917319459"></a><a name="li1178917319459"></a>URI format: GET /v2/{tenant_id}/servers/{server_id}</p>
<p id="EN-US_TOPIC_0134192987__p19574143615485">For details, see section "Querying Details About an ECS" in <em id="EN-US_TOPIC_0134192987__i8423526979148_5">Elastic Cloud Server API Reference</em>.</p>
</li><li id="EN-US_TOPIC_0134192987__li1080517313459">Request example<p class="subitemlist" id="EN-US_TOPIC_0134192987__p08212310451"><a name="EN-US_TOPIC_0134192987__li1080517313459"></a><a name="li1080517313459"></a>GET: https://<em id="EN-US_TOPIC_0134192987__i1727172419518">{endpoint}</em>/v2/74610f3a5ad941998e91f076297ecf27/servers/0c71c0da-8852-4c56-a1d1-3a9b9bcb6da6</p>
<p id="EN-US_TOPIC_0134192987__p667518282512">Where,</p>
<p id="EN-US_TOPIC_0134192987__p14179325223"><strong id="EN-US_TOPIC_0134192987__b84235270615848">0c71c0da-8852-4c56-a1d1-3a9b9bcb6da6</strong> is the UUID of the created ECS.</p>
<p id="EN-US_TOPIC_0134192987__p1181546134313">Obtain the endpoint from <a href="https://docs.otc.t-systems.com/en-us/endpoint/index.html" target="_blank" rel="noopener noreferrer">Regions and Endpoints</a>.</p>
</li><li id="EN-US_TOPIC_0134192987__li291311316452">Response example<pre class="screen" id="EN-US_TOPIC_0134192987__screen8317115612235">{
"server": {
"tenant_id": "74610f3a5ad941998e91f076297ecf27",
"addresses": {
"2a6f4aa6-d93e-45f5-a8cb-b030dbf8cd68": [
{
"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:88:01:1b",
"OS-EXT-IPS:type": "fixed",
"addr": "192.168.2.192",
"version": 4
}
]
},
"metadata": {},
"OS-EXT-STS:task_state": null,
"OS-DCF:diskConfig": "MANUAL",
"OS-EXT-AZ:availability_zone": "eu-de-01",
"links": [
{
"rel": "self",
"href": "https://None/v2/74610f3a5ad941998e91f076297ecf27/servers/0c71c0da-8852-4c56-a1d1-3a9b9bcb6da6"
},
{
"rel": "bookmark",
"href": "https://None/74610f3a5ad941998e91f076297ecf27/servers/0c71c0da-8852-4c56-a1d1-3a9b9bcb6da6"
}
],
"OS-EXT-STS:power_state": 1,
"id": "0c71c0da-8852-4c56-a1d1-3a9b9bcb6da6",
"os-extended-volumes:volumes_attached": [
{
"id": "b551445a-e749-4d53-932a-638a455cb6c3"
}
],
"OS-EXT-SRV-ATTR:host": "pod1a.eude1",
"image": {
"links": [
{
"rel": "bookmark",
"href": "https://None/74610f3a5ad941998e91f076297ecf27/images/11e8f727-d439-4ed1-b3b8-33f46c0379c4"
}
],
"id": "11e8f727-d439-4ed1-b3b8-33f46c0379c4"
},
"OS-SRV-USG:terminated_at": null,
"accessIPv4": "",
"accessIPv6": "",
"created": "2018-05-25T01:47:11Z",
"hostId": "b2792bef989888d2df1f51bff81de5ac58a4117f4e9ec3059c1a0410",
"OS-EXT-SRV-ATTR:hypervisor_hostname": "nova001@36",
"key_name": null,
"flavor": {
"links": [
{
"rel": "bookmark",
"href": "https://None/74610f3a5ad941998e91f076297ecf27/flavors/c3.2xlarge.2"
}
],
"id": "c3.2xlarge.2"
},
"security_groups": [
{
"name": "default"
}
],
"config_drive": "",
"OS-EXT-STS:vm_state": "active",
"OS-EXT-SRV-ATTR:instance_name": "instance-001883cd",
"user_id": "f79791beca3c48159ac2553fff22e166",
"name": "zttestvm1",
"progress": 0,
"OS-SRV-USG:launched_at": "2018-05-25T01:47:55.755922",
"updated": "2018-05-25T01:47:55Z",
"status": "ACTIVE"
}
}</pre>
</li></ul>
</p></li></ol>
</div>
</div>