Querying the pg_hba.conf Change History of a DB Instance
Function
This API is used to query the pg_hba.conf change history of a DB instance.
- Before calling an API, you need to understand the API in Authentication.
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Project ID of a tenant in a region.
For details about how to obtain the project ID, see Obtaining a Project ID.
instance_id
Yes
Instance ID.
Table 2 Request parameters Parameter
Mandatory
Type
Description
start_time
No
String
Start time. If this parameter is not specified, 00:00 (UTC time zone) on the current day is used by default.
end_time
No
String
End time. If this parameter is not specified, the current time (UTC time zone) is used by default.
Request
Response
- Normal response
Table 3 Parameters Parameter
Type
Description
Array elements
Array of objects
Parameter list.
For details, see Table 4.
Table 4 Parameters Parameter
Type
Description
status
String
Change result.
- success: The change has taken effect.
- failed: The change did not take effect.
- setting: The change is in progress.
time
String
Time when the change was made.
fail_reason
String
Reason for a change failure.
before_confs
Array of objects
Original values.
For details, see Table 5.
after_confs
Array of objects
New values.
For details, see Table 6.
Table 5 before_confs field description Parameter
Type
Description
type
String
Connection type. Enumerated values: host, hostssl, and hostnossl
database
String
Database name other than template0 and template1. Use commas (,) to separate multiple names.
user
String
Name of a user other than rdsAdmin, rdsMetric, rdsBackup, rdsRepl, and rdsProxy.
- all indicates all database users of the DB instance.
- Use commas (,) to separate multiple user names.
address
String
Client IP address. 0.0.0.0/0 indicates that the user can access the database from any IP address.
mask
String
Subnet mask. The default value is an empty string.
method
String
Authentication mode. Enumerated values: reject, md5, and scram-sha-256
priority
Integer
Configuration priority.
Table 6 after_confs field description Parameter
Type
Description
type
String
Connection type. Enumerated values: host, hostssl, and hostnossl
database
String
Database name other than template0 and template1. Use commas (,) to separate multiple names.
user
String
Name of a user other than rdsAdmin, rdsMetric, rdsBackup, rdsRepl, and rdsProxy.
- all indicates all database users of the DB instance.
- Use commas (,) to separate multiple user names.
address
String
Client IP address. 0.0.0.0/0 indicates that the user can access the database from any IP address.
mask
String
Subnet mask. The default value is an empty string.
method
String
Authentication mode. Enumerated values: reject, md5, and scram-sha-256
priority
Integer
Configuration priority.
- Example normal response
[ { "status" : "success", "time" : "2023-08-01 09:00:00", "fail_reason" : "", "before_confs" : [ { "type" : "host", "database" : "all", "user" : "all", "address" : "0.0.0.0/0", "mask" : "", "method" : "md5", "priority" : 0 } ], "after_confs" : [ { "type" : "hostssl", "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