ALIYUN::ECD::Desktops类型用于创建一台或多台云桌面。
语法
{
  "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
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| UserAssignMode | String | 否 | 否 | 云桌面分配模式。 | 取值: 
 说明 如果您未设置EndUserId参数,则创建的云桌面不会分配给用户。 | 
| PromotionId | String | 否 | 否 | 优惠活动ID。 | 无 | 
| PolicyGroupId | String | 是 | 否 | 策略ID。 | 无 | 
| AutoRenew | Boolean | 否 | 否 | 是否自动续费。 | 取值: 
 说明 当参数ChargeType取值为PrePaid时,此参数才生效。 | 
| Amount | Integer | 否 | 否 | 创建的云桌面数量。 | 取值范围:1~300。 默认值:1。 | 
| DesktopName | String | 否 | 否 | 云桌面名称。 | 无 | 
| Hostname | String | 否 | 否 | 自定义设置云桌面的主机名称。 | 仅支持设置AD工作区下,操作系统类型是Windows的云桌面。 当您创建一台云桌面时,主机名称的命名规则如下: 
 当您创建多台云桌面时,命名规则为 多台云桌面统一命名格式说明如下: 
 | 
| Period | Integer | 否 | 否 | 购买资源的时长。 | 单位由 PeriodUnit指定。当参数ChargeType取值为PrePaid时才生效,且为必选值。
 | 
| VolumeEncryptionEnabled | Boolean | 否 | 否 | 是否开启磁盘加密。 | 取值: 
 | 
| AutoPay | Boolean | 否 | 否 | 是否自动支付。 | 取值: 
 | 
| GroupId | String | 否 | 否 | 桌面组ID。 | 无 | 
| OfficeSiteId | String | 是 | 否 | 工作区ID。 | 无 | 
| DesktopNameSuffix | Boolean | 否 | 否 | 桌面名称是否自动增加后缀。 | 取值: 
 | 
| BundleId | String | 是 | 否 | 桌面模板ID。 | 无 | 
| EndUserId | List | 否 | 否 | 授权使用云桌面的用户ID。 | 即将桌面分配给用户。可设置1~100个。 
 | 
| ChargeType | String | 否 | 否 | 云桌面的计费方式。 | 取值: 
 | 
| VolumeEncryptionKey | String | 否 | 否 | 开启磁盘加密的情况下使用的KMS的密钥ID。 | 关于如何获取KMS的密钥ID,请参见ListKeys。 | 
| Tags | List | 否 | 否 | 标签。 | 请参见Tags属性。 | 
| PeriodUnit | String | 否 | 否 | 包年包月计费方式的时长单位。 | 取值: 
 | 
| VpcId | String | 否 | 否 | 此参数暂不开放使用。 | 无 | 
| DirectoryId | String | 否 | 否 | 此参数暂不开放使用。 | 无 | 
| UserName | String | 否 | 否 | 此参数暂不开放使用。 | 无 | 
Tags语法
"Tags": [
  {
    "Value": String,
    "Key": String
  }
]Tags属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| Value | String | 否 | 否 | 标签值。 | 可设置1~20个。 | 
| Key | String | 是 | 否 | 标签键。 | 可设置1~20个。 | 
返回值
Fn::GetAtt
- DesktopId:云桌面ID。
- OrderId:订单ID。
示例
- JSON格式- { "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" ] } } } }
该文章对您有帮助吗?