UpdateKibanaWhiteIps

Updated at:

Updates the Kibana access whitelist of a specified Alibaba Cloud Elasticsearch instance.

Operation description

Before you begin

  • When you invoke this operation, you cannot update information when the instance status is activating, invalid, or freeze (inactive).

  • You can update the whitelist in two ways: IP whitelist list and IP whitelist group. The two methods cannot be used simultaneously, and apart from InstanceId and clientToken, the two methods support different parameters as follows:
    • IP whitelist list: kibanaIPWhitelist

    • IP whitelist group: modifyMode, whiteIpGroup

  • The public access whitelist does not support private IP addresses, and the internal-facing access whitelist does not support public IP addresses.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

elasticsearch:UpdateKibanaWhiteIps

update

*Instance

acs:elasticsearch:{#regionId}:{#accountId}:instances/{#instancesId}

None None

Request syntax

PATCH /openapi/instances/{InstanceId}/kibana-white-ips HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

es-cn-tl329rbpc0001****

Request parameters

Parameter

Type

Required

Description

Example

clientToken

string

No

A unique token generated by the client to ensure the idempotence of the request. The value must be unique across different requests and can be up to 64 ASCII characters in length.

5A2CFF0E-5718-45B5-9D4D-70B3FF****

modifyMode

string

No

The modification mode. Valid values:

  • Cover (default): Overwrites the original IP whitelist with the value of the ips parameter.

  • Append: Adds the IP addresses specified in the ips parameter to the original IP whitelist.

  • Delete: Removes the IP addresses specified in the ips parameter from the original IP whitelist. At least one IP address must be retained.

Valid values:

  • Cover
  • Append
  • Delete

Cover

body

object

No

The request body.

kibanaIPWhitelist

array

No

The IP access whitelist for the Kibana node. Cannot be set together with the whitelist group.

string

No

The IP address whitelist. This parameter is available when whiteIpGroup is empty. The value of this parameter updates the IP whitelist configuration in the Default whitelist group.

You cannot configure kibanaIPWhitelist and whiteIpGroup at the same time.

["110.0.XX.XX/8"]

whiteIpGroup

object

No

Updates the Kibana access whitelist configuration by whitelist group. Only one whitelist group can be updated at a time.

You cannot configure kibanaIPWhitelist and whiteIpGroup at the same time.

groupName

string

No

The name of the whitelist group. This parameter is required if the whiteIpGroup parameter is specified.

test_group_name

whiteIpType

string

No

The whitelist type. Only PUBLIC_KIBANA (public access whitelist) is supported.

PUBLIC_KIBANA

ips

array

No

The list of IP addresses in the whitelist group.

string

No

The list of IP addresses in the whitelist group. This parameter is required if the whiteIpGroup parameter is specified.

["0.0.0.0", "10.2.XX.XX"]

Important Adding and deleting whitelist groups is implemented by calls with modifyMode set to Cover. Delete and Append cannot add or delete whitelist groups. They can only modify the IP address list within a whitelist group. Details are as follows:
  • When modifyMode is set to Cover, if ips is empty, the whitelist group is deleted. If groupName is not in the list of existing whitelist group names, a new whitelist group is created.

  • When modifyMode is set to Delete, at least one IP address must be retained after deletion.

  • When modifyMode is set to Append, the whitelist group name must already exist. Otherwise, a NotFound error is returned.

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

E5EF11F1-DBAE-4020-AC24-DFA6C4345CAE

Result

object

The details of the Elasticsearch instance.

kibanaPrivateIPWhitelist

array

The Kibana private network access whitelist.

string

The Kibana private network access whitelist.

[ "192.168.XX.XX/24" ]

kibanaIPWhitelist

array

The Kibana access whitelist.

string

The Kibana access whitelist.

["0.0.XX.XX", "10.2.XX.XX", "110.0.XX.XX/9"]

networkConfig

object

The network configuration.

vpcId

string

The VPC ID.

vpc-bp1jy348ibzulk6hn****

vswitchId

string

The vSwitch ID.

vsw-bp1a0mifpletdd1da****

vsArea

string

The region where the instance resides.

cn-hangzhou-h

type

string

The network type.

vpc

whiteIpGroupList

array<object>

The whitelist group list.

object

The whitelist group list.

groupName

string

The name of the whitelist group.

test_group_name

ips

array

The list of IP addresses in the whitelist group.

string

The list of IP addresses in the whitelist group.

["0.0.0.0", "10.2.XX.XX"]

whiteIpType

string

The whitelist type.

PUBLIC_KIBANA

Note

In the following response examples, only the parameters listed in the response data are guaranteed. Parameters not mentioned are for reference only. Do not rely on obtaining these parameters in your program.

Examples

Success response

JSON format

{
  "RequestId": "E5EF11F1-DBAE-4020-AC24-DFA6C4345CAE",
  "Result": {
    "kibanaPrivateIPWhitelist": [
      "[ \"192.168.XX.XX/24\" ]"
    ],
    "kibanaIPWhitelist": [
      "[\"0.0.XX.XX\",       \"10.2.XX.XX\",       \"110.0.XX.XX/9\"]"
    ],
    "networkConfig": {
      "vpcId": "vpc-bp1jy348ibzulk6hn****",
      "vswitchId": "vsw-bp1a0mifpletdd1da****",
      "vsArea": "cn-hangzhou-h",
      "type": "vpc",
      "whiteIpGroupList": [
        {
          "groupName": "test_group_name",
          "ips": [
            "[\"0.0.0.0\", \"10.2.XX.XX\"]"
          ],
          "whiteIpType": "PUBLIC_KIBANA"
        }
      ]
    }
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.