ALIYUN::GWS::Cluster类型用于创建集群。
语法
{
"Type": "ALIYUN::GWS::Cluster",
"Properties": {
"Policy": Map,
"VpcId": String,
"VSwitchId": String,
"ClusterType": String,
"Name": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
Policy | Map | 否 | 是 | 集群策略 | 详情请参见Policy属性。 |
VpcId | String | 是 | 否 | 专有网络ID | 无 |
VSwitchId | String | 否 | 否 | 交换机ID | 无 |
ClusterType | String | 是 | 否 | 集群类型 | 取值:gws.s1.standard |
Name | String | 否 | 是 | 集群名称 | 无 |
Policy语法
"Policy": {
"LocalDrive": String,
"UsbRedirect": String,
"Clipboard": String,
"Watermark": String
}
Policy属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
LocalDrive | String | 是 | 是 | 本地文件操作 | 取值:
|
UsbRedirect | String | 是 | 是 | USB重定向 | 取值:
|
Clipboard | String | 是 | 是 | 剪贴板 | 取值:
|
Watermark | String | 是 | 是 | 水印 | 取值:
|
返回值
Fn::GetAtt
- ClusterId:集群ID。
- Name:集群名称。
示例
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Policy": {
"Type": "Json",
"Description": "Cluster policy"
},
"VpcId": {
"Type": "String",
"Description": "VPC id"
},
"VSwitchId": {
"Type": "String",
"Description": "VSwitch id"
},
"ClusterType": {
"Type": "String",
"Description": "Cluster Type:\ngws.s1.standard"
},
"Name": {
"Type": "String",
"Description": "Cluster name"
}
},
"Resources": {
"Cluster": {
"Type": "ALIYUN::GWS::Cluster",
"Properties": {
"Policy": {
"Ref": "Policy"
},
"VpcId": {
"Ref": "VpcId"
},
"VSwitchId": {
"Ref": "VSwitchId"
},
"ClusterType": {
"Ref": "ClusterType"
},
"Name": {
"Ref": "Name"
}
}
}
},
"Outputs": {
"ClusterId": {
"Description": "Cluster id",
"Value": {
"Fn::GetAtt": [
"Cluster",
"ClusterId"
]
}
},
"Name": {
"Description": "Cluster name",
"Value": {
"Fn::GetAtt": [
"Cluster",
"Name"
]
}
}
}
}
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Policy:
Type: Json
Description: Cluster policy
VpcId:
Type: String
Description: VPC id
VSwitchId:
Type: String
Description: VSwitch id
ClusterType:
Type: String
Description: |-
Cluster Type:
gws.s1.standard
Name:
Type: String
Description: Cluster name
Resources:
Cluster:
Type: 'ALIYUN::GWS::Cluster'
Properties:
Policy:
Ref: Policy
VpcId:
Ref: VpcId
VSwitchId:
Ref: VSwitchId
ClusterType:
Ref: ClusterType
Name:
Ref: Name
Outputs:
ClusterId:
Description: Cluster id
Value:
'Fn::GetAtt':
- Cluster
- ClusterId
Name:
Description: Cluster name
Value:
'Fn::GetAtt':
- Cluster
- Name