Instructions for Whitelist Management Interfaces
Last Updated:2020-07-20
View a whitelist
Request structure
GET /v{version}/instance/{instanceId}/securityIp HTTP/1.1
HOST: rds.bj.baidubce.com
Authorization authorization string
Request header field
There are no other special header fields except the common header field.
Request parameters
Parameter Name | Type | Required | Parameter Position | Description |
---|---|---|---|---|
version | string | Yes | URL 0 | API Version Number |
instanceId | string | Yes | URL Parameters | Instance ID |
Return header field
Parameter Name | Type | Description |
---|---|---|
ETag | string | When modifying the current version number, the current Etag is returned by the header mode |
Return parameter
Parameter Name | Type | Description |
---|---|---|
securityIps | List String | The array composed of IP must, whose conforms to CIDR model. For details, see IP Format(RDS/API Refernece/Appendix.md#IP Format#). |
Request example
GET /v1/instance/r-modkurfj/securityIp HTTP/1.1
HOST: rds.bj.baidubce.com
Authorization bce-auth-v1/rdsak/2016-07-03T06:13:13Z/1800/x-bce-date/{signature}
Return example
HTTP/1.1 200 OK
x-bce-request-id 7869616F-7A68-6977-656E-406261696475
ETag:xxx-xxx-xxx
Content-Type: application/json
Content-Length: 567
{
"securityIps": [
"127.0.0.1", "%", "192.168.0.1/24"
]
}
Update whitelist
Note
Whitelist needs to be wholly updated. And, you must add all whitelists when updating.
Request structure
PUT /v{version}/instance/{instanceId}/securityIp HTTP/1.1
HOST: rds.bj.baidubce.com
x-bce-if-match: {ETag}
Authorization authorization string
{
"securityIps": securityIps
}
Request header field
Parameter Name | Type | Description |
---|---|---|
x-bce-if-match | string | ETag value got via query interface. |
Request parameters
Parameter Name | Type | Required | Parameter Position | Description |
---|---|---|---|---|
version | string | Yes | URL parameter | API Version Number |
instanceId | string | Yes | URL parameter | Instance ID |
securityIps | List String | Yes | RequestBody parameter | Whitelist IPS Sheet |
Return header field
No other special header fields are available, except for common header fields.
Return parameter
No specific parameters are returned.
Request example
PUT /v1/instance/r-dnubrhaqp/securityIp HTTP/1.1
HOST: rds.bj.baidubce.com
x-bce-if-match: V11
Authorization bce-auth-v1/rdsak/2016-07-03T06:13:13Z/1800/x-bce-date/{signature}
{
"securityIps": [
"127.0.0.1", "%", "192.168.0.1/24"
]
}
Return example
HTTP/1.1 200 OK
x-bce-request-id 7869616F-7A68-6977-656E-406261696475
Content-Type: application/json
Content-Length: 0