All Products
Search
Document Center

OpenSearch:Config class

Last Updated:Feb 22, 2023

Overview

This topic describes the Config class and its methods that are used to build the Client object.

Class security

Thread-safe

Constructor

Config()

Description

Parameter

Type

Description

endpoint

String

The API endpoint. You can view the API endpoint on the API Endpoint tab of the Instance Details page.

instanceId

String

The ID of the OpenSearch instance. You can view the ID on the Instance Details page.

accessUserName

String

The username. You can view the username on the Network Information tab of the Instance Details page.

accessPassWord

String

The password. You can view the password on the Network Information tab of the Instance Details page.

httpProxy

String

The public IP address. You must specify this parameter for calling API operations over the Internet. Example: "http://Public IP address:Port number".

Specify the endpoint parameter

Syntax

Config setEndpoint(String endpoint)

Description

Parameter

Type

Description

endpoint

String

The API endpoint. You can view the API endpoint on the API Endpoint tab of the Instance Details page.

Obtain the value of the endpoint parameter

Syntax

String getEndpoint()

Returned result

  • String endpoint parameter value

Specify the instanceId parameter

Syntax

Config setInstanceId(String InstanceId)

Description

Parameter

Type

Description

instanceId

String

The ID of the OpenSearch instance. You can view the ID on the Instance Details page.

Obtain the value of the instanceId parameter

Syntax

String getInstanceId()

Returned result

  • String instanceId parameter value

Specify the accessUserName parameter

Syntax

Config setAccessUserName(String AccessUserName)

Description

Parameter

Type

Description

accessUserName

String

The username. You can view the username on the Network Information tab of the Instance Details page.

Obtain the value of the accessUserName parameter

Syntax

String getAccessUserName()

Returned result

  • String accessUserName Parameter value

Specify the accessPassWord parameter

Syntax

Config setAccessPassWord(String AccessPassWord)

Description

Parameter

Type

Description

accessPassWord

String

The password. You can view the password on the Network Information tab of the Instance Details page.

Obtain the value of the accessPassWord parameter

Syntax

String getAccessPassWord()

Returned result

  • String accessPassWord parameter value