ALIYUN::CloudPhone::InstanceGroup

更新时间:
复制 MD 格式

The ALIYUN::CloudPhone::InstanceGroup resource type creates and starts Cloud Phone 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 name

Type

Required

Update allowed

Description

Constraints

ImageId

String

Yes

Yes

The image ID.

None

InstanceType

String

Yes

No

The instance type.

None

SecurityGroupId

String

Yes

No

The security group ID.

Uses the same security group as ECS.

VSwitchId

String

Yes

No

The virtual switch ID.

None

Amount

Integer

No

No

The number of ECS instances to create.

Valid values: 1 to 100.

Default value: 1.

AutoPay

Boolean

No

No

Specifies whether to enable automatic payment.

Valid values:

  • true (default): enables automatic payment.

  • false: disables automatic payment.

AutoRenew

Boolean

No

No

Specifies whether to enable auto-renewal.

This parameter is valid only when ChargeType is set to PrePaid.

Valid values:

  • true: enables auto-renewal.

  • false (default): disables auto-renewal.

ChargeType

String

No

No

The billing method of the instance.

Valid values:

  • PrePaid: subscription.

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

Description

String

No

Yes

The description of the instance.

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

EipBandwidth

Integer

No

No

The bandwidth of the elastic IP address (EIP).

Valid values: 1 to 200.

If you set this parameter, an EIP with the specified bandwidth is automatically created and attached to the Cloud Phone instance.

The EIP is released when the instance is released.

InstanceName

String

No

Yes

The instance name.

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

Default value: the instance ID.

KeyPairName

String

No

Yes

The name of the key pair for the Cloud Phone instance.

None

Period

Integer

No

No

Duration.

Valid values:

  • If PeriodUnit is set to Month, valid values are 1, 2, 3, and 6.

  • If PeriodUnit is set to Year, valid values are 1, 2, 3, 4, and 5.

PeriodUnit

String

No

No

The unit of the subscription duration.

Valid values:

  • Year

  • Month (default value): The month.

Resolution

String

No

Yes

The resolution of the Cloud Phone instance.

Call the DescribeInstanceTypes operation to query the resolutions that the current instance type supports. Then, select a suitable resolution.

Tag

List

No

Yes

The collection of tags for the instance.

For more information, see the Tag properties section.

VncPassword

String

No

Yes

The connection password for the management terminal of the Cloud Phone instance.

None

Tag syntax

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

Tag properties

Property name

Type

Required

Update allowed

Description

Constraints

Key

String

Yes

No

The tag key of the instance.

None

Value

String

No

No

The tag value of the instance.

None

Return values

Fn::GetAtt

  • OrderId: The order ID.

  • InstanceIds: The list of instance IDs.

  • TradePrice: The price of the order.

  • PrivateIps: The list of private IP addresses. This parameter applies only to VPC-connected instances.

Examples

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  SecurityGroupId:
    Type: String
    Description: The ID of the security group in which to create the ECS instance. If you create an instance in the classic network, the security group cannot belong to a VPC. If you create an instance in a VPC, the security group must belong to that VPC.
  VSwitchId:
    Type: String
    Description: The ID of the vSwitch.
  ImageId:
    Type: String
    Description: The image ID.
  VncPassword:
    Type: String
    Description: |-
      The VNC password for the Cloud Phone.
      The password must be 6 characters long and can contain only uppercase letters,
      lowercase letters, and digits.
    AllowedPattern: '[a-zA-Z0-9]{6}'
  InstanceType:
    Type: String
    Description: The 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: The order ID.
    Value:
      Fn::GetAtt:
        - InstanceGroup
        - OrderId
  InstanceIds:
    Description: The instance IDs.
    Value:
      Fn::GetAtt:
        - InstanceGroup
        - InstanceIds
  TradePrice:
    Description: The price.
    Value:
      Fn::GetAtt:
        - InstanceGroup
        - TradePrice
                    

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "SecurityGroupId": {
      "Type": "String",
      "Description": "The ID of the security group in which to create the ECS instance. If you create an instance in the classic network, the security group cannot belong to a VPC. If you create an instance in a VPC, the security group must belong to that VPC."
    },
    "VSwitchId": {
      "Type": "String",
      "Description": "The ID of the vSwitch."
    },
    "ImageId": {
      "Type": "String",
      "Description": "The image ID."
    },
    "VncPassword": {
      "Type": "String",
      "Description": "The VNC password for the Cloud Phone.\nThe password must be 6 characters long and can contain only uppercase letters, \nlowercase letters, and digits.",
      "AllowedPattern": "[a-zA-Z0-9]{6}"
    },
    "InstanceType": {
      "Type": "String",
      "Description": "The 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": "The order ID.",
      "Value": {
        "Fn::GetAtt": [
          "InstanceGroup",
          "OrderId"
        ]
      }
    },
    "InstanceIds": {
      "Description": "The instance IDs.",
      "Value": {
        "Fn::GetAtt": [
          "InstanceGroup",
          "InstanceIds"
        ]
      }
    },
    "TradePrice": {
      "Description": "The price.",
      "Value": {
        "Fn::GetAtt": [
          "InstanceGroup",
          "TradePrice"
        ]
      }
    }
  }
}