文档

在资源编排控制台动态选择参数配置

更新时间:

资源编排服务ROS(Resource Orchestration Service)支持通过创建资源栈的方式动态选择参数配置。

背景信息

当您使用ROS创建资源栈管理多种资源时,通常需要打开多个控制台查找资源参数信息。此时您可以在模板的参数配置中添加AssociationProperty,对指定的参数提供可选值,以便在控制台动态选择参数配置。

模板代码段示例

以下提供了动态选择参数配置的模板代码段示例,实际使用过程中只需补充需要创建的资源即可编辑完整的模板。

示例在参数中指定AssociationProperty以获取所选地域下对应的相关资源,指定AssociationPropertyMetadata对不同参数添加筛选条件,以便在创建资源时进行参数预筛选。

Parameters:
  ZoneId:
    AssociationProperty: ALIYUN::ECS::Instance::ZoneId
    Type: String
    Description:
      zh-cn: 可用区ID。<br><b>注: <font color='blue'>选择前请确认该可用区是否支持创建ECS资源的规格,建议与其他交换机可用区不同</font></b>
      en: Availability Zone ID.<br><b>note:<font color='blue'>before selecting, please confirm that the Availability Zone supports the specification of creating ECS resources,which is recommended to be different from other VSwitch Availability Zone</font></b>
    Label:
      zh-cn: 交换机可用区
      en: VSwitch Availability Zone
  VPC:
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Type: String
    Description:
      zh-cn: 现有虚拟专有网络的实例ID,在VPC控制台专有网络下查询
      en: Please search the ID starting with (vpc-xxx)from console-Virtual Private Cloud
    Label:
      zh-cn: 现有VPC的实例ID
      en: Existing VPC Instance ID
  VSwitch:
    AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
    Type: String
    Description:
      zh-cn: 现有业务网络交换机的实例ID,在VPC控制台专有网络中的交换机下查询
      en: Please search the business vswitch ID starting with(vsw-xxx)from console-Virtual Private Cloud-VSwitches
    Label:
      zh-cn: 网络交换机ID
      en: VSwitch ID
    AssociationPropertyMetadata:
      ZoneId: ZoneId
      VpcId: VPC
  SecurityGroup:
    Type: String
    Description:
      zh-cn: 现有业务安全组的实例ID,在ECS控制台选择网络与安全>安全组下进行查询
      en: Please search the business security group ID starting with(sg-xxx)from console-ECS-Network & Security
    Label:
      zh-cn: 业务安全组ID
      en: Business Security Group ID
    AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
    AssociationPropertyMetadata:
      VpcId: VPC
  InstanceType:
    AssociationProperty: ALIYUN::ECS::Instance::InstanceType
    AssociationPropertyMetadata:
      ZoneId: ZoneId
    Label:
      zh-cn: 实例规格
      en: Instance Type
    Type: String
    Description:
      zh-cn: <font color='blue'><b>1.选择机型前请先确认当前可用区下该机型是否有货,部分机型需要提前报备</b></font><br><font color='blue'><b>2.可选机型列表</font><br></b></font>[ecs.c5.large <font color='green'>2vCPU 4GiB 内网带宽1Gbps 内网收发包30万PPS</font>]<br></b>[ecs.c5.xlarge <font color='green'>4vCPU 8GiB 内网带宽1.5Gbps 内网收发包50万PPS</font>]<br></b>[ecs.c5.2xlarge <font color='green'>8vCPU 16GiB 内网带宽2.5Gbps 内网收发包80万PPS</font>]
      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>]

参数说明:

  • VPC:所选地域下可选的专有网络ID。

  • ZoneId:所选地域下可选的可用区ID。

  • VSwitch:所选可用区与所选VPC下可选的交换机ID。

  • SecurityGroup:所选VPC下可选的安全组ID。

  • InstanceType:所选可用区下可选的ECS实例规格。

控制台配置项

当您使用模板代码段示例创建资源栈时,ROS控制台将动态获取当前阿里云账号下已有资源信息。

image.png

参数

说明

示例

交换机可用区

专有网络下的交换机可用区ID。

华北1可用区C

现有VPC的实例ID

VPC实例ID。

关于如何创建和查询VPC实例,请参见创建和管理专有网络

vpc-bp1m6fww66xbntjyc****

网络交换机ID

专有网络下的交换机ID。

关于如何创建和查询交换机,请参见创建和管理交换机

vsw-bp183p93qs667muql****

业务安全组ID

ECS安全组ID。

关于如何查询安全组ID,请参见查询安全组

sg-bp15ed6xe1yxeycg7o****

实例规格

ECS实例规格。

请选用有效的实例规格。更多信息,请参见实例规格族

ecs.e4.2xlarge

  • 本页导读 (1)
文档反馈