Utilisez le type de ressource ALIYUN::ADB::DBCluster pour créer un cluster AnalyticDB for MySQL.
Syntaxe
{
"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
}
}
Propriétés
Nom de la propriété | Type | Obligatoire | Mise à jour autorisée | Description | Contrainte |
DBClusterCategory | String | Oui | Oui | Série | Valeurs valides :
Pour plus d'informations, consultez Éditions. |
DBClusterVersion | String | Oui | Non | Version du cluster AnalyticDB for MySQL. | Définissez la valeur sur 3.0. |
Mode | String | Oui | Non | Modèle. | Valeurs valides :
|
PayType | String | Oui | Non | Méthode de facturation. | Valeurs valides :
|
VPCId | String | Oui | Non | ID du VPC (Virtual Private Cloud). | Aucune. |
VSwitchId | String | Oui | Non | ID du vSwitch. | Aucune. |
ComputeResource | String | Non | Oui | Ressource de calcul. | Ressource de calcul. Ce paramètre est obligatoire si Mode est Flexible (mode élastique). Remarque Appelez l'opération DescribeAvailableResource pour interroger les ressources de calcul disponibles dans une région spécifiée. |
DBClusterClass | String | Non | Oui | Spécification. | Spécification du cluster. Valeurs valides :
Remarque Ce paramètre est obligatoire si Mode est Reserver (mode réservé). |
DBClusterDescription | String | Non | Non | Remarque | Aucune. |
DBNodeGroupCount | Integer | Non | Oui | Nombre de groupes de nœuds. | Valeurs valides : 1 à 200 (entier). Remarque Ce paramètre est obligatoire si Mode est Reserver (mode réservé). |
DBNodeStorage | Integer | Non | Oui | Capacité de stockage par nœud. | Cette propriété est requise uniquement si Mode est Reserver. Unité : Go. Valeurs valides :
Remarque Pas : 100 Go pour les valeurs inférieures à 1 000 Go. Pas : 1 000 Go pour les valeurs supérieures ou égales à 1 000 Go. |
ElasticIOResource | Integer | Non | Oui | Unité d'E/S élastique (EIU). | Cette propriété est requise uniquement si Mode est Flexible. Pour plus d'informations, consultez Ajouter des unités d'E/S élastiques (EIU). |
ExecutorCount | Integer | Non | Non | Nombre de nœuds de calcul utilisés par le cluster en mode élastique. | Aucune. |
KmsId | String | Non | Non | ID de la clé utilisée pour chiffrer les données sur disque. | Remarque Ce paramètre s'applique uniquement lorsque le chiffrement sur disque est activé pour le cluster AnalyticDB for MySQL. |
DiskEncryption | Boolean | Non | Non | Indique s'il faut activer le chiffrement sur disque. | Aucune. |
EnableSSL | Boolean | Non | Non | Indique s'il faut activer le chiffrement SSL pour les connexions. | Valeurs valides :
|
Period | Integer | Non | Non | Durée de l'abonnement. | Cette propriété est requise uniquement si PayType est Prepaid. Valeurs valides :
|
PeriodType | String | Non | Non | Indique si le cluster sous abonnement est facturé mensuellement ou annuellement. | Cette propriété est requise uniquement si PayType est Prepaid. Valeurs valides :
|
ResourceGroupId | String | Non | Oui | ID du groupe de ressources. | Aucune. |
Tags | List | Non | Oui | Tags. | Vous pouvez ajouter jusqu'à 20 tags. Pour plus d'informations, consultez Propriété Tags. |
ZoneId | String | Non | Non | ID de la zone. | Appelez DescribeRegions pour interroger les zones disponibles. |
Syntaxe des tags
"Tags": [
{
"Key": String,
"Value": String
}
]
Propriété Tags
|
Nom de la propriété |
Type |
Obligatoire |
Mise à jour autorisée |
Description |
Contrainte |
|
Key |
String |
Oui |
Non |
Clé du tag. |
Longueur : 1 à 128 caractères. Ne peut pas commencer par |
|
Value |
String |
Non |
Non |
Valeur du tag. |
Longueur : 0 à 128 caractères. Ne peut pas commencer par |
Valeurs de retour
Fn::GetAtt
DBClusterId : ID du cluster.
OrderId : ID de la commande.
ConnectionString : Chaîne de connexion pour le VPC.
Arn : Nom de ressource Alibaba Cloud (ARN) de la ressource.
Exemples
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"
]
}
}
}
}