Querying pg_hba.conf of a DB Instance
Function
This API is used to query the pg_hba.conf file configurations of a DB instance.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about request header parameters.
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Definition
Project ID of a tenant in a region.
To obtain the value, see Obtaining a Project ID.
Constraints
N/A
Range
N/A
Default Value
N/A
instance_id
Yes
Definition
Instance ID.
Constraints
N/A
Range
N/A
Default Value
N/A
Request
Response
- Normal response
Table 2 Parameters Parameter
Type
Description
Array elements
Array of objects
Definition
Parameter list.
For details, see Table 3.
Table 3 Parameters Parameter
Type
Description
type
String
Definition
Connection type.
Range
Enumerated values: host, hostssl, and hostnossl
database
String
Definition
Database name.
Range
The value can be any name other than template0 and template1. Use commas (,) to separate multiple names.
user
String
Definition
Name of a user other than rdsAdmin, rdsMetric, rdsBackup, rdsRepl, and rdsProxy.
Range
- all indicates all database users of the DB instance.
- Use commas (,) to separate usernames.
address
String
Definition
Client IP address. 0.0.0.0/0 indicates that the user can access the database from any IP address.
Range
N/A
mask
String
Definition
Subnet mask.
Range
The value is an empty character string by default.
method
String
Definition
Authentication mode.
Range
Enumerated values: reject, md5, and scram-sha-256
priority
Integer
Definition
Configuration priority.
Range
N/A
- Example normal response
[ { "type" : "host", "database" : "all", "user" : "all", "address" : "0.0.0.0/0", "mask" : "", "method" : "md5", "priority" : 0 } ]
- Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot