Tous les produits
Search
Centre de documentation

Resource Orchestration Service:ALIYUN::RDS::Connection

Dernière mise à jour :Aug 10, 2026

Le type de ressource ALIYUN::RDS::Connection permet de demander un endpoint public pour une instance ApsaraDB RDS.

Syntaxe

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

Propriétés

Propriété

Type

Obligatoire

Modifiable

Description

Contrainte

DBInstanceId

String

Oui

Non

ID de l'instance ApsaraDB RDS.

Aucune.

Port

Integer

Oui

Non

Port de l'endpoint public.

Valeurs valides : de 1000 à 5999.

BabelfishPort

String

Non

Non

Port TDS de l'instance activée pour Babelfish.

Remarque

S'applique uniquement aux instances ApsaraDB RDS for PostgreSQL. Présentation de Babelfish.

ConnectionStringPrefix

String

Non

Non

Préfixe de l'endpoint public.

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

Exemple : test1234.mysql.rds.aliyuncs.com.

Remarque

Doit contenir entre 5 et 40 caractères. Caractères autorisés : lettres, chiffres et tirets (-). Caractères interdits : ~ ! # % ^ & * = + | { } ; : ' " , < > / ?

GeneralGroupName

String

Non

Non

Nom du cluster dédié. Cette propriété prend effet uniquement lorsque l'instance est créée dans un cluster ApsaraDB MyBase exécutant MySQL en édition Standard.

Aucune.

Valeurs de retour

Fn::GetAtt

  • DBInstanceId : ID de l'instance ApsaraDB RDS.

  • Port : port de l'endpoint public.

  • ConnectionString : endpoint public.

  • BabelfishPort : port TDS de l'instance activée pour Babelfish.

Exemples

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"
        ]
      }
    }
  }
}