use of com.tencentcloudapi.common.exception.TencentCloudSDKException in project tencentcloud-sdk-java-intl-en by TencentCloud.
the class CdnClient method EnableCaches.
/**
*This API (EnableCaches) is used to unblock manually blocked URLs. After a URL is successfully unblocked, it takes about 5 to 10 minutes to take effect across the entire network. (This API is during beta test and not fully available now.)
* @param req EnableCachesRequest
* @return EnableCachesResponse
* @throws TencentCloudSDKException
*/
public EnableCachesResponse EnableCaches(EnableCachesRequest req) throws TencentCloudSDKException {
JsonResponseModel<EnableCachesResponse> rsp = null;
String rspStr = "";
try {
Type type = new TypeToken<JsonResponseModel<EnableCachesResponse>>() {
}.getType();
rspStr = this.internalRequest(req, "EnableCaches");
rsp = gson.fromJson(rspStr, type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException("response message: " + rspStr + ".\n Error message: " + e.getMessage());
}
return rsp.response;
}
use of com.tencentcloudapi.common.exception.TencentCloudSDKException in project tencentcloud-sdk-java-intl-en by TencentCloud.
the class CdnClient method StopCdnDomain.
/**
*This API is used to suspend the acceleration service for a domain name.
*Note: after the acceleration service has been suspended, requests to the cache node will return a 404 error. In order to avoid impact to your business, please move the domain name to another service before suspending the acceleration service.
* @param req StopCdnDomainRequest
* @return StopCdnDomainResponse
* @throws TencentCloudSDKException
*/
public StopCdnDomainResponse StopCdnDomain(StopCdnDomainRequest req) throws TencentCloudSDKException {
JsonResponseModel<StopCdnDomainResponse> rsp = null;
String rspStr = "";
try {
Type type = new TypeToken<JsonResponseModel<StopCdnDomainResponse>>() {
}.getType();
rspStr = this.internalRequest(req, "StopCdnDomain");
rsp = gson.fromJson(rspStr, type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException("response message: " + rspStr + ".\n Error message: " + e.getMessage());
}
return rsp.response;
}
use of com.tencentcloudapi.common.exception.TencentCloudSDKException in project tencentcloud-sdk-java-intl-en by TencentCloud.
the class CdnClient method ManageClsTopicDomains.
/**
*This API is used to manage the list of domain names bound to a log topic.
* @param req ManageClsTopicDomainsRequest
* @return ManageClsTopicDomainsResponse
* @throws TencentCloudSDKException
*/
public ManageClsTopicDomainsResponse ManageClsTopicDomains(ManageClsTopicDomainsRequest req) throws TencentCloudSDKException {
JsonResponseModel<ManageClsTopicDomainsResponse> rsp = null;
String rspStr = "";
try {
Type type = new TypeToken<JsonResponseModel<ManageClsTopicDomainsResponse>>() {
}.getType();
rspStr = this.internalRequest(req, "ManageClsTopicDomains");
rsp = gson.fromJson(rspStr, type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException("response message: " + rspStr + ".\n Error message: " + e.getMessage());
}
return rsp.response;
}
use of com.tencentcloudapi.common.exception.TencentCloudSDKException in project tencentcloud-sdk-java-intl-en by TencentCloud.
the class CdnClient method AddCdnDomain.
/**
*This API is used to add a CDN acceleration domain name.
* @param req AddCdnDomainRequest
* @return AddCdnDomainResponse
* @throws TencentCloudSDKException
*/
public AddCdnDomainResponse AddCdnDomain(AddCdnDomainRequest req) throws TencentCloudSDKException {
JsonResponseModel<AddCdnDomainResponse> rsp = null;
String rspStr = "";
try {
Type type = new TypeToken<JsonResponseModel<AddCdnDomainResponse>>() {
}.getType();
rspStr = this.internalRequest(req, "AddCdnDomain");
rsp = gson.fromJson(rspStr, type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException("response message: " + rspStr + ".\n Error message: " + e.getMessage());
}
return rsp.response;
}
use of com.tencentcloudapi.common.exception.TencentCloudSDKException in project tencentcloud-sdk-java-intl-en by TencentCloud.
the class CdnClient method UpdateDomainConfig.
/**
*This API is used to modify the configuration of CDN acceleration domain names.
*Note: if you need to update complex configuration items, you must pass all the attributes of the entire object. The default value will be used for attributes that are not passed. We recommend calling the querying API to obtain the configuration attributes first. You can then modify and pass the attributes to the API. The certificate and key fields do not need to be passed for HTTPS configuration.
* @param req UpdateDomainConfigRequest
* @return UpdateDomainConfigResponse
* @throws TencentCloudSDKException
*/
public UpdateDomainConfigResponse UpdateDomainConfig(UpdateDomainConfigRequest req) throws TencentCloudSDKException {
JsonResponseModel<UpdateDomainConfigResponse> rsp = null;
String rspStr = "";
try {
Type type = new TypeToken<JsonResponseModel<UpdateDomainConfigResponse>>() {
}.getType();
rspStr = this.internalRequest(req, "UpdateDomainConfig");
rsp = gson.fromJson(rspStr, type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException("response message: " + rspStr + ".\n Error message: " + e.getMessage());
}
return rsp.response;
}
Aggregations