ALIYUN::ECD::Desktops is used to create one or more cloud desktops.

Syntax

{
  "Type": "ALIYUN::ECD::Desktops",
  "Properties": {
    "UserAssignMode": String,
    "PromotionId": String,
    "PolicyGroupId": String,
    "UserName": String,
    "AutoRenew": Boolean,
    "Amount": Integer,
    "DesktopName": String,
    "Hostname": String,
    "Period": Integer,
    "VolumeEncryptionEnabled": Boolean,
    "AutoPay": Boolean,
    "GroupId": String,
    "OfficeSiteId": String,
    "DesktopNameSuffix": Boolean,
    "BundleId": String,
    "EndUserId": List,
    "VpcId": String,
    "ChargeType": String,
    "VolumeEncryptionKey": String,
    "Tags": List,
    "PeriodUnit": String,
    "DirectoryId": String
  }
}

Properties

Property Type Required Editable Description Constraint
UserAssignMode String No No The assignment mode of the cloud desktops that you want to create. Default value: ALL. Valid values:
  • ALL: If you specify the EndUserId property, the cloud desktops are assigned to each regular user that you specify.
  • PER_USER: If you specify the EndUserId property, the cloud desktops are evenly assigned to all regular users that you specify.

    In this case, you must make sure that the value of the Amount property can be divisible by the number of regular user IDs that are specified by the EndUserId property.

Note If you do not specify the EndUserId property, the cloud desktops are not assigned to regular users.
PromotionId String No No The ID of the sales promotion. None.
PolicyGroupId String Yes No The ID of the policy. None.
AutoRenew Boolean No No Specifies whether to enable auto-renewal. Default value: false. Valid values:
  • true: enables auto-renewal. The renewal duration is the same as the subscription duration that you specified for the Period parameter when you purchased the cloud desktop.
  • false: disables auto-renewal.
Note This property takes effect only when you set the ChargeType property to PrePaid.
Amount Integer No No The number of cloud desktops that you want to create. Valid values: 1 to 300.

Default value: 1.

DesktopName String No No The name of the cloud desktop. None.
Hostname String No No The custom hostname that you specify for the cloud desktop. You can specify a custom hostname only for a Windows cloud desktop in the workspace of the enterprise Active Directory (AD) account type.
If you create a cloud desktop, the hostname that you specify must meet the following requirements:
  • The hostname must be 2 to 15 characters in length.
  • The hostname can contain letters, digits, and hyphens (-). The hostname cannot start or end with a hyphen (-), contain consecutive hyphens (-), or contain only digits.

If you create multiple cloud desktops, the hostnames that you specify must be in the name_prefix[begin_number,bits]name_suffix format. For example, if you set the Hostname property to ecd-[1,4]-test, the hostname of the first cloud desktop is ecd-0001-test and the hostname of the second cloud desktop is ecd-0002-test. The rest may be deduced by analogy.

The following information describes the parameters for the format:
  • name_prefix: the prefix of the hostname.
  • begin_number,bits: the ordered number in the hostname.
  • name_suffix: the suffix of the hostname.
Period Integer No No The subscription duration of the cloud desktop that you want to purchase. The unit of the value is specified by the PeriodUnit property. This property takes effect and is required only when you set the ChargeType property to PrePaid.
  • Valid values if you set the PeriodUnit property to Month: 1, 2, 3, and 6.
  • Valid values if you set the PeriodUnit property to Year: 1, 2, 3, 4, and 5.
VolumeEncryptionEnabled Boolean No No Specifies whether to enable disk encryption. Default value: false. Valid values:
  • true
  • false
AutoPay Boolean No No Specifies whether to enable automatic payment.
Default value: true. Valid values:
  • true: enables automatic payment.

    Make sure that you have sufficient balance in your Alibaba Cloud account. Otherwise, your order becomes invalid.

  • false: disables automatic payment. In this case, an order is generated, but no payment is made.
GroupId String No No The ID of the desktop group. None.
OfficeSiteId String Yes No The ID of the workspace. None.
DesktopNameSuffix Boolean No No Specifies whether to automatically add a suffix to the cloud desktop name. Default value: false. Valid values:
  • true
  • false
BundleId String Yes No The ID of the cloud desktop template. None.
EndUserId List No No The IDs of the regular users who are authorized to use the cloud desktop. The cloud desktop that you create is assigned to the regular users. You can specify 1 to 100 user IDs.
  • Only one regular user can use the cloud desktop at a time.
  • If you do not specify the EndUserId property, the cloud desktop that you create is not assigned to regular users.
ChargeType String No No The billing method of the cloud desktop.
Default value: PostPaid. Valid values:
  • PostPaid: pay-as-you-go
  • PrePaid: subscription
VolumeEncryptionKey String No No The ID of the Key Management Service (KMS) key that is used when disk encryption is enabled. For more information about how to query the key ID, see ListKeys.
Tags List No No The tags. For more information, see Tags properties.
PeriodUnit String No No The unit of the subscription duration. Default value: Month. Valid values:
  • Month
  • Year
VpcId String No No This property is unavailable. None.
DirectoryId String No No This property is unavailable. None.
UserName String No No This property is unavailable. None.

Tags syntax

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

Tags properties

Property Type Required Editable Description Constraint
Value String No No The value of the tag. You can specify 1 to 20 values for a tag.
Key String Yes No The key of the tag. You can specify 1 to 20 keys for a tag.

Return values

Fn::GetAtt

  • DesktopId: the ID of the cloud desktop.
  • OrderId: the ID of the order.

Examples

  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "PolicyGroupId": {
          "Type": "String",
          "Description": "The ID of the policy."
        },
        "OfficeSiteId": {
          "Type": "String",
          "Description": "The ID of the workspace."
        },
        "BundleId": {
          "Type": "String",
          "Description": "The ID of the cloud desktop template."
        }
      },
      "Resources": {
        "Desktops": {
          "Type": "ALIYUN::ECD::Desktops",
          "Properties": {
            "PolicyGroupId": {
              "Ref": "PolicyGroupId"
            },
            "OfficeSiteId": {
              "Ref": "OfficeSiteId"
            },
            "BundleId": {
              "Ref": "BundleId"
            }
          }
        }
      },
      "Outputs": {
        "DesktopId": {
          "Description": "The ID of the cloud desktop. If multiple cloud desktops are created in a call, the\nIDs of the cloud desktops are returned.",
          "Value": {
            "Fn::GetAtt": [
              "Desktops",
              "DesktopId"
            ]
          }
        },
        "OrderId": {
          "Description": "The ID of the order.\nNote This parameter is returned only when the ChargeType parameter is set to PrePaid.",
          "Value": {
            "Fn::GetAtt": [
              "Desktops",
              "OrderId"
            ]
          }
        }
      }
    }
  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      PolicyGroupId:
        Type: String
        Description: The ID of the policy.
      OfficeSiteId:
        Type: String
        Description: The ID of the workspace.
      BundleId:
        Type: String
        Description: The ID of the cloud desktop template.
    Resources:
      Desktops:
        Type: ALIYUN::ECD::Desktops
        Properties:
          PolicyGroupId:
            Ref: PolicyGroupId
          OfficeSiteId:
            Ref: OfficeSiteId
          BundleId:
            Ref: BundleId
    Outputs:
      DesktopId:
        Description: |-
          The ID of the cloud desktop. If multiple cloud desktops are created in a call, the
          IDs of the cloud desktops are returned.
        Value:
          Fn::GetAtt:
            - Desktops
            - DesktopId
      OrderId:
        Description: |-
          The ID of the order.
          Note This parameter is returned only when the ChargeType parameter is set to PrePaid.
        Value:
          Fn::GetAtt:
            - Desktops
            - OrderId