Elastic Cloud Server
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
Domain Name Service
VPC Endpoint
Cloud Connect
Enterprise Switch
Security & Compliance
Web Application Firewall
Host Security Service
Data Encryption Workshop
Database Security Service
Advanced Anti-DDoS
Data Security Center
Container Guard Service
Situation Awareness
Managed Threat Detection
Cloud Certificate Manager
Anti-DDoS Service
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GaussDB(for MySQL)
Distributed Database Middleware
GaussDB(for openGauss)
Developer Services
Distributed Cache Service
Simple Message Notification
Application Performance Management
Application Operations Management
Blockchain Service
API Gateway
Cloud Performance Test Service
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Cloud Communications
Message & SMS
Cloud Ecosystem
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP License Service
Support Plans
Customer Operation Capabilities
Partner Support Plans
Professional Services
Intelligent EdgeFabric
SDK Developer Guide
API Request Signing Guide
Koo Command Line Interface
Updated at: Feb 24, 2022 GMT+08:00

Methods of the NorthApiClient Class

The methods of the NorthApiClient class are used to create an application instance. They are the prerequisites for calling other SDK APIs. The following describes the main methods:



public void setClientInfo(ClientInfo clientInfo)

Initializes the parameters of NorthApiClient. For details on the definition of ClientInfo, see Methods of the Clientinfo Class.

public void setHttpConnection(int httpSocketTimeout, int httpConnectionTimeout, int maxConnectionAmount, int maxConnectionAmountPerRoute)

You can set the socket timeout interval (in milliseconds), connection timeout interval (in milliseconds), maximum number of connections, and maximum number of connections for each route in the HTTP connection pool. The default values of the four parameters are 30000, 30000, 200, and 200 respectively.

This method must be called before the initSSLConfig() or initSSLConfig(SSLConfig sslConfig) method is called.

public void initSSLConfig()

Initializes the two-way authentication configuration. Other methods can only be used after this method is called.


This method uses a test certificate, which is an informal certificate, and does not verify the host name. Therefore, this method is used only in the integration interconnection commissioning phase.

public void initSSLConfig(SSLConfig sslConfig)

Initializes the two-way authentication configuration. Other methods can only be used after this method is called. For details on the definition of SSLConfig, see SSLConfig Class Method Description.


This method is used to import certificates and can be used in commercial use. Before calling this method, you can call the setHostnameVerifier(HostnameVerifier hostnameVerifier) method to verify the host name. Otherwise, the strict host name verification is used by default.

public void setHostnameVerifier(HostnameVerifier hostnameVerifier)

Customizes the host name verification method. This method needs to be called before the initSSLConfig(SSLConfig sslConfig) method is called. Otherwise, the strict host name verification is used by default.

  • If the host name in the commercial certificate is the same as that in the platform environment, you do not need to call this method. By default, the strict host name verification is used.
  • The host name verification method should be based on the security principle. The value true should not be returned directly.

public String getVersion()

Queries the SDK version.

Did you find this page helpful?

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?

Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel