All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::RDS::Connection

Last Updated:Jun 03, 2026

ALIYUN::RDS::Connection applies for a public endpoint for an ApsaraDB RDS instance.

Syntax

{
  "Type": "ALIYUN::RDS::Connection",
  "Properties": {
    "DBInstanceId": String,
    "Port": Integer,
    "BabelfishPort": String,
    "ConnectionStringPrefix": String,
    "GeneralGroupName": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

DBInstanceId

String

Yes

No

The ApsaraDB RDS instance ID.

None.

Port

Integer

Yes

No

The public endpoint port.

Valid values: 1000 to 5999.

BabelfishPort

String

No

No

The TDS port of the Babelfish-enabled instance.

Note

Applies only to ApsaraDB RDS for PostgreSQL instances. Introduction to Babelfish.

ConnectionStringPrefix

String

No

No

The public endpoint prefix.

Format: <prefix>.<engine>.rds.aliyuncs.com.

For example: test1234.mysql.rds.aliyuncs.com.

Note

Must be 5 to 40 characters. Allowed: letters, digits, and hyphens (-). Disallowed: ~ ! # % ^ & * = + | { } ; : ' " , < > / ?

GeneralGroupName

String

No

No

The dedicated cluster name. Takes effect only when the instance is created in an ApsaraDB MyBase cluster that runs MySQL on Standard Edition.

None.

Return values

Fn::GetAtt

  • DBInstanceId: the ApsaraDB RDS instance ID.

  • Port: the public endpoint port.

  • ConnectionString: the public endpoint.

  • BabelfishPort: the TDS port of the Babelfish-enabled instance.

Examples

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  DBInstanceId:
    Type: String
    Description: RDS instance ID.
    Default: '****'
  Port:
    Type: Number
    Description: The port of the database service.
    MinValue: 1000
    MaxValue: 5999
    Default: 1000
Resources:
  Connection:
    Type: ALIYUN::RDS::Connection
    Properties:
      DBInstanceId:
        Ref: DBInstanceId
      Port:
        Ref: Port
Outputs:
  DBInstanceId:
    Description: RDS instance ID.
    Value:
      Fn::GetAtt:
        - Connection
        - DBInstanceId
  Port:
    Description: The port of the database service.
    Value:
      Fn::GetAtt:
        - Connection
        - Port
  ConnectionString:
    Description: Connection string
    Value:
      Fn::GetAtt:
        - Connection
        - ConnectionString
  BabelfishPort:
    Description: The name of the dedicated cluster to which the instance belongs.
    Value:
      Fn::GetAtt:
        - Connection
        - BabelfishPort

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DBInstanceId": {
      "Type": "String",
      "Description": "RDS instance ID.",
      "Default": "****"
    },
    "Port": {
      "Type": "Number",
      "Description": "The port of the database service.",
      "MinValue": 1000,
      "MaxValue": 5999,
      "Default": 1000
    }
  },
  "Resources": {
    "Connection": {
      "Type": "ALIYUN::RDS::Connection",
      "Properties": {
        "DBInstanceId": {
          "Ref": "DBInstanceId"
        },
        "Port": {
          "Ref": "Port"
        }
      }
    }
  },
  "Outputs": {
    "DBInstanceId": {
      "Description": "RDS instance ID.",
      "Value": {
        "Fn::GetAtt": [
          "Connection",
          "DBInstanceId"
        ]
      }
    },
    "Port": {
      "Description": "The port of the database service.",
      "Value": {
        "Fn::GetAtt": [
          "Connection",
          "Port"
        ]
      }
    },
    "ConnectionString": {
      "Description": "Connection string",
      "Value": {
        "Fn::GetAtt": [
          "Connection",
          "ConnectionString"
        ]
      }
    },
    "BabelfishPort": {
      "Description": "The name of the dedicated cluster to which the instance belongs.",
      "Value": {
        "Fn::GetAtt": [
          "Connection",
          "BabelfishPort"
        ]
      }
    }
  }
}