Cria uma instância do ApsaraDB for SelectDB.
Sintaxe
{
"Type": "ALIYUN::SELECTDB::DBInstance",
"Properties": {
"CacheSize": Integer,
"ChargeType": String,
"DBInstanceClass": String,
"EngineVersion": String,
"VSwitchId": String,
"VpcId": String,
"ZoneId": String,
"AccountPassword": String,
"ConnectionString": String,
"DBInstanceDescription": String,
"Engine": String,
"Period": String,
"ResourceGroupId": String,
"SecurityIPList": List,
"Tags": List,
"UsedTime": Integer
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatória |
Editável |
Descrição |
Restrição |
|
CacheSize |
Integer |
Sim |
Não |
Tamanho do cache reservado. |
Nenhuma. |
|
ChargeType |
String |
Sim |
Não |
Método de faturamento da instância. |
Valores válidos:
|
|
DBInstanceClass |
String |
Sim |
Não |
Tipo da instância. |
Valores válidos:
|
|
EngineVersion |
String |
Sim |
Não |
Versão do mecanismo de banco de dados. |
Valores válidos:
|
|
VSwitchId |
String |
Sim |
Não |
ID do vSwitch. |
Nenhuma. |
|
VpcId |
String |
Sim |
Não |
ID da VPC. |
Nenhuma. |
|
ZoneId |
String |
Sim |
Não |
ID da zona. |
Nenhuma. |
|
AccountPassword |
String |
Não |
Não |
Senha da conta de administrador do banco de dados. |
A senha deve atender aos seguintes requisitos:
|
|
ConnectionString |
String |
Não |
Não |
Endpoint para conexão ao banco de dados. |
Nenhuma. |
|
DBInstanceDescription |
String |
Não |
Não |
Descrição da instância. |
Nenhuma. |
|
Engine |
String |
Não |
Não |
Tipo do mecanismo de banco de dados. |
Valor padrão: selectdb. |
|
Period |
String |
Não |
Não |
Unidade de duração da assinatura. |
Valores válidos:
Nota
Obrigatório apenas quando ChargeType estiver definido como Prepaid. |
|
ResourceGroupId |
String |
Não |
Não |
ID do grupo de recursos. |
Nenhuma. |
|
SecurityIPList |
List |
Não |
Não |
Endereços IP na lista de permissões da instância. |
Suporta até 1.000 endereços IP. |
|
Tags |
List |
Não |
Não |
Tags da instância. |
É possível adicionar até 20 tags. Para mais informações, consulte Propriedades de Tags. |
|
UsedTime |
Integer |
Não |
Não |
Duração da assinatura. |
Valores válidos:
Nota
Obrigatório apenas quando ChargeType estiver definido como Prepaid. |
Sintaxe de Tags
"Tags": [
{
"Value": String,
"Key": String
}
]
Propriedades de Tags
|
Propriedade |
Tipo |
Obrigatória |
Editável |
Descrição |
Restrição |
|
Key |
String |
Sim |
Não |
Chave da tag. |
Nenhuma. |
|
Value |
String |
Não |
Não |
Valor da tag. |
Nenhuma. |
Valores de retorno
Fn::GetAtt
DBInstanceId: ID da instância.
VpcConnectionString: endpoint da VPC da instância.
Exemplos
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
EngineVersion:
Type: String
Description:
en: Database version.
AllowedValues:
- '3.0'
- '4.0'
Required: true
ZoneId:
AssociationProperty: ZoneId
Type: String
Description:
en: Availability Zone ID.
Required: true
DBInstanceClass:
Type: String
Description:
en: |-
The class of the DB instance.
Call DescribeAllDBInstanceClass API to check the latest class list
Required: true
VSwitchId:
AssociationPropertyMetadata:
VpcId: ${VpcId}
ZoneId: ${ZoneId}
AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
Type: String
Description:
en: Switch ID.
Required: true
CacheSize:
Type: Number
Description:
en: Reserve cache size.
Required: true
MinValue: 100
MaxValue: 4000
VpcId:
AssociationProperty: ALIYUN::ECS::VPC::VPCId
Type: String
Description:
en: VPC id.
Required: true
ChargeType:
Type: String
Description:
en: |-
The paid type of instance.Value:
Postpaid: Postpaid (pay per quantity).
Prepaid: Prepaid (year and monthly).
AllowedValues:
- Postpaid
- Prepaid
Required: true
Resources:
DBInstance:
Type: ALIYUN::SELECTDB::DBInstance
Properties:
EngineVersion:
Ref: EngineVersion
ZoneId:
Ref: ZoneId
DBInstanceClass:
Ref: DBInstanceClass
VSwitchId:
Ref: VSwitchId
CacheSize:
Ref: CacheSize
VpcId:
Ref: VpcId
ChargeType:
Ref: ChargeType
Outputs:
DBInstanceId:
Description: Instance ID.
Value:
Fn::GetAtt:
- DBInstance
- DBInstanceId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"EngineVersion": {
"Type": "String",
"Description": {
"en": "Database version."
},
"AllowedValues": [
"3.0",
"4.0"
],
"Required": true
},
"ZoneId": {
"AssociationProperty": "ZoneId",
"Type": "String",
"Description": {
"en": "Availability Zone ID."
},
"Required": true
},
"DBInstanceClass": {
"Type": "String",
"Description": {
"en": "The class of the DB instance.\nCall DescribeAllDBInstanceClass API to check the latest class list"
},
"Required": true
},
"VSwitchId": {
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}",
"ZoneId": "${ZoneId}"
},
"AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
"Type": "String",
"Description": {
"en": "Switch ID."
},
"Required": true
},
"CacheSize": {
"Type": "Number",
"Description": {
"en": "Reserve cache size."
},
"Required": true,
"MinValue": 100,
"MaxValue": 4000
},
"VpcId": {
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
"Type": "String",
"Description": {
"en": "VPC id."
},
"Required": true
},
"ChargeType": {
"Type": "String",
"Description": {
"en": "The paid type of instance.Value:\nPostpaid: Postpaid (pay per quantity).\nPrepaid: Prepaid (year and monthly)."
},
"AllowedValues": [
"Postpaid",
"Prepaid"
],
"Required": true
}
},
"Resources": {
"DBInstance": {
"Type": "ALIYUN::SELECTDB::DBInstance",
"Properties": {
"EngineVersion": {
"Ref": "EngineVersion"
},
"ZoneId": {
"Ref": "ZoneId"
},
"DBInstanceClass": {
"Ref": "DBInstanceClass"
},
"VSwitchId": {
"Ref": "VSwitchId"
},
"CacheSize": {
"Ref": "CacheSize"
},
"VpcId": {
"Ref": "VpcId"
},
"ChargeType": {
"Ref": "ChargeType"
}
}
}
},
"Outputs": {
"DBInstanceId": {
"Description": "Instance ID.",
"Value": {
"Fn::GetAtt": [
"DBInstance",
"DBInstanceId"
]
}
}
}
}