ALIYUN::MONGODB::ShardingNetworkPrivateAddress

更新时间:
复制为 MD 格式

ALIYUN::MONGODB::ShardingNetworkPrivateAddress类型用于为云数据库分片集群实例节点申请内网连接地址。

语法

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

属性

属性名称

类型

必须

允许更新

描述

约束

DBInstanceId

String

分片集群实例ID。

NodeId

String

分片集群实例中的Mongos节点、Shard节点或ConfigServer节点的ID。

AccountName

String

账号名称。

  • 以小写字母开头,长度为4-16位,由小写字母、数字或下划线组成。

  • 只有首次申请Shard/ConfigServer地址时需要设置账号名称和密码,即所有Shard节点和ConfigServer节点将使用首次申请地址时设置的账号和密码。

  • 该账号权限固定为只读。

AccountPassword

String

账号密码。

密码由大写字母、小写字母、数字和特殊字符中的至少三种组成,特殊字符为'! #$%^& *()_+-='

- 密码长度为8-32位。

ZoneId

String

实例所属可用区ID。

返回值

Fn::GetAtt

  • CompatibleConnections:DynamoDB协议实例的连接地址列表。

  • NetworkAddresses:MongoDB协议类型实例的连接地址列表。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  NodeId:
    Type: String
    Description:
      en: |-
        The ID of the Mongos node, Shard node, or ConfigServer node in the sharded cluster instance.
        > You can call the [DescribeDBInstanceAttribute] interface to query the Mongos, Shard, and ConfigServer node ID.
    Required: true
  ZoneId:
    Type: String
    Description:
      en: |-
        The ID of the zone to which the instance belongs.
        > You can call the [describeddinstanceattribute] operation to query the zone ID of an instance.
    AssociationProperty: ZoneId
    Default: Null
    Required: false
  DBInstanceId:
    Type: String
    Description:
      en: The ID of the Shard cluster instance.
    Required: true
  AccountPassword:
    Type: String
    Description:
      en: |-
        Account password.
        - The password consists of at least three of uppercase letters, lowercase letters, numbers, and special characters. The special character is '! #$%^& *()_+-='
        - The password length is 8-32 bits.
    Default: Null
    Required: false
  AccountName:
    Type: String
    Description:
      en: |-
        Account name.
        >- starts with a lowercase letter, has 4 to 16 digits in length, and consists of lowercase letters, numbers, or underscores.
        - Only when you apply for the Shard/ConfigServer address for the first time, you need to set the account name and password. That is, all Shard nodes and ConfigServer nodes will use the account and password set when applying for the address for the first time.
        - The permissions of this account are fixed to read-only.
    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: A list of connection addresses of an instance of the MongoDB protocol type.
  CompatibleConnections:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CompatibleConnections
    Description: The list of connection addresses of the DynamoDB protocol instance.
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "NodeId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the Mongos node, Shard node, or ConfigServer node in the sharded cluster instance.\n> You can call the [DescribeDBInstanceAttribute] interface to query the Mongos, Shard, and ConfigServer node ID."
      },
      "Required": true
    },
    "ZoneId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the zone to which the instance belongs.\n> You can call the [describeddinstanceattribute] operation to query the zone ID of an instance."
      },
      "AssociationProperty": "ZoneId",
      "Default": null,
      "Required": false
    },
    "DBInstanceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the Shard cluster instance."
      },
      "Required": true
    },
    "AccountPassword": {
      "Type": "String",
      "Description": {
        "en": "Account password.\n- The password consists of at least three of uppercase letters, lowercase letters, numbers, and special characters. The special character is '! #$%^& *()_+-='\n- The password length is 8-32 bits."
      },
      "Default": null,
      "Required": false
    },
    "AccountName": {
      "Type": "String",
      "Description": {
        "en": "Account name.\n>- starts with a lowercase letter, has 4 to 16 digits in length, and consists of lowercase letters, numbers, or underscores.\n- Only when you apply for the Shard/ConfigServer address for the first time, you need to set the account name and password. That is, all Shard nodes and ConfigServer nodes will use the account and password set when applying for the address for the first time.\n- The permissions of this account are fixed to read-only."
      },
      "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": "A list of connection addresses of an instance of the MongoDB protocol type."
    },
    "CompatibleConnections": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CompatibleConnections"
        ]
      },
      "Description": "The list of connection addresses of the DynamoDB protocol instance."
    }
  }
}