All Products
Search
Document Center

Data Management:GetInstance

Last Updated:Oct 22, 2026

Retrieves the details of an 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. You can call the GetUserActiveTenant operation to obtain the value of this parameter.

2***

Host

string

Yes

The endpoint of the instance. You can call the ListInstances operation to obtain the value of this parameter.

172.17.XXX.XXX

Port

integer

Yes

The connection port of the instance. You can call the ListInstances operation to obtain the value of this parameter.

5432

Sid

string

No

The SID of the instance. You can call the ListInstances operation to obtain the value of this parameter.

test

RealLoginUserUid

string

No

The UID of the Alibaba Cloud account of the user who actually calls the API operation.

21400447956867****

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

F6C80B69-3203-56AC-8021-18BA72A6F4E1

Instance

object

The instance details.

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 DBA for the instance.

29****

UseDsql

integer

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

  • 0: Disabled.

  • 1: Enabled.

0

Port

integer

The connection port of the instance.

5432

EcsInstanceId

string

The ECS instance ID.

i-bp124ldpklqz59y3****

EnvType

string

The environment type of the instance. Valid values:

  • product: Production environment.

  • dev: Development environment.

  • pre: Staging environment.

  • test: Testing environment.

  • sit: SIT environment.

  • uat: UAT environment.

  • pet: Stress testing environment.

  • stag: STAG environment.

test

Sid

string

The SID of the instance.

test

OwnerIdList

object

OwnerIds

array

The list of owner user IDs for the instance.

string

The owner user ID of the instance.

10****

SafeRuleId

string

The ID of the security rule for the instance.

3****

OwnerNameList

object

OwnerNames

array

The list of owner nicknames for the instance.

string

The owner nickname of the instance.

yang_test

DbaNickName

string

The nickname of the DBA for the instance.

dbaname

QueryTimeout

integer

The query timeout period of the instance.

7200

InstanceSource

string

The source of the instance.

ECS_OWN

Host

string

The endpoint of the instance.

192.168.XXX.XXX

State

string

The instance status. Valid values:

  • NORMAL: Normal.

  • DISABLE: Disabled.

NORMAL

DataLinkName

string

The data link name of the instance.

test

ExportTimeout

integer

The export timeout period of the instance.

86400

InstanceId

string

The instance ID.

188****

InstanceType

string

The database type of the instance.

postgresql

DatabasePassword

string

The password of the database user.

******

InstanceAlias

string

The alias of the instance.

Test

DdlOnline

integer

The online DDL configuration of the instance.

0

EcsRegion

string

The region to which the instance belongs.

cn-beijing

StandardGroup

object

The control mode information for the instance.

GroupName

string

The name of the security rule corresponding to the control mode.

Free operation

GroupMode

string

The type of the control mode. Valid values:

  • COMMON: Security collaboration mode.

  • NONE_CONTROL: Free operation mode.

  • STABLE: Stable change mode.

NONE_CONTROL

SellSitd

string

Specifies whether sensitive data protection is enabled. Valid values:

  • true: Enabled.

  • false: Disabled.

false

SellTrust

string

Specifies whether security hosting is enabled. Valid values:

  • true: Enabled.

  • false: Disabled.

true

ErrorCode

string

The error code.

UnknownError

ErrorMessage

string

The error message.

UnknownError

Success

boolean

Indicates whether the request is successful. Valid values:

  • true: The request is successful.

  • false: The request failed.

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": "Test",
    "DdlOnline": 0,
    "EcsRegion": "cn-beijing",
    "StandardGroup": {
      "GroupName": "Free operation",
      "GroupMode": "NONE_CONTROL"
    },
    "SellSitd": "false",
    "SellTrust": "true"
  },
  "ErrorCode": "UnknownError",
  "ErrorMessage": "UnknownError",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.