DATASOURCE::MONGODB::Instances is used to query the 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 version of the database engine. | Valid values:
|
ReplicationFactor | String | No | Yes | The number of nodes in the replica set instance. | Valid values:
|
DBInstanceStatus | String | No | Yes | The status of the instance. | For more information about the valid values, see Instance states. |
ZoneId | String | No | Yes | The zone ID. | You can call the DescribeRegions operation to query the zones supported by the instance. |
ResourceGroupId | String | No | Yes | The ID of the resource group. | None. |
DBInstanceClass | String | No | Yes | The instance type. | For more information about the valid values, see Instance types. |
VSwitchId | String | No | Yes | The vSwitch ID. | None. |
DBInstanceType | String | No | Yes | The architecture of the instance. | Valid values:
|
Expired | Boolean | No | Yes | Specifies whether the instance has expired. | Valid values:
|
ConnectionDomain | String | No | Yes | The endpoint of the node. | You can call the DescribeDBInstanceAttribute operation to query the endpoint of the node. |
VpcId | String | No | Yes | The ID of the virtual private cloud (VPC). | None. |
DBInstanceId | String | No | Yes | The instance ID. | None. |
ChargeType | String | No | Yes | The billing method of the instance. | Valid values:
|
NetworkType | String | No | Yes | The network type of the instance. | Valid values:
|
DBInstanceDescription | String | No | Yes | The description of the instance. | None. |
Tags | List | No | Yes | The tags of the instance. | You can add up to 20 tags. For more information, see Tags properties. |
RefreshOptions | String | No | Yes | The refresh policy for data source resources when the stack is updated. | Valid values:
|
Tags syntax
"Tags": [
{
"Value": String,
"Key": String
}
]
Tags properties
Property | Type | Required | Editable | Description | Constraint |
Value | String | No | No | The tag value of the instance. | The tag value must be 1 to 128 characters in length. It cannot start with |
Key | String | Yes | No | The tag key of the instance. | The tag key must be 1 to 128 characters in length. It cannot start with |
Return values (Fn::GetAtt)
InstanceIds: the IDs of the instances.
Instances: details of the instances.
Property | Type | Description | Constraint |
InstanceIds | List | The IDs of the instances. | None. |
Instances | List | Details of the instances. | None. |
ChargeType | String | The billing method of the instance. | Valid values:
|
Tags | List | The tags of the instance. | None. |
VpcAuthMode | String | Indicates whether password-free access over a VPC is enabled. | Valid values:
|
NetworkType | String | The network type of the instance. | Valid values:
|
LockMode | String | The lock mode of the instance. | Valid values:
|
EngineVersion | String | The version of the database engine. | None. |
MongosList | List | Details of the mongos nodes. | This property is returned if DBInstanceType is set to sharding. |
DBInstanceDescription | String | The description of the instance. | None. |
DBInstanceType | String | The architecture of the instance. | Valid values:
|
ShardList | List | Details of the shard nodes. | This property is returned if DBInstanceType is set to sharding. |
DBInstanceStatus | String | The status of the instance. | For more information about the valid values, see Instance states. |
DBInstanceStorage | Number | The storage capacity of the instance. | None. |
ResourceGroupId | String | The ID of the resource group. | None. |
ZoneId | String | The zone ID of the instance. | None. |
DBInstanceId | String | The instance ID. | None. |
DBInstanceClass | String | The instance type. | For more information about the valid values, see Instance specifications. |
Engine | String | The database engine. | None. |
ReplicationFactor | String | The number of nodes in the instance. | This property is returned if DBInstanceType is set to replicate. |
KindCode | String | The kind code of the instance. | Valid values:
|
CapacityUnit | String | The read and write throughput consumed by the instance. | This property is returned if DBInstanceType is set to 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"
]
}
}
}
}