Use dynamic parameters in the ROS console

更新时间:
复制 MD 格式

Resource Orchestration Service (ROS) allows you to dynamically select parameter values from prepopulated lists when you create a stack.

Background

Creating a ROS stack to manage multiple resources often requires you to open several consoles to find parameter values. To simplify this process, you can add the AssociationProperty attribute to your template parameters. This populates a dropdown list of available values in the console, allowing you to select parameters dynamically.

Sample template

This sample template shows how to configure dynamic parameters. Complete the template by adding the resources you want to create.

In this example, the AssociationProperty attribute retrieves a list of available resources in the selected region. The AssociationPropertyMetadata attribute filters the list of values for specific parameters.

Parameters:
  ZoneId:
    AssociationProperty: ALIYUN::ECS::Instance::ZoneId
    Type: String
    Description:
      en: The ID of the availability zone.<br><b>Note: <font color='blue'>Before you select an availability zone, make sure that it supports the instance type that you want to use. We recommend that you select an availability zone that is different from the one where your vSwitch resides.</font></b>
    Label:
      en: VSwitch Availability Zone
  VPC:
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Type: String
    Description:
      en: The ID of an existing Virtual Private Cloud (VPC). You can find the ID in the VPC console.
    Label:
      en: Existing VPC Instance ID
  VSwitch:
    AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
    Type: String
    Description:
      en: The ID of an existing vSwitch. You can find the ID on the vSwitches page of the VPC console.
    Label:
      en: VSwitch ID
    AssociationPropertyMetadata:
      ZoneId: ZoneId
      VpcId: VPC
  SecurityGroup:
    Type: String
    Description:
      en: The ID of an existing security group. You can find the ID by navigating to Network & Security > Security Groups in the Elastic Compute Service (ECS) console.
    Label:
      en: Business Security Group ID
    AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
    AssociationPropertyMetadata:
      VpcId: VPC
  InstanceType:
    AssociationProperty: ALIYUN::ECS::Instance::InstanceType
    AssociationPropertyMetadata:
      ZoneId: ZoneId
    Label:
      en: Instance Type
    Type: String
    Description:
      en: <font color='blue'><b>1. Before you select an instance type, make sure that it is available in the selected availability zone. Some instance types may require prior approval.</b></font><br><font color='blue'><b>2. Sample instance types:</font></b></font>[ecs.c5.large: <font color='green'>2 vCPU, 4 GiB Memory, 1 Gbps Bandwidth, 300,000 PPS</font>]<br></b>[ecs.c5.xlarge: <font color='green'>4 vCPU, 8 GiB Memory, 1.5 Gbps Bandwidth, 500,000 PPS</font>]<br></b>[ecs.c5.2xlarge: <font color='green'>8 vCPU, 16 GiB Memory, 2.5 Gbps Bandwidth, 800,000 PPS</font>]

Parameters

  • VPC: The ID of a Virtual Private Cloud (VPC) in the selected region.

  • ZoneId: The ID of an availability zone in the selected region.

  • VSwitch: The ID of a vSwitch in the selected availability zone and VPC.

  • SecurityGroup: The ID of a security group in the selected VPC.

  • InstanceType: An Elastic Compute Service (ECS) instance type in the selected availability zone.

Console parameters

When you use this template to create a stack, the ROS console dynamically populates the parameter fields with existing resources from your Alibaba Cloud account.

Parameter

Description

Example

VSwitch Availability Zone

The ID of the availability zone for the vSwitch.

China (Qingdao) Zone C

Existing VPC Instance ID

The ID of the Virtual Private Cloud (VPC) instance.

For more information about creating and finding a VPC, see Create and manage a VPC.

vpc-bp1m6fww66xbntjyc****

VSwitch ID

The ID of the vSwitch in the VPC.

For more information about creating and finding a vSwitch, see Create and manage vSwitches.

vsw-bp183p93qs667muql****

Business Security Group ID

The ID of the Elastic Compute Service (ECS) security group.

For more information about finding a security group, see Search for security groups.

sg-bp15ed6xe1yxeycg7o****

Instance Type

The ECS instance type.

Select a valid instance type. For more information, see Instance family.

ecs.e4.2xlarge