use of com.tencentcloudapi.common.exception.TencentCloudSDKException in project tencentcloud-sdk-java-intl-en by TencentCloud.
the class CvmClient method InquiryPriceRunInstances.
/**
*This API is used to query the price of creating instances. You can only use this API for instances whose configuration is within the purchase limit. For more information, see [RunInstances](https://intl.cloud.tencent.com/document/api/213/15730?from_cn_redirect=1).
* @param req InquiryPriceRunInstancesRequest
* @return InquiryPriceRunInstancesResponse
* @throws TencentCloudSDKException
*/
public InquiryPriceRunInstancesResponse InquiryPriceRunInstances(InquiryPriceRunInstancesRequest req) throws TencentCloudSDKException {
JsonResponseModel<InquiryPriceRunInstancesResponse> rsp = null;
String rspStr = "";
try {
Type type = new TypeToken<JsonResponseModel<InquiryPriceRunInstancesResponse>>() {
}.getType();
rspStr = this.internalRequest(req, "InquiryPriceRunInstances");
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 MariadbClient method ModifyDBParameters.
/**
*This API is used to modify database parameters.
* @param req ModifyDBParametersRequest
* @return ModifyDBParametersResponse
* @throws TencentCloudSDKException
*/
public ModifyDBParametersResponse ModifyDBParameters(ModifyDBParametersRequest req) throws TencentCloudSDKException {
JsonResponseModel<ModifyDBParametersResponse> rsp = null;
String rspStr = "";
try {
Type type = new TypeToken<JsonResponseModel<ModifyDBParametersResponse>>() {
}.getType();
rspStr = this.internalRequest(req, "ModifyDBParameters");
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 MariadbClient method IsolateHourDBInstance.
/**
*This API is used to isolate pay-as-you-go instances.
* @param req IsolateHourDBInstanceRequest
* @return IsolateHourDBInstanceResponse
* @throws TencentCloudSDKException
*/
public IsolateHourDBInstanceResponse IsolateHourDBInstance(IsolateHourDBInstanceRequest req) throws TencentCloudSDKException {
JsonResponseModel<IsolateHourDBInstanceResponse> rsp = null;
String rspStr = "";
try {
Type type = new TypeToken<JsonResponseModel<IsolateHourDBInstanceResponse>>() {
}.getType();
rspStr = this.internalRequest(req, "IsolateHourDBInstance");
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 MariadbClient method DescribeBackupTime.
/**
*This API is used to get the backup time of a TencentDB instance. The backend system will perform instance backup regularly according to this configuration.
* @param req DescribeBackupTimeRequest
* @return DescribeBackupTimeResponse
* @throws TencentCloudSDKException
*/
public DescribeBackupTimeResponse DescribeBackupTime(DescribeBackupTimeRequest req) throws TencentCloudSDKException {
JsonResponseModel<DescribeBackupTimeResponse> rsp = null;
String rspStr = "";
try {
Type type = new TypeToken<JsonResponseModel<DescribeBackupTimeResponse>>() {
}.getType();
rspStr = this.internalRequest(req, "DescribeBackupTime");
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 MariadbClient method SwitchDBInstanceHA.
/**
*This API is used to start a primary-replica switch of instances.
* @param req SwitchDBInstanceHARequest
* @return SwitchDBInstanceHAResponse
* @throws TencentCloudSDKException
*/
public SwitchDBInstanceHAResponse SwitchDBInstanceHA(SwitchDBInstanceHARequest req) throws TencentCloudSDKException {
JsonResponseModel<SwitchDBInstanceHAResponse> rsp = null;
String rspStr = "";
try {
Type type = new TypeToken<JsonResponseModel<SwitchDBInstanceHAResponse>>() {
}.getType();
rspStr = this.internalRequest(req, "SwitchDBInstanceHA");
rsp = gson.fromJson(rspStr, type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException("response message: " + rspStr + ".\n Error message: " + e.getMessage());
}
return rsp.response;
}
Aggregations