Consulta uma lista de fontes de dados.
Experimente agora
Testar
Autorização RAM
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| ProjectId |
integer |
Sim |
O ID do workspace ao qual a fonte de dados pertence. Você pode chamar a operação ListProjects para consultar o ID. |
76086 |
| Name |
string |
Não |
O nome da fonte de dados que você deseja consultar. |
abc |
| ConnectionType |
string |
Não |
O tipo da fonte de dados. Valores válidos:
|
rds |
| SubType |
string |
Não |
O subtipo da fonte de dados. Este parâmetro é usado em cenários em que um tipo inclui subtipos. O seguinte tipo e subtipos são suportados:
|
mysql |
| Status |
string |
Não |
O status da fonte de dados. Valores válidos:
|
1 |
| EnvType |
integer |
Não |
O ambiente no qual a fonte de dados é usada. Valores válidos: 0 e 1. O valor 0 indica o ambiente de desenvolvimento. O valor 1 indica o ambiente de produção. |
1 |
| PageSize |
integer |
Não |
O número de entradas por página. Valor padrão: 10. Valor máximo: 100. |
10 |
| PageNumber |
integer |
Não |
O número da página. As páginas começam a partir da página 1. |
1 |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
|||
| HttpStatusCode |
integer |
O código de status HTTP. |
200 |
| RequestId |
string |
O ID da solicitação. |
0bc14115159376359**** |
| Success |
boolean |
Indica se a solicitação foi bem-sucedida. |
true |
| Data |
object |
Os resultados da consulta de fontes de dados que são retornados em várias páginas. |
|
| PageNumber |
integer |
O número da página. |
1 |
| PageSize |
integer |
O número de entradas por página. Valor padrão: 10. Valor máximo: 100. |
20 |
| TotalCount |
integer |
O número total de fontes de dados retornadas. |
3 |
| Connections |
array<object> |
As fontes de dados. |
|
|
object |
|||
| Status |
integer |
The status of the data source. Valid values:
|
1 |
| ConnectionType |
string |
The type of the data source. Valid values:
|
mysql |
| ProjectId |
integer |
The ID of the workspace with which the data source is associated. |
123 |
| SubType |
string |
The subtype of the data source. This parameter is used in scenarios where a type includes subtypes. The following type and subtypes are supported:
|
mysql |
| GmtModified |
string |
The time when the data source was last modified. Example: Mar 17, 2021 4:09:32 PM. |
Mar 17, 2021 4:09:32 PM |
| EnvType |
integer |
The environment in which the data source is used. Valid values:
|
1 |
| ConnectStatus |
integer |
The status of the data source. Valid values:
|
1 |
| Sequence |
integer |
The field that is used to sort data sources. Data sources are sorted in descending order based on the value of this parameter. |
300 |
| Description |
string |
The description of the data source. |
a connection |
| GmtCreate |
string |
The time when the data source was created. Example: Mar 17, 2021 4:09:32 PM. |
Mar 17, 2021 4:09:32 PM |
| DefaultEngine |
boolean |
Indicates whether the compute engine that is associated with the data source is the default compute engine used by data sources of the same type. |
false |
| Shared |
boolean |
Indicates whether the data source is a shared data source. |
false |
| Operator |
string |
The ID of the Alibaba Cloud account that is used to last modify the data source. |
193543050**** |
| Name |
string |
The name of the data source. |
abc |
| Content |
string |
The details of the data source. Examples of details of some common data sources:
|
{\"database\":\"xxx\",\"instanceName\":\"xxx\",\"password\":\"xxx\",\"rdsOwnerId\":\"xxx\",\"tag\":\"rds\",\"username\":\"xxx\"} |
| Id |
integer |
The data source ID. |
1 |
| BindingCalcEngineId |
integer |
The ID of the compute engine with which the data source is associated. |
123 |
| TenantId |
integer |
The tenant ID. |
1234567 |
Exemplos
Resposta de sucesso
JSON formato
{
"HttpStatusCode": 200,
"RequestId": "0bc14115159376359****",
"Success": true,
"Data": {
"PageNumber": 1,
"PageSize": 20,
"TotalCount": 3,
"Connections": [
{
"Status": 1,
"ConnectionType": "mysql",
"ProjectId": 123,
"SubType": "mysql",
"GmtModified": "Mar 17, 2021 4:09:32 PM",
"EnvType": 1,
"ConnectStatus": 1,
"Sequence": 300,
"Description": "a connection",
"GmtCreate": "Mar 17, 2021 4:09:32 PM",
"DefaultEngine": false,
"Shared": false,
"Operator": "193543050****",
"Name": "abc",
"Content": "{\\\"database\\\":\\\"xxx\\\",\\\"instanceName\\\":\\\"xxx\\\",\\\"password\\\":\\\"xxx\\\",\\\"rdsOwnerId\\\":\\\"xxx\\\",\\\"tag\\\":\\\"rds\\\",\\\"username\\\":\\\"xxx\\\"}",
"Id": 1,
"BindingCalcEngineId": 123,
"TenantId": 1234567
}
]
}
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | Invalid.Tenant.ConnectionNotExists | The connection does not exist. | The connection does not exist. |
| 400 | Invalid.Tenant.ProjectNotExists | The project does not exist. | The project does not exist. |
| 400 | Invalid.Tenant.UserNotInProject | The user is not in the project. | The user is not in the project. |
| 403 | Invalid.Tenant.UserIsNotProjectOwnerOrAdmin | The user is not a project administrator or owner. | The user is not a project administrator or owner. |
| 403 | Invalid.Tenant.UserNotInTenant | The user is not in tenant. | The user is not in tenant. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.