Use the ALIYUN::MONGODB::ShardingNetworkPublicAddress type to request a public connection address for an instance.
Syntax
{
"Type": "ALIYUN::MONGODB::ShardingNetworkPublicAddress",
"Properties": {
"DBInstanceId": String,
"NodeId": String
}
}
Properties
|
Parameter |
Type |
Required |
Update allowed |
Description |
Constraints |
|
DBInstanceId |
String |
Yes |
No |
The ID of the sharded cluster instance. |
None |
|
NodeId |
String |
No |
No |
The ID of the mongos node, shard node, or config server node in a sharded cluster instance. |
None |
Return values
Fn::GetAtt
NetworkAddresses: A list of connection addresses for the instance.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
DBInstanceId:
Type: String
Description:
en: |-
The ID of the sharded cluster instance.
> For a sharded cluster instance, you must also specify the **NodeId** parameter.
Required: true
NodeId:
Type: String
Description:
en: |-
The mongos node ID, shard node ID, or config server node ID in the sharded cluster instance. You can call the [DescribeDBInstanceAttribute](~~ 62010 ~~) operation to query the node ID of the mongos node, shard node, or config server node.
> This parameter is required when **DBInstanceId** is the ID of a sharded cluster instance.
Default: Null
Required: false
Resources:
ExtensionResource:
Type: ALIYUN::MONGODB::ShardingNetworkPublicAddress
Properties:
DBInstanceId:
Ref: DBInstanceId
NodeId:
Ref: NodeId
Outputs:
NetworkAddresses:
Value:
Fn::GetAtt:
- ExtensionResource
- NetworkAddresses
Description: A list of connection addresses for the instance.
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"DBInstanceId": {
"Type": "String",
"Description": {
"en": "The ID of the sharded cluster instance.\n> For a sharded cluster instance, you must also specify the **NodeId** parameter."
},
"Required": true
},
"NodeId": {
"Type": "String",
"Description": {
"en": "The mongos node ID, shard node ID, or config server node ID in the sharded cluster instance. You can call the [DescribeDBInstanceAttribute](~~ 62010 ~~) operation to query the node ID of the mongos node, shard node, or config server node.\n> This parameter is required when **DBInstanceId** is the ID of a sharded cluster instance."
},
"Default": null,
"Required": false
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::MONGODB::ShardingNetworkPublicAddress",
"Properties": {
"DBInstanceId": {
"Ref": "DBInstanceId"
},
"NodeId": {
"Ref": "NodeId"
}
}
}
},
"Outputs": {
"NetworkAddresses": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"NetworkAddresses"
]
},
"Description": "A list of connection addresses for the instance."
}
}
}