Consulta as informações de configuração de uma única conexão.
Descrição da operação
Consulta as informações de configuração de uma única conexão.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
eventbridge:GetConnection |
get |
*Connection
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| ConnectionName |
string |
Sim |
O nome da conexão. |
connection-name |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
|||
| RequestId |
string |
O ID da solicitação retornado. |
34AD682D-5B91-5773-8132-AA38C130**** |
| Message |
string |
As informações retornadas pela solicitação de API. |
success |
| Code |
string |
O status da API ou o código de erro POP. Valores válidos: Success: A solicitação foi bem-sucedida. |
Success |
| HttpCode |
integer |
O código de status HTTP. |
200 |
| Data |
object |
O resultado retornado. |
|
| Connections |
array<object> |
A lista de informações de configuração de conexão. |
|
|
array<object> |
A estrutura de dados das informações de configuração de conexão. |
||
| ConnectionName |
string |
The name of the connection configuration. |
demo |
| Id |
integer |
The data source ID. |
5668 |
| Description |
string |
The description of the connection configuration. |
demo |
| Type |
string |
The connection type. Valid values: Http, MySQL, PostgreSQL, Elasticsearch. |
Http |
| Parameters |
any |
The data source connection parameters (JSON object). Only returned for data source type connections. Empty for the Http type. For field definitions, refer to the ParamsSchema returned by GetConnectionType. |
{"HostName":"xxx.mysql.rds.aliyuncs.com","Port":"3306","User":"root","Password":"xxx","DatabaseName":"demo_db"} |
| GmtCreate |
integer |
The creation time. |
1669648905 |
| NetworkParameters |
object |
The data structure of the network configuration. |
|
| NetworkType |
string |
|
PublicNetwork |
| VpcId |
string |
The ID of the virtual private cloud (VPC). |
eb-test/vpc-bp1symadadwnwg**** |
| VswitcheId |
string |
The vSwitch ID. |
vsw-bp1iu4x7aeradadown****,vsw-bp193sqmadadlaszpeq**** |
| SecurityGroupId |
string |
The security group ID. |
eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9**** |
| AuthParameters |
object |
The data structure of the permission. |
|
| AuthorizationType |
string |
The authorization type:
|
BASIC_AUTH |
| ApiKeyAuthParameters |
object |
The data structure of the API KEY. |
|
| ApiKeyName |
string |
The key of the API key. |
key |
| ApiKeyValue |
string |
The value of the API key. |
value |
| BasicAuthParameters |
object |
The data structure of Basic authentication. |
|
| Password |
string |
The password for basic authentication. |
******** |
| Username |
string |
The username for basic authentication. |
admin |
| OAuthParameters |
object |
The data structure of OAuth request parameters. |
|
| AuthorizationEndpoint |
string |
The request URL for obtaining the OAuth token. |
http://localhost:8080/oauth/token |
| HttpMethod |
string |
The HTTP method used for the request. Valid values:
|
POST |
| ClientParameters |
object |
The data structure of the client parameters. |
|
| ClientID |
string |
The client ID. |
ClientID |
| ClientSecret |
string |
The client secret of the application. |
Qo57Q~F249~S74GmNPA36pZJoJK4f4**** |
| OAuthHttpParameters |
object |
The request parameters for OAuth authentication. |
|
| BodyParameters |
array<object> |
The list of request parameter data structures. |
|
|
object |
The list of request parameter data structures. |
||
| IsValueSecret |
string |
Indicates whether the parameter is used for authentication. |
false |
| Key |
string |
The key of the body request parameter. |
keyDemo |
| Value |
string |
The value of the body request parameter. |
valueDemo |
| HeaderParameters |
array<object> |
The list of request header parameters. |
|
|
object |
The list of request header parameters. |
||
| IsValueSecret |
string |
Indicates whether the parameter is used for authentication. |
false |
| Key |
string |
The key of the request header parameter. |
keyDemo |
| Value |
string |
The value of the request header parameter. |
keyDemo |
| QueryStringParameters |
array<object> |
The data structure of the request path parameters. |
|
|
object |
The data structure of the request path parameters. |
||
| IsValueSecret |
string |
Indicates whether the parameter is used for authentication. |
false |
| Key |
string |
The key of the request path parameter. |
keyDemo |
| Value |
string |
The value of the request path parameter. |
valueDemo |
Exemplos
Resposta de sucesso
JSON formato
{
"RequestId": "34AD682D-5B91-5773-8132-AA38C130****",
"Message": "success",
"Code": "Success",
"HttpCode": 200,
"Data": {
"Connections": [
{
"ConnectionName": "demo",
"Id": 5668,
"Description": "demo",
"Type": "Http",
"Parameters": "{\"HostName\":\"xxx.mysql.rds.aliyuncs.com\",\"Port\":\"3306\",\"User\":\"root\",\"Password\":\"xxx\",\"DatabaseName\":\"demo_db\"}",
"GmtCreate": 1669648905,
"NetworkParameters": {
"NetworkType": "PublicNetwork",
"VpcId": "eb-test/vpc-bp1symadadwnwg****",
"VswitcheId": "vsw-bp1iu4x7aeradadown****,vsw-bp193sqmadadlaszpeq****",
"SecurityGroupId": "eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9****"
},
"AuthParameters": {
"AuthorizationType": "BASIC_AUTH",
"ApiKeyAuthParameters": {
"ApiKeyName": "key",
"ApiKeyValue": "value"
},
"BasicAuthParameters": {
"Password": "********",
"Username": "admin"
},
"OAuthParameters": {
"AuthorizationEndpoint": "http://localhost:8080/oauth/token",
"HttpMethod": "POST",
"ClientParameters": {
"ClientID": "ClientID",
"ClientSecret": "Qo57Q~F249~S74GmNPA36pZJoJK4f4****"
},
"OAuthHttpParameters": {
"BodyParameters": [
{
"IsValueSecret": "false",
"Key": "keyDemo",
"Value": "valueDemo"
}
],
"HeaderParameters": [
{
"IsValueSecret": "false",
"Key": "keyDemo",
"Value": "keyDemo"
}
],
"QueryStringParameters": [
{
"IsValueSecret": "false",
"Key": "keyDemo",
"Value": "valueDemo"
}
]
}
}
}
}
]
}
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 500 | InternalError | InternalError | |
| 409 | RequestParameterException | Request parameter exception | |
| 409 | ConnectionNotExist | The Connection name not existed! |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.