
com.tencentcloudapi.tcaplusdb.v20190823.TcaplusdbClient Maven / Gradle / Ivy
/*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tencentcloudapi.tcaplusdb.v20190823;
import java.lang.reflect.Type;
import com.google.gson.JsonSyntaxException;
import com.google.gson.reflect.TypeToken;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import com.tencentcloudapi.common.AbstractClient;
import com.tencentcloudapi.common.profile.ClientProfile;
import com.tencentcloudapi.common.JsonResponseModel;
import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.tcaplusdb.v20190823.models.*;
public class TcaplusdbClient extends AbstractClient{
private static String endpoint = "tcaplusdb.tencentcloudapi.com";
private static String version = "2019-08-23";
public TcaplusdbClient(Credential credential, String region) {
this(credential, region, new ClientProfile());
}
public TcaplusdbClient(Credential credential, String region, ClientProfile profile) {
super(TcaplusdbClient.endpoint, TcaplusdbClient.version, credential, region, profile);
}
/**
*根据给定的表信息,清除表数据。
* @param req ClearTablesRequest
* @return ClearTablesResponse
* @throws TencentCloudSDKException
*/
public ClearTablesResponse ClearTables(ClearTablesRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "ClearTables"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*选中目标表格,上传并校验改表文件,返回是否允许修改表格结构的结果。
* @param req CompareIdlFilesRequest
* @return CompareIdlFilesResponse
* @throws TencentCloudSDKException
*/
public CompareIdlFilesResponse CompareIdlFiles(CompareIdlFilesRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "CompareIdlFiles"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*用户创建备份任务
* @param req CreateBackupRequest
* @return CreateBackupResponse
* @throws TencentCloudSDKException
*/
public CreateBackupResponse CreateBackup(CreateBackupRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "CreateBackup"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*本接口用于创建TcaplusDB集群
* @param req CreateClusterRequest
* @return CreateClusterResponse
* @throws TencentCloudSDKException
*/
public CreateClusterResponse CreateCluster(CreateClusterRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "CreateCluster"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*在TcaplusDB集群下创建表格组
* @param req CreateTableGroupRequest
* @return CreateTableGroupResponse
* @throws TencentCloudSDKException
*/
public CreateTableGroupResponse CreateTableGroup(CreateTableGroupRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "CreateTableGroup"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*根据选择的IDL文件列表,批量创建表格
* @param req CreateTablesRequest
* @return CreateTablesResponse
* @throws TencentCloudSDKException
*/
public CreateTablesResponse CreateTables(CreateTablesRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "CreateTables"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*删除TcaplusDB集群,必须在集群所属所有资源(包括表格组,表)都已经释放的情况下才会成功。
* @param req DeleteClusterRequest
* @return DeleteClusterResponse
* @throws TencentCloudSDKException
*/
public DeleteClusterResponse DeleteCluster(DeleteClusterRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DeleteCluster"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*指定集群ID和待删除IDL文件的信息,删除目标文件,如果文件正在被表关联则删除失败。
* @param req DeleteIdlFilesRequest
* @return DeleteIdlFilesResponse
* @throws TencentCloudSDKException
*/
public DeleteIdlFilesResponse DeleteIdlFiles(DeleteIdlFilesRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DeleteIdlFiles"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*删除表格组
* @param req DeleteTableGroupRequest
* @return DeleteTableGroupResponse
* @throws TencentCloudSDKException
*/
public DeleteTableGroupResponse DeleteTableGroup(DeleteTableGroupRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DeleteTableGroup"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*根据指定的表信息删除目标表
* @param req DeleteTablesRequest
* @return DeleteTablesResponse
* @throws TencentCloudSDKException
*/
public DeleteTablesResponse DeleteTables(DeleteTablesRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DeleteTables"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*查询TcaplusDB集群列表,包含集群详细信息。
* @param req DescribeClustersRequest
* @return DescribeClustersResponse
* @throws TencentCloudSDKException
*/
public DescribeClustersResponse DescribeClusters(DescribeClustersRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeClusters"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*查询表描述文件详情
* @param req DescribeIdlFileInfosRequest
* @return DescribeIdlFileInfosResponse
* @throws TencentCloudSDKException
*/
public DescribeIdlFileInfosResponse DescribeIdlFileInfos(DescribeIdlFileInfosRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeIdlFileInfos"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*查询TcaplusDB服务支持的地域列表
* @param req DescribeRegionsRequest
* @return DescribeRegionsResponse
* @throws TencentCloudSDKException
*/
public DescribeRegionsResponse DescribeRegions(DescribeRegionsRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeRegions"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*查询表格组列表
* @param req DescribeTableGroupsRequest
* @return DescribeTableGroupsResponse
* @throws TencentCloudSDKException
*/
public DescribeTableGroupsResponse DescribeTableGroups(DescribeTableGroupsRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeTableGroups"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*查询表详情
* @param req DescribeTablesRequest
* @return DescribeTablesResponse
* @throws TencentCloudSDKException
*/
public DescribeTablesResponse DescribeTables(DescribeTablesRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeTables"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*查询回收站中的表详情
* @param req DescribeTablesInRecycleRequest
* @return DescribeTablesInRecycleResponse
* @throws TencentCloudSDKException
*/
public DescribeTablesInRecycleResponse DescribeTablesInRecycle(DescribeTablesInRecycleRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeTablesInRecycle"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*查询任务列表
* @param req DescribeTasksRequest
* @return DescribeTasksResponse
* @throws TencentCloudSDKException
*/
public DescribeTasksResponse DescribeTasks(DescribeTasksRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeTasks"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*查询本用户是否在白名单中,控制是否能创建TDR类型的APP或表
* @param req DescribeUinInWhitelistRequest
* @return DescribeUinInWhitelistResponse
* @throws TencentCloudSDKException
*/
public DescribeUinInWhitelistResponse DescribeUinInWhitelist(DescribeUinInWhitelistRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeUinInWhitelist"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*修改指定的应用名称
* @param req ModifyAppNameRequest
* @return ModifyAppNameResponse
* @throws TencentCloudSDKException
*/
public ModifyAppNameResponse ModifyAppName(ModifyAppNameRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "ModifyAppName"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*修改指定的集群名称
* @param req ModifyClusterNameRequest
* @return ModifyClusterNameResponse
* @throws TencentCloudSDKException
*/
public ModifyClusterNameResponse ModifyClusterName(ModifyClusterNameRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "ModifyClusterName"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*修改指定集群的密码,后台将在旧密码失效之前同时支持TcaplusDB SDK使用旧密码和新密码访问数据库。在旧密码失效之前不能提交新的密码修改请求,在旧密码失效之后不能提交修改旧密码过期时间的请求。
* @param req ModifyClusterPasswordRequest
* @return ModifyClusterPasswordResponse
* @throws TencentCloudSDKException
*/
public ModifyClusterPasswordResponse ModifyClusterPassword(ModifyClusterPasswordRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "ModifyClusterPassword"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*修改TcaplusDB表格组名称
* @param req ModifyTableGroupNameRequest
* @return ModifyTableGroupNameResponse
* @throws TencentCloudSDKException
*/
public ModifyTableGroupNameResponse ModifyTableGroupName(ModifyTableGroupNameRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "ModifyTableGroupName"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*修改表备注信息
* @param req ModifyTableMemosRequest
* @return ModifyTableMemosResponse
* @throws TencentCloudSDKException
*/
public ModifyTableMemosResponse ModifyTableMemos(ModifyTableMemosRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "ModifyTableMemos"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*表格扩缩容
* @param req ModifyTableQuotasRequest
* @return ModifyTableQuotasResponse
* @throws TencentCloudSDKException
*/
public ModifyTableQuotasResponse ModifyTableQuotas(ModifyTableQuotasRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "ModifyTableQuotas"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*根据用户选定的表定义IDL文件,批量修改指定的表
* @param req ModifyTablesRequest
* @return ModifyTablesResponse
* @throws TencentCloudSDKException
*/
public ModifyTablesResponse ModifyTables(ModifyTablesRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "ModifyTables"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*恢复回收站中,用户自行删除的表。对欠费待释放的表无效。
* @param req RecoverRecycleTablesRequest
* @return RecoverRecycleTablesResponse
* @throws TencentCloudSDKException
*/
public RecoverRecycleTablesResponse RecoverRecycleTables(RecoverRecycleTablesRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "RecoverRecycleTables"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*表格数据回档
* @param req RollbackTablesRequest
* @return RollbackTablesResponse
* @throws TencentCloudSDKException
*/
public RollbackTablesResponse RollbackTables(RollbackTablesRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "RollbackTables"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*上传并校验创建表格文件,返回校验合法的表格定义
* @param req VerifyIdlFilesRequest
* @return VerifyIdlFilesResponse
* @throws TencentCloudSDKException
*/
public VerifyIdlFilesResponse VerifyIdlFiles(VerifyIdlFilesRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "VerifyIdlFiles"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy