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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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:

  • WORKER:Elasticsearch cluster
  • KIBANA:Kibana cluster
networkType String Body No PUBLIC

The network type. If the whiteIpList parameter is optional, this parameter is required. Valid values:

  • PRIVATE: private network
  • PUBLIC: Internet
modifyMode String Body No Cover

The modification method. Valid values:

  • Cover (default): overwrites the original IP address whitelist with the value of the ips parameter.
  • Append: Add the IP addresses entered in the ips parameter to the original IP address whitelist.
  • Delete: Delete the IP addresses entered in the ips parameter from the original IP address whitelist. You must retain at least one IP address.
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:

  • PRIVATE_KIBANA:Kibana private network access whitelist
  • PRIVATE_ES:Elasticsearch private network access whitelist
  • PUBLIC_ES:Elasticsearch Internet access whitelist
  • PUBLIC_KIBANA:Kibana public network access whitelist

Response parameters

Parameter Type Example Description
Result Boolean true

The following results can be returned:

  • true: The whitelist is updated.
  • false: The whitelist failed to be updated.
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.