文档

ALIYUN::DashVector::Cluster

更新时间:

ALIYUN::DashVector::Cluster类型用于创建向量检索Cluster。

语法

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

属性

属性名称

类型

必须

允许更新

描述

约束

ClusterName

String

实例名称。

必须由大小写字母、数字、下划线(_)、中划线(-)组成,长度[3, 32]。同一账户中不允许两个相同的Cluster名称同时存在。

ClusterType

String

实例规格。

取值:

  • 免费试用Cluster:采用Serverless架构,适用于快速体验产品。免费试用实例使用限制请参考约束与限制

  • 存储型和性能型Cluster分别提供6种可选规格,不同规格的主要区别在于存储容量的不同。实例规格详情,请参见实例规格

ReplicaCount

Integer

副本数。

可选范围为1-5。副本之间数据完全相同,副本数越大,可支持的QPS越高,呈线性关系。同时副本数越大,服务可用性越高,建议对可用性有较高要求的生产环境选择不小于2的副本数。

IgnoreExisting

Boolean

是否忽略现有集群。

取值:

  • true:忽略。

  • false:不忽略。

返回值

Fn::GetAtt

  • Endpoint:集群endpoint。

  • InstanceId:实例ID。

  • ClusterName:实例名称。

示例

YAML格式

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格式

{
  "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"
        ]
      }
    }
  }
}