ALIYUN::OTS::InstanceV2类型用于创建新版表格存储实例。
语法
{
"Type": "ALIYUN::OTS::InstanceV2",
"Properties": {
"ClusterType": String,
"InstanceName": String,
"InstanceDescription": String,
"NetworkSourceACL": List,
"NetworkTypeACL": List,
"ResourceGroupId": String,
"Tags": List
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
ClusterType | String | 是 | 否 | 集群类型。 | 取值:
|
InstanceName | String | 是 | 否 | 实例名称。 | 实例的命名规范如下:
|
InstanceDescription | String | 否 | 是 | 实例描述。 | 长度限制在 3-256 个字符之间。 |
NetworkSourceACL | List | 否 | 是 | 实例允许的网络来源列表, | 最大支持1项配置。 取值:
|
NetworkTypeACL | List | 否 | 是 | 实例允许的网络类型列表。 | 最大支持3项配置 取值:
|
ResourceGroupId | String | 否 | 是 | 资源组 ID。 | 无 |
Tags | List | 否 | 是 | 标签列表。 | 最多支持20个,更多信息请参见Tags属性。 |
Tags语法
"Tags": [
{
"Value": String,
"Key": String
}
]
Tags属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Key | String | 是 | 否 | 标签键。 | 无 |
Value | String | 是 | 否 | 标签值。 | 无 |
返回值
Fn::GetAtt
InstanceName:实例名称。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
InstanceName:
Type: String
Description:
en: |
Instance name.The naming specifications for instances are as follows:
Must consist of English letters, numbers or dash lines (-).
The first character must be in English letters.
The end character cannot be a dash (-).
Insensitive case.
The length is between 3 and 16 characters.
Required: true
AllowedPattern: '[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9]$'
MinLength: 3
MaxLength: 16
ClusterType:
Type: String
Description:
en: |-
Cluster type (i.e. instance specification).
Enumeration values:
SSD: High performance.
HYBRID: Capacity type.
AllowedValues:
- SSD
- HYBRID
Required: true
Resources:
InstanceV2:
Type: ALIYUN::OTS::InstanceV2
Properties:
InstanceName:
Ref: InstanceName
ClusterType:
Ref: ClusterType
Outputs:
InstanceName:
Description: Name of the tablestore instance.
Value:
Fn::GetAtt:
- InstanceV2
- InstanceName
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"InstanceName": {
"Type": "String",
"Description": {
"en": "Instance name.The naming specifications for instances are as follows:\nMust consist of English letters, numbers or dash lines (-).\nThe first character must be in English letters.\nThe end character cannot be a dash (-).\nInsensitive case.\nThe length is between 3 and 16 characters.\n"
},
"Required": true,
"AllowedPattern": "[A-Za-z][A-Za-z0-9\\-]*[A-Za-z0-9]$",
"MinLength": 3,
"MaxLength": 16
},
"ClusterType": {
"Type": "String",
"Description": {
"en": "Cluster type (i.e. instance specification).\nEnumeration values:\nSSD: High performance.\nHYBRID: Capacity type."
},
"AllowedValues": [
"SSD",
"HYBRID"
],
"Required": true
}
},
"Resources": {
"InstanceV2": {
"Type": "ALIYUN::OTS::InstanceV2",
"Properties": {
"InstanceName": {
"Ref": "InstanceName"
},
"ClusterType": {
"Ref": "ClusterType"
}
}
}
},
"Outputs": {
"InstanceName": {
"Description": "Name of the tablestore instance.",
"Value": {
"Fn::GetAtt": [
"InstanceV2",
"InstanceName"
]
}
}
}
}
该文章对您有帮助吗?