All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::DashVector::Cluster

更新時間:Aug 12, 2024

ALIYUN::DashVector::Cluster is used to create a DashVector cluster.

Syntax

{
  "Type": "ALIYUN::DashVector::Cluster",
  "Properties": {
    "ClusterName": String,
    "ClusterType": String,
    "ReplicaCount": Integer,
    "IgnoreExisting": Boolean
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

ClusterName

String

Yes

No

The cluster name.

The name must be 3 to 32 characters in length, and can contain only letters, digits, underscores (_), and hyphens (-). It must be unique within an account.

ClusterType

String

Yes

No

The cluster specification.

Cluster specifications vary based on the cluster type:

  • The free trial cluster type uses a serverless architecture and is suitable for fast trial scenarios. For more information about the limits on free trial clusters, see Limits.

  • The storage-optimized and performance-optimized cluster types separately provide six available cluster specifications that differ in terms of storage capacity. For more information about cluster specifications, see Cluster specifications.

ReplicaCount

Integer

Yes

No

The number of replicas.

Valid values: 1 to 5. Data in all replicas is the same. The supported QPS linearly increases based on the number of replicas. A larger number of replicas indicates higher service availability. If your production environment requires high service availability, we recommend that you use at least two replicas.

IgnoreExisting

Boolean

No

No

Specifies whether to ignore the existing cluster.

Valid values:

  • true

  • false

Return values

Fn::GetAtt

  • Endpoint: the endpoint of the cluster.

  • InstanceId: the cluster ID.

  • ClusterName: the cluster name.

Examples

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ReplicaCount:
    Type: Number
    Description:
      en: The number of replicas.
    Required: true
    MinValue: 1
    MaxValue: 5
    Default: 1
  ClusterName:
    Type: String
    Description:
      en: The name of cluster.
    AllowedPattern: '[-a-z0-9_]{3,32}'
    Required: true
    Default: test
  ClusterType:
    Type: String
    Description:
      en: The type of cluster.
    AllowedValues:
      - Serverless
      - S.small
      - S.large
      - S.xlarge
      - S.2xlarge
      - S.4xlarge
      - S.8xlarge
      - S.16xlarge
      - P.small
      - P.large
      - P.xlarge
      - P.2xlarge
      - P.4xlarge
      - P.8xlarge
      - P.16xlarge
    Required: true
    Default: S.large
Resources:
  Cluster:
    Type: ALIYUN::DashVector::Cluster
    Properties:
      ReplicaCount:
        Ref: ReplicaCount
      ClusterName:
        Ref: ClusterName
      ClusterType:
        Ref: ClusterType
Outputs:
  Endpoint:
    Description: The endpoint of the cluster.
    Value:
      Fn::GetAtt:
        - Cluster
        - Endpoint
  InstanceId:
    Description: The ID of the cluster.
    Value:
      Fn::GetAtt:
        - Cluster
        - InstanceId
  ClusterName:
    Description: The name of the cluster.
    Value:
      Fn::GetAtt:
        - Cluster
        - ClusterName

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ReplicaCount": {
      "Type": "Number",
      "Description": {
        "en": "The number of replicas."
      },
      "Required": true,
      "MinValue": 1,
      "MaxValue": 5,
      "Default": 1
    },
    "ClusterName": {
      "Type": "String",
      "Description": {
        "en": "The name of cluster."
      },
      "AllowedPattern": "[-a-z0-9_]{3,32}",
      "Required": true,
      "Default": "test"
    },
    "ClusterType": {
      "Type": "String",
      "Description": {
        "en": "The type of cluster."
      },
      "AllowedValues": [
        "Serverless",
        "S.small",
        "S.large",
        "S.xlarge",
        "S.2xlarge",
        "S.4xlarge",
        "S.8xlarge",
        "S.16xlarge",
        "P.small",
        "P.large",
        "P.xlarge",
        "P.2xlarge",
        "P.4xlarge",
        "P.8xlarge",
        "P.16xlarge"
      ],
      "Required": true,
      "Default": "S.large"
    }
  },
  "Resources": {
    "Cluster": {
      "Type": "ALIYUN::DashVector::Cluster",
      "Properties": {
        "ReplicaCount": {
          "Ref": "ReplicaCount"
        },
        "ClusterName": {
          "Ref": "ClusterName"
        },
        "ClusterType": {
          "Ref": "ClusterType"
        }
      }
    }
  },
  "Outputs": {
    "Endpoint": {
      "Description": "The endpoint of the cluster.",
      "Value": {
        "Fn::GetAtt": [
          "Cluster",
          "Endpoint"
        ]
      }
    },
    "InstanceId": {
      "Description": "The ID of the cluster.",
      "Value": {
        "Fn::GetAtt": [
          "Cluster",
          "InstanceId"
        ]
      }
    },
    "ClusterName": {
      "Description": "The name of the cluster.",
      "Value": {
        "Fn::GetAtt": [
          "Cluster",
          "ClusterName"
        ]
      }
    }
  }
}