All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::DMS::Database

更新時間:Dec 04, 2025

The DATASOURCE::DMS::Database data source queries the details of a specific database.

Syntax

{
  "Type": "DATASOURCE::DMS::Database",
  "Properties": {
    "Host": String,
    "Port": Integer,
    "SchemaName": String,
    "RefreshOptions": String,
    "Sid": String,
    "Tid": Integer
  }
}

Properties

Property

Type

Required

Update Allowed

Description

Constraints

Host

String

Yes

Yes

The database endpoint.

None

Port

Integer

Yes

Yes

The connection port of the database.

The value must be in the range of 1 to 65535.

SchemaName

String

Yes

Yes

The name of the database.

None

RefreshOptions

String

No

Yes

The refresh policy for the data source resource when the stack is updated.

Valid values:

  • Never (default): The data source resource is never refreshed when the stack is updated.

  • Always: The data source resource is always refreshed when the stack is updated.

Sid

String

No

Yes

The system ID (SID) of the database.

Note

The SID is the unique identifier for an Oracle database. An initial ID is automatically assigned when a database is created.

Tid

Integer

No

Yes

The tenant ID.

Call the GetUserActiveTenant operation to obtain this parameter.

Return values

Fn::GetAtt

  • InstanceId: The ID of the database instance.

  • SearchName: The search name of the database.

  • Port: The connection port of the database.

  • DatabaseId: The ID of the database.

  • Encoding: The encoding of the database.

  • Host: The database endpoint.

  • EnvType: The environment type of the database.

  • DbType: The type of the database.

  • Sid: The SID of the database.

  • DbaName: The nickname of the database administrator (DBA).

  • DbaId: The user ID of the DBA.

  • State: The state of the database.

  • InstanceAlias: The alias of the instance.

  • OwnerNameList: The list of nicknames of database owners.

  • CatalogName: The name of the database catalog.

  • SchemaName: The name of the database schema.

  • OwnerIdList: The list of user IDs of database owners.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Port:
    Type: Number
    Description:
      en: Database connection port.
    Required: true
    MinValue: 1
    MaxValue: 65535
  Host:
    Type: String
    Description:
      en: Database connection address.
    Required: true
  SchemaName:
    Type: String
    Description:
      en: Database schema name.
    Required: true
Resources:
  Database:
    Type: DATASOURCE::DMS::Database
    Properties:
      Port:
        Ref: Port
      Host:
        Ref: Host
      SchemaName:
        Ref: SchemaName
Outputs:
  InstanceId:
    Description: Database instance ID.
    Value:
      Fn::GetAtt:
        - Database
        - InstanceId
  SearchName:
    Description: Database search name.
    Value:
      Fn::GetAtt:
        - Database
        - SearchName
  Port:
    Description: Database connection port.
    Value:
      Fn::GetAtt:
        - Database
        - Port
  DatabaseId:
    Description: Database ID.
    Value:
      Fn::GetAtt:
        - Database
        - DatabaseId
  Encoding:
    Description: Database encoding.
    Value:
      Fn::GetAtt:
        - Database
        - Encoding
  Host:
    Description: Database connection address.
    Value:
      Fn::GetAtt:
        - Database
        - Host
  EnvType:
    Description: Database environment type.
    Value:
      Fn::GetAtt:
        - Database
        - EnvType
  DbType:
    Description: Database type.
    Value:
      Fn::GetAtt:
        - Database
        - DbType
  Sid:
    Description: Database SID.
    Value:
      Fn::GetAtt:
        - Database
        - Sid
  DbaName:
    Description: Database administrator name.
    Value:
      Fn::GetAtt:
        - Database
        - DbaName
  DbaId:
    Description: Database administrator ID.
    Value:
      Fn::GetAtt:
        - Database
        - DbaId
  State:
    Description: Database state.
    Value:
      Fn::GetAtt:
        - Database
        - State
  InstanceAlias:
    Description: Database instance alias.
    Value:
      Fn::GetAtt:
        - Database
        - InstanceAlias
  OwnerNameList:
    Description: Database owner name list.
    Value:
      Fn::GetAtt:
        - Database
        - OwnerNameList
  CatalogName:
    Description: Database catalog name.
    Value:
      Fn::GetAtt:
        - Database
        - CatalogName
  SchemaName:
    Description: Database schema name.
    Value:
      Fn::GetAtt:
        - Database
        - SchemaName
  OwnerIdList:
    Description: Database owner ID list.
    Value:
      Fn::GetAtt:
        - Database
        - OwnerIdList
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Port": {
      "Type": "Number",
      "Description": {
        "en": "Database connection port."
      },
      "Required": true,
      "MinValue": 1,
      "MaxValue": 65535
    },
    "Host": {
      "Type": "String",
      "Description": {
        "en": "Database connection address."
      },
      "Required": true
    },
    "SchemaName": {
      "Type": "String",
      "Description": {
        "en": "Database schema name."
      },
      "Required": true
    }
  },
  "Resources": {
    "Database": {
      "Type": "DATASOURCE::DMS::Database",
      "Properties": {
        "Port": {
          "Ref": "Port"
        },
        "Host": {
          "Ref": "Host"
        },
        "SchemaName": {
          "Ref": "SchemaName"
        }
      }
    }
  },
  "Outputs": {
    "InstanceId": {
      "Description": "Database instance ID.",
      "Value": {
        "Fn::GetAtt": [
          "Database",
          "InstanceId"
        ]
      }
    },
    "SearchName": {
      "Description": "Database search name.",
      "Value": {
        "Fn::GetAtt": [
          "Database",
          "SearchName"
        ]
      }
    },
    "Port": {
      "Description": "Database connection port.",
      "Value": {
        "Fn::GetAtt": [
          "Database",
          "Port"
        ]
      }
    },
    "DatabaseId": {
      "Description": "Database ID.",
      "Value": {
        "Fn::GetAtt": [
          "Database",
          "DatabaseId"
        ]
      }
    },
    "Encoding": {
      "Description": "Database encoding.",
      "Value": {
        "Fn::GetAtt": [
          "Database",
          "Encoding"
        ]
      }
    },
    "Host": {
      "Description": "Database connection address.",
      "Value": {
        "Fn::GetAtt": [
          "Database",
          "Host"
        ]
      }
    },
    "EnvType": {
      "Description": "Database environment type.",
      "Value": {
        "Fn::GetAtt": [
          "Database",
          "EnvType"
        ]
      }
    },
    "DbType": {
      "Description": "Database type.",
      "Value": {
        "Fn::GetAtt": [
          "Database",
          "DbType"
        ]
      }
    },
    "Sid": {
      "Description": "Database SID.",
      "Value": {
        "Fn::GetAtt": [
          "Database",
          "Sid"
        ]
      }
    },
    "DbaName": {
      "Description": "Database administrator name.",
      "Value": {
        "Fn::GetAtt": [
          "Database",
          "DbaName"
        ]
      }
    },
    "DbaId": {
      "Description": "Database administrator ID.",
      "Value": {
        "Fn::GetAtt": [
          "Database",
          "DbaId"
        ]
      }
    },
    "State": {
      "Description": "Database state.",
      "Value": {
        "Fn::GetAtt": [
          "Database",
          "State"
        ]
      }
    },
    "InstanceAlias": {
      "Description": "Database instance alias.",
      "Value": {
        "Fn::GetAtt": [
          "Database",
          "InstanceAlias"
        ]
      }
    },
    "OwnerNameList": {
      "Description": "Database owner name list.",
      "Value": {
        "Fn::GetAtt": [
          "Database",
          "OwnerNameList"
        ]
      }
    },
    "CatalogName": {
      "Description": "Database catalog name.",
      "Value": {
        "Fn::GetAtt": [
          "Database",
          "CatalogName"
        ]
      }
    },
    "SchemaName": {
      "Description": "Database schema name.",
      "Value": {
        "Fn::GetAtt": [
          "Database",
          "SchemaName"
        ]
      }
    },
    "OwnerIdList": {
      "Description": "Database owner ID list.",
      "Value": {
        "Fn::GetAtt": [
          "Database",
          "OwnerIdList"
        ]
      }
    }
  }
}