ALIYUN::MONGODB::ShardingNetworkPublicAddress类型用于为实例申请公网连接地址。
语法
{
"Type": "ALIYUN::MONGODB::ShardingNetworkPublicAddress",
"Properties": {
"DBInstanceId": String,
"NodeId": String
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
DBInstanceId |
String |
是 |
否 |
实例ID。 |
无 |
|
NodeId |
String |
否 |
否 |
分片集群实例中的Mongos节点ID、Shard节点ID或ConfigServer节点ID。 |
无 |
返回值
Fn::GetAtt
NetworkAddresses:MongoDB协议类型实例的连接地址列表。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
DBInstanceId:
Type: String
Description:
en: |-
The ID of the instance.
> you must also configure the **NodeId** parameter when configuring a shard cluster instance ID.
Required: true
NodeId:
Type: String
Description:
en: |-
The Mongos node ID, Shard node ID, or ConfigServer 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 ConfigServer node.
> This parameter is required when **DBInstanceId** is configured as a sharded cluster instance ID.
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 of an instance of the MongoDB protocol type.
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"DBInstanceId": {
"Type": "String",
"Description": {
"en": "The ID of the instance.\n> you must also configure the **NodeId** parameter when configuring a shard cluster instance ID."
},
"Required": true
},
"NodeId": {
"Type": "String",
"Description": {
"en": "The Mongos node ID, Shard node ID, or ConfigServer 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 ConfigServer node.\n> This parameter is required when **DBInstanceId** is configured as a sharded cluster instance ID."
},
"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 of an instance of the MongoDB protocol type."
}
}
}该文章对您有帮助吗?