ALIYUN::GWS::Cluster is used to create a Cluster.

Syntax

{
  "Type": "ALIYUN::GWS::Cluster",
  "Properties": {
    "Policy": Map,
    "VpcId": String,
    "VSwitchId": String,
    "ClusterType": String,
    "Name": String
  }
}

Properties

Property Type Required Editable Description Constraint
Policy Map No Yes Cluster policy For more information, see Policy properties.
VpcId String Yes No The ID of the VPC. None
VSwitchId String No No The ID of the VSwitch. None
ClusterType String Yes No The type of the cluster. Valid values: gws.s1.standard
Name String No Yes Cluster Name None

Policy syntax

"Policy": {
  "LocalDrive": String,
  "UsbRedirect": String,
  "Clipboard": String,
  "Watermark": String
}

Policy properties

Property Type Required Editable Description Constraint
LocalDrive String Yes Yes Local file operations Valid values:
  • off
  • read
  • readwrite
UsbRedirect String Yes Yes USB redirection Valid values:
  • on
  • off
Clipboard String Yes Yes Clipboard Valid values:
  • off
  • read
  • readwrite
Watermark String Yes Yes Watermarks Valid values:
  • on
  • off

Response parameters

Fn::GetAtt

  • ClusterId: the ID of the cluster.
  • Name: the Name of the cluster.

Examples

JSON format

{
  "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 format

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