ALIYUN::RDS::DBInstance türü, bir ApsaraDB RDS veritabanı örneği oluşturmak için kullanılır.
Söz dizimi
{
"Type": "ALIYUN::RDS::DBInstance",
"Properties": {
"AutoUpgradeMinorVersion": String,
"PeriodType": String,
"Category": String,
"PrivateIpAddress": String,
"ResourceGroupId": String,
"TargetDedicatedHostIdForSlave": String,
"DBInstanceNetType": String,
"DBTimeZone": String,
"DedicatedHostGroupId": String,
"EncryptionKey": String,
"PreferredBackupPeriod": List,
"SecurityIPList": String,
"SecurityGroupId": String,
"DBIsIgnoreCase": Integer,
"DBInstanceStorage": Integer,
"DBMappings": List,
"Port": Integer,
"ConnectionStringPrefix": String,
"ConnectionStringType": String,
"MultiAZ": Boolean,
"MaintainTime": String,
"Engine": String,
"DBParamGroupId": String,
"DBInstanceDescription": String,
"Tags": Map,
"TargetDedicatedHostIdForMaster": String,
"EngineVersion": String,
"ZoneId": String,
"DBInstanceClass": String,
"AllocatePublicConnection": Boolean,
"PreferredBackupTime": String,
"VSwitchId": String,
"BackupPolicyMode": String,
"Period": Integer,
"PayType": String,
"DBInstanceStorageType": String,
"RoleARN": String,
"MasterUserPassword": String,
"MasterUserType": String,
"VpcId": String,
"MasterUsername": String,
"ConnectionMode": String,
"BackupRetentionPeriod": Number,
"TargetDedicatedHostIdForLog": String,
"SlaveZoneIds": List,
"AutoRenew": Boolean,
"SQLCollectorStatus": String,
"SSLSetting": String,
"LogBackupFrequency": String,
"EnableBackupLog": Boolean,
"ReleasedKeepPolicy": String,
"ArchiveBackupRetentionPeriod": Integer,
"ArchiveBackupKeepPolicy": String,
"ArchiveBackupKeepCount": Integer,
"LogBackupRetentionPeriod": Integer,
"HighSpaceUsageProtection": String,
"LocalLogRetentionSpace": Integer,
"BackUpCategory": String,
"CompressType": Integer,
"LocalLogRetentionHours": Integer,
"LogBackupLocalRetentionNumber": Integer,
"ServerlessConfig": Map,
"InstanceNetworkType": String,
"StorageAutoScale": String,
"StorageUpperBound": Number,
"StorageThreshold": Number,
"BurstingEnabled": Boolean,
"IoAccelerationEnabled": String,
"SubscriptionDeletionForce": Boolean,
"ColdDataEnabled": Boolean,
"DeletionProtection": Boolean
}
}
Özellikler
Özellik Adı | Tür | Gerekli | Güncelleme İzni | Açıklama | Kısıtlamalar |
ResourceGroupId | String | Hayır | Evet | Kaynak grubunun kimliği. | Yok |
Engine | String | Evet | Veritabanı türü. | Geçerli değerler:
| |
DBInstanceStorage | Integer | Evet | Evet | Veritabanı örneğinin depolama alanı. | Geçerli değerler:
Birim: GB. Not Değer, 5 GB'nin katı olmalıdır. |
EngineVersion | String | Hayır | Hayır | Veritabanının sürüm numarası. | Geçerli değerler:
|
AutoUpgradeMinorVersion | String | Hayır | Evet | Örneğin küçük motor sürümünü yükseltme yöntemi. | Geçerli değerler:
|
Port | Integer | Hayır | Evet | Örnek bağlantı noktası. | Yok |
ConnectionStringPrefix | String | Hayır | Evet | Uç nokta ön eki. | Ön ek küçük harfle başlamalı ve küçük harf veya rakamla bitmelidir. Küçük harfler, rakamlar ve tire (-) içerebilir. Ön ek en az 8 karakter uzunluğunda olmalıdır. Uç noktanın toplam uzunluğu (ön ek + son ek) 63 karakteri aşamaz. |
ConnectionStringType | String | Hayır | Evet | Uç nokta türü. | Geçerli değerler:
|
DBTimeZone | String | Hayır | Hayır | UTC saat dilimi. | Değer -12:59 ile +13:00 aralığında olmalıdır. Not
|
DBParamGroupId | String | Hayır | Hayır | Parametre şablonunun kimliği. | Yok |
Category | String | Hayır | Evet | Örnek sürümü. | Geçerli değerler:
Not Parametreleri sorgularken ZoneId, DBInstanceStorageType ve Category parametrelerini belirtin. Aksi takdirde doğrulama eksik kalabilir. |
TargetDedicatedHostIdForMaster | String | Hayır | Hayır | Adanmış kümede bir örnek oluştururken birincil örneğin ana bilgisayar kimliğini belirtin. | Yok |
DBIsIgnoreCase | Integer | Hayır | Hayır | Tablo adlarının büyük/küçük harfe duyarlı olup olmadığını belirtir. | Geçerli değerler:
|
EncryptionKey | String | Hayır | Hayır | Aynı bölgedeki disk şifrelemesi için kullanılan anahtarın kimliği. Anahtar kimliğini Key Management Service (KMS) konsolunda görüntüleyebilir veya yeni bir anahtar oluşturabilirsiniz. | Bu parametreyi belirtirseniz disk şifreleme etkinleştirilir ve devre dışı bırakılamaz. Ayrıca RoleARN parametresini de belirtmeniz gerekir. |
MaintainTime | String | Hayır | Hayır | Örneğin bakım penceresi. | Biçim: |
TargetDedicatedHostIdForSlave | String | Hayır | Hayır | Adanmış kümede bir örnek oluştururken ikincil örneğin ana bilgisayar kimliğini belirtin. | Yok |
DedicatedHostGroupId | String | Hayır | Hayır | Adanmış kümede bir örnek oluştururken adanmış kümenin kimliğini belirtin. | Yok |
DBInstanceStorageType | String | Hayır | Evet | Örnek depolama sınıfı. | Örneğin depolama sınıfı. Geçerli değerler:
Bu parametrenin varsayılan değeri, DBInstanceClass parametresinde belirtilen örnek türü koduna göre otomatik olarak belirlenir:
Not
|
RoleARN | String | Hayır | Hayır | Rolün ARN'si. RDS, KMS'e erişmek için bu rolü kullanır. | Daha fazla bilgi için bkz. RDS'e KMS'e erişim izni verme. |
DBInstanceClass | String | Evet | Evet | Örnek türü. | Daha fazla bilgi için bkz. Birincil örnek türleri. |
SecurityIPList | String | Evet | Evet | Örneğin tüm veritabanlarına erişmesine izin verilen IP adresi izin listesi. | Birden fazla IP adresini virgülle (,) ayırın. IP adresleri tekrar edemez. En fazla 1.000 IP adresi desteklenir. Desteklenen biçimler:
|
SecurityGroupId | String | Hayır | Evet | İlişkilendirilen güvenlik grubunun kimliği. | En fazla üç güvenlik grubu ilişkilendirebilirsiniz. Birden fazla güvenlik grubu kimliğini virgülle (,) ayırın. Güvenlik gruplarını temizlemek için boş bir dize belirtin. |
MultiAZ | Boolean | Hayır | Hayır | Veritabanı örneğinin birden fazla alanı destekleyip desteklemediğini belirtir. | Geçerli değerler:
Not Parametreleri sorgularken MultiAZ parametresini false olarak ayarlayın. Aksi takdirde doğrulama eksik kalabilir. |
VpcId | String | Hayır | Hayır | VPC kimliği. | Yok |
DBMappings | List | Hayır | Hayır | Örnek içinde yeni bir veritabanı oluşturur. | Daha fazla bilgi için bkz. DBMappings özellikleri. |
DBInstanceDescription | String | Hayır | Evet | Örneğin açıklaması veya notları. | Ad 2 ila 256 karakter uzunluğunda olmalıdır. İngilizce harf veya Çince karakterle başlamalıdır. |
SubscriptionDeletionForce | Boolean | Hayır | Hayır | Bu seçenek yalnızca abonelik örnekleri için geçerlidir. Abonelik örneği için bu seçenek true olarak ayarlanırsa örnek silinmeden önce kullandıkça öde örneğine dönüştürülür. Bu seçenek false olarak ayarlanırsa örnek zorla silinmez. Bu işlem ek ücretlere neden olabilir. Bu seçeneği dikkatli kullanın. | Yok |
ConnectionMode | String | Hayır | Hayır | Veritabanının bağlantı modu. | Geçerli değerler:
Bu parametre belirtilmezse RDS varsayılan bir değer atar. Not SQL Server 2012, 2016 ve 2017 yalnızca standart erişim modunu destekler. |
MasterUsername | String | Hayır | Evet | Veritabanı örneğinin yönetici hesabının adı. | Ad global olarak benzersiz olmalıdır. Uzunluğu en fazla 16 karakter olabilir. Harfle başlamalı ve harf, rakam ile alt çizgi (_) içerebilir. |
MasterUserPassword | String | Hayır | Evet | Veritabanı örneğinin yönetici hesabının parolası. | Uzunluk 8 ila 32 karakter arasında olmalıdır. Harf, rakam ve alt çizgi (_) içerebilir. |
ZoneId | String | Hayır | Hayır | Alan kimliği. | Not Parametreleri sorgularken ZoneId, DBInstanceStorageType ve Category parametrelerini belirtin. Aksi takdirde doğrulama eksik kalabilir. |
DBInstanceNetType | String | Hayır | Hayır | Veritabanı örneğinin ağ türü. | Geçerli değerler
|
VSwitchId | String | Hayır | Hayır | vSwitch kimliği. | Birden fazla değeri virgülle (,) ayırın. Veritabanı türü MariaDB ise bu parametreyi belirtmeniz gerekir. |
BackupPolicyMode | String | Hayır | Evet | Yedekleme türü. | Geçerli değerler:
|
AllocatePublicConnection | Boolean | Hayır | Hayır | Örnek için genel uç nokta isteyip istemediğinizi belirtir. | Geçerli değerler:
|
PreferredBackupTime | String | Hayır | Evet | Yedekleme zamanı. | Biçim: Geçerli değerler: 00:00Z-01:00Z, 01:00Z-02:00Z, 02:00Z-03:00Z, 03:00Z-04:00Z, 04:00Z-05:00Z, 05:00Z-06:00Z, 06:00Z-07:00Z, 07:00Z-08:00Z, 08:00Z-09:00Z, 09:00Z-10:00Z, 10:00Z-11:00Z, 11:00Z-12:00Z, 12:00Z-13:00Z, 13:00Z-14:00Z, 14:00Z-15:00Z, 15:00Z-16:00Z, 16:00Z-17:00Z, 17:00Z-18:00Z, 18:00Z-19:00Z, 19:00Z-20:00Z, 20:00Z-21:00Z, 21:00Z-22:00Z, 22:00Z-23:00Z, 23:00Z-24:00Z. |
BackupRetentionPeriod | Number | Hayır | Evet | Yedeklerin saklanacağı gün sayısı. | Değer 7 ila 30 aralığında olmalıdır. Birim: gün. Varsayılan değer: 7. |
PrivateIpAddress | String | Hayır | Hayır | Belirtilen vSwitch içindeki özel IP adresi. | Bu parametreyi belirtmezseniz sistem otomatik olarak bir özel IP adresi atar. |
PreferredBackupPeriod | List | Hayır | Evet | Yedekleme döngüsü. | Geçerli değerler:
|
MasterUserType | String | Hayır | Hayır | Yönetici hesabı türü. | Geçerli değerler:
|
Tags | Map | Hayır | Evet | TagKey ve TagValue dahil etiket listesi. | TagKey boş olamaz ancak TagValue boş olabilir. Örnek biçim: |
PeriodType | String | Hayır | Hayır | Faturalama döngüsü. | Geçerli değerler:
|
PayType | String | Hayır | Hayır | Örneğin faturalama yöntemi. | Geçerli değerler:
Not
|
Period | Integer | Hayır | Hayır | Abonelik süresi. | Geçerli değerler:
|
TargetDedicatedHostIdForLog | String | Hayır | Hayır | Adanmış kümede bir örnek oluştururken günlük kaydedici örneğinin ana bilgisayar kimliğini belirtin. | Yok |
SlaveZoneIds | List | Hayır | Hayır | Yüksek Kullanılabilirlik Sürümü veya Üç Düğümlü Kurumsal Sürüm örneği için ikincil alan. | En fazla iki ikincil alan belirtebilirsiniz, örneğin Her birincil veya ikincil alan için bir vSwitch belirtin. Örneğin, ZoneId olarak ayarlayın. |
SQLCollectorStatus | String | Hayır | Evet | SQL Explorer (SQL Denetimi) özelliğini etkinleştirip etkinleştirmeyeceğinizi belirtir. | Geçerli değerler:
|
SSLSetting | String | Hayır | Hayır | Örnek için Secure Sockets Layer (SSL) bağlantı ayarları. | Geçerli değerler:
|
AutoRenew | Boolean | Hayır | Evet | Otomatik yenilemeyi etkinleştirip etkinleştirmeyeceğinizi belirtir. | Bu parametre yalnızca abonelik örneği oluşturduğunuzda geçerlidir. Geçerli değerler:
Not
|
LogBackupFrequency | String | Hayır | Evet | Günlük yedekleme sıklığı. | Geçerli değer: LogInterval, her 30 dakikada bir yedekleme yapıldığını gösterir. LogBackupFrequency parametresinin varsayılan değeri PreferredBackupPeriod parametresinin değeriyle aynıdır. Not LogBackupFrequency parametresi yalnızca SQL Server için geçerlidir. |
EnableBackupLog | Boolean | Hayır | Evet | Günlük yedekleme özelliğini etkinleştirip etkinleştirmeyeceğinizi belirtir. | Geçerli değerler:
Not BackupPolicyMode parametresi LogBackupPolicy olarak ayarlandığında bu parametreyi belirtmeniz gerekir. |
ReleasedKeepPolicy | String | Hayır | Evet | Örnek serbest bırakıldıktan sonra arşivlenmiş yedekler için saklama ilkesi. | Geçerli değerler:
Not
|
ArchiveBackupRetentionPeriod | Integer | Hayır | Evet | Arşivlenmiş yedeklerin saklanacağı gün sayısı. | Değer 30 ila 1095 aralığında olmalıdır. Birim: gün. |
ArchiveBackupKeepPolicy | String | Hayır | Evet | Arşivlenmiş yedekler için saklama süresi. | Geçerli değerler:
|
ArchiveBackupKeepCount | Integer | Hayır | Evet | Saklanacak arşivlenmiş yedek sayısı. | Geçerli değerler:
Varsayılan değer: 1. |
LogBackupRetentionPeriod | Integer | Hayır | Evet | Günlük yedeklerinin saklanacağı gün sayısı. | Değer 7 ila 730 aralığında olmalıdır. Günlük yedek saklama süresi veri yedek saklama süresinden uzun olamaz. Not Günlük yedekleme özelliği etkinleştirildiğinde günlük yedekleri için saklama süresini belirtebilirsiniz. |
HighSpaceUsageProtection | String | Hayır | Evet | Disk alanı yetersiz olduğunda (örnek kullanımı %80'i aştığında veya kalan alan 5 GB'ten az olduğunda) günlük yedek dosyalarının zorla silinip silinmeyeceğini belirtir. | Geçerli değerler:
BackupPolicyMode parametresi LogBackupPolicy olarak ayarlandığında bu parametreyi belirtmeniz gerekir. |
LocalLogRetentionSpace | Integer | Hayır | Evet | Günlük yedek dosyalarını depolamak için örnekte kullanılabilecek maksimum alan yüzdesi. | Değer 0 ila 50 aralığında olmalıdır. Günlük yedek dosyalarının alan kullanımı bu yüzdeyi aşarsa sistem alan kullanımı bu yüzdenin altına düşene kadar günlük yedek dosyalarını önceden siler. Not BackupPolicyMode parametresi LogBackupPolicy olarak ayarlandığında bu parametreyi belirtmeniz gerekir. |
BackUpCategory | String | Hayır | Evet | Saniyeler içinde yedeklemeyi etkinleştirip etkinleştirmeyeceğinizi belirtir. | Geçerli değerler:
|
CompressType | Integer | Hayır | Evet | Yedek sıkıştırma yöntemi. | Geçerli değerler:
|
LocalLogRetentionHours | Integer | Hayır | Evet | Yerel günlük yedeklerinin saklanacağı saat sayısı. | Değer 0 ila 168 aralığında olmalıdır. Birim: saat. 0 değeri, günlük yedek dosyalarının örnekte saklanmadığını gösterir. Not BackupPolicyMode parametresi LogBackupPolicy olarak ayarlandığında bu parametreyi belirtmeniz gerekir. |
LogBackupLocalRetentionNumber | Integer | Hayır | Evet | Örnekte saklanabilecek günlük yedek dosyası sayısı. | Değer 6 ila 100 aralığında olmalıdır. Varsayılan değer: 60. |
ServerlessConfig | Map | Hayır | Hayır | RDS Sunucusuz örneği için ayarlar. | Daha fazla bilgi için bkz. ServerlessConfig özellikleri. |
InstanceNetworkType | String | Hayır | Hayır | Örneğin ağ türü. | Geçerli değerler:
Not Cloud disk kullanan RDS for MySQL örnekleri yalnızca VPC'leri destekler. Bu parametreyi VPC olarak ayarlamanız gerekir. PostgreSQL ve MariaDB örnekleri yalnızca VPC'leri destekler. Bu parametreyi VPC olarak ayarlamanız gerekir. SQL Server Basic Edition ve Web Edition örnekleri klasik ağları ve VPC'leri destekler. Diğer örnekler yalnızca VPC'leri destekler. Bu parametreyi VPC olarak ayarlamanız gerekir. |
StorageAutoScale | String | Hayır | Hayır | Otomatik depolama genişletme anahtarı. | Bu parametre yalnızca MySQL ve PostgreSQL için desteklenir. Geçerli değerler:
Not Bu ayarı örnek oluşturulduktan sonra ModifyDasInstanceConfig çağırarak da ayarlayabilirsiniz. Daha fazla bilgi için bkz. ApsaraDB RDS for MySQL örneği için otomatik depolama genişletmeyi yapılandırma. |
StorageUpperBound | Number | Hayır | Hayır | Otomatik genişletme için toplam depolama alanının üst sınırı. | Otomatik genişletme, örneğin toplam depolama alanının bu değeri aşmasına neden olmaz. Birim: GB. Not Değer 0'dan büyük veya 0'a eşit olmalıdır. StorageAutoScale parametresi Enable olarak ayarlandığında bu parametre gereklidir. |
StorageThreshold | Number | Hayır | Hayır | Otomatik depolama genişletmeyi tetikleyen eşik (yüzde). | Geçerli değerler:
Not StorageAutoScale parametresi Enable olarak ayarlandığında bu parametre gereklidir. |
BurstingEnabled | Boolean | Hayır | Hayır | Genel Amaçlı ESSD'ler için G/Ç patlatma özelliği anahtarı. | Geçerli değerler:
Not Genel Amaçlı ESSD'lerin G/Ç patlatma özelliği hakkında daha fazla bilgi için bkz. Premium performans diski nedir?. |
IoAccelerationEnabled | String | Hayır | Hayır | Genel Amaçlı ESSD'ler için G/Ç hızlandırma özelliğini etkinleştirip etkinleştirmeyeceğinizi belirtir. | Geçerli değerler:
Not Genel Amaçlı ESSD'lerin G/Ç hızlandırma özelliği hakkında daha fazla bilgi için bkz. Buffer Pool Extension (BPE) özelliği. |
ColdDataEnabled | Boolean | Hayır | Hayır | Genel cloud disk veri arşivleme özelliğini etkinleştirir veya devre dışı bırakır. | Geçerli değerler:
Genel Amaçlı ESSD'lerin veri arşivleme özelliği hakkında daha fazla bilgi için bkz. Veri arşivleme özelliği. |
DeletionProtection | Boolean | Hayır | Evet | Serbest bırakma koruma özelliğinin etkin olup olmadığını belirtir. | Geçerli değerler:
|
ServerlessConfig sözdizimi
"ServerlessConfig": {
"SwitchForce": Boolean,
"MaxCapacity": Number,
"MinCapacity": Number,
"AutoPause": Boolean
}
ServerlessConfig özellikleri
Property Name | Type | Required | Update allowed | Description | Constraints |
SwitchForce | Boolean | No | No | Serverless örnek için zorunlu esnek ölçeklendirmenin etkinleştirilip etkinleştirilmeyeceğini belirtir. | Geçerli değerler:
Not
|
MaxCapacity | Number | Yes | No | Örneğin RDS Kapasite Birimleri (RCU) otomatik ölçeklendirme aralığının üst sınırı. | Değer 0,5 ile 8 arasında olmalıdır. Not Bu parametrenin değeri MinCapacity parametresinin değerine eşit veya ondan büyük olmalıdır. |
MinCapacity | Number | Yes | No | Örneğin RCU otomatik ölçeklendirme aralığının alt sınırı. | Değer 0,5 ile 8 arasında olmalıdır. Not Bu parametrenin değeri MaxCapacity parametresinin değerine eşit veya ondan küçük olmalıdır. |
AutoPause | Boolean | No | No | Serverless örnek için otomatik duraklatma ve başlatmanın etkinleştirilip etkinleştirilmeyeceğini belirtir. | Geçerli değerler:
Not 10 dakika boyunca bağlantı olmadığında örnek duraklatılmış duruma geçer. Bir bağlantı kurulduğunda örnek otomatik olarak uyanır. |
DBMappings sözdizimi
"DBMappings": [
{
"DBDescription": String,
"CharacterSetName": String,
"DBName": String
}
]
DBMappings özellikleri
Property Name | Type | Required | Update allowed | Description | Constraints |
CharacterSetName | String | Yes | No | Karakter kümesi. | Geçerli değerler:
|
DBName | String | Yes | No | Veritabanı adı. | Ad genel olarak benzersiz olmalıdır. Değer en fazla 64 karakter uzunluğunda olabilir. Bir harfle başlamalı ve harf, rakam ve alt çizgi (_) içerebilir. |
DBDescription | String | No | No | Veritabanı açıklaması. | Değer 2 ila 256 karakter uzunluğunda olmalıdır. Bir harfle başlamalı ve |
Dönüş değerleri
Fn::GetAtt
DBInstanceId: Veritabanı örneğinin ID'si.
InnerPort: Veritabanı örneğinin dahili bağlantı noktası.
InnerIPAddress: Dahili IP adresi.
InnerConnectionString: Dahili uç nokta.
PublicPort: Veritabanı örneğinin genel bağlantı noktası.
PublicConnectionString: Genel uç nokta.
PublicIPAddress: Genel IP adresi.
Örnekler
Senaryo 1: Kullandıkça öde ApsaraDB RDS for PostgreSQL Basic Edition örneği oluşturun.
ROSTemplateFormatVersion: '2015-09-01'
Description: Create a pay-as-you-go ApsaraDB RDS for PostgreSQL Basic Edition instance.
Parameters:
VpcId:
AssociationProperty: ALIYUN::ECS::VPC::VPCId
Type: String
Description:
en: The ID of the existing VPC. You can find the ID, which starts with vpc-xxx, in the VPC console.
zh-cn: The ID of the existing VPC.
Label:
en: VPC ID
zh-cn: VPC ID
ZoneId:
Type: String
Label:
en: Zone ID
zh-cn: Zone ID
Description:
en: The ID of the zone.
zh-cn: The ID of the zone.
Required: true
AssociationProperty: ZoneId
AssociationPropertyMetadata:
AutoSelectFirst: true
VSwitchId:
AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
AssociationPropertyMetadata:
VpcId: ${VpcId}
ZoneId: ${ZoneId}
Type: String
Description:
en: The ID of the existing vSwitch. You can find the ID in the VPC console.
zh-cn: The ID of the existing vSwitch.
Label:
en: VSwitch ID
zh-cn: vSwitch ID
DBInstanceClass:
Type: String
Label:
en: Instance type
zh-cn: Instance type
Required: true
AssociationProperty: ALIYUN::RDS::Instance::InstanceType
AssociationPropertyMetadata:
InstanceChargeType: Postpaid
ZoneId: ${ZoneId}
EngineVersion: '17.0'
Engine: PostgreSQL
Category: Basic
DBInstanceStorageType: cloud_essd
Resources:
RDSInstance:
Type: ALIYUN::RDS::DBInstance
Properties:
ZoneId:
Ref: ZoneId
VpcId:
Ref: VpcId
VSwitchId:
Ref: VSwitchId
DBInstanceClass:
Ref: DBInstanceClass
DBInstanceStorage: 50
Engine: PostgreSQL
EngineVersion: '17.0'
Category: Basic
DBInstanceStorageType: cloud_essd
AllocatePublicConnection: true
PayType: Postpaid
SecurityIPList: 0.0.0.0/0
Outputs:
InnerConnectionString:
Value:
Fn::GetAtt:
- RDSInstance
- InnerConnectionString
InnerIPAddress:
Value:
Fn::GetAtt:
- RDSInstance
- InnerIPAddress
PublicConnectionString:
Value:
Fn::GetAtt:
- RDSInstance
- PublicConnectionString
PublicIPAddress:
Value:
Fn::GetAtt:
- RDSInstance
- PublicIPAddress{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": "Create a pay-as-you-go ApsaraDB RDS for PostgreSQL Basic Edition instance.",
"Parameters": {
"VpcId": {
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
"Type": "String",
"Description": {
"en": "The ID of the existing VPC. You can find the ID, which starts with vpc-xxx, in the VPC console.",
"zh-cn": "The ID of the existing VPC."
},
"Label": {
"en": "VPC ID",
"zh-cn": "VPC ID"
}
},
"ZoneId": {
"Type": "String",
"Label": {
"en": "Zone ID",
"zh-cn": "Zone ID"
},
"Description": {
"en": "The ID of the zone.",
"zh-cn": "The ID of the zone."
},
"Required": true,
"AssociationProperty": "ZoneId",
"AssociationPropertyMetadata": {
"AutoSelectFirst": true
}
},
"VSwitchId": {
"AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}",
"ZoneId": "${ZoneId}"
},
"Type": "String",
"Description": {
"en": "The ID of the existing vSwitch. You can find the ID in the VPC console.",
"zh-cn": "The ID of the existing vSwitch."
},
"Label": {
"en": "VSwitch ID",
"zh-cn": "vSwitch ID"
}
},
"DBInstanceClass": {
"Type": "String",
"Label": {
"en": "Instance type",
"zh-cn": "Instance type"
},
"Required": true,
"AssociationProperty": "ALIYUN::RDS::Instance::InstanceType",
"AssociationPropertyMetadata": {
"InstanceChargeType": "Postpaid",
"ZoneId": "${ZoneId}",
"EngineVersion": "17.0",
"Engine": "PostgreSQL",
"Category": "Basic",
"DBInstanceStorageType": "cloud_essd"
}
}
},
"Resources": {
"RDSInstance": {
"Type": "ALIYUN::RDS::DBInstance",
"Properties": {
"ZoneId": {
"Ref": "ZoneId"
},
"VpcId": {
"Ref": "VpcId"
},
"VSwitchId": {
"Ref": "VSwitchId"
},
"DBInstanceClass": {
"Ref": "DBInstanceClass"
},
"DBInstanceStorage": 50,
"Engine": "PostgreSQL",
"EngineVersion": "17.0",
"Category": "Basic",
"DBInstanceStorageType": "cloud_essd",
"AllocatePublicConnection": true,
"PayType": "Postpaid",
"SecurityIPList": "0.0.0.0/0"
}
}
},
"Outputs": {
"InnerConnectionString": {
"Value": {
"Fn::GetAtt": [
"RDSInstance",
"InnerConnectionString"
]
}
},
"InnerIPAddress": {
"Value": {
"Fn::GetAtt": [
"RDSInstance",
"InnerIPAddress"
]
}
},
"PublicConnectionString": {
"Value": {
"Fn::GetAtt": [
"RDSInstance",
"PublicConnectionString"
]
}
},
"PublicIPAddress": {
"Value": {
"Fn::GetAtt": [
"RDSInstance",
"PublicIPAddress"
]
}
}
}
}Senaryo 2: Abonelik tabanlı, çok alanlı ApsaraDB RDS for MySQL High-availability Edition örneği oluşturun.
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: Create a subscription, multi-zone ApsaraDB RDS for MySQL High-availability Edition instance.
en: Create a subscription, multi-zone ApsaraDB RDS for MySQL High-availability Edition instance.
Parameters:
VSwitch2:
AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
AssociationPropertyMetadata:
VpcId: ${VpcId}
ZoneId: ${ZoneId2}
Type: String
Description:
zh-cn: The ID of the existing vSwitch.
en: The ID of the existing vSwitch. You can find the ID in the VPC console.
Label:
zh-cn: VSwitch 2 ID
en: VSwitch 2 ID
VpcId:
AssociationProperty: ALIYUN::ECS::VPC::VPCId
Type: String
Description:
zh-cn: The ID of the existing VPC.
en: The ID of the existing VPC. You can find the ID, which starts with vpc-xxx, in the VPC console.
Label:
zh-cn: VPC ID
en: VPC ID
ZoneId1:
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
AssociationPropertyMetadata:
ExclusiveTo:
- ZoneId2
Type: String
Label:
zh-cn: Primary zone
en: Primary zone
ZoneId2:
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
AssociationPropertyMetadata:
ExclusiveTo:
- ZoneId1
Type: String
Label:
zh-cn: Secondary zone
en: Secondary zone
VSwitch1:
AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
AssociationPropertyMetadata:
VpcId: ${VpcId}
ZoneId: ${ZoneId1}
Type: String
Description:
zh-cn: The ID of the existing vSwitch.
en: The ID of the existing vSwitch. You can find the ID in the VPC console.
Label:
zh-cn: VSwitch 1 ID
en: VSwitch 1 ID
DBInstanceClass:
AssociationProperty: ALIYUN::RDS::Instance::InstanceType
AssociationPropertyMetadata:
Engine: MySQL
Category: HighAvailability
EngineVersion: '8.0'
InstanceChargeType: Prepaid
DBInstanceStorageType: cloud_essd
Type: String
Label:
zh-cn: Instance type
en: Instance type
Outputs:
InnerIPAddress:
Value:
Fn::GetAtt:
- RDSInstance
- InnerIPAddress
InnerConnectionString:
Value:
Fn::GetAtt:
- RDSInstance
- InnerConnectionString
PublicConnectionString:
Value:
Fn::GetAtt:
- RDSInstance
- PublicConnectionString
PublicIPAddress:
Value:
Fn::GetAtt:
- RDSInstance
- PublicIPAddress
Resources:
RDSInstance:
Type: ALIYUN::RDS::DBInstance
Properties:
Category: HighAvailability
Engine: MySQL
PayType: Prepaid
SlaveZoneIds:
- Ref: ZoneId2
DBInstanceStorage: 20
PeriodType: Month
DBInstanceStorageType: cloud_essd
Period: 1
ZoneId:
Ref: ZoneId1
VpcId:
Ref: VpcId
VSwitchId:
Fn::Join:
- ','
- - Ref: VSwitch1
- Ref: VSwitch2
EngineVersion: '8.0'
DBInstanceClass:
Ref: DBInstanceClass
SecurityIPList: 0.0.0.0/0
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- VpcId
- ZoneId1
- ZoneId2
- VSwitch1
- VSwitch2
Label:
default:
zh-cn: Network configuration
en: Network configuration
- Parameters:
- DBInstanceClass
Label:
default:
zh-cn: RDS configuration
en: RDS configuration{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": {
"zh-cn": "Create a subscription, multi-zone ApsaraDB RDS for MySQL High-availability Edition instance.",
"en": "Create a subscription, multi-zone ApsaraDB RDS for MySQL High-availability Edition instance."
},
"Parameters": {
"VSwitch2": {
"AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}",
"ZoneId": "${ZoneId2}"
},
"Type": "String",
"Description": {
"zh-cn": "The ID of the existing vSwitch.",
"en": "The ID of the existing vSwitch. You can find the ID in the VPC console."
},
"Label": {
"zh-cn": "VSwitch 2 ID",
"en": "VSwitch 2 ID"
}
},
"VpcId": {
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
"Type": "String",
"Description": {
"zh-cn": "The ID of the existing VPC.",
"en": "The ID of the existing VPC. You can find the ID, which starts with vpc-xxx, in the VPC console."
},
"Label": {
"zh-cn": "VPC ID",
"en": "VPC ID"
}
},
"ZoneId1": {
"AssociationProperty": "ALIYUN::ECS::Instance::ZoneId",
"AssociationPropertyMetadata": {
"ExclusiveTo": [
"ZoneId2"
]
},
"Type": "String",
"Label": {
"zh-cn": "Primary zone",
"en": "Primary zone"
}
},
"ZoneId2": {
"AssociationProperty": "ALIYUN::ECS::Instance::ZoneId",
"AssociationPropertyMetadata": {
"ExclusiveTo": [
"ZoneId1"
]
},
"Type": "String",
"Label": {
"zh-cn": "Secondary zone",
"en": "Secondary zone"
}
},
"VSwitch1": {
"AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}",
"ZoneId": "${ZoneId1}"
},
"Type": "String",
"Description": {
"zh-cn": "The ID of the existing vSwitch.",
"en": "The ID of the existing vSwitch. You can find the ID in the VPC console."
},
"Label": {
"zh-cn": "VSwitch 1 ID",
"en": "VSwitch 1 ID"
}
},
"DBInstanceClass": {
"AssociationProperty": "ALIYUN::RDS::Instance::InstanceType",
"AssociationPropertyMetadata": {
"Engine": "MySQL",
"Category": "HighAvailability",
"EngineVersion": "8.0",
"InstanceChargeType": "Prepaid",
"DBInstanceStorageType": "cloud_essd"
},
"Type": "String",
"Label": {
"zh-cn": "Instance type",
"en": "Instance type"
}
}
},
"Outputs": {
"InnerIPAddress": {
"Value": {
"Fn::GetAtt": [
"RDSInstance",
"InnerIPAddress"
]
}
},
"InnerConnectionString": {
"Value": {
"Fn::GetAtt": [
"RDSInstance",
"InnerConnectionString"
]
}
},
"PublicConnectionString": {
"Value": {
"Fn::GetAtt": [
"RDSInstance",
"PublicConnectionString"
]
}
},
"PublicIPAddress": {
"Value": {
"Fn::GetAtt": [
"RDSInstance",
"PublicIPAddress"
]
}
}
},
"Resources": {
"RDSInstance": {
"Type": "ALIYUN::RDS::DBInstance",
"Properties": {
"Category": "HighAvailability",
"Engine": "MySQL",
"PayType": "Prepaid",
"SlaveZoneIds": [
{
"Ref": "ZoneId2"
}
],
"DBInstanceStorage": 20,
"PeriodType": "Month",
"DBInstanceStorageType": "cloud_essd",
"Period": 1,
"ZoneId": {
"Ref": "ZoneId1"
},
"VpcId": {
"Ref": "VpcId"
},
"VSwitchId": {
"Fn::Join": [
",",
[
{
"Ref": "VSwitch1"
},
{
"Ref": "VSwitch2"
}
]
]
},
"EngineVersion": "8.0",
"DBInstanceClass": {
"Ref": "DBInstanceClass"
},
"SecurityIPList": "0.0.0.0/0"
}
}
},
"Metadata": {
"ALIYUN::ROS::Interface": {
"ParameterGroups": [
{
"Parameters": [
"VpcId",
"ZoneId1",
"ZoneId2",
"VSwitch1",
"VSwitch2"
],
"Label": {
"default": {
"zh-cn": "Network configuration",
"en": "Network configuration"
}
}
},
{
"Parameters": [
"DBInstanceClass"
],
"Label": {
"default": {
"zh-cn": "RDS configuration",
"en": "RDS configuration"
}
}
}
]
}
}
}Senaryo 3: Kullandıkça öde Serverless ApsaraDB RDS for MySQL örneği oluşturun ve bir veritabanı ile veritabanı hesabı ilişkilendirin.
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: Create a pay-as-you-go Serverless ApsaraDB RDS for MySQL instance and associate a database and a database account.
en: Create a pay-as-you-go Serverless ApsaraDB RDS for MySQL instance and associate a database and a database account.
Parameters:
VpcId:
AssociationProperty: ALIYUN::ECS::VPC::VPCId
Type: String
Description:
zh-cn: The ID of the existing VPC.
en: The ID of the existing VPC. You can find the ID, which starts with vpc-xxx, in the VPC console.
Label:
zh-cn: VPC ID
en: VPC ID
RdsAccountName:
Default: db_root
Type: String
Description:
zh-cn: The name of the MySQL administrator user.
en: Account Name
Label:
zh-cn: Username
en: Account Name
ZoneId:
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
Type: String
Label:
zh-cn: Primary zone
en: Primary zone
VSwitch:
AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
AssociationPropertyMetadata:
VpcId: ${VpcId}
ZoneId: ${ZoneId}
Type: String
Description:
zh-cn: The ID of the existing vSwitch.
en: The ID of the existing vSwitch. You can find the ID in the VPC console.
Label:
zh-cn: vSwitch ID
en: VSwitch ID
DBInstanceClass:
Default: mysql.n2.serverless.1c
AssociationProperty: ALIYUN::RDS::Instance::InstanceType
AssociationPropertyMetadata:
Engine: MySQL
EngineVersion: '8.0'
InstanceChargeType: Serverless
DBInstanceStorageType: cloud_essd
ZoneId: ${ZoneId}
Type: String
Label:
zh-cn: Instance type
en: Instance type
RdsAccountPassword:
Type: String
NoEcho: true
Description:
zh-cn: |-
The value must be 8 to 32 characters in length. It must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. The following special characters are supported:
!@#$&%^*()_+-= .
en: |-
The value must be 8 to 32 characters in length. It must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. The following special characters are supported:
!@#$& amp;%^* ()_+-= .
Label:
zh-cn: User password
en: DB Account Password
Outputs:
PublicConnectionString:
Value:
Fn::GetAtt:
- RDSInstance
- PublicConnectionString
InnerIPAddress:
Value:
Fn::GetAtt:
- RDSInstance
- InnerIPAddress
AccountName:
Value:
Fn::GetAtt:
- RdsAccount
- AccountName
PublicIPAddress:
Value:
Fn::GetAtt:
- RDSInstance
- PublicIPAddress
DBName:
Value:
Fn::GetAtt:
- Database
- DBName
InnerConnectionString:
Value:
Fn::GetAtt:
- RDSInstance
- InnerConnectionString
Resources:
RDSInstance:
Type: ALIYUN::RDS::DBInstance
Properties:
Category: serverless_basic
Engine: MySQL
DBInstanceStorage: 20
ServerlessConfig:
MinCapacity: 0.5
AutoPause: false
MaxCapacity: 8
SwitchForce: false
DBInstanceStorageType: cloud_essd
PayType: Serverless
ZoneId:
Ref: ZoneId
VpcId:
Ref: VpcId
VSwitchId:
Ref: VSwitch
EngineVersion: '8.0'
DBInstanceClass:
Ref: DBInstanceClass
SecurityIPList: 0.0.0.0/0
RdsAccount:
Type: ALIYUN::RDS::Account
Properties:
DBInstanceId:
Ref: RDSInstance
AccountPassword:
Ref: RdsAccountPassword
AccountType: Super
AccountName:
Ref: RdsAccountName
Database:
Type: ALIYUN::RDS::Database
Properties:
CharacterSetName: UTF8
DBInstanceId:
Ref: RDSInstance
DBName: springboot_demo
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- VpcId
- ZoneId
- VSwitch
Label:
default:
zh-cn: Network configuration
en: Network configuration
- Parameters:
- DBInstanceClass
- RdsAccountName
- RdsAccountPassword
Label:
default:
zh-cn: RDS configuration
en: RDS configuration
{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": {
"zh-cn": "Create a pay-as-you-go Serverless ApsaraDB RDS for MySQL instance and associate a database and a database account.",
"en": "Create a pay-as-you-go Serverless ApsaraDB RDS for MySQL instance and associate a database and a database account."
},
"Parameters": {
"VpcId": {
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
"Type": "String",
"Description": {
"zh-cn": "The ID of the existing VPC.",
"en": "The ID of the existing VPC. You can find the ID, which starts with vpc-xxx, in the VPC console."
},
"Label": {
"zh-cn": "VPC ID",
"en": "VPC ID"
}
},
"RdsAccountName": {
"Default": "db_root",
"Type": "String",
"Description": {
"zh-cn": "The name of the MySQL administrator user.",
"en": "Account Name"
},
"Label": {
"zh-cn": "Username",
"en": "Account Name"
}
},
"ZoneId": {
"AssociationProperty": "ALIYUN::ECS::Instance::ZoneId",
"Type": "String",
"Label": {
"zh-cn": "Primary zone",
"en": "Primary zone"
}
},
"VSwitch": {
"AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}",
"ZoneId": "${ZoneId}"
},
"Type": "String",
"Description": {
"zh-cn": "The ID of the existing vSwitch.",
"en": "The ID of the existing vSwitch. You can find the ID in the VPC console."
},
"Label": {
"zh-cn": "vSwitch ID",
"en": "VSwitch ID"
}
},
"DBInstanceClass": {
"Default": "mysql.n2.serverless.1c",
"AssociationProperty": "ALIYUN::RDS::Instance::InstanceType",
"AssociationPropertyMetadata": {
"Engine": "MySQL",
"EngineVersion": "8.0",
"InstanceChargeType": "Serverless",
"DBInstanceStorageType": "cloud_essd",
"ZoneId": "${ZoneId}"
},
"Type": "String",
"Label": {
"zh-cn": "Instance type",
"en": "Instance type"
}
},
"RdsAccountPassword": {
"Type": "String",
"NoEcho": true,
"Description": {
"zh-cn": "The value must be 8 to 32 characters in length. It must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. The following special characters are supported:\n!@#$&%^*()_+-= .",
"en": "The value must be 8 to 32 characters in length. It must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. The following special characters are supported:\n!@#$& amp;%^* ()_+-= ."
},
"Label": {
"zh-cn": "User password",
"en": "DB Account Password"
}
}
},
"Outputs": {
"PublicConnectionString": {
"Value": {
"Fn::GetAtt": [
"RDSInstance",
"PublicConnectionString"
]
}
},
"InnerIPAddress": {
"Value": {
"Fn::GetAtt": [
"RDSInstance",
"InnerIPAddress"
]
}
},
"AccountName": {
"Value": {
"Fn::GetAtt": [
"RdsAccount",
"AccountName"
]
}
},
"PublicIPAddress": {
"Value": {
"Fn::GetAtt": [
"RDSInstance",
"PublicIPAddress"
]
}
},
"DBName": {
"Value": {
"Fn::GetAtt": [
"Database",
"DBName"
]
}
},
"InnerConnectionString": {
"Value": {
"Fn::GetAtt": [
"RDSInstance",
"InnerConnectionString"
]
}
}
},
"Resources": {
"RDSInstance": {
"Type": "ALIYUN::RDS::DBInstance",
"Properties": {
"Category": "serverless_basic",
"Engine": "MySQL",
"DBInstanceStorage": 20,
"ServerlessConfig": {
"MinCapacity": 0.5,
"AutoPause": false,
"MaxCapacity": 8,
"SwitchForce": false
},
"DBInstanceStorageType": "cloud_essd",
"PayType": "Serverless",
"ZoneId": {
"Ref": "ZoneId"
},
"VpcId": {
"Ref": "VpcId"
},
"VSwitchId": {
"Ref": "VSwitch"
},
"EngineVersion": "8.0",
"DBInstanceClass": {
"Ref": "DBInstanceClass"
},
"SecurityIPList": "0.0.0.0/0"
}
},
"RdsAccount": {
"Type": "ALIYUN::RDS::Account",
"Properties": {
"DBInstanceId": {
"Ref": "RDSInstance"
},
"AccountPassword": {
"Ref": "RdsAccountPassword"
},
"AccountType": "Super",
"AccountName": {
"Ref": "RdsAccountName"
}
}
},
"Database": {
"Type": "ALIYUN::RDS::Database",
"Properties": {
"CharacterSetName": "UTF8",
"DBInstanceId": {
"Ref": "RDSInstance"
},
"DBName": "springboot_demo"
}
}
},
"Metadata": {
"ALIYUN::ROS::Interface": {
"ParameterGroups": [
{
"Parameters": [
"VpcId",
"ZoneId",
"VSwitch"
],
"Label": {
"default": {
"zh-cn": "Network configuration",
"en": "Network configuration"
}
}
},
{
"Parameters": [
"DBInstanceClass",
"RdsAccountName",
"RdsAccountPassword"
],
"Label": {
"default": {
"zh-cn": "RDS configuration",
"en": "RDS configuration"
}
}
}
]
}
}
}Daha fazla örnek için, bkz. bu kaynağı içeren genel şablonlar.