Consulta os endpoints de um cluster PolarDB.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
polardb:DescribeDBClusterEndpoints |
get |
*dbcluster
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| DBClusterId |
string |
Sim |
O ID do cluster. Nota
Você pode chamar a operação DescribeDBClusters para encontrar os IDs de todos os clusters em sua conta. |
pc-************* |
| DBEndpointId |
string |
Não |
O ID do endpoint do cluster. |
pe-************* |
| DescribeType |
string |
Não |
Especifica se devem ser retornadas informações sobre nós de IA. |
AI |
| PolarFsInstanceId |
string |
Não |
O ID da instância PolarFS. |
pfs-test***** |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
|||
| RequestId |
string |
O ID da solicitação. |
2DC120BF-6EBA-4C63-BE99-B09F9E****** |
| Items |
array<object> |
Uma lista de endpoints do cluster. |
|
|
array<object> |
|||
| Nodes |
string |
A lista de nós configurados para o endpoint. |
pi-***************,pi-*************** |
| ReadWriteMode |
string |
O modo de leitura/gravação. Valores válidos:
|
ReadOnly |
| AddressItems |
array<object> |
Os endereços de conexão do endpoint. |
|
|
object |
|||
| VSwitchId |
string |
The vSwitch ID. |
vsw-************ |
| PrivateZoneConnectionString |
string |
The connection string for the private domain name. |
***.***.**.com |
| ConnectionString |
string |
The connection string. |
********.rwlb.polardb-pg-public.rds.aliyuncs.com |
| NetType |
string |
The network type. Valid values:
|
Private |
| Port |
string |
The port. |
1521 |
| VpcInstanceId |
string |
The VPC instance ID. Nota
This parameter is returned only for PolarDB for MySQL clusters. |
pe-************* |
| VPCId |
string |
The VPC ID. |
vpc-*************** |
| IPAddress |
string |
The IP address. |
192.***.***.*** |
| DashboardUsed |
boolean |
Indicates whether the endpoint is a dashboard endpoint for a PolarDB Search node.
|
True |
| DBEndpointId |
string |
O ID do endpoint. |
pe-************* |
| EndpointConfig |
string |
As configurações avançadas do endpoint do cluster.
|
{\"DistributedTransaction\":\"off\",\"ConsistLevel\":\"0\",\"LoadBalanceStrategy\":\"load\",\"MasterAcceptReads\":\"on\"} |
| DBEndpointDescription |
string |
O nome do endpoint. |
test |
| EndpointType |
string |
O tipo do endpoint do cluster. Valores válidos:
|
Custom |
| AutoAddNewNodes |
string |
Indica se novos nós são adicionados automaticamente ao endpoint de cluster padrão. Valores válidos:
|
Enable |
| DBClusterId |
string |
O ID do cluster. |
pc-bp1s826a1up****** |
| SccMode |
string |
Indica se a consistência global (modo de alto desempenho) está ativada para o nó. Valores válidos:
|
on |
| PolarSccTimeoutAction |
string |
A política para tratamento de timeouts de leitura com consistência global. Valores válidos:
|
0 |
| PolarSccWaitTimeout |
string |
O período de timeout para leituras com consistência global. |
100 |
| NodeWithRoles |
string |
O papel de cada nó no endpoint. O nó primário tem o papel Writer. Os nós somente leitura têm papéis numerados, como Reader1, Reader2, e assim por diante. Nota
Este parâmetro é suportado apenas por clusters PolarDB for PostgreSQL e clusters PolarDB for PostgreSQL (compatível com Oracle). |
Reader1 |
| ServiceName |
string |
O nome do serviço. |
test-name |
| NetType |
string |
O tipo de rede. Valores válidos:
|
Private |
| VPCId |
string |
O ID da VPC. |
vpc-*************** |
| Port |
string |
A porta. |
1521 |
| ConnectionString |
string |
A string de conexão. |
********.rwlb.polardb-pg-public.rds.aliyuncs.com |
| Protocol |
string |
O tipo de protocolo. |
http |
Exemplos
Resposta de sucesso
JSON formato
{
"RequestId": "2DC120BF-6EBA-4C63-BE99-B09F9E******",
"Items": [
{
"Nodes": "pi-***************,pi-***************",
"ReadWriteMode": "ReadOnly",
"AddressItems": [
{
"VSwitchId": "vsw-************",
"PrivateZoneConnectionString": "***.***.**.com",
"ConnectionString": "********.rwlb.polardb-pg-public.rds.aliyuncs.com",
"NetType": "Private",
"Port": "1521",
"VpcInstanceId": "pe-*************",
"VPCId": "vpc-***************",
"IPAddress": "192.***.***.***",
"DashboardUsed": true
}
],
"DBEndpointId": "pe-*************",
"EndpointConfig": "{\\\"DistributedTransaction\\\":\\\"off\\\",\\\"ConsistLevel\\\":\\\"0\\\",\\\"LoadBalanceStrategy\\\":\\\"load\\\",\\\"MasterAcceptReads\\\":\\\"on\\\"}",
"DBEndpointDescription": "test",
"EndpointType": "Custom",
"AutoAddNewNodes": "Enable",
"DBClusterId": "pc-bp1s826a1up******",
"SccMode": "on",
"PolarSccTimeoutAction": "0",
"PolarSccWaitTimeout": "100",
"NodeWithRoles": "Reader1",
"ServiceName": "test-name",
"NetType": "Private",
"VPCId": "vpc-***************",
"Port": "1521",
"ConnectionString": "********.rwlb.polardb-pg-public.rds.aliyuncs.com",
"Protocol": "http"
}
]
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. | The specified DBClusterId parameter does not exist in the current record. |
| 404 | InvalidDBClusterId.NotFound | The DBClusterId provided does not exist in our records. | The specified DBClusterId parameter does not exist in the current record. |
| 404 | InvalidDBClusterId.Malformed | The specified parameter DBClusterId is not valid. | The specified DBClusterId parameter is invalid. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.