DATASOURCE::MONGODB::Instances is used to query the details of 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
}
}
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 status, see Instance states. |
ZoneId | String | No | Yes | The ID of the zone to which the instance belongs. | 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 supported instance types, see Instance specifications. |
VSwitchId | String | No | Yes | The ID of the vSwitch. | None. |
DBInstanceType | String | No | Yes | The architecture of the instance. | Default value: replicate. Valid values:
|
Expired | Boolean | No | Yes | Specifies whether the instance expires. | Valid values:
|
ConnectionDomain | String | No | Yes | The endpoint of the node. | You can call the DescribeDBInstanceAttribute operation to query the endpoint. |
VpcId | String | No | Yes | The ID of the virtual private cloud (VPC). | None. |
DBInstanceId | String | No | Yes | The ID of the instance. | 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 specify up to 20 tags.
For more information, see Tags properties. |
Tags syntax
"Tags": [
{
"Value": String,
"Key": String
}
]
Tags properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Value | String | No | No | The value of the tag. | The value must be 1 to 128 characters in length. The value cannot start with aliyun , acs: , http:// , or https:// .
|
Key | String | Yes | No | The key of the tag. | The key must be 1 to 128 characters in length. The key cannot start with aliyun , acs: , http:// , or https:// .
|
Return values (Fn::GetAtt)
- InstanceIds: the IDs of the instances.
- Instances: the 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 the DBInstanceType property 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 the DBInstanceType property is set to sharding. |
DBInstanceStatus | String | The state of the instance. | For more information about the state, see Instance states. |
DBInstanceStorage | Number | The storage capacity of the instance. | None. |
ResourceGroupId | String | The ID of the resource group. | None. |
ZoneId | String | The ID of the zone to which the instance belongs. | None. |
DBInstanceId | String | The ID of the instance. | None. |
DBInstanceClass | String | The instance type. | For more information about the supported instance types, see Instance specifications. |
Engine | String | The database engine of the instance. | None. |
ReplicationFactor | String | The number of nodes in the instance. | This property is returned if the DBInstanceType property 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 the DBInstanceType property 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"
]
}
}
}
}