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,
    "ResourceGroupId": String
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
PropertyTypeRequiredEditableDescriptionConstraint
VpcIdStringNoNoThe ID of the virtual private cloud (VPC). This property is required if the NetworkMode property is set to 2.
NetworkModeIntegerYesNoThe network type of the cluster. Valid values:
  • 1: classic network
  • 2: VPC
LogicalRegionIdStringNoNoThe region ID of the custom namespace. The region ID is in the format of Physical region ID:Custom namespace identifier.

Example: cn-beijing:prod.

ResourceGroupIdStringNoYesThe ID of the resource group. None
ClusterNameStringYesNoThe name of the cluster. The name must be 1 to 64 characters in length, and can contain letters, digits, underscores (_), and periods (.).
ClusterTypeIntegerYesNoThe type of the cluster. Valid values:
  • 1: Swarm cluster
  • 2: Elastic Compute Service (ECS) cluster
  • 3: Kubernetes cluster
OversoldFactorIntegerNoNoThe CPU oversold ratio supported by a Docker cluster. Valid values:
  • 2 (1/2)
  • 4 (1/4)
  • 8 (1/8)

Response parameters

Fn::GetAtt

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

Examples

    YAMLformat

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      VpcId:
        Type: String
        AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Resources:
      Cluster:
        Type: ALIYUN::EDAS::Cluster
        Properties:
          LogicalRegionId:
            Fn::Join:
              - ':'
              - - Ref: ALIYUN::Region
                - prod
          OversoldFactor: 4
          VpcId:
            Ref: VpcId
          ClusterName: TestCluster
          NetworkMode: 2
          ClusterType: 2
    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

    JSONformat

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "VpcId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
        }
      },
      "Resources": {
        "Cluster": {
          "Type": "ALIYUN::EDAS::Cluster",
          "Properties": {
            "LogicalRegionId": {
              "Fn::Join": [
                ":",
                [
                  {
                    "Ref": "ALIYUN::Region"
                  },
                  "prod"
                ]
              ]
            },
            "OversoldFactor": 4,
            "VpcId": {
              "Ref": "VpcId"
            },
            "ClusterName": "TestCluster",
            "NetworkMode": 2,
            "ClusterType": 2
          }
        }
      },
      "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"
            ]
          }
        }
      }
    }