All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::MONGODB::ShardingNetworkPrivateAddress

Last Updated:Jul 05, 2026

The ALIYUN::MONGODB::ShardingNetworkPrivateAddress resource allocates a private connection address for a node in an ApsaraDB for MongoDB sharded cluster instance.

Syntax

{
  "Type": "ALIYUN::MONGODB::ShardingNetworkPrivateAddress",
  "Properties": {
    "DBInstanceId": String,
    "NodeId": String,
    "AccountPassword": String,
    "AccountName": String,
    "ZoneId": String
  }
}

Properties

Parameter

Type

Required

Update allowed

Description

Constraints

DBInstanceId

String

Yes

No

The ID of the sharded cluster instance.

None

NodeId

String

Yes

No

The ID of the Mongos, Shard, or ConfigServer node in the sharded cluster instance.

None

AccountName

String

No

No

The account name.

  • Must be 4 to 16 characters long, start with a lowercase letter, and contain only lowercase letters, digits, and underscores (_).

  • Specify the account name and password only when requesting a private connection address for a shard or config server node for the first time. The specified account and password are then used for all shard and config server nodes in the instance.

  • This account has read-only permissions.

AccountPassword

String

No

No

The account password.

The password must be 8 to 32 characters.
The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Supported special characters are: ! #$%^& *()_+-=

ZoneId

String

No

No

The ID of the zone where the instance is located.

None

Outputs

Fn::GetAtt

  • CompatibleConnections: The list of connection addresses that use the DynamoDB protocol.

  • NetworkAddresses: The list of connection addresses that use the MongoDB protocol.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  NodeId:
    Type: String
    Description:
      en: |-
        The ID of the Mongos, Shard, or ConfigServer node in the sharded cluster instance.
        > You can call the DescribeDBInstanceAttribute operation to query the IDs of the Mongos, Shard, and ConfigServer nodes.
    Required: true
  ZoneId:
    Type: String
    Description:
      en: |-
        The ID of the zone where the instance is located.
        > You can call the DescribeDBInstanceAttribute operation to query the zone ID of an instance.
    AssociationProperty: ZoneId
    Default: Null
    Required: false
  DBInstanceId:
    Type: String
    Description:
      en: The ID of the sharded cluster instance.
    Required: true
  AccountPassword:
    Type: String
    Description:
      en: |-
        The account password.
        - Must be 8 to 32 characters.
        - Must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
        - Supported special characters: ! #$%^& *()_+-=
    Default: Null
    Required: false
  AccountName:
    Type: String
    Description:
      en: |-
        The account name.
        - Must be 4 to 16 characters long, start with a lowercase letter, and contain only lowercase letters, digits, and underscores (_).
        - Specify the account name and password only when requesting a private connection address for a shard or config server node for the first time. The specified account and password are then used for all shard and config server nodes in the instance.
        - This account has read-only permissions.
    Default: Null
    Required: false
Resources:
  ExtensionResource:
    Type: ALIYUN::MONGODB::ShardingNetworkPrivateAddress
    Properties:
      NodeId:
        Ref: NodeId
      ZoneId:
        Ref: ZoneId
      DBInstanceId:
        Ref: DBInstanceId
      AccountPassword:
        Ref: AccountPassword
      AccountName:
        Ref: AccountName
Outputs:
  NetworkAddresses:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - NetworkAddresses
    Description: The list of connection addresses that use the MongoDB protocol.
  CompatibleConnections:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CompatibleConnections
    Description: The list of connection addresses that use the DynamoDB protocol.
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "NodeId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the Mongos, Shard, or ConfigServer node in the sharded cluster instance.\n> You can call the DescribeDBInstanceAttribute operation to query the IDs of the Mongos, Shard, and ConfigServer nodes."
      },
      "Required": true
    },
    "ZoneId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the zone where the instance is located.\n> You can call the DescribeDBInstanceAttribute operation to query the zone ID of an instance."
      },
      "AssociationProperty": "ZoneId",
      "Default": null,
      "Required": false
    },
    "DBInstanceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the sharded cluster instance."
      },
      "Required": true
    },
    "AccountPassword": {
      "Type": "String",
      "Description": {
        "en": "The account password.\n- Must be 8 to 32 characters.\n- Must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.\n- Supported special characters: ! #$%^& *()_+-="
      },
      "Default": null,
      "Required": false
    },
    "AccountName": {
      "Type": "String",
      "Description": {
        "en": "The account name.\n- Must be 4 to 16 characters long, start with a lowercase letter, and contain only lowercase letters, digits, and underscores (_).\n- Specify the account name and password only when requesting a private connection address for a shard or config server node for the first time. The specified account and password are then used for all shard and config server nodes in the instance.\n- This account has read-only permissions."
      },
      "Default": null,
      "Required": false
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::MONGODB::ShardingNetworkPrivateAddress",
      "Properties": {
        "NodeId": {
          "Ref": "NodeId"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "DBInstanceId": {
          "Ref": "DBInstanceId"
        },
        "AccountPassword": {
          "Ref": "AccountPassword"
        },
        "AccountName": {
          "Ref": "AccountName"
        }
      }
    }
  },
  "Outputs": {
    "NetworkAddresses": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "NetworkAddresses"
        ]
      },
      "Description": "The list of connection addresses that use the MongoDB protocol."
    },
    "CompatibleConnections": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CompatibleConnections"
        ]
      },
      "Description": "The list of connection addresses that use the DynamoDB protocol."
    }
  }
}