CINXE.COM
Use ROS to create ECS resources - Elastic Compute Service - Alibaba Cloud Documentation Center
<!DOCTYPE html> <html lang="en" class="transparent alicloud back-to-top"> <link rel="stylesheet" href="//g.alicdn.com/aliyun-help/help-intl-portal-fe/0.3.51/css/index.css" /> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <meta name="spm-id" content="a2c63"> <meta name="data-spm" content="a2c63" /> <meta name="aplus-core" content="aplus.js"> <meta name="aplus-ajax" content="chksum"> <meta name="aplus-waiting" content="MAN"> <meta name="aplus-pvhash" content="1"> <meta name="kloud:supported-langs" content="en,zh,tc,ja"/> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="applicable-device" content="pc,mobile"> <meta name="aplus-rhost-v" content="sg.mmstat.com"> <meta name="aplus-rhost-g" content="sg.mmstat.com"> <title> Use ROS to create ECS resources - Elastic Compute Service - Alibaba Cloud Documentation Center </title> <meta name="keywords" content="ROS,ECS"> <meta name="description" content="Use ROS to create ECS resources,Elastic Compute Service:You can create templates in Resource Orchestration Service (ROS) to define Alibaba Cloud Elastic Compute Service (ECS) resources, such as ECS instances and security groups, and the dependencies betwee..."> <script> window.globalData = { website: "intl", lang: "en", nodeId:"2850760", channel: "", notfound: "", statusCode: "", errorType: "" }; // UT的全局配置变量,在CDN加载前配置 window.$ACE_TRACKER_CONFIG = { enableHistory: true, enableHash: false }; </script> <!-- <base href="https://www.alibabacloud.com">--> <link rel="canonical" href="https://www.alibabacloud.com/help/en/ecs/developer-reference/ros"/> <link rel="shortcut icon" href="//img.alicdn.com/tfs/TB1ugg7M9zqK1RjSZPxXXc4tVXa-32-32.png"/> <link rel="stylesheet" href="https://o.alicdn.com/fund/alicloud-pure-layout/css/index.min.css" /> </head> <body data-spm="" class="HAS_ALPS_RESOURCE"><script> with(document)with(body)with(insertBefore(createElement("script"),firstChild))setAttribute("exparams","category=&userid=&aplus&yunid=&&trid=0b9a079a17398008600237096e65e2&asid=AQAAAAAcQbNnVGfoMwAAAACCs94+mB2tIg==",id="tb-beacon-aplus",src=(location>"https"?"//g":"//g")+".alicdn.com/alilog/mlog/aplus_v2.js") </script> <script async src="https://o.alicdn.com/fund/alicloud-pure-layout/index.js"></script> <div id="app"> <div class="aliyun-app-layout"> <!-- docId:2850760 --> <input type="hidden" id="website" value="intl"> <div class="products-wrapper$tip" data-spm="879954"> <section id="products" class="intl-product container"> <div class="row"> <div class="col-lg-3 col-md-3 col-sm-4 col-xs-12" id="navDocument"> <div class="doc-nav"> <a class="doc-center" href="/help/en"> <i class="icon-docs icon-docs-back"></i> Document Center </a> </div> <div class="placeholder-ele"> </div> </div> <div class="col-lg-7 col-md-7 col-sm-8 col-xs-12 doc-content"> <div class="all-products action" id="J_AllProducts"> <div class="all-products-head"> <div class="all-products-title">All Products</div> <div class="all-products-search-wrapper"> <div class="all-products-search focus"> <input autocomplete="off" class="all-products-search-box-input" id="J_AllProductsSearch" placeholder="Search Product" data-spm-anchor-id="a2c4g.11186623.6.i0.1f753945H9RVzu"> <i class="icon-search icon-docs icon-docs-search"></i> <ul class="all-products-search-result" style="display: none;"> </ul> </div> </div> </div> <div class="all-products-body" id="J_AllProductsBody"></div> </div> <div class="search-product-modal"> Search </div> <div class="breadcrumbs-top" data-spm="a1"> <div class="row nav-breadcrumb"> <div class="col-md-12 hidden-sm hidden-xs"> <ul class="breadcrumb text-sm"> <li><a class="active" title="Document Center" href="/help/en">Document Center</a></li> <li><a class="active" title="Elastic Compute Service" href="/help/en/ecs/">Elastic Compute Service</a></li> <li><a class="active" title="Developer Reference" href="/help/en/ecs/developer-reference/">Developer Reference</a></li> <li><a class="active" title="ROS Reference" href="/help/en/ecs/developer-reference/ros">ROS Reference</a></li> </ul> </div> <div class="col-md-4 col-sm-12"> <button type="button" class="navbar-toggle bc mr0" data-toggle="collapse" data-target="#sideMenu-mobile"> <span class="icon-bar"></span> <span class="icon-bar"></span> all-products-head <span class="icon-bar"></span> </button> </div> </div> <form class="search-bar clearfix" method="GET" action="/s/en"> <input type="hidden" name="type" value="doc"/> <div class="select"> <p class="select-text"> <span class="placeholder">This Product</span> <i class="icon-docs icon-docs-selected"></i> </p> <ul class="select-options" style="display:none;"> <li class="option selected" data-value="h_pid_$productId">This Product</li> <li class="option" data-value="">All Products</li> </ul> <input type="hidden" name="rangeinfo" value="h_pid_25365"/> </div> <input autocomplete="off" class="search-key" type="text" placeholder="Search by keyword" name="k"/> <ul class="help-top-search-result" style="display: block;"></ul> <button class="search-submit" type="submit"> <i class="icon-docs icon-docs-search"></i> </button> <div class="collapse-menus select"> <p class="select-text"> <span class="placeholder">Elastic Compute Service:ROS reference</span> <i class="icon-docs icon-docs-more"></i> </p> </div> </form> </div> <header id="header-faq" class="clearfix"> <a class="doc-center" href="/help/en"> <i class="icon-docs icon-docs-back"></i> Document Center </a> <div class="download-links"> </div> <h1 class="page-title">Elastic Compute Service:ROS reference</h1> <div class="doc-status"> Last Updated:Jan 08, 2025 </div> </header> <article class="product-description markdown-body"> <div lang="en" class="icms-help-docs-content"> <main id="main-2807178"><p id="73d59899a4508" data-tag="shortdesc" class="shortdesc">You can create templates in <span data-tag="ph" id="8242c67c77q6y" outputclass="productName" data-ref-searchable="yes" data-reuse-tag="firstProductName" data-type="firstProductName" data-product-code="ros" docid="4265504" class="ph productName">Resource Orchestration Service (ROS)</span> to define Alibaba Cloud Elastic Compute Service (ECS) resources, such as ECS instances and security groups, and the dependencies between the resources. The orchestration engine of <span id="853aa9b745rz2" outputclass="productName" data-tag="ph" data-ref-searchable="yes" data-reuse-tag="productSimpleName" data-type="productSimpleName" data-product-code="ros" docid="4265504" class="ph productName">ROS</span> creates and configures all resources based on the templates to implement automated deployment and O&M. This topic describes how to use a <span id="06ff5da132dp6" outputclass="productName" data-tag="ph" data-ref-searchable="yes" data-reuse-tag="productSimpleName" data-type="productSimpleName" data-product-code="ros" docid="4265504" class="ph productName">ROS</span> template to automatically create an ECS instance. </p><div data-tag="body" class="body"><section id="8cfd61db3cgdo" class="section"><p id="965fb036e8zmf"><span id="5a4114dbe57y8" outputclass="productName" data-tag="ph" data-ref-searchable="yes" data-reuse-tag="productSimpleName" data-type="productSimpleName" data-product-code="ros" docid="4265504" class="ph productName">ROS</span> is an Alibaba Cloud service that helps simplify the management of cloud computing resources. For more information, see <a href="/help/en/ros/product-overview/what-is-ros" id="123e2d9ca04uu" title="" class="xref">What is ROS?</a> </p></section><section id="b71f42603dstk" class="section"><h2 id="22ce5ab3ee9fu"><b>Supported ECS resources</b></h2><p id="ffec8e9e2frjs">The resources that can be orchestrated by using <span id="1e72098818fkp" outputclass="productName" data-tag="ph" data-ref-searchable="yes" data-reuse-tag="productSimpleName" data-type="productSimpleName" data-product-code="ros" docid="4265504" class="ph productName">ROS</span> include regular and data source resources. For more information, see <a href="/help/en/ros/developer-reference/ecs/" id="a5581e5ab01yc" title="" class="xref">ECS</a>. </p><ul id="4a01295470j6c"><li id="acc0d4a30dphl"><div id="97fe34ca70gb1" outputclass="collapse" class="collapse"><p id="79350c64a0q1s" data-tag="expandable-title" class="expandable-title"><b>Regular resources</b></p><div id="03967efae9qfw" data-tag="expandable-content" class="expandable-content"><ul id="af7e51bd89bbv"><li id="ab9a4106467yp"><p id="1badc7f75abhc"><a href="/help/en/ros/developer-reference/aliyun-ecs-autoprovisioninggroup#reference-2317454" id="3bba879d30n2d" title="" class="xref">ALIYUN::ECS::AutoProvisioningGroup</a>: creates an auto provisioning group.</p></li><li id="38ce214af8wim"><p id="700cd45fe4y9p"><a href="/help/en/ros/developer-reference/aliyun-ecs-autosnapshotpolicy#concept-tjw-v2k-wgb" id="df295a4a7be7n" title="" class="xref">ALIYUN::ECS::AutoSnapshotPolicy</a>: creates an automatic snapshot policy.</p></li><li id="6318abf68fl7v"><p id="f5fc59c0825un"><a href="/help/en/ros/developer-reference/aliyun-ecs-assignipv6addresses#concept-2325016" id="5da81e98ccuya" title="" class="xref">ALIYUN::ECS::AssignIpv6Addresses</a>: assigns IPv6 addresses to an elastic network interface (ENI).</p></li><li id="7d1c8eaa102u6"><p id="c924f2e049oa1"><a href="/help/en/ros/developer-reference/aliyun-ecs-assignprivateipaddresses#concept-2330902" id="d0aa9eb7dd5am" title="" class="xref">ALIYUN::ECS::AssignPrivateIpAddresses</a>: assigns secondary private IP addresses to an ENI.</p></li><li id="02b90f21cbduj"><p id="6141319298881"><a href="/help/en/ros/developer-reference/aliyun-ecs-command#concept-vbb-2ss-qgb" id="c872a53e53xf2" title="" class="xref">ALIYUN::ECS::Command</a>: creates a Cloud Assistant command.</p></li><li id="8371ea263cn49"><p id="fb5ea51f900at"><a href="/help/en/ros/developer-reference/aliyun-ecs-copyimage#concept-187899" id="1537d1dbe2sqr" title="" class="xref">ALIYUN::ECS::CopyImage</a>: copies a custom image from one region to another region.</p></li><li id="a370ef1c570ix"><p id="546694e70231j"><a href="/help/en/ros/developer-reference/aliyun-ecs-customimage#concept-55980-zh" id="b7bb133972749" title="" class="xref">ALIYUN::ECS::CustomImage</a>: creates a custom image.</p></li><li id="ccb9812f04e2p"><p id="a20f019670dfi"><a href="/help/en/ros/developer-reference/aliyun-ecs-dedicatedhost#concept-xsc-jmm-4fb" id="08df2e204ez99" title="" class="xref">ALIYUN::ECS::DedicatedHost</a>: creates a dedicated host.</p></li><li id="20e1c66b937a4"><p id="d94c22aa0ffx9"><a href="/help/en/ros/developer-reference/aliyun-ecs-deploymentset#concept-xsc-jmm-4fb" id="7c30fcb245eoq" title="" class="xref">ALIYUN::ECS::DeploymentSet</a>: creates a deployment set.</p></li><li id="351de751a7uyo"><p id="937d5defedzjv"><a href="/help/en/ros/developer-reference/aliyun-ecs-disk#concept-51201-zh" id="c0ccbd995fx2t" title="" class="xref">ALIYUN::ECS::Disk</a>: creates a data disk.</p></li><li id="562ae79f26hov"><p id="5da7aae9f8crv"><a href="/help/en/ros/developer-reference/aliyun-ecs-diskattachment#concept-51188-zh" id="de52db2763zx0" title="" class="xref">ALIYUN::ECS::DiskAttachment</a>: attaches a data disk to an ECS instance.</p></li><li id="17eb93f116a6y"><p id="54edee2dd55gu"><a href="/help/en/ros/developer-reference/aliyun-ecs-forwardentry#concept-e1p-j12-lfb" id="e2a8f06cfbgd3" title="" class="xref">ALIYUN::ECS::ForwardEntry</a>: configures a Destination Network Address Translation (DNAT) table for a NAT gateway.</p></li><li id="a5134c282bsz0"><p id="c50c27666cc9m"><a href="/help/en/ros/developer-reference/aliyun-ecs-hpccluster#concept-2427640" id="c2235fd81c7qd" title="" class="xref">ALIYUN::ECS::HpcCluster</a>: creates a High Performance Computing (HPC) cluster.</p></li><li id="944db942e9m8n"><p id="94d648dda0kjd"><a href="/help/en/ros/developer-reference/aliyun-ecs-instance#concept-51198-zh" id="8c33941938bsj" title="" class="xref">ALIYUN::ECS::Instance</a>: creates an ECS instance.</p></li><li id="dee22741659a4"><p id="f9d739e285psb"><a href="/help/en/ros/developer-reference/aliyun-ecs-instanceclone#concept-48279-zh" id="b2fbf04e5chqm" title="" class="xref">ALIYUN::ECS::InstanceClone</a>: clones an ECS instance.</p></li><li id="0f762092bd8vf"><p id="943a495360mbu"><a href="/help/en/ros/developer-reference/aliyun-ecs-instancegroup#concept-48278-zh" id="97b04a6877g6d" title="" class="xref">ALIYUN::ECS::InstanceGroup</a>: creates ECS instances.</p></li><li id="9dbcde7edfsx0"><p id="06b93fb19f2yg"><a href="/help/en/ros/developer-reference/aliyun-ecs-instancegroupclone#concept-48289-zh" id="49e84db56f5v6" title="" class="xref">ALIYUN::ECS::InstanceGroupClone</a>: clones an ECS instance to create one or more ECS instances.</p></li><li id="0283e8adcbca9"><p id="e49f4bfb01awv"><a href="/help/en/ros/developer-reference/aliyun-ecs-invocation#concept-omf-kfn-qgb" id="d797a3843fgpi" title="" class="xref">ALIYUN::ECS::Invocation</a>: runs a Cloud Assistant command on ECS instances.</p></li><li id="75de276ff8p1e"><p id="5fe6ce93273w6"><a href="/help/en/ros/developer-reference/aliyun-ecs-joinsecuritygroup#concept-48917-zh" id="cc82e9727d069" title="" class="xref">ALIYUN::ECS::JoinSecurityGroup</a>: adds ECS instances to a security group.</p></li><li id="47cfffd35bbse"><p id="87bf825d8bvv8"><a href="/help/en/ros/developer-reference/aliyun-ecs-launchtemplate#concept-xsc-jmm-4fb" id="0a6124f054ako" title="" class="xref">ALIYUN::ECS::LaunchTemplate</a>: creates a launch template.</p></li><li id="6b9393a57731t"><p id="4e69cf04f9gka"><a href="/help/en/ros/developer-reference/aliyun-ecs-networkinterface#concept-acc-41n-qgb" id="f449785413na3" title="" class="xref">ALIYUN::ECS::NetworkInterface</a>: creates an ENI.</p></li><li id="5ec32106e6vuk"><p id="3c7be68c5at0a"><a href="/help/en/ros/developer-reference/aliyun-ecs-networkinterfaceattachment#concept-yp1-p3n-qgb" id="f1351279530bv" title="" class="xref">ALIYUN::ECS::NetworkInterfaceAttachment</a>: attaches an ENI to an ECS instance in a virtual private cloud (VPC).</p></li><li id="2577a3488fwik"><p id="6aa72606bewnx"><a href="/help/en/ros/developer-reference/aliyun-ecs-networkinterfacepermission#concept-ann-lwt-qgb" id="9ec650f6dfrdv" title="" class="xref">ALIYUN::ECS::NetworkInterfacePermission</a>: grants permissions on an ENI to an account.</p></li><li id="ccc15745d5edt"><p id="0ea7fc391agvp"><a href="/help/en/ros/developer-reference/aliyun-ecs-prefixlist#concept-2b08e94" id="118526dea4maa" title="" class="xref">ALIYUN::ECS::PrefixList</a>: creates a prefix list.</p></li><li id="e291441c72l8v"><p id="b1f9998f4b1k1"><a href="/help/en/ros/developer-reference/aliyun-ecs-route#concept-51197-zh" id="1f58c12774el0" title="" class="xref">ALIYUN::ECS::Route</a>: creates a custom route entry.</p></li><li id="43b680b70chmi"><p id="18c6274286gg0"><a href="/help/en/ros/developer-reference/aliyun-ecs-runcommand#concept-2557029" id="73883608acm8o" title="" class="xref">ALIYUN::ECS::RunCommand</a>: runs a shell, PowerShell, or batch command on ECS instances.</p></li><li id="1ccdd81ffe7bz"><p id="b4f846e0dbpoz"><a href="/help/en/ros/developer-reference/aliyun-ecs-snatentry#concept-48475-zh" id="77f10288a38j6" title="" class="xref">ALIYUN::ECS::SNatEntry</a>: configures a Source Network Address Translation (SNAT) table for a NAT gateway.</p></li><li id="62d1a3ab2b11v"><p id="0fd7d271d8yxa"><a href="/help/en/ros/developer-reference/aliyun-ecs-securitygroup#concept-51207-zh" id="5e026ff26azkt" title="" class="xref">ALIYUN::ECS::SecurityGroup</a>: creates a security group.</p></li><li id="85656b263aqh7"><p id="f0ed0af17amyg"><a href="/help/en/ros/developer-reference/aliyun-ecs-securitygroupclone#concept-54355-zh" id="3e53adb929h0l" title="" class="xref">ALIYUN::ECS::SecurityGroupClone</a>: clones a security group.</p></li><li id="d8c4dad70d9tb"><p id="e043feb777jcv"><a href="/help/en/ros/developer-reference/aliyun-ecs-securitygroupegress#concept-51189-zh" id="42bbc08d2bfr8" title="" class="xref">ALIYUN::ECS::SecurityGroupEgress</a>: creates an outbound rule in a security group.</p></li><li id="8405e5a716m6h"><p id="3425bdf73buwz"><a href="/help/en/ros/developer-reference/aliyun-ecs-securitygroupingress#concept-51206-zh" id="f772947c251yb" title="" class="xref">ALIYUN::ECS::SecurityGroupIngress</a>: creates an inbound rule in a security group.</p></li><li id="d683eab5f49jg"><p id="d417c3d1c6o35"><a href="/help/en/ros/developer-reference/aliyun-ecs-snapshot#concept-55972-zh" id="c15825faf0b62" title="" class="xref">ALIYUN::ECS::Snapshot</a>: creates a snapshot for a disk.</p></li><li id="7ff98dd125jv4"><p id="fb690586b2d60"><a href="/help/en/ros/developer-reference/aliyun-ecs-sshkeypair#concept-54422-zh" id="25b0bb1da749p" title="" class="xref">ALIYUN::ECS::SSHKeyPair</a>: creates an SSH key pair.</p></li><li id="165e0a479c289"><p id="b0908a9b0bwys"><a href="/help/en/ros/developer-reference/aliyun-ecs-sshkeypairattachment#concept-54429-zh" id="cf598bb385gid" title="" class="xref">ALIYUN::ECS::SSHKeyPairAttachment</a>: binds an SSH key pair to ECS instances.</p></li><li id="5a7441e8e0ajv"><p id="cc65e5fe44l2p"><a href="/help/en/ros/developer-reference/aliyun-ecs-vpc#concept-51194-zh" id="4aea441dcbztt" title="" class="xref">ALIYUN::ECS::VPC</a>: creates a VPC.</p></li><li id="86ee1008bflos"><p id="d58c99d527c9k"><a href="/help/en/ros/developer-reference/aliyun-ecs-vswitch#concept-51192-zh" id="4880189b43peo" title="" class="xref">ALIYUN::ECS::VSwitch</a>: creates a vSwitch in a VPC.</p></li><li id="0c6d87aa3fafi"><p id="1bbab04c11hzr"><a href="/help/en/ros/developer-reference/aliyun-ecs-ramroleattachment" id="a263943508peg" title="" class="xref">ALIYUN::ECS::RamRoleAttachment</a>: attaches an instance Resource Access Management (RAM) role to ECS instances.</p></li><li id="9b84f2874cur6"><p id="787d6564afgcm"><a href="/help/en/ros/developer-reference/aliyun-ecs-activation" id="a7f5eadad2els" title="" class="xref">ALIYUN::ECS::Activation</a>: creates an activation code.</p></li><li id="d680e577455ct"><p id="2e0962bf341d2"><a href="/help/en/ros/developer-reference/aliyun-ecs-imagesharepermission" id="a54798ffb0rt8" title="" class="xref">ALIYUN::ECS::ImageSharePermission</a>: manages the share permissions on a custom image.</p></li><li id="82ad2aec79ehl"><p id="94fc3b68d2nyq"><a href="/help/en/ros/developer-reference/aliyun-ecs-capacityreservation" id="ab581e79756t4" title="" class="xref">ALIYUN::ECS::CapacityReservation</a>: creates a capacity reservation.</p></li><li id="a7565f10b8y6f"><p id="cca05b50f1b5w"><a href="/help/en/ros/developer-reference/aliyun-ecs-elasticityassurance" id="2507b18a7bv40" title="" class="xref">ALIYUN::ECS::ElasticityAssurance</a>: creates an elasticity assurance.</p></li><li id="fd7e9e8c41h3w"><p id="d808192a2dzl5"><a href="/help/en/ros/developer-reference/aliyun-ecs-imagepipeline" id="46fa3b5a81z9y" title="" class="xref">ALIYUN::ECS::ImagePipeline</a>: creates an image template.</p></li><li id="93716d3cfa6ky"><p id="51803783a668f"><a href="/help/en/ros/developer-reference/aliyun-ecs-imagecomponent" id="23d040f1631ir" title="" class="xref">ALIYUN::ECS::ImageComponent</a>: creates an image component.</p></li><li id="6ead915f011ia"><p id="a7ce434d7eqh9"><a href="/help/en/ros/developer-reference/aliyun-ecs-securitygroupegresses" id="a1d5283288hb6" title="" class="xref">ALIYUN::ECS::SecurityGroupEgresses</a>: associates multiple outbound rules with a security group at a time.</p></li><li id="dea4dec58eeja"><p id="8bf7c93976xle"><a href="/help/en/ros/developer-reference/aliyun-ecs-securitygroupingresses" id="03238e08d3iof" title="" class="xref">ALIYUN::ECS::SecurityGroupIngresses</a>: associates multiple inbound rules with a security group at a time.</p></li><li id="59baf306154qi"><p id="0361ba15badc6"><a href="/help/en/ros/developer-reference/aliyun-ecs-snapshotgroup" id="fdbc1eef3arxz" title="" class="xref">ALIYUN::ECS::SnapshotGroup</a>: creates a snapshot-consistent group for the disks of an ECS instance. A snapshot-consistent group contains snapshots of one or more disks.</p></li></ul></div></div></li><li id="01706203a5nxt"><div id="0258cc8a0cugh" outputclass="collapse" class="collapse"><p jc="start" id="259d4a0b33gph" data-tag="expandable-title" style="text-align:start" class="expandable-title"><b>Data source resources</b></p><div id="abdd9e84bclm4" data-tag="expandable-content" class="expandable-content"><ul id="62a22a6563uo2"><li id="0fc06273980m5"><p id="df07a13695wm8"><a href="/help/en/ros/developer-reference/datasource-ecs-autosnapshotpolicies#concept-a1dd1b3" id="37388068a3lx3" title="" class="xref">DATASOURCE::ECS::AutoSnapshotPolicies</a>: queries automatic snapshot policies.</p></li><li id="07897196f5jh0"><p id="44dfd7d996w8w"><a href="/help/en/ros/developer-reference/datasource-ecs-dedicatedhosts#concept-6eb2706" id="e7106aba7bv3s" title="" class="xref">DATASOURCE::ECS::DedicatedHosts</a>: queries the details of dedicated hosts.</p></li><li id="bde6ef1ab1go3"><p id="e68b059a6dntn"><a href="/help/en/ros/developer-reference/datasource-ecs-deploymentsets#concept-220a396" id="25c1d2bb56zj8" title="" class="xref">DATASOURCE::ECS::DeploymentSets</a>: queries the attributes of one or more deployment sets.</p></li><li id="f0c66fc520aoy"><p id="21e4e1613b9eu"><a href="/help/en/ros/developer-reference/datasource-ecs-disks#concept-4e4566b" id="bc0e54b43fbu2" title="" class="xref">DATASOURCE::ECS::Disks</a>: queries block storage devices that you created, including cloud disks and local disks.</p></li><li id="f3e1ee04d937r"><p id="8a28a75202rbc"><a href="/help/en/ros/developer-reference/datasource-ecs-diskcategories#concept-d326479" id="7488df140cpdc" title="" class="xref">DATASOURCE::ECS::DiskCategories</a>: queries disk categories.</p></li><li id="02dce56a249cz"><p id="903f58d29enqq"><a href="/help/en/ros/developer-reference/datasource-ecs-hpcclusters#concept-c8a776b" id="91ef393c3fxux" title="" class="xref">DATASOURCE::ECS::HpcClusters</a>: queries available HPC clusters.</p></li><li id="247fa8fa1dfq1"><p id="cc0b6c26ccqf1"><a href="/help/en/ros/developer-reference/datasource-ecs-images#concept-97e2813" id="29e11e2c9dco0" title="" class="xref">DATASOURCE::ECS::Images</a>: queries available images.</p></li><li id="739dc735b5t1f"><p id="0d9fb06253rsd"><a href="/help/en/ros/developer-reference/datasource-ecs-instances#concept-6d93010" id="713e8cb0ebxqy" title="" class="xref">DATASOURCE::ECS::Instances</a>: queries the details of ECS instances.</p></li><li id="53a3a3b1baijk"><p id="3335aa79ea475"><a href="/help/en/ros/developer-reference/datasource-ecs-keypairs#concept-b1b8a47" id="66cd501a35gvu" title="" class="xref">DATASOURCE::ECS::KeyPairs</a>: queries key pairs.</p></li><li id="7e1ddec450m8l"><p id="e6d589c147ubd"><a href="/help/en/ros/developer-reference/datasource-ecs-networkinterfaces#concept-b5c62b5" id="676961787be4q" title="" class="xref">DATASOURCE::ECS::NetworkInterfaces</a>: queries the details of ENIs.</p></li><li id="0fabf4d944rfe"><p id="550d99a98b620"><a href="/help/en/ros/developer-reference/datasource-ecs-recommendinstancetypes#concept-5906621" id="d631dd3a23973" title="" class="xref">DATASOURCE::ECS::RecommendInstanceTypes</a>: queries ECS instance types.</p></li><li id="64b010b556rba"><p id="36170fdf0ag21"><a href="/help/en/ros/developer-reference/datasource-ecs-securitygroups#concept-e5ffa66" id="fe219c20385e6" title="" class="xref">DATASOURCE::ECS::SecurityGroups</a>: queries the basic information about security groups.</p></li><li id="f03face9a1kcc"><p id="d71c899a8ebjn"><a href="/help/en/ros/developer-reference/datasource-ecs-snapshots#concept-201ff8c" id="c1f4d066141jq" title="" class="xref">DATASOURCE::ECS::Snapshots</a>: queries all snapshots of an ECS instance or a cloud disk.</p></li><li id="585f47114cluv"><p id="c36d084c0ez1y"><a href="/help/en/ros/developer-reference/datasource-ecs-zones#concept-7c1d7d4" id="96ff1492d2j43" title="" class="xref">DATASOURCE::ECS::Zones</a>: queries zones.</p></li><li id="852eba6661lnz"><p id="d8e93989171fm"><a href="/help/en/ros/developer-reference/datasource-ecs-managedinstances#concept-80b6140" id="2e4fe0dd2agip" title="" class="xref">DATASOURCE::ECS::ManagedInstances</a>: queries managed instances.</p></li><li id="65eadf670bpwm"><p id="af1f4f7662snw"><a href="/help/en/ros/developer-reference/datasource-ecs-commands" id="d56a536be5guu" title="" class="xref">DATASOURCE::ECS::Commands</a>: queries all available commands that you created.<a href="/help/en/ros/developer-reference/list-of-resource-types-by-service#50a53ef8b79t7" id="9eb1b202a67to" title="" class="xref">Elastic Compute Service (ECS)</a></p></li><li id="8316d8757fhkp"><p id="d6d3971dcbk2g"><a href="/help/en/ros/developer-reference/datasource-ecs-dedicatedhostclusters-1" id="4aa04e2352w61" title="" class="xref">DATASOURCE::ECS::DedicatedHostClusters</a>: queries information about dedicated host clusters.</p></li><li id="659d2e6f4albp"><p id="df1dd56f6cv6h"><a href="/help/en/ros/developer-reference/datasource-ecs-activations" id="becdc7b1e9fvv" title="" class="xref">DATASOURCE::ECS::Activations</a>: queries activation codes.</p></li><li id="47ef9ea28b8z6"><p id="046d55bf6cpyj"><a href="/help/en/ros/developer-reference/datasource-ecs-activation" id="2b5b18f7462ga" title="" class="xref">DATASOURCE::ECS::Activation</a>: queries the details of an activation code.</p></li><li id="34eda3579dwaa"><p id="ae8b1c8c96zcg"><a href="/help/en/ros/developer-reference/datasource-ecs-autosnapshotpolicy" id="99420b10f79h3" title="" class="xref">DATASOURCE::ECS::AutoSnapshotPolicy</a>: queries the details of an automatic snapshot policy.</p></li><li id="286b1634a8071"><p id="a307ceab08386"><a href="/help/en/ros/developer-reference/datasource-ecs-command" id="e477beb670bfq" title="" class="xref">DATASOURCE::ECS::Command</a>: queries the details of an available command that you created.</p></li><li id="afca16e64akim"><p id="778d51be9au36"><a href="/help/en/ros/developer-reference/datasource-ecs-dedicatedhostcluster" id="9d74f9e402hsv" title="" class="xref">DATASOURCE::ECS::DedicatedHostCluster</a>: queries the details of a dedicated host cluster.</p></li><li id="efd6848aefpci"><p id="d5230f33ed1ao"><a href="/help/en/ros/developer-reference/datasource-ecs-deploymentset" id="ecef74b8f8z4p" title="" class="xref">DATASOURCE::ECS::DeploymentSet</a>: queries the details of a deployment set.</p></li><li id="ae0eda55cdhj1"><p id="7d4f7ebc92hg2"><a href="/help/en/ros/developer-reference/datasource-ecs-disk" id="11e7c37c27jwf" title="" class="xref">DATASOURCE::ECS::Disk</a>: queries the details of a cloud disk.</p></li><li id="203111ed9dw97"><p id="e3d0862cb3uca"><a href="/help/en/ros/developer-reference/datasource-ecs-hpccluster" id="01b5834cfa735" title="" class="xref">DATASOURCE::ECS::HpcCluster</a>: queries the details of an HPC cluster.</p></li><li id="54c72f5393js2"><p id="21bbbf7c45u4k"><a href="/help/en/ros/developer-reference/datasource-ecs-instance" id="621a40038a583" title="" class="xref">DATASOURCE::ECS::Instance</a>: queries the details of an ECS instance.</p></li><li id="b9d266ba31b17"><p id="7fad8c8418adz"><a href="/help/en/ros/developer-reference/datasource-ecs-keypair" id="d730059d9blxe" title="" class="xref">DATASOURCE::ECS::KeyPair</a>: queries the details of a key pair.</p></li><li id="6dc29473cfsij"><p id="50a897cef4wz3"><a href="/help/en/ros/developer-reference/datasource-ecs-launchtemplate" id="c716c6b0bfas6" title="" class="xref">DATASOURCE::ECS::LaunchTemplate</a>: queries the details of a launch template.</p></li><li id="7d5318dbcfbky"><p id="6655b898aay12"><a href="/help/en/ros/developer-reference/datasource-ecs-securitygroup" id="c681debbe19l1" title="" class="xref">DATASOURCE::ECS::SecurityGroup</a>: queries the details of a security group.</p></li><li id="1f8fc8828bzlx"><p id="64267e430bi2m"><a href="/help/en/ros/developer-reference/datasource-ecs-snapshot" id="ae4389e64dw5c" title="" class="xref">DATASOURCE::ECS::Snapshot</a>: queries the details of a snapshot.</p></li><li id="a8252c0bbf1mp"><p id="7b99de3690mqv"><a href="/help/en/ros/developer-reference/datasource-ecs-launchtemplates" id="f06eec01f7dfc" title="" class="xref">DATASOURCE::ECS::LaunchTemplates</a>: queries available launch templates.</p></li></ul></div></div></li></ul></section><h2 id="b315ca77a4ivf"><b>Example</b></h2><p id="1e100fc339aim">This section describes how to create an ECS instance based on a predefined <span id="ec1c13862celc" outputclass="productName" data-tag="ph" data-ref-searchable="yes" data-reuse-tag="productSimpleName" data-type="productSimpleName" data-product-code="ros" docid="4265504" class="ph productName">ROS</span> template. </p><section id="4919bbd030m4k" class="section"><h3 id="4ac792e030vq8"><b>Permissions</b></h3><p id="6a10367979pn9">By default, <span id="218f173752s8x" outputclass="productName" data-tag="ph" data-ref-searchable="yes" data-reuse-tag="productSimpleName" data-type="productSimpleName" data-product-code="ros" docid="4265504" class="ph productName">ROS</span> uses the credentials of the user logged on to the <span id="43e7c09f31csr" outputclass="productName" data-tag="ph" data-ref-searchable="yes" data-reuse-tag="productSimpleName" data-type="productSimpleName" data-product-code="ros" docid="4265504" class="ph productName">ROS</span> console. If you log on to the <span id="a029a98d9f486" outputclass="productName" data-tag="ph" data-ref-searchable="yes" data-reuse-tag="productSimpleName" data-type="productSimpleName" data-product-code="ros" docid="4265504" class="ph productName">ROS</span> console by using an Alibaba Cloud account, you do not need to obtain the permissions described in the following table. If you log on to the <span id="a8d5549f36e9i" outputclass="productName" data-tag="ph" data-ref-searchable="yes" data-reuse-tag="productSimpleName" data-type="productSimpleName" data-product-code="ros" docid="4265504" class="ph productName">ROS</span> console as a RAM user, the user must obtain the required permissions. The following table describes the permissions.</p><table id="e1b0f7acc95tg" tablewidth="1376" tablecolswidth="431 945" autofit="true" class="table"><colgroup colwidth="0.63*" style="width:31.32%"></colgroup><colgroup colwidth="1.37*" style="width:68.68%"></colgroup><tbody class="tbody"><tr id="d40559b02f8mf"><td id="9b715cad00qd5" rowspan="1" style="background-color:#e5e5e5" colspan="1"><p id="fbe116f3feh2n"><b>Alibaba Cloud service</b></p></td><td id="d96444fd85046" rowspan="1" style="background-color:#e5e5e5" colspan="1"><p id="131bd83c3952y"><b>Required permission</b></p></td></tr><tr id="7783b24e0dxhp"><td id="cd8fefa7e7u0b" rowspan="1" colspan="1"><p id="15d543a25aj61"><span id="d0d5e9aab5nz0" outputclass="productName" data-tag="ph" data-ref-searchable="yes" data-reuse-tag="productName" data-type="productName" data-product-code="vpc" docid="3760747" data-source="reuse_library" class="ph productName">Virtual Private Cloud</span></p></td><td id="f1b4847534c4u" rowspan="1" colspan="1"><p id="4ac808281fgi1"><b>AliyunVPCFullAccess</b>: the permissions to query VPCs and vSwitches and create elastic IP addresses (EIPs). </p></td></tr><tr id="4043d6d8e52aw"><td id="0b7b5ccd62rwz" rowspan="1" colspan="1"><p id="ae039cb25b155"><span id="b1d4975ee2818" outputclass="productName" data-tag="ph" data-ref-searchable="yes" data-reuse-tag="productName" data-type="productName" data-product-code="ecs" docid="3727597" data-source="reuse_library" class="ph productName">Elastic Compute Service</span></p></td><td id="36cdbf75b46qo" rowspan="1" colspan="1"><p id="4698c8f5e1x7k"><b>AliyunECSFullAccess</b>: the permissions to create and manage ECS resources, such as ECS instances. </p></td></tr><tr id="9e0d07d497f80"><td id="24b2c9e124p5k" rowspan="1" colspan="1"><p id="ce6575095dy9c"><span id="ba2e28b1d2mdy" outputclass="productName" data-tag="ph" data-ref-searchable="yes" data-reuse-tag="productName" data-type="productName" data-product-code="ros" docid="3760840" data-source="reuse_library" class="ph productName">Resource Orchestration Service</span></p></td><td id="f69adbdcd2u2i" rowspan="1" colspan="1"><p id="0fd736fd78w7j"><b>AliyunROSFullAccess</b>: the permissions to create and manage ROS resources, such as stacks. </p></td></tr><tr id="f06396fe0bt46"><td id="0405741254z2j" rowspan="1" colspan="1"><p id="4ce1646aa1apx"><span id="715feb3309y8w" outputclass="productName" data-tag="ph" data-ref-searchable="yes" data-reuse-tag="productName" data-type="productName" data-product-code="eip" docid="3760723" data-source="reuse_library" class="ph productName">Elastic IP Address</span></p></td><td id="fa37568372tmv" rowspan="1" colspan="1"><p id="23254dfc7f6v9"><b>AliyunEIPFullAccess</b>: the permissions to create and manage EIPs. </p></td></tr></tbody></table></section><section id="f8b316a0a5uni" class="section"><h3 id="7598738f7dgn9"><b>Required resources</b></h3><p id="0f21b47c68j4b">The following figure shows the architecture of resources required by the <span id="3373e9e324tvl" outputclass="productName" data-tag="ph" data-ref-searchable="yes" data-reuse-tag="productName" data-type="productName" data-product-code="ecs" docid="3727597" data-source="reuse_library" class="ph productName">Elastic Compute Service</span> instance that you want to create.</p><ul id="abc1b1731esae"><li id="b301f0bee8ph4"><p id="e8ea0621e7zey"><b>Region: </b>Select the region in which you want to create an ECS instance. The region that you select in the ECS console is automatically used. You do not need to specify a region. </p></li><li id="a48a947522e1g"><p id="b8e34cb6cbdvw"><b>Network and zone: </b>Alibaba Cloud provides a default VPC per region and a default vSwitch per zone in each default VPC. </p></li><li id="c029c042f11nb"><p id="1e9070bd4cz6j"><b>Instance type</b>: Select an instance type, such as an instance type that has 2 vCPUs and 4 GiB of memory. </p></li><li id="d822f74f7bv3o"><p id="7a60637b46lat"><b>Image: </b>Select an image, such as an Alibaba Cloud Linux image or a Windows Server image. An image contains the operating system and provisioned data that are required to start and run an ECS instance. </p></li><li id="96925645ecp3y"><p id="f5053be446ofe"><b>Storage: </b>Configure Elastic Block Storage (EBS) devices as the system disk and data disks of the ECS instance based on your business requirements. </p></li><li id="ca0641f192f6o"><p id="c7215a76efbin"><b>EIP: </b>Create an EIP for the ECS instance. The instance can be accessed by using the EIP. </p></li><li id="144585dd0a7fu"><p id="7f8c08884f2go"><b>Security group</b>: Select or create a security group for the ECS instance. A security group serves as a virtual firewall to control inbound and outbound traffic for ECS instances. </p></li><li id="0f26ae8ec2tum"><p id="feff86e0a43ya"><b>Key pair</b>: Select or create a key pair for the ECS instance. Alibaba Cloud provides the secure and convenient key pair-based authentication method for logons to ECS instances. Key pairs are security credentials used for authentication. After you create a key pair, the public key is stored on the ECS instance, and the private key is stored on your on-premises computer. </p><hetu type="flowchart" id="10b7955a240cf" origintagname="foreign" uuid="4553391_20240801095024.466" versionid="CAEQLhiBgICQrob5lRkiIGQxNmRjMTZkODkxYTRkYzU4MjAxZWEyZWE4NTFhNTI0" comment_59e14ef3-a91a-4045-8e29-fdd7d8f45cad="comment" translate="yes" hetuid="4a8acbbb-989d-40e6-89cf-a65752f5b38c"><img src="https://help-static-aliyun-doc.aliyuncs.com/assets/img/en-US/1856336371/CAEQLhiBgICQrob5lRkiIGQxNmRjMTZkODkxYTRkYzU4MjAxZWEyZWE4NTFhNTI04553391_20240801095024.466.svg" alt="image" class="image break flowchart hetu"></hetu></li></ul><p id="9c4405885fv6f">The preceding resources correspond to the following <span id="f09d981fbacfz" outputclass="productName" data-tag="ph" data-ref-searchable="yes" data-reuse-tag="productName" data-type="productName" data-product-code="ros" docid="3760840" data-source="reuse_library" class="ph productName">Resource Orchestration Service</span> resources:</p><ul id="2bd653df98omi"><li id="0d0943174584h"><p id="56afdf6af07gn"><b>Region: </b>The region that you select in the ROS console is automatically used. You do not need to specify a region. </p></li><li id="42b3ebc4ddm97"><p id="a883bf69cfsnn"><b>Network and zone: </b><a href="/help/en/ros/developer-reference/aliyun-ecs-vpc" id="b60caf41c8d54" title="" class="xref">ALIYUN::ECS::VPC</a>.</p></li><li id="15168b2d7a7fi"><p id="e4684bd8b2458"><b>Instance type: </b><a href="/help/en/ros/developer-reference/datasource-ecs-instance" id="797188c402rbq" title="" class="xref">DATASOURCE::ECS::Instance</a>.</p></li><li id="bb71f30aedtqd"><p id="c067e2b672mx8"><b>Image: </b><a href="/help/en/ros/developer-reference/datasource-ecs-images" id="126f2ff9ffezf" title="" class="xref">DATASOURCE::ECS::Images</a>.</p></li><li id="b9e483f734bcs"><p id="f92ba5a765v0e"><b>Storage: </b><a href="/help/en/ros/developer-reference/aliyun-ecs-disk" id="cc6b276aa9u38" title="" class="xref">ALIYUN::ECS::Disk</a>.</p></li><li id="df254af944fac"><p id="9acd54e9e44tc"><b>EIP: </b><a href="/help/en/ros/developer-reference/aliyun-vpc-eip#concept-cxc-v5n-jgb" id="93a0cfd6a89k1" title="" class="xref">ALIYUN::VPC::EIP</a>.</p></li><li id="3b0ecb7fb1msx"><p id="545a0e91e4fjq"><b>Security group: </b><a href="/help/en/ros/developer-reference/aliyun-ecs-securitygroup" id="974c5e9fddst2" title="" class="xref">ALIYUN::ECS::SecurityGroup</a>.</p></li><li id="1aa39978b5uso"><p id="a57078daecvdi"><b>Key pair</b>: <a href="/help/en/ros/developer-reference/datasource-ecs-keypair" id="420e93bb5fd2z" title="" class="xref">DATASOURCE::ECS::KeyPair</a>.</p></li></ul></section><section id="5310d9c030xzv" class="section"><h3 id="58a8471030xmb"><b>Create a stack</b></h3><div type="note" id="f0b3f6d489u76" class="note note-note"><div class="note-icon-wrapper"><i class="icon-note note note"></i></div><div class="noteContentSpan"><strong>Note </strong><p id="3da2058bc8mn3">Click <span id="af999730b0yii" data-tag="help-deploy-button" deploy-id="218" outputclass="help-deploy-button" class="help-deploy-button">Quick Deploy</span> and perform the following operations. </p></div></div><ol id="5e01e81030sca" start="1"><li id="5e01e811306jj"><p id="8319330d81amn">Log on to the <a href="https://rosnext.console.aliyun.com/cn-shanghai/stacks" id="5bcc7af02b7og" class="" target="_blank">ROS console</a>. In the top navigation bar, select a region from the <b data-tag="uicontrol" id="967348002b9qh" class="uicontrol">Region</b> drop-down list. </p></li><li id="99dfbf002bksm"><p id="639b998b7aqfq">In the left-side navigation pane, click <b data-tag="uicontrol" id="9d07b2f02b4ld" class="uicontrol">Stacks</b>. On the Stacks page, choose <b data-tag="uicontrol" id="a8f793a02b819" class="uicontrol">Create Stack</b>. On the Create Stack page, configure the Specify Template parameter. In this example, the Specify Template parameter is set to Use a Sample Template. In this case, you must select a sample template provided by ROS from the Sample Templates drop-down list.<img id="65ed40d3f13y1" src="https://help-static-aliyun-doc.aliyuncs.com/assets/img/en-US/0386816371/p859457.png" alt="image" placement="break" width="500" class="image break"> </p></li><li id="ea58b81dc1tlk"><p id="dd9b4f9c4c2hn">Confirm the template content in the <b data-tag="uicontrol" id="124cd430b89lq" class="uicontrol">Template Content</b> code editor and click <b data-tag="uicontrol" id="9f57235a9bm3k" class="uicontrol">Next</b>. </p><section id="b39344c4cc9i5" class="section"><p id="a51b1a0466vx8">In this example, a sample template that uses an existing VPC, vSwitch, and security group is selected to create two ECS instances and associate EIPs with the instances. The following code snippets show the sample template content in the YAML and JSON formats:</p><div id="95ad2f9e35hka" outputclass="collapse" class="collapse"><p id="e51b94ad51tld" data-tag="expandable-title" class="expandable-title"><b>Template content in YAML format</b></p><div id="17835c6313bwq" data-tag="expandable-content" class="expandable-content"><pre code-type="xCode" id="6880496fd3z56" data-tag="codeblock" outputclass="language-yaml" class="pre codeblock language-yaml"><code>ROSTemplateFormatVersion: '2015-09-01' Description: en: Use Count to create a VPC type ECS, and then bind EIP (existing VPC). Parameters: VPC: Type: String Label: en: VPC ID Description: en: Please search the ID starting with (vpc-xxx)from console-Virtual Private Cloud AssociationProperty: ALIYUN::ECS::VPC::VPCId VSwitch: Type: String Label: en: VSwitch ID Description: en: Existing VSwitch ID, query under console-VPC-VSwitch, <font color='red'>VSwitch must be under VPC. ECS will be created under this VSwitch</font> AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId AssociationPropertyMetadata: VpcId: ${VPC} ZoneId: ${ECSZoneId} SecurityGroup: Type: String Label: en: Business Security Group ID Description: en: Please search the business security group ID starting with(sg-xxx)from console-ECS-Network & Security </font> AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId AssociationPropertyMetadata: VpcId: ${VPC} EIPBandwidth: Type: Number Label: en: EIP Bandwidth Description: en: 'EIP Bandwidth, Value range: [1,200], unit: Mbps.' Default: 2 MinValue: 1 MaxValue: 200 EIPInternetChargeType: Type: String Label: en: EIP Charge Type AssociationPropertyMetadata: LocaleKey: InternetChargeType Default: PayByTraffic AllowedValues: - PayByBandwidth - PayByTraffic Count: Type: Number Label: en: Count Description: en: 'The number of ecs and eip to be created, value range: [1,140]' Default: 1 MinValue: 1 MaxValue: 140 ECSZoneId: Type: String Label: en: VSwitch Availability Zone Description: en: 'Availability zone ID.<br><b>Note: <font color=''blue''>Before selecting, please confirm whether the availability zone supports the specification of creating ECS resources. It is recommended to be different from other switch availability zones</font></b ><br><font color=''red''>The switch availability zone and the selected switch instance ID must be in the same availability zone.</font>' </font> AssociationProperty: ALIYUN::ECS::Instance:ZoneId ECSImageId: Type: String Label: en: Image Description: en: Image ID. Use a CentOS 7 image. For more information, see <b><a href='https://www.alibabacloud.com/help/en/doc-detail/112977.html' target='_blank'><font color='blue'>Find an image</font></a></b>. AssociationProperty: ALIYUN::ECS::Image::ImageId AssociationPropertyMetadata: InstanceType: ${ECSInstanceType} SupportedImageOwnerAlias: - system - self - others Default: centos_7_04_64_20G_alibase_201701015.vhd ECSInstanceType: Type: String Label: en: Instance Type Description: en: <font color='blue'><b>1.Before selecting the model please confirm that the current available zone under the model is in stock, some models need to be reported in advance</b></font><br><font color='blue'><b>2.List of optional models</font><br></b></font>[ecs.c5.large <font color='green'>2vCPU 4GiB Intranet bandwidth1Gbps In-grid sending and receiving packages30MillionPPS</font>]<br></b>[ecs.c5.xlarge <font color='green'>4vCPU 8GiB Intranet bandwidth1.5Gbps In-grid sending and receiving packages50MillionPPS</font>]<br></b>[ecs.c5.2xlarge <font color='green'>8vCPU 16GiB Intranet bandwidth2.5Gbps In-grid sending and receiving packages80MillionPPS</font>] AssociationProperty: ALIYUN::ECS::Instance::InstanceType AssociationPropertyMetadata: ZoneId: ECSZoneId ECSDiskCategory: Type: String Label: en: System Disk Type Description: en: '<font color=''blue''><b>Optional values:</b></font><br>[cloud_efficiency: <font color=''green''>Efficient Cloud Disk</font>]<br>[cloud_ssd: <font color=''green''>SSD Cloud Disk</font>]<br>[cloud_essd: <font color=''green''>ESSD Cloud Disk</font>]<br>[cloud: <font color=''green''>Cloud Disk</font>]<br>[ephemeral_ssd: <font color=''green''>Local SSD Cloud Disk</font>]' AssociationProperty: ALIYUN::ECS::Disk::SystemDiskCategory AssociationPropertyMetadata: LocaleKey: DiskCategory InstanceType: ${ECSInstanceType} ECSSysDiskSize: Type: Number Label: en: System Disk Space Description: en: 'System disk size, range of values: 40-500, units: GB.' Default: 40 MinValue: 40 MaxValue: 500 ECSPassword: Type: String Label: en: Instance Password Description: en: Server login password, Length 8-30, must contain three(Capital letters, lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in). ConstraintDescription: en: Length 8-30, must contain three(Capital letters, lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in). Default: Null AllowedPattern: '[0-9A-Za-z\_\-\&:;''<>,=%`~!@#\(\)\$\^\*\+\|\{\}\[\]\.\?\/]+$' MinLength: 8 MaxLength: 30 NoEcho: true KeyPairName: Type: String Label: en: Key Pair Name Description: en: If it is a Windows ECS instance, ignore this parameter. The default is blank.<br>If you have filled in <font color='green'>key pair name</font>, <font color='green'>instance password< The content of /font> will still be set in the instance, but the password login method in the Linux system will be forbidden.<br><font color='red'>Please enter the name of the existing key pair. If you use the instance password Login, the key pair name does not need to be filled in</font> AssociationProperty: ALIYUN::ECS::KeyPair::KeyPairName Default: Null PayType: Type: String Label: en: ECS Instance Charge Type AssociationProperty: ChargeType AssociationPropertyMetadata: LocaleKey: InstanceChargeType Default: PostPaid AllowedValues: - PostPaid - PrePaid PayPeriodUnit: Type: String Label: en: Pay Period Unit AssociationProperty: PayPeriodUnit AssociationPropertyMetadata: Visible: Condition: Fn::Not: Fn::Equals: - ${PayType} - PostPaid Default: Month AllowedValues: - Month - Year PayPeriod: Type: Number Label: en: Period AssociationProperty: PayPeriod AssociationPropertyMetadata: Visible: Condition: Fn::Not: Fn::Equals: - ${PayType} - PostPaid Default: 1 AllowedValues: - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 Resources: ECSInstanceGroup: Type: ALIYUN::ECS::InstanceGroup Properties: ZoneId: Ref: ECSZoneId VpcId: Ref: VPC VSwitchId: Ref: VSwitch SecurityGroupId: Ref: SecurityGroup ImageId: Ref: ECSImageId AllocatePublicIP: 'false' InstanceChargeType: Ref: PayType Period: Ref: PayPeriod PeriodUnit: Ref: PayPeriodUnit InstanceType: Ref: ECSInstanceType IoOptimized: optimized KeyPairName: Ref: KeyPairName MaxAmount: Ref: Count Password: Ref: ECSPassword SystemDiskCategory: Ref: ECSDiskCategory SystemDiskSize: Ref: ECSSysDiskSize ElasticIp: Type: ALIYUN::VPC::EIP Properties: Bandwidth: Ref: EIPBandwidth InternetChargeType: Ref: EIPInternetChargeType Count: Ref: Count ElasticIpAssociation: Type: ALIYUN::VPC::EIPAssociation Properties: InstanceId: Fn::Select: - Ref: ALIYUN::Index - Fn::GetAtt: - ECSInstanceGroup - InstanceIds AllocationId: Fn::Select: - Ref: ALIYUN::Index - Ref: ElasticIp Count: Ref: Count Outputs: EipAddress: Description: IP address of created EIP. Value: Fn::GetAtt: - ElasticIp - EipAddress SecurityGroupId: Description: generated security group id for security group. Value: Ref: SecurityGroup VSwitchId: Description: generated security vswitch id for VPC. Value: Ref: VSwitch VpcId: Description: generated security vpc id for VPC. Value: Ref: VPC Metadata: ALIYUN::ROS::Interface: ParameterGroups: - Parameters: - VPC - ECSZoneId - VSwitch - SecurityGroup Label: default: 'VPC ' - Parameters: - EIPBandwidth - EIPInternetChargeType Label: default: EIP - Parameters: - PayType - PayPeriodUnit - PayPeriod Label: default: en: ECS PayType Configuration - Parameters: - ECSInstanceType - ECSImageId - ECSDiskCategory - ECSSysDiskSize - Count - ECSPassword - KeyPairName Label: default: ECS TemplateTags: - acs:example:Elastic Computing:Specify the Count parameter to create ECS instances in an existing VPC and associate EIPs with the instances</code></pre></div></div><div id="83a21709826zy" outputclass="collapse" class="collapse"><p id="2a1da516e67yh" data-tag="expandable-title" class="expandable-title"><b>Template content in JSON format</b></p><div id="3b05a75f9b19d" data-tag="expandable-content" class="expandable-content"><pre data-tag="codeblock" outputclass="language-json" code-type="xCode" id="02bb11b626x1m" class="pre codeblock language-json"><code>{ "ROSTemplateFormatVersion": "2015-09-01", "Description": { "en": "Use Count to create a VPC type ECS, and then bind EIP (existing VPC).", }, "Parameters": { "VPC": { "Type": "String", "Label": { "en": "VPC ID", }, "Description": { "en": "Please search the ID starting with (vpc-xxx)from console-Virtual Private Cloud", }, "AssociationProperty": "ALIYUN::ECS::VPC::VPCId" }, "VSwitch": { "Type": "String", "Label": { "en": "VSwitch ID", }, "Description": { "en": "Existing VSwitch ID, query under console-VPC-VSwitch, <font color='red'>VSwitch must be under VPC. ECS will be created under this VSwitch</font>", }, "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId", "AssociationPropertyMetadata": { "VpcId": "${VPC}", "ZoneId": "${ECSZoneId}" } }, "SecurityGroup": { "Type": "String", "Label": { "en": "Business Security Group ID", }, "Description": { "en": "Please search the business security group ID starting with(sg-xxx)from console-ECS-Network & Security", </font>" }, "AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId", "AssociationPropertyMetadata": { "VpcId": "${VPC}" } }, "EIPBandwidth": { "Type": "Number", "Label": { "en": "EIP Bandwidth", }, "Description": { "en": "EIP Bandwidth, Value range: [1,200], unit: Mbps.", }, "Default": 1, "MinValue": 1, "MaxValue": 200 }, "EIPInternetChargeType": { "Type": "String", "Label": { "en": "EIP Charge Type", }, "AssociationPropertyMetadata": { "LocaleKey": "InternetChargeType" }, "Default": "PayByTraffic", "AllowedValues": [ "PayByBandwidth", "PayByTraffic" ] }, "Count": { "Type": "Number", "Label": { "en": "Count", }, "Description": { "en": "The number of ecs and eip to be created, value range: [1,140]", }, "Default": 2, "MinValue": 1, "MaxValue": 140 }, "ECSZoneId": { "Type": "String", "Label": { "en": "VSwitch Availability Zone", }, "Description": { "en": "Availability zone ID.<br><b>Note: <font color='blue'>Before selecting, please confirm whether the availability zone supports the specification of creating ECS resources. It is recommended to be different from other switch availability zones</font></b ><br><font color='red'>The switch availability zone and the selected switch instance ID must be in the same availability zone.</font>", </font>" }, "AssociationProperty": "ALIYUN::ECS::Instance:ZoneId" }, "ECSImageId": { "Type": "String", "Label": { "en": "Image", }, "Description": { "en": "Image ID. Use a CentOS 7 image. For more information, see <b><a href='https://www.alibabacloud.com/help/en/doc-detail/112977.html' target='_blank'><font color='blue'>Find the image</font></a></b>", }, "AssociationProperty": "ALIYUN::ECS::Image::ImageId", "AssociationPropertyMetadata": { "InstanceType": "${ECSInstanceType}", "SupportedImageOwnerAlias": [ "system", "self", "others" ] }, "Default": "centos_7_04_64_20G_alibase_201701015.vhd" }, "ECSInstanceType": { "Type": "String", "Label": { "en": "Instance Type", }, "Description": { "en": "<font color='blue'><b>1.Before selecting the model please confirm that the current available zone under the model is in stock, some models need to be reported in advance</b></font><br><font color='blue'><b>2.List of optional models</font><br></b></font>[ecs.c5.large <font color='green'>2vCPU 4GiB Intranet bandwidth1Gbps In-grid sending and receiving packages30MillionPPS</font>]<br></b>[ecs.c5.xlarge <font color='green'>4vCPU 8GiB Intranet bandwidth1.5Gbps In-grid sending and receiving packages50MillionPPS</font>]<br></b>[ecs.c5.2xlarge <font color='green'>8vCPU 16GiB Intranet bandwidth2.5Gbps In-grid sending and receiving packages80MillionPPS</font>]", }, "AssociationProperty": "ALIYUN::ECS::Instance::InstanceType", "AssociationPropertyMetadata": { "ZoneId": "ECSZoneId" } }, "ECSDiskCategory": { "Type": "String", "Label": { "en": "System Disk Type", }, "Description": { "en": "<font color='blue'><b>Optional values:</b></font><br>[cloud_efficiency: <font color='green'>Efficient Cloud Disk</font>]<br>[cloud_ssd: <font color='green'>SSD Cloud Disk</font>]<br>[cloud_essd: <font color='green'>ESSD Cloud Disk</font>]<br>[cloud: <font color='green'>Cloud Disk</font>]<br>[ephemeral_ssd: <font color='green'>Local SSD Cloud Disk</font>]", }, "AssociationProperty": "ALIYUN::ECS::Disk::SystemDiskCategory", "AssociationPropertyMetadata": { "LocaleKey": "DiskCategory", "InstanceType": "${ECSInstanceType}" } }, "ECSSysDiskSize": { "Type": "Number", "Label": { "en": "System Disk Space", }, "Description": { "en": "System disk size, range of values: 40-500, units: GB.", }, "Default": 40, "MinValue": 40, "MaxValue": 500 }, "ECSPassword": { "Type": "String", "Label": { "en": "Instance Password", }, "Description": { "en": "Server login password, Length 8-30, must contain three(Capital letters, lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in).", }, "ConstraintDescription": { "en": "Length 8-30, must contain three(Capital letters, lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in).", }, "Default": null, "AllowedPattern": "[0-9A-Za-z\\_\\-\\&:;'<>,=%`~!@#\\(\\)\\$\\^\\*\\+\\|\\{\\}\\[\\]\\.\\?\\/]+$", "MinLength": 8, "MaxLength": 30, "NoEcho": true }, "KeyPairName": { "Type": "String", "Label": { "en": "Key Pair Name", }, "Description": { "en": "If it is a Windows ECS instance, ignore this parameter. The default is blank.<br>If you have filled in <font color='green'>key pair name</font>, <font color='green'>instance password< The content of /font> will still be set in the instance, but the password login method in the Linux system will be forbidden.<br><font color='red'>Please enter the name of the existing key pair. If you use the instance password Login, the key pair name does not need to be filled in</font>", }, "AssociationProperty": "ALIYUN::ECS::KeyPair::KeyPairName", "Default": null }, "PayType": { "Type": "String", "Label": { "en": "ECS Instance Charge Type", }, "AssociationProperty": "ChargeType", "AssociationPropertyMetadata": { "LocaleKey": "InstanceChargeType" }, "Default": "PostPaid", "AllowedValues": [ "PostPaid", "PrePaid" ] }, "PayPeriodUnit": { "Type": "String", "Label": { "en": "Pay Period Unit", }, "AssociationProperty": "PayPeriodUnit", "AssociationPropertyMetadata": { "Visible": { "Condition": { "Fn::Not": { "Fn::Equals": [ "${PayType}", "PostPaid" ] } } } }, "Default": "Month", "AllowedValues": [ "Month", "Year" ] }, "PayPeriod": { "Type": "Number", "Label": { "en": "Period", }, "AssociationProperty": "PayPeriod", "AssociationPropertyMetadata": { "Visible": { "Condition": { "Fn::Not": { "Fn::Equals": [ "${PayType}", "PostPaid" ] } } } }, "Default": 1, "AllowedValues": [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ] } }, "Resources": { "ECSInstanceGroup": { "Type": "ALIYUN::ECS::InstanceGroup", "Properties": { "ZoneId": { "Ref": "ECSZoneId" }, "VpcId": { "Ref": "VPC" }, "VSwitchId": { "Ref": "VSwitch" }, "SecurityGroupId": { "Ref": "SecurityGroup" }, "ImageId": { "Ref": "ECSImageId" }, "AllocatePublicIP": "false", "InstanceChargeType": { "Ref": "PayType" }, "Period": { "Ref": "PayPeriod" }, "PeriodUnit": { "Ref": "PayPeriodUnit" }, "InstanceType": { "Ref": "ECSInstanceType" }, "IoOptimized": "optimized", "KeyPairName": { "Ref": "KeyPairName" }, "MaxAmount": { "Ref": "Count" }, "Password": { "Ref": "ECSPassword" }, "SystemDiskCategory": { "Ref": "ECSDiskCategory" }, "SystemDiskSize": { "Ref": "ECSSysDiskSize" } } }, "ElasticIp": { "Type": "ALIYUN::VPC::EIP", "Properties": { "Bandwidth": { "Ref": "EIPBandwidth" }, "InternetChargeType": { "Ref": "EIPInternetChargeType" } }, "Count": { "Ref": "Count" } }, "ElasticIpAssociation": { "Type": "ALIYUN::VPC::EIPAssociation", "Properties": { "InstanceId": { "Fn::Select": [ { "Ref": "ALIYUN::Index" }, { "Fn::GetAtt": [ "ECSInstanceGroup", "InstanceIds" ] } ] }, "AllocationId": { "Fn::Select": [ { "Ref": "ALIYUN::Index" }, { "Ref": "ElasticIp" } ] } }, "Count": { "Ref": "Count" } } }, "Outputs": { "EipAddress": { "Description": "IP address of created EIP.", "Value": { "Fn::GetAtt": [ "ElasticIp", "EipAddress" ] } }, "SecurityGroupId": { "Description": "generated security group id for security group.", "Value": { "Ref": "SecurityGroup" } }, "VSwitchId": { "Description": "generated security vswitch id for VPC.", "Value": { "Ref": "VSwitch" } }, "VpcId": { "Description": "generated security vpc id for VPC.", "Value": { "Ref": "VPC" } } }, "Metadata": { "ALIYUN::ROS::Interface": { "ParameterGroups": [ { "Parameters": [ "VPC", "ECSZoneId", "VSwitch", "SecurityGroup" ], "Label": { "default": "VPC " } }, { "Parameters": [ "EIPBandwidth", "EIPInternetChargeType" ], "Label": { "default": "EIP" } }, { "Parameters": [ "PayType", "PayPeriodUnit", "PayPeriod" ], "Label": { "default": { "en": "ECS PayType Configuration", } } }, { "Parameters": [ "ECSInstanceType", "ECSImageId", "ECSDiskCategory", "ECSSysDiskSize", "Count", "ECSPassword", "KeyPairName" ], "Label": { "default": "ECS" } } ], "TemplateTags": [ "acs:example:Elastic Computing:Specify the Count parameter to create ECS instances in an existing VPC and associate EIPs with the instances" ] } } }</code></pre></div></div></section></li><li id="4da0e73ae28s5"><p id="43feb664136f3">Follow the on-screen instructions to configure the parameters, such as VPC ID, VSwitch Availability Zone, VSwitch ID, and Business Security Group ID, based on your business requirements. Then, click <b data-tag="uicontrol" id="146c3faa6dywe" class="uicontrol">Create</b> to create a stack. </p></li><li id="b94c73b888wby"><p id="b4b964e9d3v18">View the result. </p><p id="7f59672327g81"><img id="dd5e1ef938o08" src="https://help-static-aliyun-doc.aliyuncs.com/assets/img/en-US/9600779271/p853150.png" alt="image" placement="break" class="image break"></p></li><li id="5c69eacdfee6p"><p id="36d4b40a9arhg">When the stack is created, ECS instances are created based on the template specified in the stack and enter the <code data-tag="code" code-type="xCode" class="code">Running</code> state. You can view the instances in the ECS console, by calling an API operation, or by using an SDK.<img id="81d209572ej37" src="https://help-static-aliyun-doc.aliyuncs.com/assets/img/en-US/9600779271/p853171.png" alt="image" placement="break" class="image break"> </p></li></ol></section><section id="347c784197p54" class="section"><h2 id="524fe70587mbn">References</h2><p id="5b88c9c912ne7"><span id="454ad359a9va1" outputclass="productName" data-tag="ph" data-ref-searchable="yes" data-reuse-tag="productSimpleName" data-type="productSimpleName" data-product-code="ros" docid="4265504" class="ph productName">ROS</span> allows you to deploy resources with a few clicks in various scenarios, such as environment building, website building, application building, and Artificial Intelligence Generated Content (AIGC) practices. For information about more use cases for <span id="4b1937791eb14" outputclass="productName" data-tag="ph" data-ref-searchable="yes" data-reuse-tag="productSimpleName" data-type="productSimpleName" data-product-code="ros" docid="4265504" class="ph productName">ROS</span>, see the following topics:</p><ul id="95d71a32bcp2e"><li id="20d6c128073fu"><p id="2f708fb1c239o"><a href="/help/en/ecs/user-guide/step-1-create-a-vpc-that-supports-ipv6-addressing" id="a0772f9e0cw74" title="" class="xref">IPv6 communication</a></p></li><li id="810d26aac2wqz"><p id="b8546df673m7r"><a href="/help/en/ecs/use-cases/install-and-use-docker" id="a782a3f1bbyw7" title="" class="xref">Install Docker</a></p></li><li id="4931d35117rxx"><p id="054b826ffcrfz"><a href="/help/en/ecs/use-cases/manually-deploy-mysql-on-an-ecs-instance-that-runs-centos" id="742eef4c6bk5x" title="" class="xref">Deploy MySQL on a Linux instance</a></p></li><li id="e87a4133f9xde"><p id="e3e220fa5d94t"><a href="/help/en/ecs/use-cases/use-ros-to-deploy-an-lnmp-stack" id="cfe9aca71ep0d" title="" class="xref">Use ROS to deploy an LNMP stack</a></p></li><li id="59184a2e9dwxt"><p id="5513f13554ygr"><a href="/help/en/ecs/summary-of-website-building-methods#p-ghj-tfo-ndv" id="561b04f322vmj" title="" class="xref">Build a WordPress website by using ROS</a></p></li><li id="513a5f3f73thd"><p id="6d3e175d9bkmu"><a href="/help/en/ecs/use-cases/manually-build-an-ftp-site-on-a-linux-instance" id="1fbc6b8901cw9" title="" class="xref">Build an FTP site on a Linux instance</a></p></li><li id="82dd6ca5cf1sa"><p id="19cbd2111f48q"><a href="/help/en/ecs/use-cases/build-a-hadoop-environment" id="5346243146sa0" title="" class="xref">Build a Hadoop environment</a></p></li><li id="9b633c1bef5n8"><p id="867f16b1d9b82"><a href="/help/en/ecs/use-cases/manually-deploy-a-java-web-environment-using-tomcat" id="420f3f31damq6" title="" class="xref">Deploy a Java web environment on an instance that runs Alibaba Cloud Linux 2, Alibaba Cloud Linux 3, or CentOS 7.x</a></p></li><li id="b39b1c2160zf5"><p id="a95d3f95e2396"><a href="/help/en/ecs/use-cases/deploying-and-using-svn" id="28dc720d494cn" title="" class="xref">Deploy and use SVN</a></p></li><li id="00c2d81635o5s"><p id="a4ae4add566ou"><a href="/help/en/ros/use-cases/connect-an-ecs-instance-to-an-apsaradb-rds-instance-to-initialize-data" id="e01b5e7dfdl6y" title="" class="xref">Connect an ECS instance to an ApsaraDB RDS instance to initialize data</a></p></li></ul></section></div></main> </div> </article> <script type="text/javascript"> window.storeDocs = { language: '$lang', docGithubLink: '$!githubInfo.url' } </script> <div class="nav-footer"> </div> <div class="alicloud-document-ask clearfix"></div> <div class="feedback-message" style="display:none;"> <span class="hasfeedback acon acon-done-16"></span> Thank you! We've received your feedback. </div> </div> <div class="col-log-2 col-md-2 col-sm-0 col-xs-0 nav-catalog"> <div class="article-catalog" id="articleCatalog"></div> </div> </div> </section> </div> </div> </div> <script src="//g.alicdn.com/aliyun-help/help-intl-portal-fe/0.3.51/js/index.js"></script> <script src="https://cloud-assets.alicdn.com/alicdn/dawn/user-tracker/latest/js/index.js"></script> </body> </html>