类 IotPkiManageClient
- java.lang.Object
-
- com.baidubce.AbstractBceClient
-
- com.baidubce.services.iothisk.AbstractIotHiskBceClient
-
- com.baidubce.services.iothisk.IotPkiManageClient
-
public class IotPkiManageClient extends AbstractIotHiskBceClient
Provides the client for accessing the iot pki service.
-
-
字段概要
-
从类继承的字段 com.baidubce.services.iothisk.AbstractIotHiskBceClient
HANDLERS
-
从类继承的字段 com.baidubce.AbstractBceClient
config, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX
-
-
构造器概要
构造器 构造器 说明 IotPkiManageClient(BceClientConfiguration config)Constructs a new pki client using the client configuration to access hisk pki.
-
方法概要
-
从类继承的方法 com.baidubce.services.iothisk.AbstractIotHiskBceClient
createRequest, fillInHeaderAndBody, toJson
-
从类继承的方法 com.baidubce.AbstractBceClient
computeBktVirEndpoint, computeServiceId, getBktVirEndpoint, getClient, getEndpoint, getServiceId, invokeHttpClient, isRegionSupported, setClient, shutdown
-
-
-
-
构造器详细资料
-
IotPkiManageClient
public IotPkiManageClient(BceClientConfiguration config)
Constructs a new pki client using the client configuration to access hisk pki.- 参数:
config- The bcc client configuration options controlling how this client connects to bcc (e.g. proxy settings, retry counts, etc).
-
-
方法详细资料
-
createRootCACert
public CreateRootCACertResponse createRootCACert(CreateRootCACertRequest request, String clientToken)
Create a root cert.- 参数:
request- The request object containing all options for creating a root cert.clientToken- A random string to make request idempotent.- 返回:
- The created root cert ID.
-
deleteRootCACert
public void deleteRootCACert(String certId)
Delete a root cert.- 参数:
certId- The cert ID of the root cert which will be deleted.
-
getRootCACert
public GetRootCACertResponse getRootCACert(String certId)
Get a root cert.- 参数:
certId- The cert ID of the root cert which will be got.- 返回:
- Crl download url and root cert download url.
-
createCertGroup
public CreateCertGroupResponse createCertGroup(CreateCertGroupRequest request, String clientToken)
Create a cert group.- 参数:
request- The request object containing all options for creating a cert group.clientToken- A random string to make request idempotent.- 返回:
- The created cert group ID.
-
deleteCertGroup
public void deleteCertGroup(String groupId)
Delete a cert group.- 参数:
groupId- The group ID of the cert group which will be deleted.
-
getCertGroup
public GetCertGroupResponse getCertGroup(String groupId)
Get a cert group.- 参数:
groupId- The group ID of the cert group which will be got.- 返回:
- Root cert ID and sub cert' ID of this group.
-
createServerCert
public CreateSubCertResponse createServerCert(CreateSubCertRequest request, String clientToken)
Create a server cert.- 参数:
request- The request object containing all options for creating a server cert.clientToken- A random string to make request idempotent.- 返回:
- The created server cert ID.
-
deleteServerCert
public void deleteServerCert(String serverCertId)
Delete a server cert.- 参数:
serverCertId- The server cert ID of the cert which will be deleted.
-
getServerCert
public GetSubCertResponse getServerCert(String serverCertId)
Get a server cert.- 参数:
serverCertId- The server cert ID of the cert which will be got.- 返回:
- Root cert ID, cert group ID and cert download url of this cert.
-
queryServerCerts
public QueryServerCertResponse queryServerCerts(String rootCACertId, String groupId)
Query server certs.- 参数:
rootCACertId- The root cert ID of server certs which will be queried.groupId- The cert group ID of server certs which will be queried.- 返回:
- Server cert list of the query.
-
renewServerCert
public RenewSubCertResponse renewServerCert(RenewSubCertRequest request, String serverCertId, String clientToken)
Renew a server cert.- 参数:
request- The request object containing all options for renewing a server cert.serverCertId- The server cert ID of the cert which will be renewed.clientToken- A random string to make request idempotent.- 返回:
- Download url of the new server cert.
-
createClientCert
public CreateSubCertResponse createClientCert(CreateSubCertRequest request, String clientToken)
Create a client cert.- 参数:
request- The request object containing all options for creating a client cert.clientToken- A random string to make request idempotent.- 返回:
- The created client cert ID.
-
deleteClientCert
public void deleteClientCert(String clientCertId)
Delete a client cert.- 参数:
clientCertId- The client cert ID of the cert which will be deleted.
-
getClientCert
public GetSubCertResponse getClientCert(String clientCertId)
Get a client cert.- 参数:
clientCertId- The client cert ID of the cert which will be got.- 返回:
- Root cert ID, cert group ID and cert download url of this cert.
-
queryClientCerts
public QueryClientCertResponse queryClientCerts(String rootCACertId, String groupId)
Query client certs.- 参数:
rootCACertId- The root cert ID of client certs which will be queried.groupId- The cert group ID of client certs which will be queried.- 返回:
- Client cert list of the query.
-
renewClientCert
public RenewSubCertResponse renewClientCert(RenewSubCertRequest request, String clientCertId, String clientToken)
Renew a client cert.- 参数:
request- The request object containing all options for renewing a client cert.clientCertId- The client cert ID of the cert which will be renewed.clientToken- A random string to make request idempotent.- 返回:
- Download url of the new client cert.
-
batchCreateClientCert
public BatchCreateClientCertResponse batchCreateClientCert(BatchCreateClientCertRequest request, String clientToken)
Batch create client certs.- 参数:
request- The request object containing all options for creating client certs.clientToken- A random string to make request idempotent.- 返回:
- The create batch ID.
-
getBatchCreateStatus
public GetBatchCreateStatusResponse getBatchCreateStatus(String jobId)
Get batch create status- 参数:
jobId- The create batch ID.- 返回:
- Status of the create batch.
-
downloadClientCert
public String downloadClientCert(String clientCertId)
Download client cert.- 参数:
clientCertId- The client cert ID which will be downloaded.- 返回:
- Cert content string, encoded by base64, using PEM format.
-
downloadServerCert
public String downloadServerCert(String serverCertId)
Download server cert.- 参数:
serverCertId- The server cert ID which will be downloaded.- 返回:
- Cert content string, encoded by base64, using PEM format.
-
downloadRootCert
public String downloadRootCert(String rootCertId)
Download root cert.- 参数:
rootCertId- The root cert ID which will be downloaded.- 返回:
- Cert content string, encoded by base64, using PEM format.
-
downloadBatchCreateCerts
public Map<String,String> downloadBatchCreateCerts(String jobId)
Download batch create certs.- 参数:
jobId- The create batch ID which will be downloaded.- 返回:
- null if create failed or processing, or a map which maps device ID and cert content.
-
getCertStatus
public GetCertStatusResponse getCertStatus(GetCertStatusRequest request)
Get cert status.- 参数:
request- The request object containing all options for creating client certs.- 返回:
- Cert status of request.
-
downloadCrl
public DownloadCrlResponse downloadCrl(String issuerDN)
Download root cert.- 参数:
issuerDN- The root cert DN, can be found in root cert.- 返回:
- Crl content string, encoded by base64, using PEM format.
-
getOcspResponse
public GetOcspResponse getOcspResponse(byte[] ocspRequest)
Standard ocsp query use HTTP GET method.- 参数:
ocspRequest- Standard ocsp request.- 返回:
- Standard ocsp response.
-
-