Use o tipo de recurso ALIYUN::ADB::DBCluster para criar um cluster do AnalyticDB for MySQL.
Sintaxe
{
"Type": "ALIYUN::ADB::DBCluster",
"Properties": {
"DBNodeStorage": Integer,
"PeriodType": String,
"DBClusterCategory": String,
"ZoneId": String,
"ResourceGroupId": String,
"VPCId": String,
"VSwitchId": String,
"Mode": String,
"DBClusterDescription": String,
"ComputeResource": String,
"Period": Integer,
"PayType": String,
"ElasticIOResource": Integer,
"DBClusterVersion": String,
"DBNodeGroupCount": Integer,
"ExecutorCount": Integer,
"DBClusterClass": String,
"KmsId": String,
"DiskEncryption": Boolean,
"EnableSSL": Boolean,
"Tags": List
}
}
Propriedades
Nome da propriedade | Tipo | Obrigatório | Atualização permitida | Descrição | Restrição |
DBClusterCategory | String | Sim | Sim | Série | Valores válidos:
Para mais informações, consulte Edições. |
DBClusterVersion | String | Sim | Não | Versão do cluster do AnalyticDB for MySQL. | Defina o valor como 3.0. |
Mode | String | Sim | Não | Modo. | Valores válidos:
|
PayType | String | Sim | Não | Método de faturamento. | Valores válidos:
|
VPCId | String | Sim | Não | ID da Virtual Private Cloud (VPC). | Nenhuma. |
VSwitchId | String | Sim | Não | ID do vSwitch. | Nenhuma. |
ComputeResource | String | Não | Sim | Recurso de computação. | Recurso de computação. Este parâmetro é obrigatório se Mode for Flexible (modo elástico). Nota Chame a operação DescribeAvailableResource para consultar os recursos de computação disponíveis em uma região específica. |
DBClusterClass | String | Não | Sim | Especificação. | Especificação do cluster. Valores válidos:
Nota Este parâmetro é obrigatório se Mode for Reserver (modo reservado). |
DBClusterDescription | String | Não | Não | Observação | Nenhuma. |
DBNodeGroupCount | Integer | Não | Sim | Número de grupos de nós. | Valores válidos: 1 a 200 (inteiro). Nota Este parâmetro é obrigatório se Mode for Reserver (modo reservado). |
DBNodeStorage | Integer | Não | Sim | Capacidade de armazenamento por nó. | Esta propriedade é necessária apenas se Mode for Reserver. Unidade: GB. Valores válidos:
Nota Incremento: 100 GB para valores menores que 1.000 GB. Incremento: 1.000 GB para valores maiores ou iguais a 1.000 GB. |
ElasticIOResource | Integer | Não | Sim | Unidade de E/S elástica (EIU). | Esta propriedade é necessária apenas se Mode for Flexible. Para mais informações, consulte Dimensionar unidades de E/S elásticas (EIUs). |
ExecutorCount | Integer | Não | Não | Número de nós de computação usados pelo cluster no modo elástico. | Nenhuma. |
KmsId | String | Não | Não | ID da chave usada para criptografar dados do disco. | Nota Este parâmetro se aplica apenas quando a criptografia de disco está ativada para o cluster do AnalyticDB for MySQL. |
DiskEncryption | Boolean | Não | Não | Define se a criptografia de disco deve ser ativada. | Nenhuma. |
EnableSSL | Boolean | Não | Não | Define se a criptografia SSL deve ser ativada para conexões. | Valores válidos:
|
Period | Integer | Não | Não | Duração da assinatura. | Esta propriedade é necessária apenas se PayType for Prepaid. Valores válidos:
|
PeriodType | String | Não | Não | Define se o cluster de assinatura é faturado mensal ou anualmente. | Esta propriedade é necessária apenas se PayType for Prepaid. Valores válidos:
|
ResourceGroupId | String | Não | Sim | ID do grupo de recursos. | Nenhuma. |
Tags | List | Não | Sim | Tags. | É possível adicionar até 20 tags. Para mais informações, consulte Propriedade Tags. |
ZoneId | String | Não | Não | ID da zona. | Chame DescribeRegions para consultar as zonas disponíveis. |
Sintaxe de Tags
"Tags": [
{
"Key": String,
"Value": String
}
]
Propriedade Tags
|
Nome da propriedade |
Tipo |
Obrigatório |
Atualização permitida |
Descrição |
Restrição |
|
Key |
String |
Sim |
Não |
Chave da tag. |
Comprimento: 1 a 128 caracteres. Não pode começar com |
|
Value |
String |
Não |
Não |
Valor da tag. |
Comprimento: 0 a 128 caracteres. Não pode começar com |
Valores de retorno
Fn::GetAtt
DBClusterId: o ID do cluster.
OrderId: o ID do pedido.
ConnectionString: a string de conexão para a VPC.
Arn: o Alibaba Cloud Resource Name (ARN) do recurso.
Exemplos
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
DBClusterCategory:
Type: String
Description: |-
The edition of the cluster.
Valid values when the cluster is in reserved mode:
Basic
Cluster
When the cluster is in elastic mode, set the value to MixedStorage.
AllowedValues:
- Basic
- Cluster
- MixedStorage
Default: MixedStorage
ZoneId:
AssociationProperty: ALIYUN::ECS::Instance:ZoneId
Type: String
Description: The zone ID of the cluster. You can call the DescribeRegions operation to query the most recent zone list.
VPCId:
AssociationProperty: ALIYUN::ECS::VPC::VPCId
Type: String
Description: |-
The ID of the VPC.
Note If you leave this parameter empty, the default VPC or vSwitch of the specified region is used. If the region does not have a default VPC, a VPC is created.
VSwitchId:
AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
Type: String
Description: The ID of the vSwitch.
AssociationPropertyMetadata:
VpcId: VPC
ZoneId: VSwitchZoneId
Mode:
Type: String
Description: |-
The mode of the cluster. Valid values:
Reserver: the reserved mode
Flexible: the elastic mode
AllowedValues:
- Reserver
- Flexible
Default: Flexible
ComputeResource:
Type: String
Description: The computing resource of the cluster. This parameter is required in elastic mode.
Default: 8Core32GB
PayType:
Type: String
Description: |-
The billing method of the cluster. Valid values:
Postpaid: pay-as-you-go
Prepaid: subscription
AllowedValues:
- Prepaid
- PostPaid
Default: PostPaid
ElasticIOResource:
Type: Number
Description: |-
Elastic IO Unit
Note the flexible mode cluster will use this parameter.
Default: 0
DBClusterVersion:
Type: String
Description: The version of the cluster. Set the value to 3.0.
Default: '3.0'
Resources:
DBCluster:
Type: ALIYUN::ADB::DBCluster
Properties:
DBClusterCategory:
Ref: DBClusterCategory
ZoneId:
Ref: ZoneId
VPCId:
Ref: VPCId
VSwitchId:
Ref: VSwitchId
Mode:
Ref: Mode
ComputeResource:
Ref: ComputeResource
PayType:
Ref: PayType
ElasticIOResource:
Ref: ElasticIOResource
DBClusterVersion:
Ref: DBClusterVersion
Outputs:
DBClusterId:
Description: The ID of the cluster.
Value:
Fn::GetAtt:
- DBCluster
- DBClusterId
OrderId:
Description: The ID of the order.
Value:
Fn::GetAtt:
- DBCluster
- OrderId
ConnectionString:
Description: Vpc connection string.
Value:
Fn::GetAtt:
- DBCluster
- ConnectionString
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"DBClusterCategory": {
"Type": "String",
"Description": "The edition of the cluster.\nValid values when the cluster is in reserved mode:\nBasic\nCluster\nWhen the cluster is in elastic mode, set the value to MixedStorage.",
"AllowedValues": [
"Basic",
"Cluster",
"MixedStorage"
],
"Default": "MixedStorage"
},
"ZoneId": {
"AssociationProperty": "ALIYUN::ECS::Instance:ZoneId",
"Type": "String",
"Description": "The zone ID of the cluster. You can call the DescribeRegions operation to query the most recent zone list."
},
"VPCId": {
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
"Type": "String",
"Description": "The ID of the VPC.\nNote If you leave this parameter empty, the default VPC or vSwitch of the specified region is used. If the region does not have a default VPC, a VPC is created."
},
"VSwitchId": {
"AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
"Type": "String",
"Description": "The ID of the vSwitch.",
"AssociationPropertyMetadata": {
"VpcId": "VPC",
"ZoneId": "VSwitchZoneId"
}
},
"Mode": {
"Type": "String",
"Description": "The mode of the cluster. Valid values:\nReserver: the reserved mode\nFlexible: the elastic mode",
"AllowedValues": [
"Reserver",
"Flexible"
],
"Default": "Flexible"
},
"ComputeResource": {
"Type": "String",
"Description": "The computing resource of the cluster. This parameter is required in elastic mode.",
"Default": "8Core32GB"
},
"PayType": {
"Type": "String",
"Description": "The billing method of the cluster. Valid values:\nPostpaid: pay-as-you-go\nPrepaid: subscription",
"AllowedValues": [
"Prepaid",
"PostPaid"
],
"Default": "PostPaid"
},
"ElasticIOResource": {
"Type": "Number",
"Description": "Elastic IO Unit\nNote the flexible mode cluster will use this parameter.",
"Default": 0
},
"DBClusterVersion": {
"Type": "String",
"Description": "The version of the cluster. Set the value to 3.0.",
"Default": "3.0"
}
},
"Resources": {
"DBCluster": {
"Type": "ALIYUN::ADB::DBCluster",
"Properties": {
"DBClusterCategory": {
"Ref": "DBClusterCategory"
},
"ZoneId": {
"Ref": "ZoneId"
},
"VPCId": {
"Ref": "VPCId"
},
"VSwitchId": {
"Ref": "VSwitchId"
},
"Mode": {
"Ref": "Mode"
},
"ComputeResource": {
"Ref": "ComputeResource"
},
"PayType": {
"Ref": "PayType"
},
"ElasticIOResource": {
"Ref": "ElasticIOResource"
},
"DBClusterVersion": {
"Ref": "DBClusterVersion"
}
}
}
},
"Outputs": {
"DBClusterId": {
"Description": "The ID of the cluster.",
"Value": {
"Fn::GetAtt": [
"DBCluster",
"DBClusterId"
]
}
},
"OrderId": {
"Description": "The ID of the order.",
"Value": {
"Fn::GetAtt": [
"DBCluster",
"OrderId"
]
}
},
"ConnectionString": {
"Description": "Vpc connection string.",
"Value": {
"Fn::GetAtt": [
"DBCluster",
"ConnectionString"
]
}
}
}
}