Queries data stores.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListConnections

The operation that you want to perform.

Name String Yes abc

The name of the data source that you want to query.

ProjectId Long Yes 76086

The name of the workspace where the data source resides.

RegionId String Yes cn-shanghai

The region ID of the data source.

ConnectionType String No rds

The type of the connection string.

SubType String No mysql

The sub-type of the connection string.

Status String No 1

The status of the data source.

EnvType Integer No 1

The type of the workspace to which the data source belongs.

PageSize Integer No 10

The number of entries to return on each page. Default value: 10. Maximum value: 100.

PageNumber Integer No 1

The page number to be queried.

Response parameters

Parameter Type Example Description
Data Struct

The list of paged query results of the connection string.

Connections Array of Connections

The list of connection strings.

BindingCalcEngineId Integer 123

The ID of the compute engine associated with the source instance.

ConnectStatus Integer 1

The status of the data source.

ConnectionType String mysql

The type of the source data store.

Content String {\"database\":\"xxx\",\"instanceName\":\"xxx\",\"password\":\"xxx\",\"rdsOwnerId\":\"xxx\",\"tag\":\"rds\",\"username\":\"xxx\"}

Details of the connection.

DefaultEngine Boolean false

Indicates whether the engine associated with the data source is the default engine of the same type.

Description String a connection

Describes the data source.

EnvType Integer 1

The environment where the data source is located.

GmtCreate String Oct 10, 2019 3:42:53 PM

The time when the data source was created.

GmtModified String Oct 10, 2019 3:42:53 PM

The time when the data source was modified.

Id Integer 1

The ID of the data source.

Name String abc

Name of the data source.

Operator String 193543050****

The Alibaba Cloud ID of the last operator of the data source.

ProjectId Integer 123

The ID of the workspace associated with the data source.

Sequence Integer 300

The sorting field.

Shared Boolean false

Indicates whether the data source is shared.

Status Integer 1

The status of the data source.

SubType String mysql

The sub-type of the data source.

TenantId Long 1234567

The ID of the tenant.

PageNumber Integer 1

The page that is returned.

PageSize Integer 20

The number of entries to return on each page. Default value: 10. Maximum value: 100.

TotalCount Integer 3

The total number of data sources.

HttpStatusCode Integer 200

The HTTP status code.

RequestId String 0bc14115159376359****

The ID of the request.

Success Boolean true

Indicates whether the request is successful.

Examples

Sample requests


     http(s)://[Endpoint]/? Action=ListConnections &Name=abc &ProjectId=76086 &RegionId=cn-shanghai &<common request parameters> 
   

Sample success responses

XML format


     <RequestId>0bc14115159****</RequestId> <HttpStatusCode>200</HttpStatusCode> <Data> <Connections> <Operator>193543050****</Operator> <Status>1</Status> <ConnectStatus>1</ConnectStatus> <Description>a connection</Description> <SubType>mysql</SubType> <BindingCalcEngineId>123</BindingCalcEngineId> <ConnectionType>mysql</ConnectionType> <GmtModified>Oct 10, 2019 3:42:53 PM</GmtModified> <ProjectId>123</ProjectId> <Sequence>300</Sequence> <Shared>false</Shared> <EnvType>1</EnvType> <DefaultEngine>false</DefaultEngine> <Name>abc</Name> <GmtCreate>Oct 10, 2019 3:42:53 PM</GmtCreate> <TenantId>1234567</TenantId> <Content>{\"database\":\"xxx\",\"instanceName\":\"xxx\",\"password\":\"xxx\",\"rdsOwnerId\":\"xxx\",\"tag\":\"rds\",\"username\":\"xxx\"}</Content> <Id>1</Id> </Connections> <TotalCount>3</TotalCount> <PageSize>20</PageSize> <PageNumber>1</PageNumber> </Data> <Success>true</Success> 
   

JSON Hint


     { "RequestId": "0bc14115159****", "HttpStatusCode": 200, "Data": { "Connections": { "Operator": "193543050****", "Status": 1, "ConnectStatus": 1, "Description": "a connection", "SubType": "mysql", "BindingCalcEngineId": 123, "ConnectionType": "mysql", "GmtModified": "Oct 10, 2019 3:42:53 PM", "ProjectId": 123, "Sequence": 300, "Shared": false, "EnvType": 1, "DefaultEngine": false, "Name": "abc", "GmtCreate": "Oct 10, 2019 3:42:53 PM", "TenantId": 1234567, "Content": "{\\\"database\\\":\\\"xxx\\\",\\\"instanceName\\\":\\\"xxx\\\",\\\"password\\\":\\\"xxx\\\",\\\"rdsOwnerId\\\":\\\"xxx\\\",\\\"tag\\\":\\\"rds\\\",\\\"username\\\":\\\"xxx\\\"}", "Id": 1 }, "TotalCount": 3, "PageSize": 20, "PageNumber": 1 }, "Success": true } 
   

Error codes

HttpCode Error code Error message Description
400 Invalid.Tenant.ConnectionNotExists The connection does not exist. The data source does not exist.
400 Invalid.Tenant.ProjectNotExists The project does not exist. The error message returned because the specified project does not exist.
403 Invalid.Tenant.UserIsNotProjectOwnerOrAdmin The user is not a project administrator or owner. The user is not the project owner or project administrator.
400 Invalid.Tenant.UserNotInProject The user is not in the project. The user is not in the project.
403 Invalid.Tenant.UserNotInTenant The user is not in tenant. The user is not in the tenant.

Go to the Error CenterFor more information, see error codes.