Updating an ES Listener

Function

This API is used to update an ES 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, see Obtaining a 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 parameter

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 parameter

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 access control group associated with the listener

enable_ipgroup

Boolean

Access control group status

type

String

Access control group type

Request Example

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

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

Response Example

None

Status Codes

Status Code

Description

200

The request is processed successfully.

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 exists, or the request fails to be processed because of the update of the conflict request.

412

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

Error Codes

See Error Codes.