Deleting One or More Records from pg_hba.conf
Function
This API is used to delete one or more records from the pg_hba.conf file. The priority is used as the unique identifier.
- 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
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Array elements |
No |
Array of objects |
Definition Parameters to be modified. For details, see Table 3. Constraints N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
Yes |
String |
Definition Connection type. Constraints N/A Range Enumerated values: host, hostssl, and hostnossl Default Value N/A |
database |
Yes |
String |
Definition Database name. Constraints N/A Range The value can be any name other than template0 and template1. Use commas (,) to separate multiple names. Default Value N/A |
user |
Yes |
String |
Definition Name of a user other than rdsAdmin, rdsMetric, rdsBackup, rdsRepl, and rdsProxy. Constraints N/A Range
Default Value N/A |
address |
Yes |
String |
Definition Client IP address. 0.0.0.0/0 indicates that the user can access the database from any IP address. Constraints N/A Range N/A Default Value N/A |
mask |
No |
String |
Definition Subnet mask. Constraints N/A Range N/A Default Value An empty string |
method |
Yes |
String |
Definition Authentication mode. Constraints N/A Range Enumerated values: reject, md5, and scram-sha-256 Default Value N/A |
priority |
Yes |
Integer |
Definition Configuration priority. Constraints N/A Range N/A Default Value N/A |
Example Request
DELETE https://rds.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/e28979107ed04d3b8b2f1b819b8d2be3in03/hba-info [ { "type" : "host", "database" : "all", "user" : "all", "address" : "0.0.0.0/0", "mask" : "", "method" : "md5", "priority" : 0 } ]
Response
- Normal response
Table 4 Parameters Parameter
Type
Description
code
String
Definition
Result code.
Range
N/A
message
String
Definition
Result description.
Range
N/A
- Example normal response
{ "code" : 0, "message" : "" }
- 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