文档

ALIYUN::CloudPhone::InstanceGroup

更新时间:

ALIYUN::CloudPhone::InstanceGroup类型用于创建并启动弹性云手机实例。

语法

{
  "Type": "ALIYUN::CloudPhone::InstanceGroup",
  "Properties": {
    "KeyPairName": String,
    "Description": String,
    "Amount": Integer,
    "SecurityGroupId": String,
    "AutoRenew": Boolean,
    "VSwitchId": String,
    "Period": Integer,
    "AutoPay": Boolean,
    "InstanceName": String,
    "EipBandwidth": Integer,
    "ChargeType": String,
    "ImageId": String,
    "VncPassword": String,
    "Tag": List,
    "InstanceType": String,
    "Resolution": String,
    "PeriodUnit": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

KeyPairName

String

云手机实例密钥对的名称。

Description

String

实例的描述。

长度为2~256个英文或中文字符,不能以http://https://开头。

Amount

Integer

指定创建ECS实例的数量。

取值范围:1~100。

默认值:1。

SecurityGroupId

String

安全组ID。

与ECS使用相同的安全组。

AutoRenew

Boolean

是否要自动续费。

当参数ChargeType取值为PrePaid时才生效。

取值:

  • true:自动续费。

  • false(默认):不自动续费。

VSwitchId

String

虚拟交换机ID。

Period

Integer

周期时长。

取值:

  • 当PeriodUnit为Month时,取值:1、2、3、6。

  • 当PeriodUnit为Year时,取值:1、2、3、4、5。

AutoPay

Boolean

是否自动支付。

取值:

  • true(默认值):自动支付。

  • false:禁止自动收费。

InstanceName

String

实例名称。

长度为2~128个字符,必须以大小字母或中文开头,不能以http://https://开头。可以包含中文、英文、数字、半角冒号(:)、下划线(_)、半角句号(.)或者短划线(-)。

默认值:实例的InstanceId。

EipBandwidth

Integer

EIP带宽值。

取值范围:1~200。

设置此参数将自动创建对应带宽的EIP实例,并将EIP实例绑定到云手机实例上。

实例释放时,EIP实例会一起释放回收。

ChargeType

String

实例的付费方式。

取值:

  • PrePaid:包年包月。

  • PostPaid(默认):按量付费。

ImageId

String

镜像ID。

VncPassword

String

云手机实例管理终端连接密码。

Tag

List

实例的标签集合。

更多信息,请参见Tag属性

InstanceType

String

实例规格。

Resolution

String

云手机实例选用的分辨率。

可通过DescribeInstanceTypes接口查询当前规格支持的分辨率列表,从而选择合适的分辨率。

PeriodUnit

String

包年包月计费方式的时长单位。

取值:

  • Year:年。

  • Month(默认值):月。

Tag语法

"Tag": [
  {
    "Value": String,
    "Key": String
  }
]

Tag属性

属性名称

类型

必须

允许更新

描述

约束

Value

String

实例的标签键。

Key

String

实例的标签值。

返回值

Fn::GetAtt

  • OrderId:订单号。

  • InstanceIds:实例ID列表。

  • TradePrice:价格。

  • PrivateIps:私有IP地址列表。仅适用于VPC实例。 

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  SecurityGroupId:
    Type: String
    Description: Security group to create ecs instance. For classic instance need the security group not belong to VPC, for VPC instance, please make sure the security group belong to specified VPC.
  VSwitchId:
    Type: String
    Description: vswitch id
  ImageId:
    Type: String
    Description: The image id
  VncPassword:
    Type: String
    Description: |-
      Cloud phone VNC password.
      The password must be six characters long, and must contain only uppercase,
      lowercase English letters and Arabic numerals.
    AllowedPattern: '[a-zA-Z0-9]{6}'
  InstanceType:
    Type: String
    Description: instance type
Resources:
  InstanceGroup:
    Type: ALIYUN::CloudPhone::InstanceGroup
    Properties:
      SecurityGroupId:
        Ref: SecurityGroupId
      VSwitchId:
        Ref: VSwitchId
      ImageId:
        Ref: ImageId
      VncPassword:
        Ref: VncPassword
      InstanceType:
        Ref: InstanceType
Outputs:
  OrderId:
    Description: oder id
    Value:
      Fn::GetAtt:
        - InstanceGroup
        - OrderId
  InstanceIds:
    Description: instance ids
    Value:
      Fn::GetAtt:
        - InstanceGroup
        - InstanceIds
  TradePrice:
    Description: price
    Value:
      Fn::GetAtt:
        - InstanceGroup
        - TradePrice
                    

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "SecurityGroupId": {
      "Type": "String",
      "Description": "Security group to create ecs instance. For classic instance need the security group not belong to VPC, for VPC instance, please make sure the security group belong to specified VPC."
    },
    "VSwitchId": {
      "Type": "String",
      "Description": "vswitch id"
    },
    "ImageId": {
      "Type": "String",
      "Description": "The image id"
    },
    "VncPassword": {
      "Type": "String",
      "Description": "Cloud phone VNC password.\nThe password must be six characters long, and must contain only uppercase, \nlowercase English letters and Arabic numerals.",
      "AllowedPattern": "[a-zA-Z0-9]{6}"
    },
    "InstanceType": {
      "Type": "String",
      "Description": "instance type"
    }
  },
  "Resources": {
    "InstanceGroup": {
      "Type": "ALIYUN::CloudPhone::InstanceGroup",
      "Properties": {
        "SecurityGroupId": {
          "Ref": "SecurityGroupId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "ImageId": {
          "Ref": "ImageId"
        },
        "VncPassword": {
          "Ref": "VncPassword"
        },
        "InstanceType": {
          "Ref": "InstanceType"
        }
      }
    }
  },
  "Outputs": {
    "OrderId": {
      "Description": "oder id",
      "Value": {
        "Fn::GetAtt": [
          "InstanceGroup",
          "OrderId"
        ]
      }
    },
    "InstanceIds": {
      "Description": "instance ids",
      "Value": {
        "Fn::GetAtt": [
          "InstanceGroup",
          "InstanceIds"
        ]
      }
    },
    "TradePrice": {
      "Description": "price",
      "Value": {
        "Fn::GetAtt": [
          "InstanceGroup",
          "TradePrice"
        ]
      }
    }
  }
}
  • 本页导读 (1)
文档反馈