All Products
Search
Document Center

ENS:Resource integration using ROS

Last Updated:Dec 04, 2025

You can use Resource Orchestration Service (ROS) to call API operations of ENS. This topic describes how to create a ROS template and use the template to automatically create an ENS instance.

Supported resources

Permissions

In this example, you need to create an ENS instance. By default, Resource Orchestration Service uses the credentials of the user who logs on to the ROS console. The user must be granted the following permissions:

  • AliyunENSFullAccess: permissions to manage ENS resources.

An Alibaba Cloud account has permissions on all API operations. Security risks may arise if you use an Alibaba Cloud account to call API operations. We strongly recommend that you call API operations or perform routine O&M as a RAM user. Before you call API operations as a RAM user, grant the required permissions to the RAM user as needed. The RAM user must have the permissions to manage ENS resources. For more information, see System policies for ENS.

Procedure

  1. Log on to the ROS console. In the top navigation bar, select a region from the Region drop-down list.

  2. On the Stacks page, click Create Stack. In the Specify Template section, click Select an Existing Template.

    Note
    • If you select Create a New Template or ROS Infrastructure Composer, you are redirected to the corresponding page.

  3. For Template Import Method, select Enter Template Content. For Template Content, select ROS, and enter the code.

    For more information about the syntax, description, and examples of how to create an ENS instance, see ALIYUN::ENS::Instance.

    YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Resources:
      ENSInstance:
        Type: ALIYUN::ENS::Instance
        Properties:
          EnsRegionId: cn-chengdu-telecom-3
          ImageId: centos_6_08_64_20G_alibase_20171208
          InstanceType: ens.sn1.stiny
          InternetChargeType: 95BandwidthByMonth
          Password: Enstest1xx
          Period: 1
          Quantity: 2
          SystemDiskSize: 20
          DataDiskSize: 20
          PaymentType: Subscription
    Outputs: {}

    JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Resources": {
        "ENSInstance": {
          "Type": "ALIYUN::ENS::Instance",
          "Properties": {
            "EnsRegionId": "cn-chengdu-telecom-3",
            "ImageId": "centos_6_08_64_20G_alibase_20171208",
            "InstanceType": "ens.sn1.stiny",
            "InternetChargeType": "95BandwidthByMonth",
            "Password": "Enstest1xx",
            "Period": 1,
            "Quantity": 2,
            "SystemDiskSize": 20,
            "DataDiskSize": 20,
            "PaymentType": "Subscription"
          }
        }
      },
      "Outputs": {
      }
    }
  4. Click Next and Create to execute the created stack.

  5. After the ENS instance is created, call API operations, use SDKs, or go to the ENS console to view the created ENS instance.

    image