DATASOURCE::MONGODB::Instance類型用于查詢單個云數據庫MongoDB實例的信息。
語法
{
"Type": "DATASOURCE::MONGODB::Instance",
"Properties": {
"InstanceId": String,
"RefreshOptions": String
}
}
屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
InstanceId | String | 是 | 是 | 實例 ID。 | 無 |
RefreshOptions | String | 否 | 是 | 當資源棧更新時,數據源資源的刷新策略。 | 有效值:
|
返回值
Fn::GetAtt
ResourceGroupId:資源組 ID。
HiddenZoneId:實現多可用區部署時,實例的備可用區2。
DBInstanceType:實例類型。
LogBackupRetentionPeriod:日志備份保留天數。
SnapshotBackupType:快照備份類型。
LastDowngradeTime:實例最后一次降配時間。
SslExpiredTime:SSL 證書的過期時間
Engine:數據庫引擎。
Tags:資源標簽信息列表。
DBInstanceDescription:實例的描述或備注信息。
AccountDescription:賬號備注信息。
DBInstanceReleaseProtection:是否開啟實例釋放保護
ReplicaSetsConnections:副本集實例的連接信息。
Parameters:已生效的參數設置。
EngineVersion:數據庫版本號。
InstanceId:實例 ID。
DBInstanceClass:實例規格
VSwitchId:虛擬交換機 ID。
LockMode:實例的鎖定狀態。
AutoRenewDuration:自動續期時長。
DbInstanceStorage:實例的存儲空間。
VpcId:專有網絡 ID。
SecurityIpList:分組中包含的 IP 白名單列表。
NetworkAddresses:MongoDB 協議類型實例的連接地址信息列表。
ExpireTime:實例的到期時間。
AccountName:賬號名。
BackupInterval:高頻備份頻率。
AutoRenew:自動續費狀態。
StorageEngine:實例的存儲引擎。
PreferredBackupPeriod:備份周期。
MaintainEndTime:實例可維護時間段的結束時間。
SslStatus:SSL 功能的狀態。
MongosList:Mongos 節點信息列表。
TdeStatus:TDE 狀態。
NetworkType:實例的網絡類型。
PaymentType:數據庫的計費方式。
MaintainStartTime:實例可運維時間段的開始時間。
SecurityIps:IP 白名單分組下的 IP 列表。
ReadonlyReplicas:Shard 節點中只讀節點的個數。
ReplicationFactor:實例節點數量。
ZoneId:實例所屬可用區 ID。
PreferredBackupTime:備份時間。
SecurityGroupId:ECS 安全組 ID。
CreateTime:實例的創建時間。
ShardList:Shard 節點信息列表。
SecondaryZoneId:實現多可用區部署時,實例的備可用區 1。
VpcAuthMode:是否開啟了專有網絡免密訪問功能。
ProtocolType:實例的訪問協議類型。
EnableBackupLog:是否打開日志備份。
BackupRetentionPeriod:備份保留天數。
KindCode:表示實例的類型。
示例
YAML
格式ROSTemplateFormatVersion: '2015-09-01' Parameters: InstanceId: Type: String Description: en: The ID of the mongos Required: true Resources: ExtensionDataSource: Type: DATASOURCE::MONGODB::Instance Properties: InstanceId: Ref: InstanceId Outputs: ResourceGroupId: Description: The ID of the resource group to which the instance belongs. Value: Fn::GetAtt: - ExtensionDataSource - ResourceGroupId HiddenZoneId: Description: 'The zone where the hidden node resides for multi-zone deployment. ' Value: Fn::GetAtt: - ExtensionDataSource - HiddenZoneId DBInstanceType: Description: |- The architecture of the instance. Valid values: * replicate: replica set instance * sharding: sharded cluster instance Value: Fn::GetAtt: - ExtensionDataSource - DBInstanceType LogBackupRetentionPeriod: Description: 'The number of days for which log backups are retained. Valid values: 7 to 730.' Value: Fn::GetAtt: - ExtensionDataSource - LogBackupRetentionPeriod SnapshotBackupType: Description: |- The snapshot backup type. Valid values: * Flash: single-digit second backup * Standard (default): standard backup Value: Fn::GetAtt: - ExtensionDataSource - SnapshotBackupType LastDowngradeTime: Description: The date when the last downgrade operation was performed on the instance. Value: Fn::GetAtt: - ExtensionDataSource - LastDowngradeTime SslExpiredTime: Description: The time when the SSL certificate expires. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in Coordinated Universal Time (UTC). Value: Fn::GetAtt: - ExtensionDataSource - SslExpiredTime Engine: Description: 'The database engine of the instance. Default value: mongodb.' Value: Fn::GetAtt: - ExtensionDataSource - Engine Tags: Description: The details of the instance tags. Value: Fn::GetAtt: - ExtensionDataSource - Tags DBInstanceDescription: Description: The name of the instance. Value: Fn::GetAtt: - ExtensionDataSource - DBInstanceDescription AccountDescription: Description: The description of the account. Value: Fn::GetAtt: - ExtensionDataSource - AccountDescription DBInstanceReleaseProtection: Description: |- Indicates whether release protection is enabled for the instance. Valid values: * true * false Value: Fn::GetAtt: - ExtensionDataSource - DBInstanceReleaseProtection ReplicaSetsConnections: Description: ReplicaSets Connections. Value: Fn::GetAtt: - ExtensionDataSource - ReplicaSetsConnections Parameters: Description: The settings of the parameters that have taken effect. Value: Fn::GetAtt: - ExtensionDataSource - Parameters EngineVersion: Description: |- The database engine version of the instance. * 6.0 * 5.0 * 4.4 * 4.2 * 4.0 Value: Fn::GetAtt: - ExtensionDataSource - EngineVersion InstanceId: Description: The ID of the mongos Value: Fn::GetAtt: - ExtensionDataSource - InstanceId DBInstanceClass: Description: The instance type of the instance. Value: Fn::GetAtt: - ExtensionDataSource - DBInstanceClass VSwitchId: Description: The vSwitch ID of the instance. Value: Fn::GetAtt: - ExtensionDataSource - VSwitchId LockMode: Description: |- The lock status of the instance. Valid values: * Unlock: The instance is not locked. * ManualLock: The instance is manually locked. * LockByExpiration: The instance is automatically locked due to instance expiration. * LockByRestoration: The instance is automatically locked before the instance is rolled back. * LockByDiskQuota: The instance is automatically locked after the storage space is exhausted. * Released: The instance is released. Value: Fn::GetAtt: - ExtensionDataSource - LockMode AutoRenewDuration: Description: Auto Renew Duration. Value: Fn::GetAtt: - ExtensionDataSource - AutoRenewDuration DbInstanceStorage: Description: The storage capacity of the instance. Value: Fn::GetAtt: - ExtensionDataSource - DbInstanceStorage VpcId: Description: The VPC ID of the instance. Value: Fn::GetAtt: - ExtensionDataSource - VpcId SecurityIpList: Description: The name of the IP whitelist. Value: Fn::GetAtt: - ExtensionDataSource - SecurityIpList NetworkAddresses: Description: The endpoints of ApsaraDB for MongoDB instances. Value: Fn::GetAtt: - ExtensionDataSource - NetworkAddresses ExpireTime: Description: The time when the subscription instance expires. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC. Value: Fn::GetAtt: - ExtensionDataSource - ExpireTime AccountName: Description: 'The name of the account. Value: **root * *.' Value: Fn::GetAtt: - ExtensionDataSource - AccountName BackupInterval: Description: |- The frequency at which high-frequency backup is created. Valid values: * -1: High-frequency backup is disabled. * 15: every 15 minutes. * 30: every 30 minutes. * 60: every hour. * 120: every 2 hours. * 180: every 3 hours. * 240: every 4 hours. * 360: every 6 hours. * 480: every 8 hours. * 720: every 12 hours. Value: Fn::GetAtt: - ExtensionDataSource - BackupInterval AutoRenew: Description: |- Indicates whether auto-renewal is enabled for the instance. Valid values: * true: Auto-renewal is enabled for the instance. * false: Auto-renewal is disabled for the instance. Value: Fn::GetAtt: - ExtensionDataSource - AutoRenew StorageEngine: Description: The Storage Engine Of The Instance Type. Value: Fn::GetAtt: - ExtensionDataSource - StorageEngine PreferredBackupPeriod: Description: |- The day of a week on which to back up data. Valid values: * Monday * Tuesday * Wednesday * Thursday * Friday * Saturday * Sunday Value: Fn::GetAtt: - ExtensionDataSource - PreferredBackupPeriod MaintainEndTime: Description: The end time of the maintenance window. The time follows the ISO 8601 standard in the HH:mmZ format. The time is displayed in UTC. Value: Fn::GetAtt: - ExtensionDataSource - MaintainEndTime SslStatus: Description: |- The status of the SSL feature. Valid values: * Open: The SSL feature is enabled. * Closed: The SSL feature is disabled. Value: Fn::GetAtt: - ExtensionDataSource - SslStatus MongosList: Description: The information of the mongos nodes. Value: Fn::GetAtt: - ExtensionDataSource - MongosList TdeStatus: Description: |- The TDE status. Valid values: * enabled * disabled Value: Fn::GetAtt: - ExtensionDataSource - TdeStatus NetworkType: Description: |- The network type of the instance. Valid values: * Classic: classic network * VPC: VPC Value: Fn::GetAtt: - ExtensionDataSource - NetworkType PaymentType: Description: 'The billing method of the Database. Valid values: PrePaid: subscription PostPaid: pay-as-you-go.' Value: Fn::GetAtt: - ExtensionDataSource - PaymentType MaintainStartTime: Description: The start time of the maintenance window. The time follows the ISO 8601 standard in the HH:mmZ format. The time is displayed in UTC. Value: Fn::GetAtt: - ExtensionDataSource - MaintainStartTime SecurityIps: Description: The IP addresses in the default whitelist. Value: Fn::GetAtt: - ExtensionDataSource - SecurityIps ReadonlyReplicas: Description: 'The number of read-only nodes in the shard node. Valid values: 0 to 5. The value must be an integer.' Value: Fn::GetAtt: - ExtensionDataSource - ReadonlyReplicas ReplicationFactor: Description: The number of nodes in the instance. Value: Fn::GetAtt: - ExtensionDataSource - ReplicationFactor ZoneId: Description: The ID of the zone in which the instance resides. Value: Fn::GetAtt: - ExtensionDataSource - ZoneId PreferredBackupTime: Description: The time range during which the backup was created. The time follows the ISO 8601 standard in the HH:mmZ-HH:mmZ format. The time is displayed in UTC. Value: Fn::GetAtt: - ExtensionDataSource - PreferredBackupTime SecurityGroupId: Description: The ID of the ECS security group. Value: Fn::GetAtt: - ExtensionDataSource - SecurityGroupId CreateTime: Description: The Database create time. Value: Fn::GetAtt: - ExtensionDataSource - CreateTime ShardList: Description: The information of the shard nodes. Value: Fn::GetAtt: - ExtensionDataSource - ShardList SecondaryZoneId: Description: 'The zone where the secondary node resides for multi-zone deployment. ' Value: Fn::GetAtt: - ExtensionDataSource - SecondaryZoneId VpcAuthMode: Description: |- Indicates whether password-free access within the VPC is enabled. Valid values: * Open: Password-free access within the VPC is enabled. * Close: Password-free access within the VPC is disabled, and you must use a password for access. * NotSupport: Password-free access within the VPC is not supported. Value: Fn::GetAtt: - ExtensionDataSource - VpcAuthMode ProtocolType: Description: |- The access protocol type of the instance. Valid values: * mongodb * dynamodb Value: Fn::GetAtt: - ExtensionDataSource - ProtocolType EnableBackupLog: Description: |- Indicates whether the log backup feature is enabled. Valid values: * 0 (default): The log backup feature is disabled. * 1: The log backup feature is enabled. Value: Fn::GetAtt: - ExtensionDataSource - EnableBackupLog BackupRetentionPeriod: Description: 'The retention period of the backup data. Unit: day.' Value: Fn::GetAtt: - ExtensionDataSource - BackupRetentionPeriod KindCode: Description: |- The kind code of the instance. Valid values: * 0: physical machine * 1: Elastic Compute Service (ECS) instance * 2: Docker cluster * 18: Kubernetes cluster Value: Fn::GetAtt: - ExtensionDataSource - KindCode
JSON
格式{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "InstanceId": { "Type": "String", "Description": { "en": "The ID of the mongos" }, "Required": true }, "RefreshOptions": { "Type": "String", "Description": { "en": "The refresh strategy for the datasource resource when the stack is updated. Valid values:\n- Never: Never refresh the datasource resource when the stack is updated.\n- Always: Always refresh the datasource resource when the stack is updated.\nDefault is Never." }, "AllowedValues": [ "Always", "Never" ], "Required": false, "Default": "Never" } }, "Resources": { "ExtensionDataSource": { "Type": "DATASOURCE::MONGODB::Instance", "Properties": { "InstanceId": { "Ref": "InstanceId" }, "RefreshOptions": { "Ref": "RefreshOptions" } } } }, "Outputs": { "ResourceGroupId": { "Description": "The ID of the resource group to which the instance belongs.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "ResourceGroupId" ] } }, "HiddenZoneId": { "Description": "The zone where the hidden node resides for multi-zone deployment. ", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "HiddenZoneId" ] } }, "DBInstanceType": { "Description": "The architecture of the instance. Valid values:\n* replicate: replica set instance\n* sharding: sharded cluster instance", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "DBInstanceType" ] } }, "LogBackupRetentionPeriod": { "Description": "The number of days for which log backups are retained. Valid values: 7 to 730.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "LogBackupRetentionPeriod" ] } }, "SnapshotBackupType": { "Description": "The snapshot backup type. Valid values:\n* Flash: single-digit second backup\n* Standard (default): standard backup", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "SnapshotBackupType" ] } }, "LastDowngradeTime": { "Description": "The date when the last downgrade operation was performed on the instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "LastDowngradeTime" ] } }, "SslExpiredTime": { "Description": "The time when the SSL certificate expires. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in Coordinated Universal Time (UTC).", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "SslExpiredTime" ] } }, "Engine": { "Description": "The database engine of the instance. Default value: mongodb.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "Engine" ] } }, "Tags": { "Description": "The details of the instance tags.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "Tags" ] } }, "DBInstanceDescription": { "Description": "The name of the instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "DBInstanceDescription" ] } }, "AccountDescription": { "Description": "The description of the account.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "AccountDescription" ] } }, "DBInstanceReleaseProtection": { "Description": "Indicates whether release protection is enabled for the instance. Valid values:\n* true\n* false", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "DBInstanceReleaseProtection" ] } }, "ReplicaSetsConnections": { "Description": "ReplicaSets Connections.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "ReplicaSetsConnections" ] } }, "Parameters": { "Description": "The settings of the parameters that have taken effect.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "Parameters" ] } }, "EngineVersion": { "Description": "The database engine version of the instance.\n* 6.0\n* 5.0\n* 4.4\n* 4.2\n* 4.0", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "EngineVersion" ] } }, "InstanceId": { "Description": "The ID of the mongos", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "InstanceId" ] } }, "DBInstanceClass": { "Description": "The instance type of the instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "DBInstanceClass" ] } }, "VSwitchId": { "Description": "The vSwitch ID of the instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "VSwitchId" ] } }, "LockMode": { "Description": "The lock status of the instance. Valid values:\n* Unlock: The instance is not locked.\n* ManualLock: The instance is manually locked.\n* LockByExpiration: The instance is automatically locked due to instance expiration.\n* LockByRestoration: The instance is automatically locked before the instance is rolled back.\n* LockByDiskQuota: The instance is automatically locked after the storage space is exhausted.\n* Released: The instance is released.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "LockMode" ] } }, "AutoRenewDuration": { "Description": "Auto Renew Duration.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "AutoRenewDuration" ] } }, "DbInstanceStorage": { "Description": "The storage capacity of the instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "DbInstanceStorage" ] } }, "VpcId": { "Description": "The VPC ID of the instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "VpcId" ] } }, "SecurityIpList": { "Description": "The name of the IP whitelist.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "SecurityIpList" ] } }, "NetworkAddresses": { "Description": "The endpoints of ApsaraDB for MongoDB instances.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "NetworkAddresses" ] } }, "ExpireTime": { "Description": "The time when the subscription instance expires. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "ExpireTime" ] } }, "AccountName": { "Description": "The name of the account. Value: **root * *.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "AccountName" ] } }, "BackupInterval": { "Description": "The frequency at which high-frequency backup is created. Valid values:\n* -1: High-frequency backup is disabled.\n* 15: every 15 minutes.\n* 30: every 30 minutes.\n* 60: every hour.\n* 120: every 2 hours.\n* 180: every 3 hours.\n* 240: every 4 hours.\n* 360: every 6 hours.\n* 480: every 8 hours.\n* 720: every 12 hours.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "BackupInterval" ] } }, "AutoRenew": { "Description": "Indicates whether auto-renewal is enabled for the instance. Valid values:\n* true: Auto-renewal is enabled for the instance.\n* false: Auto-renewal is disabled for the instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "AutoRenew" ] } }, "StorageEngine": { "Description": "The Storage Engine Of The Instance Type.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "StorageEngine" ] } }, "PreferredBackupPeriod": { "Description": "The day of a week on which to back up data. Valid values:\n* Monday\n* Tuesday\n* Wednesday\n* Thursday\n* Friday\n* Saturday\n* Sunday", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "PreferredBackupPeriod" ] } }, "MaintainEndTime": { "Description": "The end time of the maintenance window. The time follows the ISO 8601 standard in the HH:mmZ format. The time is displayed in UTC.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "MaintainEndTime" ] } }, "SslStatus": { "Description": "The status of the SSL feature. Valid values:\n* Open: The SSL feature is enabled.\n* Closed: The SSL feature is disabled.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "SslStatus" ] } }, "MongosList": { "Description": "The information of the mongos nodes.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "MongosList" ] } }, "TdeStatus": { "Description": "The TDE status. Valid values:\n* enabled\n* disabled", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "TdeStatus" ] } }, "NetworkType": { "Description": "The network type of the instance. Valid values:\n* Classic: classic network\n* VPC: VPC", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "NetworkType" ] } }, "PaymentType": { "Description": "The billing method of the Database. Valid values: PrePaid: subscription PostPaid: pay-as-you-go.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "PaymentType" ] } }, "MaintainStartTime": { "Description": "The start time of the maintenance window. The time follows the ISO 8601 standard in the HH:mmZ format. The time is displayed in UTC.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "MaintainStartTime" ] } }, "SecurityIps": { "Description": "The IP addresses in the default whitelist.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "SecurityIps" ] } }, "ReadonlyReplicas": { "Description": "The number of read-only nodes in the shard node. Valid values: 0 to 5. The value must be an integer.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "ReadonlyReplicas" ] } }, "ReplicationFactor": { "Description": "The number of nodes in the instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "ReplicationFactor" ] } }, "ZoneId": { "Description": "The ID of the zone in which the instance resides.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "ZoneId" ] } }, "PreferredBackupTime": { "Description": "The time range during which the backup was created. The time follows the ISO 8601 standard in the HH:mmZ-HH:mmZ format. The time is displayed in UTC.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "PreferredBackupTime" ] } }, "SecurityGroupId": { "Description": "The ID of the ECS security group.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "SecurityGroupId" ] } }, "CreateTime": { "Description": "The Database create time.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "CreateTime" ] } }, "ShardList": { "Description": "The information of the shard nodes.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "ShardList" ] } }, "SecondaryZoneId": { "Description": "The zone where the secondary node resides for multi-zone deployment. ", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "SecondaryZoneId" ] } }, "VpcAuthMode": { "Description": "Indicates whether password-free access within the VPC is enabled. Valid values:\n* Open: Password-free access within the VPC is enabled.\n* Close: Password-free access within the VPC is disabled, and you must use a password for access.\n* NotSupport: Password-free access within the VPC is not supported.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "VpcAuthMode" ] } }, "ProtocolType": { "Description": "The access protocol type of the instance. Valid values:\n* mongodb\n* dynamodb", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "ProtocolType" ] } }, "EnableBackupLog": { "Description": "Indicates whether the log backup feature is enabled. Valid values:\n* 0 (default): The log backup feature is disabled.\n* 1: The log backup feature is enabled.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "EnableBackupLog" ] } }, "BackupRetentionPeriod": { "Description": "The retention period of the backup data. Unit: day.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "BackupRetentionPeriod" ] } }, "KindCode": { "Description": "The kind code of the instance. Valid values:\n* 0: physical machine\n* 1: Elastic Compute Service (ECS) instance\n* 2: Docker cluster\n* 18: Kubernetes cluster", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "KindCode" ] } } } }