ALIYUN::DashVector::Cluster
ALIYUN::DashVector::Cluster類型用于創(chuàng)建向量檢索Cluster。
語法
{
"Type": "ALIYUN::DashVector::Cluster",
"Properties": {
"ClusterName": String,
"ClusterType": String,
"ReplicaCount": Integer,
"IgnoreExisting": Boolean
}
}
屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
ClusterName | String | 是 | 否 | 實(shí)例名稱。 | 必須由大小寫字母、數(shù)字、下劃線(_)、中劃線(-)組成,長度[3, 32]。同一賬戶中不允許兩個相同的Cluster名稱同時存在。 |
ClusterType | String | 是 | 否 | 實(shí)例規(guī)格。 | 取值:
|
ReplicaCount | Integer | 是 | 否 | 副本數(shù)。 | 可選范圍為1-5。副本之間數(shù)據(jù)完全相同,副本數(shù)越大,可支持的QPS越高,呈線性關(guān)系。同時副本數(shù)越大,服務(wù)可用性越高,建議對可用性有較高要求的生產(chǎn)環(huán)境選擇不小于2的副本數(shù)。 |
IgnoreExisting | Boolean | 否 | 否 | 是否忽略現(xiàn)有集群。 | 取值:
|
返回值
Fn::GetAtt
Endpoint:集群endpoint。
InstanceId:實(shí)例ID。
ClusterName:實(shí)例名稱。
示例
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"
]
}
}
}
}
文檔內(nèi)容是否對您有幫助?