Config class

更新时间:
复制 MD 格式

Overview

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

Class security description

Thread safety of the Config class

Constructor

Config()

Parameter description

Parameter name

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. Specify this parameter to make calls over the public network. Example: "http://<public_ip>:<port>"

Set Endpoint parameters

API Description

Config setEndpoint(String endpoint)

Parameter description

Parameter Name

Type

Description

endpoint

String

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

Obtain Endpoint Parameter

Interface description

String getEndpoint()

Response

Endpoint parameter value (String)

Set the InstanceId parameter

Interface Description

Config setInstanceId(String InstanceId)

Parameter description

Parameter Name

Type

Description

InstanceId

String

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

Obtain the InstanceId parameter

API Description

String getInstanceId()

Results

Value of InstanceId

Set the AccessUserName parameter

Description

Config setAccessUserName(String AccessUserName)

Parameter description

Parameter Name

Type

Description

AccessUserName

String

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

Obtain the AccessUserName parameter

Description

String getAccessUserName()

Return value

The value of the AccessUserName parameter

Set the AccessPassWord parameter

Description

Config setAccessPassWord(String AccessPassWord)

Parameter description

Parameter name

Type

Description

AccessPassWord

String

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

Obtain the AccessPassWord parameter

API description

String getAccessPassWord()

Response

The password of the String type