com.tencentcloudapi.dbbrain.v20191016.DbbrainClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tencentcloud-sdk-java-intl-en Show documentation
Show all versions of tencentcloud-sdk-java-intl-en Show documentation
Tencent Cloud API SDK for Java
/*
* 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.dbbrain.v20191016;
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.dbbrain.v20191016.models.*;
public class DbbrainClient extends AbstractClient{
private static String endpoint = "dbbrain.tencentcloudapi.com";
private static String service = "dbbrain";
private static String version = "2019-10-16";
public DbbrainClient(Credential credential, String region) {
this(credential, region, new ClientProfile());
}
public DbbrainClient(Credential credential, String region, ClientProfile profile) {
super(DbbrainClient.endpoint, DbbrainClient.version, credential, region, profile);
}
/**
*This API is used to add the contact name and email.. The return value is the successfully added contact ID. Select Guangzhou for Region.
* @param req AddUserContactRequest
* @return AddUserContactResponse
* @throws TencentCloudSDKException
*/
public AddUserContactResponse AddUserContact(AddUserContactRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "AddUserContact", AddUserContactResponse.class);
}
/**
*This API is used to create a health report and send it via email as configured.
* @param req CreateDBDiagReportTaskRequest
* @return CreateDBDiagReportTaskResponse
* @throws TencentCloudSDKException
*/
public CreateDBDiagReportTaskResponse CreateDBDiagReportTask(CreateDBDiagReportTaskRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "CreateDBDiagReportTask", CreateDBDiagReportTaskResponse.class);
}
/**
*This API is used to create a URL for a health report.
* @param req CreateDBDiagReportUrlRequest
* @return CreateDBDiagReportUrlResponse
* @throws TencentCloudSDKException
*/
public CreateDBDiagReportUrlResponse CreateDBDiagReportUrl(CreateDBDiagReportUrlRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "CreateDBDiagReportUrl", CreateDBDiagReportUrlResponse.class);
}
/**
*This API is used to create the email configuration. The input parameter `ProfileType` represents the type of the email configuration. Valid values: `dbScan_mail_configuration` (email configuration of database inspection report) and `scheduler_mail_configuration` (email sending configuration of regularly generated health report). Select Guangzhou for Region, regardless of the region where the instance belongs.
* @param req CreateMailProfileRequest
* @return CreateMailProfileResponse
* @throws TencentCloudSDKException
*/
public CreateMailProfileResponse CreateMailProfile(CreateMailProfileRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "CreateMailProfile", CreateMailProfileResponse.class);
}
/**
*This API is used to create the regular generation time of the health reports and the regular email sending configuration. Pass in the regular generation time of the health reports as a parameter (Monday to Sunday) to set the regular generation time of the health reports, and save the corresponding regular email sending configuration.
* @param req CreateSchedulerMailProfileRequest
* @return CreateSchedulerMailProfileResponse
* @throws TencentCloudSDKException
*/
public CreateSchedulerMailProfileResponse CreateSchedulerMailProfile(CreateSchedulerMailProfileRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "CreateSchedulerMailProfile", CreateSchedulerMailProfileResponse.class);
}
/**
*This API is used to obtain the information of the contact in the email.
* @param req DescribeAllUserContactRequest
* @return DescribeAllUserContactResponse
* @throws TencentCloudSDKException
*/
public DescribeAllUserContactResponse DescribeAllUserContact(DescribeAllUserContactRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeAllUserContact", DescribeAllUserContactResponse.class);
}
/**
*This API is used to obtain the information of the contact group in the email.
* @param req DescribeAllUserGroupRequest
* @return DescribeAllUserGroupResponse
* @throws TencentCloudSDKException
*/
public DescribeAllUserGroupResponse DescribeAllUserGroup(DescribeAllUserGroupRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeAllUserGroup", DescribeAllUserGroupResponse.class);
}
/**
*This API is used to get the details of an instance exception diagnosis event.
* @param req DescribeDBDiagEventRequest
* @return DescribeDBDiagEventResponse
* @throws TencentCloudSDKException
*/
public DescribeDBDiagEventResponse DescribeDBDiagEvent(DescribeDBDiagEventRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeDBDiagEvent", DescribeDBDiagEventResponse.class);
}
/**
*This API is used to get the list of instance diagnosis events.
* @param req DescribeDBDiagHistoryRequest
* @return DescribeDBDiagHistoryResponse
* @throws TencentCloudSDKException
*/
public DescribeDBDiagHistoryResponse DescribeDBDiagHistory(DescribeDBDiagHistoryRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeDBDiagHistory", DescribeDBDiagHistoryResponse.class);
}
/**
*This API is used to query the list of health report generation tasks.
* @param req DescribeDBDiagReportTasksRequest
* @return DescribeDBDiagReportTasksResponse
* @throws TencentCloudSDKException
*/
public DescribeDBDiagReportTasksResponse DescribeDBDiagReportTasks(DescribeDBDiagReportTasksRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeDBDiagReportTasks", DescribeDBDiagReportTasksResponse.class);
}
/**
*This API is used to query the overview of instance space usage during a specified time period, including disk usage growth (MB), available disk space (MB), total disk space (MB), and estimated number of available days.
* @param req DescribeDBSpaceStatusRequest
* @return DescribeDBSpaceStatusResponse
* @throws TencentCloudSDKException
*/
public DescribeDBSpaceStatusResponse DescribeDBSpaceStatus(DescribeDBSpaceStatusRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeDBSpaceStatus", DescribeDBSpaceStatusResponse.class);
}
/**
*This API is used to obtain the instance information list. Select Guangzhou for Region.
* @param req DescribeDiagDBInstancesRequest
* @return DescribeDiagDBInstancesResponse
* @throws TencentCloudSDKException
*/
public DescribeDiagDBInstancesResponse DescribeDiagDBInstances(DescribeDiagDBInstancesRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeDiagDBInstances", DescribeDiagDBInstancesResponse.class);
}
/**
*This API is used to obtain the health score and deduction for exceptions in the specified time period (30 minutes) based on the instance ID.
* @param req DescribeHealthScoreRequest
* @return DescribeHealthScoreResponse
* @throws TencentCloudSDKException
*/
public DescribeHealthScoreResponse DescribeHealthScore(DescribeHealthScoreRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeHealthScore", DescribeHealthScoreResponse.class);
}
/**
*This API is used to obtain the email sending configurations, including the email configuration for database inspection and the email sending configuration for regularly generated health reports. Select Guangzhou for Region.
* @param req DescribeMailProfileRequest
* @return DescribeMailProfileResponse
* @throws TencentCloudSDKException
*/
public DescribeMailProfileResponse DescribeMailProfile(DescribeMailProfileRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeMailProfile", DescribeMailProfileResponse.class);
}
/**
*This API is used to get the slow log statistics histogram.
* @param req DescribeSlowLogTimeSeriesStatsRequest
* @return DescribeSlowLogTimeSeriesStatsResponse
* @throws TencentCloudSDKException
*/
public DescribeSlowLogTimeSeriesStatsResponse DescribeSlowLogTimeSeriesStats(DescribeSlowLogTimeSeriesStatsRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeSlowLogTimeSeriesStats", DescribeSlowLogTimeSeriesStatsResponse.class);
}
/**
*This API is used to get and sort the top slow SQL statements in a specified time period by the aggregation mode of SQL template plus schema.
* @param req DescribeSlowLogTopSqlsRequest
* @return DescribeSlowLogTopSqlsResponse
* @throws TencentCloudSDKException
*/
public DescribeSlowLogTopSqlsResponse DescribeSlowLogTopSqls(DescribeSlowLogTopSqlsRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeSlowLogTopSqls", DescribeSlowLogTopSqlsResponse.class);
}
/**
*This API is used to obtain the statistical distribution chart of slow log source addresses.
* @param req DescribeSlowLogUserHostStatsRequest
* @return DescribeSlowLogUserHostStatsResponse
* @throws TencentCloudSDKException
*/
public DescribeSlowLogUserHostStatsResponse DescribeSlowLogUserHostStats(DescribeSlowLogUserHostStatsRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeSlowLogUserHostStats", DescribeSlowLogUserHostStatsResponse.class);
}
/**
*This API is used to query the daily space data of top databases consuming the most instance space. The data is daily collected by DBbrain during a specified time period. The return results are sorted by size by default.
* @param req DescribeTopSpaceSchemaTimeSeriesRequest
* @return DescribeTopSpaceSchemaTimeSeriesResponse
* @throws TencentCloudSDKException
*/
public DescribeTopSpaceSchemaTimeSeriesResponse DescribeTopSpaceSchemaTimeSeries(DescribeTopSpaceSchemaTimeSeriesRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeTopSpaceSchemaTimeSeries", DescribeTopSpaceSchemaTimeSeriesResponse.class);
}
/**
*This API is used to query real-time space statistics of top databases. The return results are sorted by size by default.
* @param req DescribeTopSpaceSchemasRequest
* @return DescribeTopSpaceSchemasResponse
* @throws TencentCloudSDKException
*/
public DescribeTopSpaceSchemasResponse DescribeTopSpaceSchemas(DescribeTopSpaceSchemasRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeTopSpaceSchemas", DescribeTopSpaceSchemasResponse.class);
}
/**
*This API is used to query the daily space data of top tables consuming the most instance space. The data is daily collected by DBbrain during a specified time period. The return results are sorted by size by default.
* @param req DescribeTopSpaceTableTimeSeriesRequest
* @return DescribeTopSpaceTableTimeSeriesResponse
* @throws TencentCloudSDKException
*/
public DescribeTopSpaceTableTimeSeriesResponse DescribeTopSpaceTableTimeSeries(DescribeTopSpaceTableTimeSeriesRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeTopSpaceTableTimeSeries", DescribeTopSpaceTableTimeSeriesResponse.class);
}
/**
*This API is used to query real-time space statistics of top tables of an instance. The return results are sorted by size by default.
* @param req DescribeTopSpaceTablesRequest
* @return DescribeTopSpaceTablesResponse
* @throws TencentCloudSDKException
*/
public DescribeTopSpaceTablesResponse DescribeTopSpaceTables(DescribeTopSpaceTablesRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeTopSpaceTables", DescribeTopSpaceTablesResponse.class);
}
/**
*This API is used to obtain SQL statement optimization suggestions.
* @param req DescribeUserSqlAdviceRequest
* @return DescribeUserSqlAdviceResponse
* @throws TencentCloudSDKException
*/
public DescribeUserSqlAdviceResponse DescribeUserSqlAdvice(DescribeUserSqlAdviceRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "DescribeUserSqlAdvice", DescribeUserSqlAdviceResponse.class);
}
/**
*This API is used to enable/disable instance inspection.
* @param req ModifyDiagDBInstanceConfRequest
* @return ModifyDiagDBInstanceConfResponse
* @throws TencentCloudSDKException
*/
public ModifyDiagDBInstanceConfResponse ModifyDiagDBInstanceConf(ModifyDiagDBInstanceConfRequest req) throws TencentCloudSDKException{
req.setSkipSign(false);
return this.internalRequest(req, "ModifyDiagDBInstanceConf", ModifyDiagDBInstanceConfResponse.class);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy