Updating an ES Listener

Function

This API is used to update an Elasticsearch listener.

URI

PUT /v1.0/{project_id}/clusters/{cluster_id}/es-listeners/{listener_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID and name, see Obtaining the Project ID and Name.

cluster_id

Yes

String

ID of the target cluster

listener_id

Yes

String

ID of the listener to be updated

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

listener

Yes

EsListenerRequest object

Listener object

Table 3 EsListenerRequest

Parameter

Mandatory

Type

Description

default_tls_container_ref

Yes

String

ID of the server certificate used by the listener

client_ca_tls_container_ref

No

String

ID of the CA certificate used by the listener. This parameter is mandatory when bidirectional authentication is to be updated.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

listener

EsListenerResponse object

Listener object

Table 5 EsListenerResponse

Parameter

Type

Description

protocol

String

Protocol used by the listener

id

String

Listener ID

name

String

Listener name

protocol_port

String

Port used by the listener

ipgroup

EsIpgroupResource object

Access control information of the listener object

Table 6 EsIpgroupResource

Parameter

Type

Description

ipgroup_id

String

ID of the IP address group associated with the listener

enable_ipgroup

Boolean

Status of an access control group

type

String

Type of an access control group

Example Requests

PUT /v1.0/6204a5bd270343b5885144cf9c8c158d/clusters/58ee0f27-70b3-47e0-ac72-9e3df6cd15cd/es-listeners/4425eb63-78ce-4c63-b60e-492befdac0e7

{
  "listener" : {
    "default_tls_container_ref" : "9c82320a8dd049eba49b28e70a2c0c3e"
  }
}

Example Responses

None

Status Codes

Status Code

Description

200

Request succeeded.

400

Invalid request.

Modify the request instead of retrying.

409

The request cannot be processed due to a conflict.

This status code indicates that the resource that the client attempts to create already exits, or the requested update failed due to a conflict.

412

The server does not meet one of the requirements that the requester puts on the request.

Error Codes

See Error Codes.