Queries information about ApsaraDB for MongoDB instances.
Syntax
{
"Type": "DATASOURCE::MONGODB::Instances",
"Properties": {
"EngineVersion": String,
"ReplicationFactor": String,
"DBInstanceStatus": String,
"ZoneId": String,
"ResourceGroupId": String,
"DBInstanceClass": String,
"VSwitchId": String,
"DBInstanceType": String,
"Expired": Boolean,
"ConnectionDomain": String,
"VpcId": String,
"DBInstanceId": String,
"ChargeType": String,
"NetworkType": String,
"DBInstanceDescription": String,
"Tags": List,
"RefreshOptions": String
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
EngineVersion |
String |
No |
Yes |
The database engine version. |
Valid values:
|
|
ReplicationFactor |
String |
No |
Yes |
The number of nodes in a replica set instance. |
Valid values:
|
|
DBInstanceStatus |
String |
No |
Yes |
The instance status. |
Valid values: Instance states. |
|
ZoneId |
String |
No |
Yes |
The zone ID. |
Call DescribeRegions to query supported zones. |
|
ResourceGroupId |
String |
No |
Yes |
The resource group ID. |
None. |
|
DBInstanceClass |
String |
No |
Yes |
The instance type. |
Valid values: Instance types. |
|
VSwitchId |
String |
No |
Yes |
The vSwitch ID. |
None |
|
DBInstanceType |
String |
No |
Yes |
The instance architecture. |
Valid values:
|
|
Expired |
Boolean |
No |
Yes |
Whether the instance has expired. |
Valid values:
|
|
ConnectionDomain |
String |
No |
Yes |
The node endpoint. |
Call DescribeDBInstanceAttribute to query node endpoints. |
|
VpcId |
String |
No |
Yes |
The VPC ID. |
None. |
|
DBInstanceId |
String |
No |
Yes |
The instance ID. |
None. |
|
ChargeType |
String |
No |
Yes |
The billing method. |
Valid values:
|
|
NetworkType |
String |
No |
Yes |
The network type. |
Valid values:
|
|
DBInstanceDescription |
String |
No |
Yes |
The instance description. |
None. |
|
Tags |
List |
No |
Yes |
The instance tags. |
Maximum: 20 tags. |
|
RefreshOptions |
String |
No |
Yes |
The refresh policy for data source resources when the stack updates. |
Valid values:
|
Tags syntax
"Tags": [
{
"Value": String,
"Key": String
}
]
Tags properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Value |
String |
No |
No |
The tag value. |
1 to 128 characters. Cannot start with |
|
Key |
String |
Yes |
No |
The tag key. |
1 to 128 characters. Cannot start with |
Return values (Fn::GetAtt)
-
InstanceIds: the instance IDs.
-
Instances: instance details.
|
Property |
Type |
Description |
Constraint |
|
InstanceIds |
List |
The instance IDs. |
None. |
|
Instances |
List |
Instance details. |
None. |
|
ChargeType |
String |
The billing method. |
Valid values:
|
|
Tags |
List |
The instance tags. |
None. |
|
VpcAuthMode |
String |
Whether password-free access over VPC is enabled. |
Valid values:
|
|
NetworkType |
String |
The network type. |
Valid values:
|
|
LockMode |
String |
The instance lock mode. |
Valid values:
|
|
EngineVersion |
String |
The database engine version. |
None. |
|
MongosList |
List |
The mongos node details. |
Returned only when DBInstanceType is sharding. |
|
DBInstanceDescription |
String |
The instance description. |
None. |
|
DBInstanceType |
String |
The instance architecture. |
Valid values:
|
|
ShardList |
List |
The shard node details. |
Returned only when DBInstanceType is sharding. |
|
DBInstanceStatus |
String |
The instance status. |
Valid values: Instance states. |
|
DBInstanceStorage |
Number |
The storage capacity of the instance. |
None. |
|
ResourceGroupId |
String |
The resource group ID. |
None. |
|
ZoneId |
String |
The zone ID. |
None. |
|
DBInstanceId |
String |
The instance ID. |
None. |
|
DBInstanceClass |
String |
The instance type. |
Valid values: Instance specifications. |
|
Engine |
String |
The database engine. |
None. |
|
ReplicationFactor |
String |
The number of nodes in the instance. |
Returned only when DBInstanceType is replicate. |
|
KindCode |
String |
The kind code of the instance. |
Valid values:
|
|
CapacityUnit |
String |
The read and write throughput consumed by the instance. |
Returned only when DBInstanceType is serverless. |
Examples
JSON format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ZoneId": {
"Type": "String",
"Description": "The zone ID of the instance. You can call the DescribeRegions operation to query the most recent zone list. ",
"AssociationProperty": "ALIYUN::ECS::Instance:ZoneId"
},
"DbType": {
"Type": "String",
"Description": "The database engine type of the instance.\nnormal: replica set instance\nsharding: sharded cluster instance",
"Default": "normal"
}
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::MONGODB::InstanceClasses",
"Properties": {
"ZoneId": {
"Ref": "ZoneId"
},
"DbType": {
"Ref": "DbType"
}
}
}
},
"Outputs": {
"InstanceClasses": {
"Description": "The list of The instance classes.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"InstanceClasses"
]
}
},
"InstanceClassIds": {
"Description": "The list of The instance class Ids.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"InstanceClassIds"
]
}
}
}
}