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

Syntax

{
  "Type": "ALIYUN::EDAS::Cluster",
  "Properties": {
    "VpcId": String,
    "NetworkMode": Integer,
    "LogicalRegionId": String,
    "ClusterName": String,
    "ClusterType": Integer,
    "OversoldFactor": Integer
  }
}

Properties

Parameter Data type Required Editable Description Constraint
VpcId String No No VPC ID If NetworkMode is set to 2,VpcId is required.
NetworkMode Integer Yes No Network type Valid values:
  • 1: Classic Network
  • 2:VPC
LogicalRegionId String No No The region ID of the custom namespace. Valid values: cn-beijing:prod. Format: "Physical Region: custom namespace identifier"
ClusterName String Yes No The name of the cluster that you want to create. It must be 1 to 64 characters in length and can contain letters, digits, periods (.), and underscores (_). Composition.
ClusterType Integer Yes No Cluster type Valid values:
  • 1: Swarm cluster
  • 2: ECS cluster
  • 3: Kubernetes cluster
OversoldFactor Integer No No Docker cluster CPU oversold Valid values:
  • 2(1/2)
  • 4(1/4)
  • 8(1/8)

Error code

Fn::GetAtt

  • ClusterName: The name of the cluster.
  • IaasProvider: provider.
  • ClusterId: The ID of the cluster.
  • ClusterType: The cluster type.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "Cluster": {
      "Type": "ALIYUN::EDAS::Cluster",
      "Properties": {
        "VpcId": {
          "Ref": "VpcId"
        },
        "NetworkMode": {
          "Ref": "NetworkMode"
        },
        "LogicalRegionId": {
          "Ref": "LogicalRegionId"
        },
        "ClusterName": {
          "Ref": "ClusterName"
        },
        "ClusterType": {
          "Ref": "ClusterType"
        },
        "OversoldFactor": {
          "Ref": "OversoldFactor"
        }
      }
    }
  },
  "Parameters": {
    "VpcId": {
      "Type": "String",
      "Description": "VPC network ID. If network selection VPC, this parameter Required
    },
    "NetworkMode": {
      "Type": "Number",
      "Description": "Network Type. 1- classic network, 2-VPC"
    },
    "LogicalRegionId": {
      "Type": "String",
      "Description": "Custom namespace RegionId (format: Physical Region: custom namespace identifier)"
    },
    "ClusterName": {
      "Type": "String",
      "Description": "Cluster name"
    },
    "ClusterType": {
      "Type": "Number",
      "Description": "Cluster type. 1-Swarm cluster, 2-ECS cluster, 3-Kubernetes Cluster"
    },
    "OversoldFactor": {
      "Type": "Number",
      "Description": "Docker CPU cluster oversold. Support 2 (1: 2 ratio) / 4 (1: 4) / 8 (1: 8 ratio)",
      "AllowedValues": [
        2,
        4,
        8
      ]
    }
  },
  "Outputs": {
    "ClusterName": {
      "Description": "Cluster name",
      "Value": {
        "Fn::GetAtt": [
          "Cluster",
          "ClusterName"
        ]
      }
    },
    "IaasProvider": {
      "Description": "Provider",
      "Value": {
        "Fn::GetAtt": [
          "Cluster",
          "IaasProvider"
        ]
      }
    },
    "ClusterId": {
      "Description": "Cluster ID",
      "Value": {
        "Fn::GetAtt": [
          "Cluster",
          "ClusterId"
        ]
      }
    },
    "ClusterType": {
      "Description": "Cluster type",
      "Value": {
        "Fn::GetAtt": [
          "Cluster",
          "ClusterType"
        ]
      }
    }
  }
}

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  Cluster:
    Type: 'ALIYUN::EDAS::Cluster'
    Properties:
      VpcId:
        Ref: VpcId
      NetworkMode:
        Ref: NetworkMode
      LogicalRegionId:
        Ref: LogicalRegionId
      ClusterName:
        Ref: ClusterName
      ClusterType:
        Ref: ClusterType
      OversoldFactor:
        Ref: OversoldFactor
Parameters:
  VpcId:
    Type: String
    Description: 'VPC network ID. If network selection VPC, this parameter Required
  NetworkMode:
    Type: Number
    Description: 'Network Type. 1- classic network, 2-VPC'
  LogicalRegionId:
    Type: String
    Description: >-
      Custom namespace RegionId (format: Physical Region: custom namespace
      identifier)
  ClusterName:
    Type: String
    Description: Cluster name
  ClusterType:
    Type: Number
    Description: 'Cluster type. 1-Swarm cluster, 2-ECS cluster, 3-Kubernetes Cluster'
  OversoldFactor:
    Type: Number
    Description: >-
      Docker CPU cluster oversold. Support 2 (1: 2 ratio) / 4 (1: 4) / 8 (1: 8
      ratio)
    AllowedValues:
      - 2
      - 4
      - 8
Outputs:
  ClusterName:
    Description: Cluster name
    Value:
      'Fn::GetAtt':
        - Cluster
        -ClusterName
  IaasProvider:
    Description: Provider
    Value:
      'Fn::GetAtt':
        - Cluster
        -IaasProvider
  ClusterId:
    Description: Cluster ID
    Value:
      'Fn::GetAtt':
        - Cluster
        - ClusterId
  ClusterType:
    Description: Cluster type
    Value:
      'Fn::GetAtt':
        - Cluster
        -ClusterType