All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ECD::Desktops

Last Updated:Aug 12, 2024

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

PropertyTypeRequiredEditableDescriptionConstraint
UserAssignModeStringNoNoThe 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.
PromotionIdStringNoNoThe ID of the sales promotion. None.
PolicyGroupIdStringYesNoThe ID of the policy. None.
AutoRenewBooleanNoNoSpecifies 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.
AmountIntegerNoNoThe number of cloud desktops that you want to create. Valid values: 1 to 300.

Default value: 1.

DesktopNameStringNoNoThe name of the cloud desktop. None.
HostnameStringNoNoThe 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.
PeriodIntegerNoNoThe 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.
VolumeEncryptionEnabledBooleanNoNoSpecifies whether to enable disk encryption. Default value: false. Valid values:
  • true
  • false
AutoPayBooleanNoNoSpecifies 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.
GroupIdStringNoNoThe ID of the desktop group. None.
OfficeSiteIdStringYesNoThe ID of the workspace. None.
DesktopNameSuffixBooleanNoNoSpecifies whether to automatically add a suffix to the cloud desktop name. Default value: false. Valid values:
  • true
  • false
BundleIdStringYesNoThe ID of the cloud desktop template. None.
EndUserIdListNoNoThe 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.
ChargeTypeStringNoNoThe billing method of the cloud desktop.
Default value: PostPaid. Valid values:
  • PostPaid: pay-as-you-go
  • PrePaid: subscription
VolumeEncryptionKeyStringNoNoThe 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.
TagsListNoNoThe tags. For more information, see Tags properties.
PeriodUnitStringNoNoThe unit of the subscription duration. Default value: Month. Valid values:
  • Month
  • Year
VpcIdStringNoNoThis property is unavailable. None.
DirectoryIdStringNoNoThis property is unavailable. None.
UserNameStringNoNoThis property is unavailable. None.

Tags syntax

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

Tags properties

PropertyTypeRequiredEditableDescriptionConstraint
ValueStringNoNoThe value of the tag. You can specify 1 to 20 values for a tag.
KeyStringYesNoThe 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