ALIYUN::DashVector::Cluster类型用于创建向量检索Cluster。
语法
{
"Type": "ALIYUN::DashVector::Cluster",
"Properties": {
"ClusterName": String,
"ClusterType": String,
"ReplicaCount": Integer,
"IgnoreExisting": Boolean
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
ClusterName | String | 是 | 否 | 实例名称。 | 必须由大小写字母、数字、下划线(_)、中划线(-)组成,长度[3, 32]。同一账户中不允许两个相同的Cluster名称同时存在。 |
ClusterType | String | 是 | 否 | 实例规格。 | 取值: |
ReplicaCount | Integer | 是 | 否 | 副本数。 | 可选范围为1-5。副本之间数据完全相同,副本数越大,可支持的QPS越高,呈线性关系。同时副本数越大,服务可用性越高,建议对可用性有较高要求的生产环境选择不小于2的副本数。 |
IgnoreExisting | Boolean | 否 | 否 | 是否忽略现有集群。 | 取值:
|
返回值
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"
]
}
}
}
}
文档内容是否对您有帮助?