All Products
Search
Document Center

Data Management:GetInstance

Last Updated:Mar 21, 2026

Gets the details of a specified instance.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dms:GetInstance

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Tid

integer

No

The tenant ID. Call the GetUserActiveTenant operation to obtain this value.

2***

Host

string

Yes

The endpoint of the instance. Call the ListInstances operation to obtain this value.

172.17.XXX.XXX

Port

integer

Yes

The port of the instance. Call the ListInstances operation to obtain this value.

5432

Sid

string

No

The SID of the instance. Call the ListInstances operation to obtain this value.

test

RealLoginUserUid

string

No

This parameter is reserved.

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

F6C80B69-3203-56AC-8021-18BA72A6F4E1

Instance

object

Details about the instance.

VpcId

string

The ID of the VPC to which the instance belongs.

vpc-o6wrloqsdqc9io3mg****

DatabaseUser

string

The username used to log on to the instance.

dbuser

DbaId

string

The ID of the database administrator (DBA) of the instance.

29****

UseDsql

integer

Indicates whether cross-database query is enabled for the instance. Valid values:

  • 0: disabled

  • 1: enabled

0

Port

integer

The port used to connect to the instance.

5432

EcsInstanceId

string

The ID of the ECS instance on which the database instance is deployed.

i-bp124ldpklqz59y3****

EnvType

string

The type of the environment to which the instance belongs. Valid values:

  • product: production environment

  • dev: development environment

  • pre: pre-release environment

  • test: test environment

  • sit: system integration testing (SIT) environment

  • uat: user acceptance testing (UAT) environment

  • pet: performance testing environment

  • stag: staging environment

test

Sid

string

The system ID (SID) of the instance.

test

OwnerIdList

object

The IDs of the instance owners.

OwnerIds

array

The user IDs of the instance owners.

string

The user ID of an instance owner.

10****

SafeRuleId

string

The ID of the security rule set for the instance.

3****

OwnerNameList

object

The nicknames of the instance owners.

OwnerNames

array

The nicknames of the instance owners.

string

The nickname of an instance owner.

yang_test

DbaNickName

string

The nickname of the DBA of the instance.

dbaname

QueryTimeout

integer

The timeout period for querying data in the instance. Unit: seconds.

7200

InstanceSource

string

The source of the instance.

ECS_OWN

Host

string

The endpoint used to connect to the instance.

192.168.XXX.XXX

State

string

The state of the instance. Valid values:

  • NORMAL: The instance is running as normal.

  • DISABLE: The instance is disabled.

NORMAL

DataLinkName

string

The name of the data link for the instance.

test

ExportTimeout

integer

The timeout period for exporting data from the instance. Unit: seconds.

86400

InstanceId

string

The ID of the instance.

188****

InstanceType

string

The type of the database.

postgresql

DatabasePassword

string

The password that corresponds to the username.

******

InstanceAlias

string

The alias of the instance.

测试

DdlOnline

integer

Indicates whether lock-free schema change is enabled for the instance.

0

EcsRegion

string

The region where the instance resides.

cn-beijing

StandardGroup

object

The control mode of the instance.

GroupName

string

The name of the security rule set that corresponds to the control mode.

自由操作

GroupMode

string

The control mode. Valid values:

  • COMMON: Security Collaboration

  • NONE_CONTROL: Flexible Management

  • STABLE: Stable Change

NONE_CONTROL

SellSitd

string

Indicates whether sensitive data protection is enabled. Valid values:

  • true: enabled

  • false: disabled

false

SellTrust

string

This parameter is reserved.

ErrorCode

string

The error code returned.

UnknownError

ErrorMessage

string

The error message returned.

UnknownError

Success

boolean

Indicates whether the request was successful. Valid values:

  • true

  • false

true

Examples

Success response

JSON format

{
  "RequestId": "F6C80B69-3203-56AC-8021-18BA72A6F4E1",
  "Instance": {
    "VpcId": "vpc-o6wrloqsdqc9io3mg****",
    "DatabaseUser": "dbuser",
    "DbaId": "29****",
    "UseDsql": 0,
    "Port": 5432,
    "EcsInstanceId": "i-bp124ldpklqz59y3****",
    "EnvType": "test",
    "Sid": "test",
    "OwnerIdList": {
      "OwnerIds": [
        "10****"
      ]
    },
    "SafeRuleId": "3****",
    "OwnerNameList": {
      "OwnerNames": [
        "yang_test"
      ]
    },
    "DbaNickName": "dbaname",
    "QueryTimeout": 7200,
    "InstanceSource": "ECS_OWN",
    "Host": "192.168.XXX.XXX",
    "State": "NORMAL",
    "DataLinkName": "test",
    "ExportTimeout": 86400,
    "InstanceId": "188****",
    "InstanceType": "postgresql",
    "DatabasePassword": "******",
    "InstanceAlias": "测试",
    "DdlOnline": 0,
    "EcsRegion": "cn-beijing",
    "StandardGroup": {
      "GroupName": "自由操作",
      "GroupMode": "NONE_CONTROL"
    },
    "SellSitd": "false",
    "SellTrust": ""
  },
  "ErrorCode": "UnknownError",
  "ErrorMessage": "UnknownError",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.