ALIYUN::ECD::Bundle

ALIYUN::ECD::Bundle类型用于创建自定义模板。

语法

{
  "Type": "ALIYUN::ECD::Bundle",
  "Properties": {
    "Description": String,
    "RootDiskSizeGib": Integer,
    "Language": String,
    "RootDiskPerformanceLevel": String,
    "DesktopType": String,
    "BundleName": String,
    "ImageId": String,
    "UserDiskPerformanceLevel": String,
    "UserDiskSizeGib": List
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Description

String

桌面模板描述。

RootDiskSizeGib

Integer

系统盘大小。

单位:GiB。

支持设置的系统盘大小与规格相对应。更多信息,请参见桌面规格概述

Language

String

操作系统语言。

目前只支持系统镜像。

取值:

  • zh-CN:简体中文。

  • zh-HK:繁体中文。

  • en-US:英文。

  • ja-JP:日文。

RootDiskPerformanceLevel

String

系统盘的性能等级。

当桌面规格设置为图形型或者高主频时,支持设置磁盘性能等级。

取值:

  • PL0

  • PL1

  • PL2

  • PL3

关于各性能等级磁盘的差异,请参见ESSD云盘

DesktopType

String

桌面规格。

您可以调用DescribeBundles查询桌面模板,从返回的DesktopType获取当前支持的桌面规格。

说明

普通镜像不能选择GPU规格,GPU类型镜像只能选择GPU规格。

BundleName

String

桌面模板名称。

ImageId

String

镜像ID。

UserDiskPerformanceLevel

String

数据盘的性能等级。

当桌面规格设置为图形型或者高主频时,支持设置磁盘性能等级。

取值:

  • PL0

  • PL1

  • PL2

  • PL3

关于各性能等级磁盘的差异,请参见ESSD云盘

UserDiskSizeGib

List

数据盘大小。

目前只能设置一个数据盘。单位:GiB。

支持设置的数据盘大小与规格相对应。更多信息,请参见桌面规格概述

说明

模板中设置的数据盘大小必须大于镜像中的数据盘大小。

返回值

Fn::GetAtt

BundleId:桌面模板ID。

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  RootDiskSizeGib:
    Type: Number
    Description: The root disk size gib.
    Default: 40
  DesktopType:
    Type: String
    Description: |-
      Desktop specifications.You can call Describundles to query the desktop bundle and get the currently supported desktop specification from the returned desktopType.
      Explain that ordinary mirrors cannot choose the GPU specifications, and the GPU type mirror can only choose the GPU specification.
    Default: eds.enterprise_office.8c8g
  ImageId:
    Type: String
    Description: The ID of the image.
    Default: desktopimage-windows-server-2019-64-ch-asp
  UserDiskSizeGib:
    Type: Json
    Description: |-
      The size of the data disk. Currently, only one data disk can be set. Unit: GiB.
      - The size of the data disk that supports the setting corresponds to the specification.
      - The data disk size (user_disk_size_gib) set in the template must be greater than the data disk size (data_disk_size) in the mirror.
    MaxLength: 1
    Default:
      - 40
Resources:
  Bundle:
    Type: ALIYUN::ECD::Bundle
    Properties:
      RootDiskSizeGib:
        Ref: RootDiskSizeGib
      DesktopType:
        Ref: DesktopType
      ImageId:
        Ref: ImageId
      UserDiskSizeGib:
        Ref: UserDiskSizeGib
Outputs:
  BundleId:
    Description: Desktop bundle ID.
    Value:
      Fn::GetAtt:
        - Bundle
        - BundleId

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "RootDiskSizeGib": {
      "Type": "Number",
      "Description": "The root disk size gib.",
      "Default": 40
    },
    "DesktopType": {
      "Type": "String",
      "Description": "Desktop specifications.You can call Describundles to query the desktop bundle and get the currently supported desktop specification from the returned desktopType.\nExplain that ordinary mirrors cannot choose the GPU specifications, and the GPU type mirror can only choose the GPU specification.",
      "Default": "eds.enterprise_office.8c8g"
    },
    "ImageId": {
      "Type": "String",
      "Description": "The ID of the image.",
      "Default": "desktopimage-windows-server-2019-64-ch-asp"
    },
    "UserDiskSizeGib": {
      "Type": "Json",
      "Description": "The size of the data disk. Currently, only one data disk can be set. Unit: GiB.\n- The size of the data disk that supports the setting corresponds to the specification.\n- The data disk size (user_disk_size_gib) set in the template must be greater than the data disk size (data_disk_size) in the mirror.",
      "MaxLength": 1,
      "Default": [40]
    }
  },
  "Resources": {
    "Bundle": {
      "Type": "ALIYUN::ECD::Bundle",
      "Properties": {
        "RootDiskSizeGib": {
          "Ref": "RootDiskSizeGib"
        },
        "DesktopType": {
          "Ref": "DesktopType"
        },
        "ImageId": {
          "Ref": "ImageId"
        },
        "UserDiskSizeGib": {
          "Ref": "UserDiskSizeGib"
        }
      }
    }
  },
  "Outputs": {
    "BundleId": {
      "Description": "Desktop bundle ID.",
      "Value": {
        "Fn::GetAtt": [
          "Bundle",
          "BundleId"
        ]
      }
    }
  }
}