Todos os produtos
Search
Central de documentação

Resource Orchestration Service:DATASOURCE::DRDS::DrdsDB

Última atualização: Jun 27, 2026

Consulta os detalhes de um banco de dados em uma instância do PolarDB-X 1.0.

Sintaxe

{
  "Type": "DATASOURCE::DRDS::DrdsDB",
  "Properties": {
    "DrdsDatabaseName": String,
    "RefreshOptions": String
  }
}

Propriedades

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

DrdsDatabaseName

String

Sim

Sim

Nome do banco de dados.

Nenhuma.

RefreshOptions

String

Não

Sim

Estratégia de atualização dos recursos da source de dados ao atualizar a pilha.

Valores válidos:

  • Never (padrão): não atualiza os recursos da source de dados durante a atualização da pilha.

  • Always: atualiza os recursos da source de dados sempre que a pilha for atualizada.

Valores de retorno

Fn::GetAtt

  • DrdsDatabaseName: nome do banco de dados.

  • StorageType: tipo de armazenamento do banco de dados.

  • SplitMode: modo de partição do banco de dados.

  • InstRole: função da instância.

  • Schema: ID do schema atribuído ao banco de dados particionado.

  • CreateTime: hora de criação do banco de dados.

Exemplos

  • YAML formato

                                  ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      DrdsDatabaseName:
        Description:
          en: The name of the Drds database.
        Required: true
        Type: String
      RefreshOptions:
        AllowedValues:
        - Always
        - Never
        Default: Never
        Description:
          en: 'The refresh strategy for the datasource resource when the stack is updated.
            Valid values:
    
            - Never: Never refresh the datasource resource when the stack is updated.
    
            - Always: Always refresh the datasource resource when the stack is updated.
    
            Default is Never.'
        Required: false
        Type: String
    Resources:
      ExtensionDataSource:
        Properties:
          DrdsDatabaseName:
            Ref: DrdsDatabaseName
          RefreshOptions:
            Ref: RefreshOptions
        Type: DATASOURCE::DRDS::DrdsDB
    Outputs:
      CreateTime:
        Description: Database creation timestamp.
        Value:
          Fn::GetAtt:
          - ExtensionDataSource
          - CreateTime
      DrdsDatabaseName:
        Description: The name of the Drds database.
        Value:
          Fn::GetAtt:
          - ExtensionDataSource
          - DrdsDatabaseName
      InstRole:
        Description: 'Database type: MASTER primary instance, SLAVE read-only instance.'
        Value:
          Fn::GetAtt:
          - ExtensionDataSource
          - InstRole
      Schema:
        Description: The schema ID that is assigned to the partitioned database by the
          system.
        Value:
          Fn::GetAtt:
          - ExtensionDataSource
          - Schema
      SplitMode:
        Description: "The partition mode of the database.Valid values: \n* HORIZONTAL:\
          \ The database is horizontally partitioned.\n* VERTICAL: The database is vertically\
          \ partitioned."
        Value:
          Fn::GetAtt:
          - ExtensionDataSource
          - SplitMode
      StorageType:
        Description: 'The storage type of the Drds database. Valid values:
    
          * RDS
    
          * PolarDB'
        Value:
          Fn::GetAtt:
          - ExtensionDataSource
          - StorageType
                            
  • JSON formato

                            {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "DrdsDatabaseName": {
          "Type": "String",
          "Description": {
            "en": "The name of the Drds database."
          },
          "Required": true
        },
        "RefreshOptions": {
          "Type": "String",
          "Description": {
            "en": "The refresh strategy for the datasource resource when the stack is updated. Valid values:\n- Never: Never refresh the datasource resource when the stack is updated.\n- Always: Always refresh the datasource resource when the stack is updated.\nDefault is Never."
          },
          "AllowedValues": [
            "Always",
            "Never"
          ],
          "Required": false,
          "Default": "Never"
        }
      },
      "Resources": {
        "ExtensionDataSource": {
          "Type": "DATASOURCE::DRDS::DrdsDB",
          "Properties": {
            "DrdsDatabaseName": {
              "Ref": "DrdsDatabaseName"
            },
            "RefreshOptions": {
              "Ref": "RefreshOptions"
            }
          }
        }
      },
      "Outputs": {
        "DrdsDatabaseName": {
          "Description": "The name of the Drds database.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "DrdsDatabaseName"
            ]
          }
        },
        "StorageType": {
          "Description": "The storage type of the Drds database. Valid values:\n* RDS\n* PolarDB",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "StorageType"
            ]
          }
        },
        "SplitMode": {
          "Description": "The partition mode of the database.Valid values: \n* HORIZONTAL: The database is horizontally partitioned.\n* VERTICAL: The database is vertically partitioned.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "SplitMode"
            ]
          }
        },
        "InstRole": {
          "Description": "Database type: MASTER primary instance, SLAVE read-only instance.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "InstRole"
            ]
          }
        },
        "Schema": {
          "Description": "The schema ID that is assigned to the partitioned database by the system.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "Schema"
            ]
          }
        },
        "CreateTime": {
          "Description": "Database creation timestamp.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "CreateTime"
            ]
          }
        }
      }
    }