Tüm Ürünler
Search
Belge Merkezi

Resource Orchestration Service:ALIYUN::RDS::PrepayDBInstance

Son Güncelleme:Oct 05, 2026

ALIYUN::RDS::PrepayDBInstance, abonelik ApsaraDB RDS örnekleri oluşturmak için kullanılır.

Sözdizimi

{
  "Type": "ALIYUN::RDS::PrepayDBInstance",
  "Properties": {
    "DBMappings": List,
    "CouponCode": String,
    "MasterUsername": String,
    "PeriodType": String,
    "DBInstanceNetType": String,
    "MasterUserType": String,
    "AutoRenew": Boolean,
    "PreferredBackupTime": String,
    "PrivateIpAddress": String,
    "Engine": String,
    "MultiAZ": Boolean,
    "VpcId": String,
    "ConnectionMode": String,
    "ResourceGroupId": String,
    "VSwitchId": String,
    "BackupRetentionPeriod": Number,
    "Quantity": Number,
    "CommodityCode": String,
    "ZoneId": String,
    "AutoPay": Boolean,
    "Port": Integer,
    "ConnectionStringPrefix": String,
    "SubscriptionDeletionForce": Boolean,
    "ConnectionStringType": String,
    "EngineVersion": String,
    "DBInstanceClass": String,
    "PreferredBackupPeriod": List,
    "DBInstanceStorage": Integer,
    "DBInstanceDescription": String,
    "Tags": Map,
    "Period": Number,
    "MasterUserPassword": String,
    "AllocatePublicConnection": Boolean,
    "SlaveZoneIds": List,
    "TargetDedicatedHostIdForMaster": String,
    "RoleARN": String,
    "DBInstanceStorageType": String,
    "Category": String,
    "DBParamGroupId": String,
    "EncryptionKey": String,
    "DBIsIgnoreCase": Integer,
    "SecurityGroupId": String,
    "TargetDedicatedHostIdForLog": String,
    "DBTimeZone": String,
    "DedicatedHostGroupId": String,
    "TargetDedicatedHostIdForSlave": String,
    "MaintainTime": String,
    "SQLCollectorStatus": String,
    "SSLSetting": String,
    "ArchiveBackupRetentionPeriod": Integer,
    "LogBackupRetentionPeriod": Integer,
    "EnableBackupLog": Boolean,
    "LogBackupLocalRetentionNumber": Integer,
    "ArchiveBackupKeepPolicy": String,
    "LocalLogRetentionHours": Integer,
    "HighSpaceUsageProtection": String,
    "CompressType": Integer,
    "LogBackupFrequency": String,
    "BackupPolicyMode": String,
    "ArchiveBackupKeepCount": Integer,
    "LocalLogRetentionSpace": Integer,
    "ReleasedKeepPolicy": String,
    "BackUpCategory": String,
    "ServerlessConfig": Map,
    "InstanceNetworkType": String,
    "StorageAutoScale": String,
    "StorageUpperBound": Number,
    "StorageThreshold": Number,
    "IoAccelerationEnabled": String,
    "ColdDataEnabled": Boolean,
    "BurstingEnabled": Boolean,
    "DeletionProtection": Boolean
  }
}

Özellikler

Özellik

Tür

Gerekli

Düzenlenebilir

Açıklama

Kısıtlama

ResourceGroupId

String

Hayır

Evet

Kaynak grubunun kimliği.

Yok.

DBMappings

List

Hayır

Hayır

Örnek üzerinde oluşturmak istediğiniz veritabanları.

Daha fazla bilgi için bkz. DBMappings özellikleri.

CouponCode

String

Hayır

Hayır

Kupon kodu.

Yok.

MasterUsername

String

Hayır

Evet

Örneğin veritabanı hesabının adı.

Ad küresel olarak benzersiz olmalıdır.

Uzunluğu 2 ila 16 karakter arasında olmalıdır. Bir harfle başlamalı ve bir harf veya rakamla bitmelidir. Harfler, rakamlar ve alt çizgi (_) içerebilir.

PeriodType

String

Evet

Hayır

Abonelik süresinin birimi.

Geçerli değerler:

  • Year (Yıl)

  • Month (Ay) (varsayılan)

AutoUpgradeMinorVersion

String

Hayır

Evet

Örnek küçük sürüm yükseltme yöntemi.

Geçerli değerler:

  • Auto: Küçük sürüme otomatik olarak yükseltir.

  • Manual: Otomatik olarak yükseltmez. Yalnızca mevcut sürüm artık desteklenmediğinde zorunlu yükseltme yapar.

DBInstanceNetType

String

Hayır

Hayır

Örneğin ağ bağlantı türü.

Geçerli değerler:

  • Internet

  • Intranet (varsayılan)

MasterUserType

String

Hayır

Hayır

Veritabanı hesabının türü.

Geçerli değerler:

  • Normal (varsayılan): standart hesap

  • Super: yetkili hesap

  • Sysadmin: sistem yönetici hesabı

    Not

    Sistem yönetici hesapları yalnızca SQL Server veritabanlarını destekler.

Port

Integer

Hayır

Evet

Örneğin bağlantı noktası.

Yok.

ConnectionStringPrefix

String

Hayır

Evet

Uç noktanın öneki.

Önek 8 ila 64 karakter uzunluğunda olmalı ve harf, rakam ve tire (-) içerebilir.

ConnectionStringType

String

Hayır

Evet

Uç nokta türü.

Geçerli değerler:

  • Inner: özel

  • Public: genel

PreferredBackupTime

String

Hayır

Evet

Yedekleme zamanı.

Zamanı SS:ddZ-SS:ddZ biçiminde belirtin.

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 ve 23:00Z-24:00Z.

PrivateIpAddress

String

Hayır

Hayır

vSwitch ile eşleşen özel IP adresi.

Bu özelliği belirtmezseniz sistem otomatik olarak bir özel IP adresi atar.

Engine

String

Evet

Hayır

Veritabanı altyapısının türü.

Geçerli değerler:

  • MySQL

  • SQLServer

  • PostgreSQL

  • PPAS

  • MariaDB

MultiAZ

Boolean

Hayır

Hayır

Örneğin alanlar arasında dağıtılıp dağıtılmayacağını belirtir.

Geçerli değerler:

  • true

  • false

VpcId

String

Hayır

Hayır

Sanal özel cloud (VPC) kimliği.

Yok.

ConnectionMode

String

Hayır

Hayır

Veritabanının bağlantı modu.

Geçerli değerler:

  • Standard: standart mod

    Not

    SQL Server 2012, SQL Server 2016 ve SQL Server 2017 çalıştıran örnekler yalnızca standart modu destekler.

  • Safe (varsayılan): veritabanı proxy modu

Bu özelliği belirtmezseniz sistem varsayılan olarak bir bağlantı modu atar.

AutoRenew

Boolean

Hayır

Hayır

Örnek için otomatik yenilemenin etkinleştirilip etkinleştirilmeyeceğini belirtir.

Geçerli değerler:

  • true

  • false

VSwitchId

String

Hayır

Hayır

vSwitch kimliği.

Yok.

BackupRetentionPeriod

Number

Hayır

Evet

Yedekleme verilerini saklayabileceğiniz gün sayısı.

Yok.

Quantity

Number

Hayır

Hayır

Oluşturmak istediğiniz örnek sayısı.

Geçerli değerler: 1 ila 99.

Varsayılan değer: 1.

CommodityCode

String

Evet

Hayır

Ürün kodu.

Geçerli değerler:

  • rds

  • bards

  • rords

SubscriptionDeletionForce

Boolean

Hayır

Hayır

Bu özellik yalnızca abonelik örnekleri için geçerlidir. Bir abonelik örneği için bu özelliği true olarak ayarlarsanız örnek zorla silinmeden önce kullandıkça öde modeline dönüştürülür. Bir abonelik örneği için bu özelliği false olarak ayarlarsanız örnek zorla silinmez. Bu özellik ek ücretlere neden olur. Bu özelliği belirtirken dikkatli olun.

Yok.

ZoneId

String

Hayır

Hayır

Alan kimliği.

Yok.

EngineVersion

String

Evet

Hayır

Veritabanı altyapısının sürümü.

Geçerli değerler:

  • Engine MySQL olarak ayarlandığında geçerli değerler: 5.5, 5.6, 5.7 ve 8.0.

  • Engine SQLServer olarak ayarlandığında geçerli değerler: 2008r2, 08r2_ent_ha, 2012, 2012_ent_ha, 2012_std_ha, 2012_web, 2014_std_ha, 2016_ent_ha, 2016_std_ha, 2016_web, 2017_std_ha, 2017_ent ve 2019_ent.

  • Engine PostgreSQL olarak ayarlandığında geçerli değerler: 9.4, 10.0, 11.0 ve 12.0.

  • Engine PPAS olarak ayarlandığında geçerli değerler: 9.3 ve 10.0.

  • Engine MariaDB olarak ayarlandığında geçerli değer: 10.3.

DBInstanceClass

String

Evet

Evet

Örnek türü.

Örnekler: rds.mys2.large, rds.mss1.large ve rds.pg.s1.small.

PreferredBackupPeriod

List

Hayır

Evet

Verileri yedeklemek istediğiniz haftanın günü.

Geçerli değerler:

  • Monday (Pazartesi)

  • Tuesday (Salı)

  • Wednesday (Çarşamba)

  • Thursday (Perşembe)

  • Friday (Cuma)

  • Saturday (Cumartesi)

  • Sunday (Pazar)

DBInstanceStorage

Integer

Evet

Evet

Örneğin depolama kapasitesi.

Geçerli değerler:

  • Engine MySQL olarak ayarlandığında geçerli değerler: 5 ila 1000.

  • Engine SQLServer olarak ayarlandığında geçerli değerler: 10 ila 1000.

  • Engine PostgreSQL veya PPAS olarak ayarlandığında geçerli değerler: 5 ila 2000.

Birim: GB.

Not

DBInstanceStorage değeri 5 GB'lık artışlarla belirtilmelidir.

DBInstanceDescription

String

Hayır

Evet

Örneğin açıklaması.

Açıklama 2 ila 256 karakter uzunluğunda olmalıdır. Bir harfle başlamalı ve http:// veya https:// ile başlayamaz. Harf, rakam, alt çizgi (_) ve tire (-) içerebilir.

Tags

Map

Hayır

Evet

Etiketler.

Yok.

Period

Number

Evet

Hayır

Abonelik süresi.

Geçerli değerler:

  • PeriodType Month olarak ayarlandığında geçerli değerler: 1 ila 9.

  • PeriodType Year olarak ayarlandığında geçerli değerler: 1 ila 3.

MasterUserPassword

String

Hayır

Evet

Örneğin veritabanı hesabının parolası.

Parola 8 ila 32 karakter uzunluğunda olmalıdır. Parola büyük harf, küçük harf, rakam ve özel karakterlerden en az üçünü içermelidir. Aşağıdaki özel karakterler desteklenir: ! @ # $ & ; % ^ * ( ) _ + - =.

AllocatePublicConnection

Boolean

Hayır

Hayır

Örnek için genel bir uç nokta talep edilip edilmeyeceğini belirtir.

Geçerli değerler:

  • true

  • false

AutoPay

Boolean

Hayır

Hayır

Otomatik ödemenin etkinleştirilip etkinleştirilmeyeceğini belirtir.

Geçerli değerler:

  • true (varsayılan)

  • false

SlaveZoneIds

List

Hayır

Hayır

Yüksek Kullanılabilirlik veya Kurumsal Sürüm örneğinin ikincil alan kimlikleri.

En fazla iki ikincil alan belirtebilirsiniz. Örneğin, bu özelliği ["zone-b"] veya ["zone-b", "zone-c"] olarak ayarlayabilirsiniz.

Her birincil veya ikincil alan için bir vSwitch belirtmeniz gerekir. Örneğin, ZoneId değerini "zone-a" ve SlaveZoneIds değerini ["zone-c", "zone-b"] olarak ayarlarsanız VSwitchId değerini "vsw-zone-a,vsw-zone-c,vsw-zone-b" olarak ayarlamanız gerekir.

Sistemin otomatik olarak bir ikincil alan seçmesini istiyorsanız SlaveZoneIds değerini ["Auto"] veya ["Auto", "Auto"] olarak ayarlamanız gerekir. Bu durumda, birincil alan için bir vSwitch kimliği belirtirseniz sistem ikincil alanlarda otomatik olarak bir vSwitch oluşturur.

TargetDedicatedHostIdForMaster

String

Hayır

Hayır

Özel bir kümede oluşturmak istediğiniz birincil örneğin ana bilgisayar kimliği.

Yok.

RoleARN

String

Hayır

Hayır

Rolün Alibaba Cloud Resource Name (ARN) değeri. Bu rolü kullanarak ApsaraDB RDS üzerinden Key Management Service (KMS) hizmetine erişebilirsiniz.

Yok.

DBInstanceStorageType

String

Hayır

Evet

Örneğin depolama türü.

Geçerli değerler:

  • local_ssd (önerilen): yerel SSD

  • cloud_ssd: standart SSD

  • cloud_essd: Gelişmiş SSD (ESSD)

Category

String

Hayır

Evet

Örneğin sürümü.

Geçerli değerler:

  • Basic: Temel Sürüm.

  • HighAvailability: Yüksek Kullanılabilirlik Sürümü

  • AlwaysOn: Küme Sürümü

  • Finance: Kurumsal Sürüm

DBParamGroupId

String

Hayır

Hayır

Parametre şablonunun kimliği.

Yok.

EncryptionKey

String

Hayır

Hayır

Örneğin bulunduğu bölgedeki disk şifrelemesi için kullanılan anahtarın kimliği.

Anahtar kimliğini KMS konsolundan alabilirsiniz. Ayrıca bir anahtar da oluşturabilirsiniz.

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:

  • 1 (varsayılan): Tablo adları büyük/küçük harfe duyarlı değildir.

  • 0: Tablo adları büyük/küçük harfe duyarlıdır.

SecurityGroupId

String

Hayır

Evet

Güvenlik grubunun kimliği.

Örneği en fazla üç güvenlik grubuyla ilişkilendirebilirsiniz. Güvenlik grubu kimliklerini virgülle (,) ayırın. Örneği tüm güvenlik gruplarından ayırmak istiyorsanız bu özelliği boş bırakın.

TargetDedicatedHostIdForLog

String

Hayır

Hayır

Özel bir kümede oluşturmak istediğiniz günlükleyici örneğinin ana bilgisayar kimliği.

Yok.

DBTimeZone

String

Hayır

Hayır

UTC saat dilimi.

Geçerli değerler: -12:59 ila +13:00.

Bu özelliği belirtmezseniz sistem varsayılan olarak örneğin bulunduğu bölgenin varsayılan saat dilimini kullanır.

Yerel SSD'lerin bağlı olduğu bir örnek oluşturuyorsanız saat dilimini adlandırabilirsiniz.

DedicatedHostGroupId

String

Hayır

Hayır

Örneği oluşturmak istediğiniz özel kümenin kimliği.

Yok.

TargetDedicatedHostIdForSlave

String

Hayır

Hayır

Özel bir kümede oluşturmak istediğiniz ikincil örneğin ana bilgisayar kimliği.

Yok.

MaintainTime

String

Hayır

Hayır

Örneğin bakım penceresi.

Bakım penceresini SS:ddZ-SS:ddZ biçiminde belirtin.

SQLCollectorStatus

String

Hayır

Evet

SQL Explorer ve Denetim özelliğinin etkinleştirilip etkinleştirilmeyeceğini belirtir.

Geçerli değerler:

  • Enable (Etkinleştir)

  • Disabled (Devre Dışı)

SSLSetting

String

Hayır

Hayır

Örneğin SSL bağlantı ayarları.

Geçerli değerler:

  • Disabled (varsayılan): örneğin SSL bağlantı ayarlarını devre dışı bırakır.

  • EnabledForPublicConnection: örneğin SSL bağlantı ayarlarını etkinleştirir. SSL sertifikaları genel uç noktaları korumak için kullanılır.

    Not

    Bu özelliği EnabledForPublicConnection olarak ayarlarsanız AllocatePublicConnection özelliğini true olarak ayarlamanız gerekir.

  • EnabledForInnerConnection: örneğin SSL bağlantı ayarlarını etkinleştirir. SSL sertifikaları özel uç noktaları korumak için kullanılır.

ArchiveBackupRetentionPeriod

Integer

Hayır

Evet

Arşivlenen yedeklemeleri saklamak istediğiniz gün sayısı.

Yok.

LogBackupRetentionPeriod

Integer

Hayır

Evet

Günlük yedeklemelerini saklamak istediğiniz gün sayısı.

Yok.

EnableBackupLog

Boolean

Hayır

Evet

Günlük yedeklemenin etkinleştirilip etkinleştirilmeyeceğini belirtir.

Geçerli değerler:

  • true

  • false

LogBackupLocalRetentionNumber

Integer

Hayır

Evet

Saklamak istediğiniz yerel ikili günlük sayısı.

Yok.

ArchiveBackupKeepPolicy

String

Hayır

Evet

Arşivlenen yedeklemeleri saklamak istediğiniz döngü.

Geçerli değerler:

  • ByMonth

  • ByWeek

  • KeepAll

ArchiveBackupKeepCount, döngü içinde saklanabilecek yedekleme sayısını belirler. Varsayılan sayı 0'dır.

Not

Bu özellik, BackupPolicyMode DataBackupPolicy olarak ayarlandığında etkili olur.

LocalLogRetentionHours

Integer

Hayır

Evet

Yerel günlük yedeklemelerini saklamak istediğiniz saat sayısı.

Yok.

HighSpaceUsageProtection

String

Hayır

Evet

Örneğin kapasite kullanımı %80'i aşarsa veya örnekte kalan kapasite 5 GB'tan azsa ikili günlüklerin zorla silinip silinmeyeceğini belirtir.

Geçerli değerler:

  • Disable (Devre Dışı Bırak)

  • Enable (Etkinleştir)

CompressType

Integer

Hayır

Evet

Yedekleme verilerini sıkıştırmak için kullanmak istediğiniz yöntem.

Geçerli değerler:

  • 0: yedekleme verilerini sıkıştırmaz.

  • 1: yedekleme verilerini sıkıştırmak için zlib kullanır.

  • 2: yedekleme verilerini paralel olarak sıkıştırmak için zlib kullanır.

  • 4: yedekleme verilerini sıkıştırmak için QuickLZ kullanır. Sıkıştırılmış yedekleme verilerini veritabanlarını ve tabloları geri yüklemek için kullanabilirsiniz.

  • 8: yedekleme verilerini sıkıştırmak için QuickLZ kullanır. Sıkıştırılmış yedekleme verilerini veritabanlarını veya tabloları geri yüklemek için kullanamazsınız. Bu değer yalnızca örnek MySQL 8.0 çalıştırdığında kullanılabilir.

LogBackupFrequency

String

Hayır

Evet

Günlükleri yedeklemek istediğiniz sıklık.

Bu özellik, Engine SQLServer olarak ayarlandığında kullanılabilir.

Değeri LogInterval olarak ayarlayın. LogInterval değeri, sistemin günlükleri her 30 dakikada bir yedeklediğini belirtir.

Not

LogBackupFrequency varsayılan değeri PreferredBackupPeriod değeriyle aynıdır.

BackupPolicyMode

String

Hayır

Evet

Yedekleme türü.

Geçerli değerler:

  • DataBackupPolicy

  • LogBackupPolicy

ArchiveBackupKeepCount

Integer

Hayır

Evet

Saklamak istediğiniz arşivlenmiş yedekleme sayısı.

Yok.

LocalLogRetentionSpace

Integer

Hayır

Evet

Örnekteki yerel günlüklerin maksimum kapasite kullanımı.

Yok.

ReleasedKeepPolicy

String

Hayır

Evet

Örnek silindiğinde arşivlenmiş yedeklemeleri saklamak için kullanmak istediğiniz ilke.

Geçerli değerler:

  • None: arşivlenmiş yedeklemeleri saklamaz.

  • Lastest: yalnızca en son arşivlenmiş yedeklemeyi saklar.

  • All: tüm arşivlenmiş yedeklemeleri saklar.

BackUpCategory

String

Hayır

Evet

Yedekleme örneğinin sürümü.

Geçerli değerler:

  • Basic: Temel Sürüm.

  • HighAvailability: Yüksek Kullanılabilirlik Sürümü

  • AlwaysOn: Küme Sürümü

  • Finance: Kurumsal Sürüm

ServerlessConfig

Map

Hayır

Hayır

Sunucusuz örneğ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:

  • VPC

  • Classic

Not

MySQL çalıştıran ve cloud disk kullanan örnek için bu özelliği VPC olarak ayarlamanız gerekir.

PostgreSQL veya MariaDB çalıştıran örnek için bu özelliği VPC olarak ayarlamanız gerekir.

SQL Server Basic veya SQL Server Web çalıştıran örnek için bu özelliği VPC veya Classic olarak ayarlayabilirsiniz. Diğer örnek türleri için bu özelliği VPC olarak ayarlamanız gerekir.

StorageAutoScale

String

Hayır

Hayır

Otomatik depolama genişletmenin etkinleştirilip etkinleştirilmeyeceğini belirtir.

Bu özellik yalnızca Engine MySQL veya PostgreSQL olarak ayarlandığında desteklenir. Geçerli değerler:

  • Enable

  • Disable (varsayılan)

Not

Örnek oluşturulduktan sonra ModifyDasInstanceConfig işlemini çağırarak bir örnek için otomatik depolama genişletme ayarlarını da düzenleyebilirsiniz. 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 depolama genişletme için izin verilen maksimum depolama kapasitesi.

Otomatik depolama genişletme, örneğin depolama kapasitesinin bu özelliğin değerini aşmasına neden olmaz. Birim: GB.

Not

Değer 0'a eşit veya 0'dan büyük olmalıdır.

StorageAutoScale Enable olarak ayarlandığında bu özelliği belirtmeniz gerekir.

StorageThreshold

Number

Hayır

Hayır

Otomatik depolama genişletmenin tetiklendiği eşik. Birim: %.

Geçerli değerler:

  • 10

  • 20

  • 30

  • 40

  • 50

Not

StorageAutoScale Enable olarak ayarlandığında bu özelliği belirtmeniz gerekir.

IoAccelerationEnabled

String

Hayır

Hayır

G/Ç hızlandırmanın etkinleştirilip etkinleştirilmeyeceğini belirtir.

Geçerli değerler:

  • 1: G/Ç hızlandırmayı etkinleştirir.

  • 0: G/Ç hızlandırmayı etkinleştirmez.

ColdDataEnabled

Boolean

Hayır

Hayır

Bu özellik ayrılmıştır.

Yok.

BurstingEnabled

Boolean

Hayır

Hayır

G/Ç patlamasının etkinleştirilip etkinleştirilmeyeceğini belirtir.

Geçerli değerler:

  • true

  • false

DeletionProtection

Boolean

Hayır

Evet

Silme koruma özelliğinin etkinleştirilip etkinleştirilmeyeceğini belirtir.

Geçerli değerler:

  • true

  • false

ServerlessConfig sözdizimi

"ServerlessConfig": {
    "SwitchForce": Boolean,
    "MaxCapacity": Number,
    "MinCapacity": Number,
    "AutoPause": Boolean
  }

ServerlessConfig özellikleri

Özellik

Tür

Gerekli

Düzenlenebilir

Açıklama

Kısıtlama

SwitchForce

Boolean

Hayır

Hayır

Sunucusuz örnek için zorunlu ölçeklendirmenin etkinleştirilip etkinleştirilmeyeceğini belirtir.

Geçerli değerler:

  • true

  • false (varsayılan)

Not
  • Bu özelliği true olarak ayarlarsanız örneğin zorunlu ölçeklendirme işlemi sırasında yaklaşık 1 dakika süren geçici bir bağlantı kesintisi oluşur. Bu özelliği iş gereksinimlerinize göre belirtin.

  • Çoğu durumda bir örneğin RCU (RDS Capacity Units) ölçeklendirmesi hemen etkili olur. Büyük işlemlerin çalıştırılması gibi bazı durumlarda ölçeklendirme hemen etkili olmayabilir. Bu durumda örneğin RCU'larını zorunlu olarak ölçeklendirmek için zorunlu ölçeklendirme özelliğini etkinleştirebilirsiniz.

MaxCapacity

Number

Evet

Hayır

Örneğin RCU ölçeklendirmesinin maksimum değeri.

Geçerli değerler: 0,5 ila 8.

Not

Bu özelliğin değeri MinCapacity değerine eşit veya ondan büyük olmalıdır.

MinCapacity

Number

Evet

Hayır

Örneğin RCU ölçeklendirmesinin minimum değeri.

Geçerli değerler: 0,5 ila 8.

Not

Bu özelliğin değeri MaxCapacity değerine eşit veya ondan küçük olmalıdır.

AutoPause

Boolean

Hayır

Hayır

Sunucusuz örnek için otomatik başlatma ve askıya alma özelliğinin etkinleştirilip etkinleştirilmeyeceğini belirtir.

Geçerli değerler:

  • true

  • false (varsayılan)

Not

Özelliği etkinleştirdikten sonra örnek 10 dakika içinde bağlanmazsa askıya alınır ve örnek bağlanırsa yeniden başlatılır.

DBMappings sözdizimi

"DBMappings": [
  {
    "DBDescription": String,
    "CharacterSetName": String,
    "DBName": String
  }
]

DBMappings özellikleri

Özellik

Tür

Gerekli

Düzenlenebilir

Açıklama

Kısıtlama

DBDescription

String

Hayır

Hayır

Veritabanının açıklaması.

Açıklama 2 ila 256 karakter uzunluğunda olmalıdır. Bir harfle başlamalı ve http:// veya https:// ile başlayamaz. Harf, rakam, alt çizgi (_) ve tire (-) içerebilir.

CharacterSetName

String

Evet

Hayır

Karakter kümesi.

Geçerli değerler:

  • Engine MySQL veya MariaDB olarak ayarlandığında geçerli değerler:

    • utf8

    • gbk

    • latin1

    • utf8mb4

  • Engine SQLServer olarak ayarlandığında geçerli değerler:

    • Chinese_PRC_CI_AS

    • Chinese_PRC_CS_AS

    • SQL_Latin1_General_CP1_CI_AS

    • SQL_Latin1_General_CP1_CS_AS

    • Chinese_PRC_BIN

  • Engine PostgreSQL olarak ayarlandığında geçerli değerler:

    • KOI8U

    • UTF8

    • WIN866

    • WIN874

    • WIN1250

    • WIN1251

    • WIN1252

    • WIN1253

    • WIN1254

    • WIN1255

    • WIN1256

    • WIN1257

    • WIN1258

    • EUC_CN

    • EUC_KR

    • EUC_TW

    • EUC_JP

    • EUC_JIS_2004

    • KOI8R

    • MULE_INTERNAL

    • LATIN1

    • LATIN2

    • LATIN3

    • LATIN4

    • LATIN5

    • LATIN6

    • LATIN7

    • LATIN8

    • LATIN9

    • LATIN10

    • ISO_8859_5

    • ISO_8859_6

    • ISO_8859_7

    • ISO_8859_8

    • SQL_ASCII

DBName

String

Evet

Hayır

Veritabanı adı.

Ad küresel olarak benzersiz olmalıdır.

Uzunluğu en fazla 64 karakter olabilir ve küçük harf, rakam ve alt çizgi (_) içerebilir. Küçük harfle başlamalıdır.

Dönüş değerleri

Fn::GetAtt

  • InnerPort: örneğin özel bağlantı noktası.

  • OrderId: sipariş kimliği.

  • PublicConnectionString: örneğin genel uç noktası.

  • InnerIPAddress: örneğin özel IP adresi.

  • DBInstanceId: örnek kimliği.

  • PublicIPAddress: örneğin genel IP adresi.

  • PublicPort: örneğin genel bağlantı noktası.

  • InnerConnectionString: örneğin özel uç noktası.

Örnekler

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
 AllocatePublicConnection:
  AllowedValues:
  - 'True'
  - 'true'
  - 'False'
  - 'false'
  Description: If true, allocate public connection automate.
  Type: Boolean
 ArchiveBackupKeepCount:
  Description: "The number of archived backups that can be retained. Default value:\
   \ 1. Valid values: \nThe value of this parameter ranges from 1 to 31 when the\
   \ ArchiveBackupKeepPolicy \n parameter is set to ByMonth. \nThe value of this\
   \ parameter ranges from 1 to 7 when the ArchiveBackupKeepPolicy \n parameter\
   \ is set to ByWeek. \nNote You do not need to specify this parameter when the\
   \ ArchiveBackupKeepPolicy \nparameter is set to KeepAll."
  MaxValue: 31
  MinValue: 1
  Type: Number
 ArchiveBackupKeepPolicy:
  AllowedValues:
  - ByMonth
  - ByWeek
  - KeepAll
  Description: "The period for which to retain archived backups. The number of archived\
   \ backups that can \n be retained within the specified period is determined\
   \ by the ArchiveBackupKeepCount parameter. \n Default value: 0. Valid values:\
   \ \nByMonth \n ByWeek \n KeepAll"
  Type: String
 ArchiveBackupRetentionPeriod:
  Description: "The number of days for which to retain archived backups. \n The\
   \ default value 0 specifies not to enable the backup archiving function. Valid\
   \ values: 30 to 1095."
  MaxValue: 1095
  MinValue: 30
  Type: Number
 AutoPay:
  AllowedValues:
  - 'True'
  - 'true'
  - 'False'
  - 'false'
  Default: true
  Description: Automatic Payment. Default is true.
  Type: Boolean
 AutoRenew:
  AllowedValues:
  - 'True'
  - 'true'
  - 'False'
  - 'false'
  Default: false
  Description: Auto renew the prepay instance. If the period type is by year, it
   will renew by year, else it will renew by month.
  Type: Boolean
 BackUpCategory:
  AllowedValues:
  - Flash
  - Standard
  Description: "Specifies whether to enable the second-level backup function. This\
   \ function allows a backup \nto be completed within seconds. Valid values: \n\
   Flash: specifies to enable the second-level backup function. \n Standard: specifies\
   \ to disable the second-level backup function."
  Type: String
 BackupPolicyMode:
  AllowedValues:
  - DataBackupPolicy
  - LogBackupPolicy
  Description: "Backup type, \nDataBackupPolicy: data backup \nLogBackupPolicy:\
   \ log backup"
  Type: String
 BackupRetentionPeriod:
  Default: 7
  Description: 'The retention period of the data backup. Value range: 7 to 730.
   The default value is the original value. Note When the BackupPolicyMode parameter
   is set to LogBackupPolicy, this parameter is required.'
  Type: Number
 Category:
  AllowedValues:
  - Basic
  - HighAvailability
  - AlwaysOn
  - Finance
  Description: 'The edition of the instance. Valid values:

   Basic: specifies to use the Basic Edition.

   HighAvailability: specifies to use the High-availability Edition.

   AlwaysOn: specifies to use the Cluster Edition.

   Finance: specifies to use the Enterprise Edition.'
  Type: String
 CommodityCode:
  AllowedValues:
  - rds
  - bards
  - rords
  Default: rds
  Description: The CommodityCode of the order.
  Type: String
 CompressType:
  Description: "The format used to compress backups. Valid values: \n 1: The zlib\
   \ tool is used to compress backups into .tar.gz files. \n 4: The QuickLZ tool\
   \ is used to compress backups into .xb.gz files. \nThis compression format is\
   \ supported only when the instance runs MySQL 5.6 or 5.7. \nIt can be used to\
   \ restore individual databases and tables. \n 8: The QuickLZ tool is used to\
   \ compress backups into .xb.gz files. \n This compression format is supported\
   \ only when the instance runs MySQL 8.0. \nIt cannot be used to restore individual\
   \ databases or tables."
  Type: Number
 ConnectionMode:
  Description: 'Connection Mode for database instance,support ''Standard'' and ''Safe''
   mode. Default is RDS system assigns. '
  Type: String
 ConnectionStringPrefix:
  AllowedPattern: '[a-zA-Z0-9-]{8,64}'
  Description: "The prefix of the endpoint. \nOnly the prefix of the CurrentConnectionString\
   \ parameter value can be modified.\nThe prefix must be 8 to 64 characters in\
   \ length and can contain letters, digits, and hyphens (-). "
  Type: String
 ConnectionStringType:
  AllowedValues:
  - Inner
  - Public
  Default: Inner
  Description: 'The endpoint type of the instance, allow values: Inner, Public'
  Type: String
 CouponCode:
  Description: The coupon code of the order.
  Type: String
 DBInstanceClass:
  Description: Database instance type. Refer the RDS database instance type reference,
   such as 'rds.mys2.large', 'rds.mss1.large', 'rds.pg.s1.small' etc
  Type: String
 DBInstanceDescription:
  Description: Description of created database instance.
  Type: String
 DBInstanceNetType:
  AllowedValues:
  - Internet
  - Intranet
  Default: Intranet
  Description: Database instance net type, default is Intranet.Internet for public
   access, Intranet for private access.
  Type: String
 DBInstanceStorage:
  Description: Database instance storage size. mysql is [5,1000]. sql server 2008r2
   is [10,1000], sql server 2012/2012_web/2016-web is [20,1000]. PostgreSQL and
   PPAS is [5,2000]. Increased every 5 GB, Unit in GB
  Type: Number
 DBInstanceStorageType:
  Description: 'The storage type of the instance. Valid values:

   local_ssd: specifies to use local SSDs. This is the recommended storage type.

   cloud_ssd: specifies to use standard SSDs.

   cloud_essd: specifies to use enhanced SSDs.'
  Type: String
 DBIsIgnoreCase:
  Description: 'Specifies whether table names are case-sensitive. Valid values:

   1: Table names are not case-sensitive. This is the default value.

   0: Table names are case-sensitive.'
  Type: Number
 DBMappings:
  Description: Database mappings to attach to db instance.
  Type: Json
 DBParamGroupId:
  Description: The ID of the parameter template used by the instance.
  Type: String
 DBTimeZone:
  Description: 'The UTC time zone of the instance. Valid values: -12:00 to +12:00.
   The time zone must be an integer value such as +08:00. Values such as +08:30
   are not allowed.'
  Type: String
 DedicatedHostGroupId:
  Description: The ID of the host group to which the instance belongs if you create
   an instance in a host group.
  Type: String
 EnableBackupLog:
  AllowedValues:
  - 'True'
  - 'true'
  - 'False'
  - 'false'
  Description: "Specifies whether to enable the log backup function. Valid values:\
   \ \nTrue: specifies to enable the log backup function. \nFalse: specifies to\
   \ disable the log backup function. \nNote You must specify this parameter when\
   \ the BackupPolicyMode parameter is set to LogBackupPolicy."
  Type: Boolean
 EncryptionKey:
  Description: The ID of the encryption key that is used to encrypt data on SSDs
   in the region. You can view the encryption key ID in the Key Management Service
   (KMS) console. You can also create an encryption key.
  Type: String
 Engine:
  AllowedValues:
  - MySQL
  - SQLServer
  - PostgreSQL
  - PPAS
  - MariaDB
  Description: Database instance engine type. Support MySQL/SQLServer/PostgreSQL/PPAS/MariaDB
   now.
  Type: String
 EngineVersion:
  Description: 'Database instance version of the relative engine type.Support MySQL:
   5.5/5.6/5.7/8.0;

   SQLServer: 2008r2/2012/2012_ent_ha/2012_std_ha/2012_web/2016_ent_ha/2016_std_ha/2016_web/2017_std_ha/2017_ent;

   PostgreSQL: 9.4/10.0/11.0/12.0;

   PPAS: 9.3/10.0;

   MariaDB: 10.3.'
  Type: String
 HighSpaceUsageProtection:
  AllowedValues:
  - Enable
  - Disable
  Description: "Specifies whether to forcibly delete log backup files when the space\
   \ usage of the \n instance exceeds 80% or the remaining space is less than 5\
   \ GB. Valid values: \n Enable and Disable. You can retain the default value.\
   \ Note You must specify \n this parameter when the BackupPolicyMode parameter\
   \ is set to LogBackupPolicy."
  Type: String
 LocalLogRetentionHours:
  Description: "The number of hours for which to retain log backup files on the\
   \ instance. \nValid values: 0 to 168. The value 0 specifies not to retain log\
   \ backup files on the instance. \nYou can retain the default value. Note You\
   \ must specify this parameter when the BackupPolicyMode \nparameter is set to\
   \ LogBackupPolicy."
  MaxValue: 168
  MinValue: 0
  Type: Number
 LocalLogRetentionSpace:
  Description: "The maximum percentage of space that is allowed to store log backup\
   \ files on the instance. \n If the space usage for log backup files exceeds\
   \ this percentage, the system deletes earlier \n log backup files until the\
   \ space usage falls below this percentage. Valid values:0 to 50. \n You can\
   \ retain the default value. Note You must specify this parameter when the \n\
   \ BackupPolicyMode parameter is set to LogBackupPolicy."
  MaxValue: 50
  MinValue: 0
  Type: Number
 LogBackupFrequency:
  Description: "The frequency at which to back up logs. Valid values: \nThe value\
   \ LogInterval specifies to back up logs every 30 minutes. \n The default value\
   \ of this parameter is the same as the data backup frequency. \nNote The value\
   \ LogInterval is supported only when the instance runs SQL Server."
  Type: String
 LogBackupLocalRetentionNumber:
  Description: "The number of log backup files that can be retained on the instance.\
   \ \nDefault value: 60. Valid values: 6 to 100."
  MaxValue: 100
  MinValue: 6
  Type: Number
 LogBackupRetentionPeriod:
  Description: "The number of days for which to retain log backup files. Valid values:\
   \ 7 to 730. The log backup \n retention period cannot be longer than the data\
   \ backup retention period.Note If you enable the log \n backup function, you\
   \ can specify the log backup retention period. This applies only when the \n\
   \ instance runs MySQL, PostgreSQL, or PPAS."
  MaxValue: 730
  MinValue: 7
  Type: Number
 MaintainTime:
  Description: The period during which the maintenance performs. The format is HH:mmZ-HH:mmZ.
  Type: String
 MasterUserPassword:
  Description: 'The master password for the database instance. '
  MaxLength: 32
  MinLength: 8
  Type: String
 MasterUserType:
  AllowedValues:
  - Normal
  - Super
  - Sysadmin
  Default: Normal
  Description: "Privilege type of account.\n Normal: Common privilege. \n Super:\
   \ High privilege. \nSysadmin: Super privileges (SA) (only supported by SQL Server)\n\
   The default value is Normal."
  Type: String
 MasterUsername:
  Description: 'The master user name for the database instance. '
  Type: String
 MultiAZ:
  AllowedValues:
  - 'True'
  - 'true'
  - 'False'
  - 'false'
  Default: false
  Description: 'Specifies if the database instance is a multiple Availability Zone
   deployment. '
  Type: Boolean
 Period:
  Default: 1
  Description: Prepaid time period. While choose by pay by month, it could be from
   1 to 9. While choose pay by year, it could be from 1 to 3.
  MaxValue: 9
  MinValue: 1
  Type: Number
 PeriodType:
  AllowedValues:
  - Month
  - Year
  Default: Month
  Description: Charge period for created instances.
  Type: String
 Port:
  Description: The port of the database service.
  MaxValue: 65535
  MinValue: 1
  Type: Number
 PreferredBackupPeriod:
  Description: The backup period. Separate multiple values with commas (,). The
   default value is the original value. Valid values:Monday Tuesday Wednesday Thursday
   Friday Saturday Sunday Note When the BackupPolicyMode parameter is set to DataBackupPolicy,
   this parameter is required.
  Type: CommaDelimitedList
 PreferredBackupTime:
  Description: 'The time when the backup task is performed. Format: yyyy-MM-ddZ-HH:mm:ssZ.Note
   When the BackupPolicyMode parameter is set to DataBackupPolicy, this parameter
   is required.'
  Type: String
 PrivateIpAddress:
  Description: The private ip for created instance.
  Type: String
 Quantity:
  Default: 1
  Description: The number of instance to be created, default is 1, max number is
   99
  MaxValue: 99
  MinValue: 1
  Type: Number
 ReleasedKeepPolicy:
  AllowedValues:
  - Lastest
  - All
  Description: "The policy used to retain archived backups if the instance is released.\
   \ Default value: None. \n Valid values: \nLastest: Only the last archived backup\
   \ is retained. \n All: All of the archived backups are retained."
  Type: String
 ResourceGroupId:
  Description: Resource group id.
  Type: String
 RoleARN:
  Description: The Alibaba Cloud Resource Name (ARN) provided to the service account
   of the instance by your Alibaba Cloud account to connect to KMS. You can copy
   the ARN from the RAM console.
  Type: String
 SQLCollectorStatus:
  AllowedValues:
  - Enable
  - Disabled
  Description: "Specifies whether to enable or disable the SQL Explorer (SQL audit)\
   \ feature. \nValid values:Enable | Disabled."
  Type: String
 SSLSetting:
  AllowedValues:
  - Disabled
  - EnabledForPublicConnection
  - EnabledForInnerConnection
  Default: Disabled
  Description: 'Secure Sockets Layer (SSL) link setting of the instance. Valid values:

   Disabled: Disable SSL

   EnabledForPublicConnection: Public connection address will be protected by the
   SSL certificate. It requires AllocatePublicConnection is true.

   EnabledForInnerConnection: Private connection address will be protected by the
   SSL certificate.

   Default value is Disabled.'
  Type: String
 SecurityGroupId:
  Description: "The ID of the ECS security groups. \nEach RDS instance can be associated\
   \ with up to three ECS security groups. \nYou must separate them with commas\
   \ (,). \nTo delete an ECS Security group, leave this parameter empty. \n"
  Type: String
 SlaveZoneIds:
  Description: List of slave zone ids can specify slave zone ids when creating the
   high-availability or enterprise edition instance. Meanwhile, VSwitchId needs
   to pass in the corresponding vswitch id to the slave zone by order. For example,
   ZoneId = "zone-a" and SlaveZoneIds = ["zone-c", "zone-b"], then the VSwitchId
   must be "vsw-zone-a,vsw-zone-c,vsw-zone-b". Of course, you can also choose automatic
   allocation, for example, ZoneId = "zone-a" and SlaveZoneIds = ["Auto", "Auto"],
   then the VSwitchId must be "vsw-zone-a,Auto,Auto". The list contains up to 2
   slave zone ids, separated by commas.
  MaxLength: 2
  Type: Json
 Tags:
  Description: 'The tags of an instance.

   You should input the information of the tag with the format of the Key-Value,
   such as {"key1":"value1","key2":"value2", ... "key5":"value5"}.

   At most 5 tags can be specified.

   Key

   It can be up to 64 characters in length.

   Cannot begin with aliyun.

   Cannot begin with http:// or https://.

   Cannot be a null string.

   Value

   It can be up to 128 characters in length.

   Cannot begin with aliyun.

   Cannot begin with http:// or https://.

   Can be a null string.'
  Type: Json
 TargetDedicatedHostIdForLog:
  Description: The ID of the host to which the instance belongs if you create a
   log instance in a host group.
  Type: String
 TargetDedicatedHostIdForMaster:
  Description: The ID of the host to which the instance belongs if you create a
   primary instance in a host group.
  Type: String
 TargetDedicatedHostIdForSlave:
  Description: The ID of the host to which the instance belongs if you create a
   secondary instance in a host group.
  Type: String
 VSwitchId:
  Description: The vSwitch id of created instance. For VPC network, the property
   is required.
  Type: String
 VpcId:
  Description: The VPC id of created database instance. For VPC network, the property
   is required.
  Type: String
 ZoneId:
  Description: selected zone to create database instance. You cannot set the ZoneId
   parameter if the MultiAZ parameter is set to true.
  Type: String
Resources:
 PrepayDBInstance:
  Properties:
   AllocatePublicConnection:
    Ref: AllocatePublicConnection
   ArchiveBackupKeepCount:
    Ref: ArchiveBackupKeepCount
   ArchiveBackupKeepPolicy:
    Ref: ArchiveBackupKeepPolicy
   ArchiveBackupRetentionPeriod:
    Ref: ArchiveBackupRetentionPeriod
   AutoPay:
    Ref: AutoPay
   AutoRenew:
    Ref: AutoRenew
   BackUpCategory:
    Ref: BackUpCategory
   BackupPolicyMode:
    Ref: BackupPolicyMode
   BackupRetentionPeriod:
    Ref: BackupRetentionPeriod
   Category:
    Ref: Category
   CommodityCode:
    Ref: CommodityCode
   CompressType:
    Ref: CompressType
   ConnectionMode:
    Ref: ConnectionMode
   ConnectionStringPrefix:
    Ref: ConnectionStringPrefix
   ConnectionStringType:
    Ref: ConnectionStringType
   CouponCode:
    Ref: CouponCode
   DBInstanceClass:
    Ref: DBInstanceClass
   DBInstanceDescription:
    Ref: DBInstanceDescription
   DBInstanceNetType:
    Ref: DBInstanceNetType
   DBInstanceStorage:
    Ref: DBInstanceStorage
   DBInstanceStorageType:
    Ref: DBInstanceStorageType
   DBIsIgnoreCase:
    Ref: DBIsIgnoreCase
   DBMappings:
    Ref: DBMappings
   DBParamGroupId:
    Ref: DBParamGroupId
   DBTimeZone:
    Ref: DBTimeZone
   DedicatedHostGroupId:
    Ref: DedicatedHostGroupId
   EnableBackupLog:
    Ref: EnableBackupLog
   EncryptionKey:
    Ref: EncryptionKey
   Engine:
    Ref: Engine
   EngineVersion:
    Ref: EngineVersion
   HighSpaceUsageProtection:
    Ref: HighSpaceUsageProtection
   LocalLogRetentionHours:
    Ref: LocalLogRetentionHours
   LocalLogRetentionSpace:
    Ref: LocalLogRetentionSpace
   LogBackupFrequency:
    Ref: LogBackupFrequency
   LogBackupLocalRetentionNumber:
    Ref: LogBackupLocalRetentionNumber
   LogBackupRetentionPeriod:
    Ref: LogBackupRetentionPeriod
   MaintainTime:
    Ref: MaintainTime
   MasterUserPassword:
    Ref: MasterUserPassword
   MasterUserType:
    Ref: MasterUserType
   MasterUsername:
    Ref: MasterUsername
   MultiAZ:
    Ref: MultiAZ
   Period:
    Ref: Period
   PeriodType:
    Ref: PeriodType
   Port:
    Ref: Port
   PreferredBackupPeriod:
    Ref: PreferredBackupPeriod
   PreferredBackupTime:
    Ref: PreferredBackupTime
   PrivateIpAddress:
    Ref: PrivateIpAddress
   Quantity:
    Ref: Quantity
   ReleasedKeepPolicy:
    Ref: ReleasedKeepPolicy
   ResourceGroupId:
    Ref: ResourceGroupId
   RoleARN:
    Ref: RoleARN
   SQLCollectorStatus:
    Ref: SQLCollectorStatus
   SSLSetting:
    Ref: SSLSetting
   SecurityGroupId:
    Ref: SecurityGroupId
   SlaveZoneIds:
    Ref: SlaveZoneIds
   Tags:
    Ref: Tags
   TargetDedicatedHostIdForLog:
    Ref: TargetDedicatedHostIdForLog
   TargetDedicatedHostIdForMaster:
    Ref: TargetDedicatedHostIdForMaster
   TargetDedicatedHostIdForSlave:
    Ref: TargetDedicatedHostIdForSlave
   VSwitchId:
    Ref: VSwitchId
   VpcId:
    Ref: VpcId
   ZoneId:
    Ref: ZoneId
  Type: ALIYUN::RDS::PrepayDBInstance
Outputs:
 DBInstanceId:
  Description: The instance id of created database instance.
  Value:
   Fn::GetAtt:
   - PrepayDBInstance
   - DBInstanceId
 InnerConnectionString:
  Description: DB instance connection url by Intranet.
  Value:
   Fn::GetAtt:
   - PrepayDBInstance
   - InnerConnectionString
 InnerIPAddress:
  Description: IP Address for created DB instance of Intranet.
  Value:
   Fn::GetAtt:
   - PrepayDBInstance
   - InnerIPAddress
 InnerPort:
  Description: Intranet port of created DB instance.
  Value:
   Fn::GetAtt:
   - PrepayDBInstance
   - InnerPort
 OrderId:
  Description: The order id list of created instance.
  Value:
   Fn::GetAtt:
   - PrepayDBInstance
   - OrderId
 PublicConnectionString:
  Description: DB instance connection url by Internet.
  Value:
   Fn::GetAtt:
   - PrepayDBInstance
   - PublicConnectionString
 PublicIPAddress:
  Description: IP Address for created DB instance of Internet.
  Value:
   Fn::GetAtt:
   - PrepayDBInstance
   - PublicIPAddress
 PublicPort:
  Description: Internet port of created DB instance.
  Value:
   Fn::GetAtt:
   - PrepayDBInstance
   - PublicPort
{
 "ROSTemplateFormatVersion": "2015-09-01",
 "Parameters": {
  "PeriodType": {
   "Type": "String",
   "Description": "Charge period for created instances.",
   "AllowedValues": [
    "Month",
    "Year"
   ],
   "Default": "Month"
  },
  "ResourceGroupId": {
   "Type": "String",
   "Description": "Resource group id."
  },
  "ArchiveBackupRetentionPeriod": {
   "Type": "Number",
   "Description": "The number of days for which to retain archived backups. \n The default value 0 specifies not to enable the backup archiving function. Valid values: 30 to 1095.",
   "MinValue": 30,
   "MaxValue": 1095
  },
  "DBTimeZone": {
   "Type": "String",
   "Description": "The UTC time zone of the instance. Valid values: -12:00 to +12:00. The time zone must be an integer value such as +08:00. Values such as +08:30 are not allowed."
  },
  "Port": {
   "Type": "Number",
   "Description": "The port of the database service.",
   "MinValue": 1,
   "MaxValue": 65535
  },
  "ArchiveBackupKeepCount": {
   "Type": "Number",
   "Description": "The number of archived backups that can be retained. Default value: 1. Valid values: \nThe value of this parameter ranges from 1 to 31 when the ArchiveBackupKeepPolicy \n parameter is set to ByMonth. \nThe value of this parameter ranges from 1 to 7 when the ArchiveBackupKeepPolicy \n parameter is set to ByWeek. \nNote You do not need to specify this parameter when the ArchiveBackupKeepPolicy \nparameter is set to KeepAll.",
   "MinValue": 1,
   "MaxValue": 31
  },
  "LogBackupRetentionPeriod": {
   "Type": "Number",
   "Description": "The number of days for which to retain log backup files. Valid values: 7 to 730. The log backup \n retention period cannot be longer than the data backup retention period.Note If you enable the log \n backup function, you can specify the log backup retention period. This applies only when the \n instance runs MySQL, PostgreSQL, or PPAS.",
   "MinValue": 7,
   "MaxValue": 730
  },
  "DBInstanceStorage": {
   "Type": "Number",
   "Description": "Database instance storage size. mysql is [5,1000]. sql server 2008r2 is [10,1000], sql server 2012/2012_web/2016-web is [20,1000]. PostgreSQL and PPAS is [5,2000]. Increased every 5 GB, Unit in GB"
  },
  "DBMappings": {
   "Type": "Json",
   "Description": "Database mappings to attach to db instance."
  },
  "ConnectionStringPrefix": {
   "Type": "String",
   "Description": "The prefix of the endpoint. \nOnly the prefix of the CurrentConnectionString parameter value can be modified.\nThe prefix must be 8 to 64 characters in length and can contain letters, digits, and hyphens (-). ",
   "AllowedPattern": "[a-zA-Z0-9-]{8,64}"
  },
  "MultiAZ": {
   "Type": "Boolean",
   "Description": "Specifies if the database instance is a multiple Availability Zone deployment. ",
   "AllowedValues": [
    "True",
    "true",
    "False",
    "false"
   ],
   "Default": false
  },
  "Engine": {
   "Type": "String",
   "Description": "Database instance engine type. Support MySQL/SQLServer/PostgreSQL/PPAS/MariaDB now.",
   "AllowedValues": [
    "MySQL",
    "SQLServer",
    "PostgreSQL",
    "PPAS",
    "MariaDB"
   ]
  },
  "Tags": {
   "Type": "Json",
   "Description": "The tags of an instance.\nYou should input the information of the tag with the format of the Key-Value, such as {\"key1\":\"value1\",\"key2\":\"value2\", ... \"key5\":\"value5\"}.\nAt most 5 tags can be specified.\nKey\nIt can be up to 64 characters in length.\nCannot begin with aliyun.\nCannot begin with http:// or https://.\nCannot be a null string.\nValue\nIt can be up to 128 characters in length.\nCannot begin with aliyun.\nCannot begin with http:// or https://.\nCan be a null string."
  },
  "DBInstanceDescription": {
   "Type": "String",
   "Description": "Description of created database instance."
  },
  "TargetDedicatedHostIdForMaster": {
   "Type": "String",
   "Description": "The ID of the host to which the instance belongs if you create a primary instance in a host group."
  },
  "EngineVersion": {
   "Type": "String",
   "Description": "Database instance version of the relative engine type.Support MySQL: 5.5/5.6/5.7/8.0;\nSQLServer: 2008r2/2012/2012_ent_ha/2012_std_ha/2012_web/2016_ent_ha/2016_std_ha/2016_web/2017_std_ha/2017_ent;\nPostgreSQL: 9.4/10.0/11.0/12.0;\nPPAS: 9.3/10.0;\nMariaDB: 10.3."
  },
  "DBInstanceClass": {
   "Type": "String",
   "Description": "Database instance type. Refer the RDS database instance type reference, such as 'rds.mys2.large', 'rds.mss1.large', 'rds.pg.s1.small' etc"
  },
  "ArchiveBackupKeepPolicy": {
   "Type": "String",
   "Description": "The period for which to retain archived backups. The number of archived backups that can \n be retained within the specified period is determined by the ArchiveBackupKeepCount parameter. \n Default value: 0. Valid values: \nByMonth \n ByWeek \n KeepAll",
   "AllowedValues": [
    "ByMonth",
    "ByWeek",
    "KeepAll"
   ]
  },
  "VSwitchId": {
   "Type": "String",
   "Description": "The vSwitch id of created instance. For VPC network, the property is required."
  },
  "BackupPolicyMode": {
   "Type": "String",
   "Description": "Backup type, \nDataBackupPolicy: data backup \nLogBackupPolicy: log backup",
   "AllowedValues": [
    "DataBackupPolicy",
    "LogBackupPolicy"
   ]
  },
  "Period": {
   "Type": "Number",
   "Description": "Prepaid time period. While choose by pay by month, it could be from 1 to 9. While choose pay by year, it could be from 1 to 3.",
   "MinValue": 1,
   "MaxValue": 9,
   "Default": 1
  },
  "LocalLogRetentionHours": {
   "Type": "Number",
   "Description": "The number of hours for which to retain log backup files on the instance. \nValid values: 0 to 168. The value 0 specifies not to retain log backup files on the instance. \nYou can retain the default value. Note You must specify this parameter when the BackupPolicyMode \nparameter is set to LogBackupPolicy.",
   "MinValue": 0,
   "MaxValue": 168
  },
  "HighSpaceUsageProtection": {
   "Type": "String",
   "Description": "Specifies whether to forcibly delete log backup files when the space usage of the \n instance exceeds 80% or the remaining space is less than 5 GB. Valid values: \n Enable and Disable. You can retain the default value. Note You must specify \n this parameter when the BackupPolicyMode parameter is set to LogBackupPolicy.",
   "AllowedValues": [
    "Enable",
    "Disable"
   ]
  },
  "RoleARN": {
   "Type": "String",
   "Description": "The Alibaba Cloud Resource Name (ARN) provided to the service account of the instance by your Alibaba Cloud account to connect to KMS. You can copy the ARN from the RAM console."
  },
  "MasterUserPassword": {
   "Type": "String",
   "Description": "The master password for the database instance. ",
   "MinLength": 8,
   "MaxLength": 32
  },
  "VpcId": {
   "Type": "String",
   "Description": "The VPC id of created database instance. For VPC network, the property is required."
  },
  "SSLSetting": {
   "Type": "String",
   "Description": "Secure Sockets Layer (SSL) link setting of the instance. Valid values:\nDisabled: Disable SSL\nEnabledForPublicConnection: Public connection address will be protected by the SSL certificate. It requires AllocatePublicConnection is true.\nEnabledForInnerConnection: Private connection address will be protected by the SSL certificate.\nDefault value is Disabled.",
   "AllowedValues": [
    "Disabled",
    "EnabledForPublicConnection",
    "EnabledForInnerConnection"
   ],
   "Default": "Disabled"
  },
  "MasterUsername": {
   "Type": "String",
   "Description": "The master user name for the database instance. "
  },
  "ConnectionMode": {
   "Type": "String",
   "Description": "Connection Mode for database instance,support 'Standard' and 'Safe' mode. Default is RDS system assigns. "
  },
  "LocalLogRetentionSpace": {
   "Type": "Number",
   "Description": "The maximum percentage of space that is allowed to store log backup files on the instance. \n If the space usage for log backup files exceeds this percentage, the system deletes earlier \n log backup files until the space usage falls below this percentage. Valid values:0 to 50. \n You can retain the default value. Note You must specify this parameter when the \n BackupPolicyMode parameter is set to LogBackupPolicy.",
   "MinValue": 0,
   "MaxValue": 50
  },
  "Category": {
   "Type": "String",
   "Description": "The edition of the instance. Valid values:\nBasic: specifies to use the Basic Edition.\nHighAvailability: specifies to use the High-availability Edition.\nAlwaysOn: specifies to use the Cluster Edition.\nFinance: specifies to use the Enterprise Edition.",
   "AllowedValues": [
    "Basic",
    "HighAvailability",
    "AlwaysOn",
    "Finance"
   ]
  },
  "PrivateIpAddress": {
   "Type": "String",
   "Description": "The private ip for created instance."
  },
  "TargetDedicatedHostIdForSlave": {
   "Type": "String",
   "Description": "The ID of the host to which the instance belongs if you create a secondary instance in a host group."
  },
  "DBInstanceNetType": {
   "Type": "String",
   "Description": "Database instance net type, default is Intranet.Internet for public access, Intranet for private access.",
   "AllowedValues": [
    "Internet",
    "Intranet"
   ],
   "Default": "Intranet"
  },
  "ReleasedKeepPolicy": {
   "Type": "String",
   "Description": "The policy used to retain archived backups if the instance is released. Default value: None. \n Valid values: \nLastest: Only the last archived backup is retained. \n All: All of the archived backups are retained.",
   "AllowedValues": [
    "Lastest",
    "All"
   ]
  },
  "DedicatedHostGroupId": {
   "Type": "String",
   "Description": "The ID of the host group to which the instance belongs if you create an instance in a host group."
  },
  "AutoRenew": {
   "Type": "Boolean",
   "Description": "Auto renew the prepay instance. If the period type is by year, it will renew by year, else it will renew by month.",
   "AllowedValues": [
    "True",
    "true",
    "False",
    "false"
   ],
   "Default": false
  },
  "EncryptionKey": {
   "Type": "String",
   "Description": "The ID of the encryption key that is used to encrypt data on SSDs in the region. You can view the encryption key ID in the Key Management Service (KMS) console. You can also create an encryption key."
  },
  "PreferredBackupPeriod": {
   "Type": "CommaDelimitedList",
   "Description": "The backup period. Separate multiple values with commas (,). The default value is the original value. Valid values:Monday Tuesday Wednesday Thursday Friday Saturday Sunday Note When the BackupPolicyMode parameter is set to DataBackupPolicy, this parameter is required."
  },
  "LogBackupLocalRetentionNumber": {
   "Type": "Number",
   "Description": "The number of log backup files that can be retained on the instance. \nDefault value: 60. Valid values: 6 to 100.",
   "MinValue": 6,
   "MaxValue": 100
  },
  "SlaveZoneIds": {
   "Type": "Json",
   "Description": "List of slave zone ids can specify slave zone ids when creating the high-availability or enterprise edition instance. Meanwhile, VSwitchId needs to pass in the corresponding vswitch id to the slave zone by order. For example, ZoneId = \"zone-a\" and SlaveZoneIds = [\"zone-c\", \"zone-b\"], then the VSwitchId must be \"vsw-zone-a,vsw-zone-c,vsw-zone-b\". Of course, you can also choose automatic allocation, for example, ZoneId = \"zone-a\" and SlaveZoneIds = [\"Auto\", \"Auto\"], then the VSwitchId must be \"vsw-zone-a,Auto,Auto\". The list contains up to 2 slave zone ids, separated by commas.",
   "MaxLength": 2
  },
  "DBIsIgnoreCase": {
   "Type": "Number",
   "Description": "Specifies whether table names are case-sensitive. Valid values:\n1: Table names are not case-sensitive. This is the default value.\n0: Table names are case-sensitive."
  },
  "CommodityCode": {
   "Type": "String",
   "Description": "The CommodityCode of the order.",
   "AllowedValues": [
    "rds",
    "bards",
    "rords"
   ],
   "Default": "rds"
  },
  "MaintainTime": {
   "Type": "String",
   "Description": "The period during which the maintenance performs. The format is HH:mmZ-HH:mmZ."
  },
  "DBParamGroupId": {
   "Type": "String",
   "Description": "The ID of the parameter template used by the instance."
  },
  "ZoneId": {
   "Type": "String",
   "Description": "selected zone to create database instance. You cannot set the ZoneId parameter if the MultiAZ parameter is set to true."
  },
  "TargetDedicatedHostIdForLog": {
   "Type": "String",
   "Description": "The ID of the host to which the instance belongs if you create a log instance in a host group."
  },
  "AllocatePublicConnection": {
   "Type": "Boolean",
   "Description": "If true, allocate public connection automate.",
   "AllowedValues": [
    "True",
    "true",
    "False",
    "false"
   ]
  },
  "PreferredBackupTime": {
   "Type": "String",
   "Description": "The time when the backup task is performed. Format: yyyy-MM-ddZ-HH:mm:ssZ.Note When the BackupPolicyMode parameter is set to DataBackupPolicy, this parameter is required."
  },
  "SecurityGroupId": {
   "Type": "String",
   "Description": "The ID of the ECS security groups. \nEach RDS instance can be associated with up to three ECS security groups. \nYou must separate them with commas (,). \nTo delete an ECS Security group, leave this parameter empty. \n"
  },
  "Quantity": {
   "Type": "Number",
   "Description": "The number of instance to be created, default is 1, max number is 99",
   "MinValue": 1,
   "MaxValue": 99,
   "Default": 1
  },
  "AutoPay": {
   "Type": "Boolean",
   "Description": "Automatic Payment. Default is false.",
   "AllowedValues": [
    "True",
    "true",
    "False",
    "false"
   ],
   "Default": true
  },
  "DBInstanceStorageType": {
   "Type": "String",
   "Description": "The storage type of the instance. Valid values:\nlocal_ssd: specifies to use local SSDs. This is the recommended storage type.\ncloud_ssd: specifies to use standard SSDs.\ncloud_essd: specifies to use enhanced SSDs."
  },
  "BackUpCategory": {
   "Type": "String",
   "Description": "Specifies whether to enable the second-level backup function. This function allows a backup \nto be completed within seconds. Valid values: \nFlash: specifies to enable the second-level backup function. \n Standard: specifies to disable the second-level backup function.",
   "AllowedValues": [
    "Flash",
    "Standard"
   ]
  },
  "CompressType": {
   "Type": "Number",
   "Description": "The format used to compress backups. Valid values: \n 1: The zlib tool is used to compress backups into .tar.gz files. \n 4: The QuickLZ tool is used to compress backups into .xb.gz files. \nThis compression format is supported only when the instance runs MySQL 5.6 or 5.7. \nIt can be used to restore individual databases and tables. \n 8: The QuickLZ tool is used to compress backups into .xb.gz files. \n This compression format is supported only when the instance runs MySQL 8.0. \nIt cannot be used to restore individual databases or tables."
  },
  "LogBackupFrequency": {
   "Type": "String",
   "Description": "The frequency at which to back up logs. Valid values: \nThe value LogInterval specifies to back up logs every 30 minutes. \n The default value of this parameter is the same as the data backup frequency. \nNote The value LogInterval is supported only when the instance runs SQL Server."
  },
  "ConnectionStringType": {
   "Type": "String",
   "Description": "The endpoint type of the instance, allow values: Inner, Public",
   "AllowedValues": [
    "Inner",
    "Public"
   ],
   "Default": "Inner"
  },
  "CouponCode": {
   "Type": "String",
   "Description": "The coupon code of the order."
  },
  "MasterUserType": {
   "Type": "String",
   "Description": "Privilege type of account.\n Normal: Common privilege. \n Super: High privilege. \nSysadmin: Super privileges (SA) (only supported by SQL Server)\nThe default value is Normal.",
   "AllowedValues": [
    "Normal",
    "Super",
    "Sysadmin"
   ],
   "Default": "Normal"
  },
  "EnableBackupLog": {
   "Type": "Boolean",
   "Description": "Specifies whether to enable the log backup function. Valid values: \nTrue: specifies to enable the log backup function. \nFalse: specifies to disable the log backup function. \nNote You must specify this parameter when the BackupPolicyMode parameter is set to LogBackupPolicy.",
   "AllowedValues": [
    "True",
    "true",
    "False",
    "false"
   ]
  },
  "SQLCollectorStatus": {
   "Type": "String",
   "Description": "Specifies whether to enable or disable the SQL Explorer (SQL audit) feature. \nValid values:Enable | Disabled.",
   "AllowedValues": [
    "Enable",
    "Disabled"
   ]
  },
  "BackupRetentionPeriod": {
   "Type": "Number",
   "Description": "The retention period of the data backup. Value range: 7 to 730. The default value is the original value. Note When the BackupPolicyMode parameter is set to LogBackupPolicy, this parameter is required.",
   "Default": 7
  }
 },
 "Resources": {
  "PrepayDBInstance": {
   "Type": "ALIYUN::RDS::PrepayDBInstance",
   "Properties": {
    "PeriodType": {
     "Ref": "PeriodType"
    },
    "ResourceGroupId": {
     "Ref": "ResourceGroupId"
    },
    "ArchiveBackupRetentionPeriod": {
     "Ref": "ArchiveBackupRetentionPeriod"
    },
    "DBTimeZone": {
     "Ref": "DBTimeZone"
    },
    "Port": {
     "Ref": "Port"
    },
    "ArchiveBackupKeepCount": {
     "Ref": "ArchiveBackupKeepCount"
    },
    "LogBackupRetentionPeriod": {
     "Ref": "LogBackupRetentionPeriod"
    },
    "DBInstanceStorage": {
     "Ref": "DBInstanceStorage"
    },
    "DBMappings": {
     "Ref": "DBMappings"
    },
    "ConnectionStringPrefix": {
     "Ref": "ConnectionStringPrefix"
    },
    "MultiAZ": {
     "Ref": "MultiAZ"
    },
    "Engine": {
     "Ref": "Engine"
    },
    "Tags": {
     "Ref": "Tags"
    },
    "DBInstanceDescription": {
     "Ref": "DBInstanceDescription"
    },
    "TargetDedicatedHostIdForMaster": {
     "Ref": "TargetDedicatedHostIdForMaster"
    },
    "EngineVersion": {
     "Ref": "EngineVersion"
    },
    "DBInstanceClass": {
     "Ref": "DBInstanceClass"
    },
    "ArchiveBackupKeepPolicy": {
     "Ref": "ArchiveBackupKeepPolicy"
    },
    "VSwitchId": {
     "Ref": "VSwitchId"
    },
    "BackupPolicyMode": {
     "Ref": "BackupPolicyMode"
    },
    "Period": {
     "Ref": "Period"
    },
    "LocalLogRetentionHours": {
     "Ref": "LocalLogRetentionHours"
    },
    "HighSpaceUsageProtection": {
     "Ref": "HighSpaceUsageProtection"
    },
    "RoleARN": {
     "Ref": "RoleARN"
    },
    "MasterUserPassword": {
     "Ref": "MasterUserPassword"
    },
    "VpcId": {
     "Ref": "VpcId"
    },
    "SSLSetting": {
     "Ref": "SSLSetting"
    },
    "MasterUsername": {
     "Ref": "MasterUsername"
    },
    "ConnectionMode": {
     "Ref": "ConnectionMode"
    },
    "LocalLogRetentionSpace": {
     "Ref": "LocalLogRetentionSpace"
    },
    "Category": {
     "Ref": "Category"
    },
    "PrivateIpAddress": {
     "Ref": "PrivateIpAddress"
    },
    "TargetDedicatedHostIdForSlave": {
     "Ref": "TargetDedicatedHostIdForSlave"
    },
    "DBInstanceNetType": {
     "Ref": "DBInstanceNetType"
    },
    "ReleasedKeepPolicy": {
     "Ref": "ReleasedKeepPolicy"
    },
    "DedicatedHostGroupId": {
     "Ref": "DedicatedHostGroupId"
    },
    "AutoRenew": {
     "Ref": "AutoRenew"
    },
    "EncryptionKey": {
     "Ref": "EncryptionKey"
    },
    "PreferredBackupPeriod": {
     "Ref": "PreferredBackupPeriod"
    },
    "LogBackupLocalRetentionNumber": {
     "Ref": "LogBackupLocalRetentionNumber"
    },
    "SlaveZoneIds": {
     "Ref": "SlaveZoneIds"
    },
    "DBIsIgnoreCase": {
     "Ref": "DBIsIgnoreCase"
    },
    "CommodityCode": {
     "Ref": "CommodityCode"
    },
    "MaintainTime": {
     "Ref": "MaintainTime"
    },
    "DBParamGroupId": {
     "Ref": "DBParamGroupId"
    },
    "ZoneId": {
     "Ref": "ZoneId"
    },
    "TargetDedicatedHostIdForLog": {
     "Ref": "TargetDedicatedHostIdForLog"
    },
    "AllocatePublicConnection": {
     "Ref": "AllocatePublicConnection"
    },
    "PreferredBackupTime": {
     "Ref": "PreferredBackupTime"
    },
    "SecurityGroupId": {
     "Ref": "SecurityGroupId"
    },
    "Quantity": {
     "Ref": "Quantity"
    },
    "AutoPay": {
     "Ref": "AutoPay"
    },
    "DBInstanceStorageType": {
     "Ref": "DBInstanceStorageType"
    },
    "BackUpCategory": {
     "Ref": "BackUpCategory"
    },
    "CompressType": {
     "Ref": "CompressType"
    },
    "LogBackupFrequency": {
     "Ref": "LogBackupFrequency"
    },
    "ConnectionStringType": {
     "Ref": "ConnectionStringType"
    },
    "CouponCode": {
     "Ref": "CouponCode"
    },
    "MasterUserType": {
     "Ref": "MasterUserType"
    },
    "EnableBackupLog": {
     "Ref": "EnableBackupLog"
    },
    "SQLCollectorStatus": {
     "Ref": "SQLCollectorStatus"
    },
    "BackupRetentionPeriod": {
     "Ref": "BackupRetentionPeriod"
    }
   }
  }
 },
 "Outputs": {
  "InnerConnectionString": {
   "Description": "DB instance connection url by Intranet.",
   "Value": {
    "Fn::GetAtt": [
     "PrepayDBInstance",
     "InnerConnectionString"
    ]
   }
  },
  "DBInstanceId": {
   "Description": "The instance id of created database instance.",
   "Value": {
    "Fn::GetAtt": [
     "PrepayDBInstance",
     "DBInstanceId"
    ]
   }
  },
  "InnerIPAddress": {
   "Description": "IP Address for created DB instance of Intranet.",
   "Value": {
    "Fn::GetAtt": [
     "PrepayDBInstance",
     "InnerIPAddress"
    ]
   }
  },
  "PublicConnectionString": {
   "Description": "DB instance connection url by Internet.",
   "Value": {
    "Fn::GetAtt": [
     "PrepayDBInstance",
     "PublicConnectionString"
    ]
   }
  },
  "PublicIPAddress": {
   "Description": "IP Address for created DB instance of Internet.",
   "Value": {
    "Fn::GetAtt": [
     "PrepayDBInstance",
     "PublicIPAddress"
    ]
   }
  },
  "OrderId": {
   "Description": "The order id list of created instance.",
   "Value": {
    "Fn::GetAtt": [
     "PrepayDBInstance",
     "OrderId"
    ]
   }
  },
  "PublicPort": {
   "Description": "Internet port of created DB instance.",
   "Value": {
    "Fn::GetAtt": [
     "PrepayDBInstance",
     "PublicPort"
    ]
   }
  },
  "InnerPort": {
   "Description": "Intranet port of created DB instance.",
   "Value": {
    "Fn::GetAtt": [
     "PrepayDBInstance",
     "InnerPort"
    ]
   }
  }
 }
}