Updates the IP address whitelist of a specified Elasticsearch cluster.
When you call this operation, take note of the following items:
The instance is in the active (activating), invalid (invalid), and inactive (inactive) state. The information cannot be updated.
Debugging
Request headers
The GetLogs operation does not have operation-specific request headers and uses only common request headers. For more information, see Common request headers.
Request syntax
PATCH|POST /openapi/instances/{InstanceId}/actions/modify-white-ips HTTP/1.1
Request parameters
Parameter | Type | Position | Required | Example | Description |
---|---|---|---|---|---|
InstanceId | String | Path | Yes | es-cn-0pp1jxvcl000z**** |
The ID of the instance. |
clientToken | String | Query | No | 5A2CFF0E-5718-45B5-9D4D-70B3FF**** |
The client token that is used to ensure the idempotence of the request. The value of this parameter is generated by the client and must be unique among different requests. The maximum value is 64 ascii characters. |
Object | Body | No |
The request body parameters. |
||
nodeType | String | Body | No | WORKER |
The type of the node. If the whiteIpList parameter is optional, this parameter is required. Valid values:
|
networkType | String | Body | No | PUBLIC |
The network type. If the whiteIpList parameter is optional, this parameter is required. Valid values:
|
modifyMode | String | Body | No | Cover |
The modification method. Valid values:
|
whiteIpList | Array of String | Body | No | 192.168.xx.xx |
The IP addresses from which the specified users can access the specified databases. |
whiteIpGroup | Object | Body | No |
Update the whitelist configuration of an instance by using whitelist group whiteIpGroup parameters. You can update only one whitelist group. |
|
groupName | String | Body | No | test_group |
The group name of the whitelist group. This parameter is required if the whiteIpGroup parameter is optional. |
ips | Array of String | Body | No | 192.168.xx.xx |
The IP addresses from which the specified users can access the specified databases. |
whiteIpType | String | Body | No | PRIVATE_ES |
The type of the IP address whitelist. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Result | Boolean | true |
The following results can be returned:
|
RequestId | String | 5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1DERFG |
The ID of the request. |
Example
Sample requests
PATCH /openapi/instances/es-cn-0pp1jxvcl000z****/actions/modify-white-ips?clientToken=5A2CFF0E-5718-45B5-9D4D-70B3FF**** HTTP/1.1
Host:elasticsearch.aliyuncs.com
Content-Type:application/json
{
"nodeType" : "WORKER",
"networkType" : "PUBLIC",
"modifyMode" : "Cover",
"whiteIpList" : [ "192.168.xx.xx" ],
"whiteIpGroup" : {
"groupName" : "test_group",
"ips" : [ "192.168.xx.xx" ],
"whiteIpType" : "PRIVATE_ES"
}
}
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyWhiteIpsResponse>
<Result>true</Result>
<RequestId>5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1DERFG</RequestId>
</ModifyWhiteIpsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Result" : true,
"RequestId" : "5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1DERFG"
}
Error codes
For a list of error codes, visit the API Error Center.