use of com.tencentcloudapi.common.JsonResponseModel in project tencentcloud-sdk-java-intl-en by TencentCloud.
the class RedisClient method SwitchInstanceVip.
/**
*This API is used to swap the VIPs of instances for instance disaster recovery switch in scenarios where cross-AZ disaster recovery is supported through DTS. After the VIPs of the source and target instances are swapped, the target instance can be written into and the DTS sync task between them will be disconnected.
* @param req SwitchInstanceVipRequest
* @return SwitchInstanceVipResponse
* @throws TencentCloudSDKException
*/
public SwitchInstanceVipResponse SwitchInstanceVip(SwitchInstanceVipRequest req) throws TencentCloudSDKException {
JsonResponseModel<SwitchInstanceVipResponse> rsp = null;
String rspStr = "";
try {
Type type = new TypeToken<JsonResponseModel<SwitchInstanceVipResponse>>() {
}.getType();
rspStr = this.internalRequest(req, "SwitchInstanceVip");
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.JsonResponseModel in project tencentcloud-sdk-java-intl-en by TencentCloud.
the class RedisClient method DescribeCommonDBInstances.
/**
*(Disused) Queries the list of instances
* @param req DescribeCommonDBInstancesRequest
* @return DescribeCommonDBInstancesResponse
* @throws TencentCloudSDKException
*/
public DescribeCommonDBInstancesResponse DescribeCommonDBInstances(DescribeCommonDBInstancesRequest req) throws TencentCloudSDKException {
JsonResponseModel<DescribeCommonDBInstancesResponse> rsp = null;
String rspStr = "";
try {
Type type = new TypeToken<JsonResponseModel<DescribeCommonDBInstancesResponse>>() {
}.getType();
rspStr = this.internalRequest(req, "DescribeCommonDBInstances");
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.JsonResponseModel in project tencentcloud-sdk-java-intl-en by TencentCloud.
the class RedisClient method CreateInstances.
/**
*This API is used to create Redis instances.
* @param req CreateInstancesRequest
* @return CreateInstancesResponse
* @throws TencentCloudSDKException
*/
public CreateInstancesResponse CreateInstances(CreateInstancesRequest req) throws TencentCloudSDKException {
JsonResponseModel<CreateInstancesResponse> rsp = null;
String rspStr = "";
try {
Type type = new TypeToken<JsonResponseModel<CreateInstancesResponse>>() {
}.getType();
rspStr = this.internalRequest(req, "CreateInstances");
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.JsonResponseModel in project tencentcloud-sdk-java-intl-en by TencentCloud.
the class RedisClient method DescribeBackupUrl.
/**
*This API is used to query the download address of a backup RDB (it is during beta test and can be used only after you apply for the eligibility).
* @param req DescribeBackupUrlRequest
* @return DescribeBackupUrlResponse
* @throws TencentCloudSDKException
*/
public DescribeBackupUrlResponse DescribeBackupUrl(DescribeBackupUrlRequest req) throws TencentCloudSDKException {
JsonResponseModel<DescribeBackupUrlResponse> rsp = null;
String rspStr = "";
try {
Type type = new TypeToken<JsonResponseModel<DescribeBackupUrlResponse>>() {
}.getType();
rspStr = this.internalRequest(req, "DescribeBackupUrl");
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.JsonResponseModel in project tencentcloud-sdk-java-intl-en by TencentCloud.
the class RedisClient method ApplyParamsTemplate.
/**
*This API is used to apply a parameter template to instances.
* @param req ApplyParamsTemplateRequest
* @return ApplyParamsTemplateResponse
* @throws TencentCloudSDKException
*/
public ApplyParamsTemplateResponse ApplyParamsTemplate(ApplyParamsTemplateRequest req) throws TencentCloudSDKException {
JsonResponseModel<ApplyParamsTemplateResponse> rsp = null;
String rspStr = "";
try {
Type type = new TypeToken<JsonResponseModel<ApplyParamsTemplateResponse>>() {
}.getType();
rspStr = this.internalRequest(req, "ApplyParamsTemplate");
rsp = gson.fromJson(rspStr, type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException("response message: " + rspStr + ".\n Error message: " + e.getMessage());
}
return rsp.response;
}
Aggregations