public class Client extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
String |
_ca |
String |
_cert |
Integer |
_connectTimeout |
com.aliyun.credentials.Client |
_credential |
Boolean |
_disableHttp2 |
String |
_endpoint |
Map<String,String> |
_endpointMap |
String |
_endpointRule |
String |
_endpointType |
GlobalParameters |
_globalParameters |
Map<String,String> |
_headers |
String |
_httpProxy |
String |
_httpsProxy |
String |
_key |
Integer |
_maxIdleConns |
String |
_method |
String |
_network |
String |
_noProxy |
String |
_openPlatformEndpoint |
String |
_productId |
String |
_protocol |
Integer |
_readTimeout |
String |
_regionId |
String |
_signatureAlgorithm |
String |
_signatureVersion |
String |
_socks5NetWork |
String |
_socks5Proxy |
com.aliyun.gateway.spi.Client |
_spi |
String |
_suffix |
String |
_tlsMinVersion |
String |
_userAgent |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addRequestInterceptor(com.aliyun.tea.interceptor.RequestInterceptor interceptor) |
void |
addResponseInterceptor(com.aliyun.tea.interceptor.ResponseInterceptor interceptor) |
void |
addRuntimeOptionsInterceptor(com.aliyun.tea.interceptor.RuntimeOptionsInterceptor interceptor) |
Map<String,?> |
callApi(Params params,
OpenApiRequest request,
com.aliyun.teautil.models.RuntimeOptions runtime) |
void |
checkConfig(Config config)
description :
If the endpointRule and config.endpoint are empty, throw error
|
static Object |
defaultAny(Object inputValue,
Object defaultValue)
description :
If inputValue is not null, return it or return defaultValue
|
Map<String,?> |
doRequest(Params params,
OpenApiRequest request,
com.aliyun.teautil.models.RuntimeOptions runtime)
description :
Encapsulate the request and invoke the network
|
Map<String,?> |
doROARequest(String action,
String version,
String protocol,
String method,
String authType,
String pathname,
String bodyType,
OpenApiRequest request,
com.aliyun.teautil.models.RuntimeOptions runtime)
description :
Encapsulate the request and invoke the network
|
Map<String,?> |
doROARequestWithForm(String action,
String version,
String protocol,
String method,
String authType,
String pathname,
String bodyType,
OpenApiRequest request,
com.aliyun.teautil.models.RuntimeOptions runtime)
description :
Encapsulate the request and invoke the network with form body
|
Map<String,?> |
doRPCRequest(String action,
String version,
String protocol,
String method,
String authType,
String bodyType,
OpenApiRequest request,
com.aliyun.teautil.models.RuntimeOptions runtime)
description :
Encapsulate the request and invoke the network
|
Map<String,?> |
execute(Params params,
OpenApiRequest request,
com.aliyun.teautil.models.RuntimeOptions runtime)
description :
Encapsulate the request and invoke the network
|
String |
getAccessKeyId()
description :
Get accesskey id by using credential
|
String |
getAccessKeySecret()
description :
Get accesskey secret by using credential
|
String |
getBearerToken()
description :
Get bearer token by credential
|
Map<String,String> |
getRpcHeaders()
description :
get RPC header for debug
|
String |
getSecurityToken()
description :
Get security token by using credential
|
String |
getType()
description :
Get credential type by credential
|
String |
getUserAgent()
description :
Get user agent
|
void |
setGatewayClient(com.aliyun.gateway.spi.Client spi)
description :
set gateway client
|
void |
setRpcHeaders(Map<String,String> headers)
description :
set RPC header for debug
|
public String _endpoint
public String _regionId
public String _protocol
public String _method
public String _userAgent
public String _endpointRule
public String _suffix
public Integer _readTimeout
public Integer _connectTimeout
public String _httpProxy
public String _httpsProxy
public String _socks5Proxy
public String _socks5NetWork
public String _noProxy
public String _network
public String _productId
public Integer _maxIdleConns
public String _endpointType
public String _openPlatformEndpoint
public com.aliyun.credentials.Client _credential
public String _signatureVersion
public String _signatureAlgorithm
public com.aliyun.gateway.spi.Client _spi
public GlobalParameters _globalParameters
public String _key
public String _cert
public String _ca
public Boolean _disableHttp2
public String _tlsMinVersion
public Map<String,?> doRPCRequest(String action, String version, String protocol, String method, String authType, String bodyType, OpenApiRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception
Encapsulate the request and invoke the network
action - api nameversion - product versionprotocol - http or httpsmethod - e.g. GETauthType - authorization type e.g. AKbodyType - response body type e.g. Stringrequest - object of OpenApiRequestruntime - which controls some details of call api, such as retry timesExceptionpublic Map<String,?> doROARequest(String action, String version, String protocol, String method, String authType, String pathname, String bodyType, OpenApiRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception
Encapsulate the request and invoke the network
action - api nameversion - product versionprotocol - http or httpsmethod - e.g. GETauthType - authorization type e.g. AKpathname - pathname of every apibodyType - response body type e.g. Stringrequest - object of OpenApiRequestruntime - which controls some details of call api, such as retry timesExceptionpublic Map<String,?> doROARequestWithForm(String action, String version, String protocol, String method, String authType, String pathname, String bodyType, OpenApiRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception
Encapsulate the request and invoke the network with form body
action - api nameversion - product versionprotocol - http or httpsmethod - e.g. GETauthType - authorization type e.g. AKpathname - pathname of every apibodyType - response body type e.g. Stringrequest - object of OpenApiRequestruntime - which controls some details of call api, such as retry timesExceptionpublic Map<String,?> doRequest(Params params, OpenApiRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception
Encapsulate the request and invoke the network
action - api nameversion - product versionprotocol - http or httpsmethod - e.g. GETauthType - authorization type e.g. AKbodyType - response body type e.g. Stringrequest - object of OpenApiRequestruntime - which controls some details of call api, such as retry timesExceptionpublic Map<String,?> execute(Params params, OpenApiRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception
Encapsulate the request and invoke the network
action - api nameversion - product versionprotocol - http or httpsmethod - e.g. GETauthType - authorization type e.g. AKbodyType - response body type e.g. Stringrequest - object of OpenApiRequestruntime - which controls some details of call api, such as retry timesExceptionpublic void addRuntimeOptionsInterceptor(com.aliyun.tea.interceptor.RuntimeOptionsInterceptor interceptor)
public void addRequestInterceptor(com.aliyun.tea.interceptor.RequestInterceptor interceptor)
public void addResponseInterceptor(com.aliyun.tea.interceptor.ResponseInterceptor interceptor)
public Map<String,?> callApi(Params params, OpenApiRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception
Exceptionpublic String getUserAgent() throws Exception
Get user agent
Exceptionpublic String getAccessKeyId() throws Exception
Get accesskey id by using credential
Exceptionpublic String getAccessKeySecret() throws Exception
Get accesskey secret by using credential
Exceptionpublic String getSecurityToken() throws Exception
Get security token by using credential
Exceptionpublic String getBearerToken() throws Exception
Get bearer token by credential
Exceptionpublic String getType() throws Exception
Get credential type by credential
Exceptionpublic static Object defaultAny(Object inputValue, Object defaultValue) throws Exception
If inputValue is not null, return it or return defaultValue
inputValue - users input valuedefaultValue - default valueExceptionpublic void checkConfig(Config config) throws Exception
If the endpointRule and config.endpoint are empty, throw error
config - config contains the necessary information to create a clientExceptionpublic void setGatewayClient(com.aliyun.gateway.spi.Client spi)
throws Exception
set gateway client
spi - .Exceptionpublic void setRpcHeaders(Map<String,String> headers) throws Exception
set RPC header for debug
headers - headers for debug, this header can be used only once.ExceptionCopyright © 2025. All rights reserved.