All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::CloudPhone::InstanceGroup

Last Updated:Mar 29, 2024

ALIYUN::CloudPhone::InstanceGroup is used to create and start Elastic Cloud Phone (ECP) instances.

Syntax

{
  "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
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

KeyPairName

String

No

No

The name of the key pair that you want to use to connect to the ECP instance.

None.

Description

String

No

Yes

The description of the ECP instance.

The description must be 2 to 256 characters in length, and cannot start with http:// or https://.

Amount

Integer

No

No

The number of Elastic Compute Service (ECS) instances that you want to create.

Valid values: 1 to 100.

Default value: 1.

SecurityGroupId

String

Yes

No

The ID of the security group to which the ECP instances belong.

The ECP instances must belong to the same security group as the ECS instances.

AutoRenew

Boolean

No

No

Specifies whether to enable auto-renewal.

This property takes effect only when ChargeType is set to PrePaid.

Valid values:

  • true

  • false (default)

VSwitchId

String

Yes

No

The vSwitch ID.

None.

Period

Integer

No

No

The subscription duration.

  • Valid values when PeriodUnit is set to Month: 1, 2, 3, and 6.

  • Valid values when PeriodUnit is set to Year: 1, 2, 3, 4, and 5.

AutoPay

Boolean

No

No

Specifies whether to enable automatic payment.

Valid values:

  • true (default)

  • false

InstanceName

String

No

Yes

The instance name.

The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).

The default value of this property is the value of the InstanceId property.

EipBandwidth

Integer

No

No

The bandwidth of the elastic IP address (EIP).

Valid values: 1 to 200.

If you specify this property, an EIP with the specified bandwidth is automatically created and associated with the ECP instance.

If the ECP instance is released, the EIP is also released.

ChargeType

String

No

No

The billing method of the ECP instance.

Valid values:

  • PrePaid: subscription

  • PostPaid (default): pay-as-you-go

ImageId

String

Yes

No

The image ID.

None.

VncPassword

String

No

Yes

The password that you want to use to connect to the management terminal of the ECP instance.

None.

Tag

List

No

Yes

The tags of the ECP instance.

For more information, see Tag properties.

InstanceType

String

Yes

No

The instance type.

None.

Resolution

String

No

No

The resolution of the ECP instance.

You can call the DescribeInstanceTypes operation to query resolutions that are supported by the instance type to select an appropriate resolution.

PeriodUnit

String

No

No

The unit of the subscription duration.

Valid values:

  • Year

  • Month (default)

Tag syntax

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

Tag properties

Property

Type

Required

Editable

Description

Constraint

Value

String

No

No

The tag key of the ECP instance.

None.

Key

String

Yes

No

The tag value of the ECP instance.

None.

Return values

Fn::GetAtt

  • OrderId: the order ID.

  • InstanceIds: the IDs of the ECP instances.

  • TradePrice: the price.

  • PrivateIps: the private IP addresses. This property is supported only by ECP instances in a virtual private cloud (VPC).  

Examples

YAML format

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 format

{
  "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"
        ]
      }
    }
  }
}