
com.tencentcloudapi.clb.v20180317.ClbClient 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.clb.v20180317;
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.clb.v20180317.models.*;
public class ClbClient extends AbstractClient{
private static String endpoint = "clb.tencentcloudapi.com";
private static String version = "2018-03-17";
public ClbClient(Credential credential, String region) {
this(credential, region, new ClientProfile());
}
public ClbClient(Credential credential, String region, ClientProfile profile) {
super(ClbClient.endpoint, ClbClient.version, credential, region, profile);
}
/**
*本接口(AssociateTargetGroups)用来将目标组绑定到负载均衡的监听器(四层协议)或转发规则(七层协议)上。
本接口为异步接口,本接口返回成功后需以返回的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
* @param req AssociateTargetGroupsRequest
* @return AssociateTargetGroupsResponse
* @throws TencentCloudSDKException
*/
public AssociateTargetGroupsResponse AssociateTargetGroups(AssociateTargetGroupsRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "AssociateTargetGroups"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*用户需要先创建出一个HTTPS:443监听器,并在其下创建转发规则。通过调用本接口,系统会自动创建出一个HTTP:80监听器(如果之前不存在),并在其下创建转发规则,与HTTPS:443监听器下的Domains(在入参中指定)对应。创建成功后可以通过HTTP:80地址自动跳转为HTTPS:443地址进行访问。
本接口为异步接口,本接口返回成功后需以返回的RequestID为入参,调用DescribeTaskStatus接口查询本次任务是否成功。
* @param req AutoRewriteRequest
* @return AutoRewriteResponse
* @throws TencentCloudSDKException
*/
public AutoRewriteResponse AutoRewrite(AutoRewriteRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "AutoRewrite"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*批量解绑四七层后端服务。
* @param req BatchDeregisterTargetsRequest
* @return BatchDeregisterTargetsResponse
* @throws TencentCloudSDKException
*/
public BatchDeregisterTargetsResponse BatchDeregisterTargets(BatchDeregisterTargetsRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "BatchDeregisterTargets"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*本接口(BatchModifyTargetWeight)用于批量修改负载均衡监听器绑定的后端机器的转发权重,支持负载均衡的4层和7层监听器;不支持传统型负载均衡。
本接口为异步接口,本接口返回成功后需以返回的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
* @param req BatchModifyTargetWeightRequest
* @return BatchModifyTargetWeightResponse
* @throws TencentCloudSDKException
*/
public BatchModifyTargetWeightResponse BatchModifyTargetWeight(BatchModifyTargetWeightRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "BatchModifyTargetWeight"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*批量绑定虚拟主机或弹性网卡,支持跨域绑定,支持四层、七层(TCP、UDP、HTTP、HTTPS)协议绑定。
* @param req BatchRegisterTargetsRequest
* @return BatchRegisterTargetsResponse
* @throws TencentCloudSDKException
*/
public BatchRegisterTargetsResponse BatchRegisterTargets(BatchRegisterTargetsRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "BatchRegisterTargets"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*在一个负载均衡实例下创建监听器。
本接口为异步接口,接口返回成功后,需以返回的 RequestId 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
* @param req CreateListenerRequest
* @return CreateListenerResponse
* @throws TencentCloudSDKException
*/
public CreateListenerResponse CreateListener(CreateListenerRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "CreateListener"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*本接口(CreateLoadBalancer)用来创建负载均衡实例(本接口只支持购买按量计费的负载均衡,包年包月的负载均衡请通过控制台购买)。为了使用负载均衡服务,您必须购买一个或多个负载均衡实例。成功调用该接口后,会返回负载均衡实例的唯一 ID。负载均衡实例的类型分为:公网、内网。详情可参考产品说明中的产品类型。
注意:(1)指定可用区申请负载均衡、跨zone容灾(仅香港支持)【如果您需要体验该功能,请通过 [工单申请](https://console.cloud.tencent.com/workorder/category)】;(2)目前只有北京、上海、广州支持IPv6;(3)一个账号在每个地域的默认购买配额为:公网100个,内网100个。
本接口为异步接口,接口成功返回后,可使用 DescribeLoadBalancers 接口查询负载均衡实例的状态(如创建中、正常),以确定是否创建成功。
* @param req CreateLoadBalancerRequest
* @return CreateLoadBalancerResponse
* @throws TencentCloudSDKException
*/
public CreateLoadBalancerResponse CreateLoadBalancer(CreateLoadBalancerRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "CreateLoadBalancer"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*针对SnatPro负载均衡,这个接口用于添加SnatIp,如果负载均衡没有开启SnatPro,添加SnatIp后会自动开启
* @param req CreateLoadBalancerSnatIpsRequest
* @return CreateLoadBalancerSnatIpsResponse
* @throws TencentCloudSDKException
*/
public CreateLoadBalancerSnatIpsResponse CreateLoadBalancerSnatIps(CreateLoadBalancerSnatIpsRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "CreateLoadBalancerSnatIps"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*CreateRule 接口用于在一个已存在的负载均衡七层监听器下创建转发规则,七层监听器中,后端服务必须绑定到规则上而非监听器上。
本接口为异步接口,本接口返回成功后需以返回的RequestID为入参,调用DescribeTaskStatus接口查询本次任务是否成功。
* @param req CreateRuleRequest
* @return CreateRuleResponse
* @throws TencentCloudSDKException
*/
public CreateRuleResponse CreateRule(CreateRuleRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "CreateRule"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*创建目标组。(目标组功能正在灰度中,需要开通白名单支持)
* @param req CreateTargetGroupRequest
* @return CreateTargetGroupResponse
* @throws TencentCloudSDKException
*/
public CreateTargetGroupResponse CreateTargetGroup(CreateTargetGroupRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "CreateTargetGroup"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*本接口用来删除负载均衡实例下的监听器(四层和七层)。
本接口为异步接口,接口返回成功后,需以得到的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
* @param req DeleteListenerRequest
* @return DeleteListenerResponse
* @throws TencentCloudSDKException
*/
public DeleteListenerResponse DeleteListener(DeleteListenerRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DeleteListener"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*DeleteLoadBalancer 接口用以删除指定的一个或多个负载均衡实例。
本接口为异步接口,接口返回成功后,需以返回的 RequestId 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
* @param req DeleteLoadBalancerRequest
* @return DeleteLoadBalancerResponse
* @throws TencentCloudSDKException
*/
public DeleteLoadBalancerResponse DeleteLoadBalancer(DeleteLoadBalancerRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DeleteLoadBalancer"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*该接口支持删除负载均衡的多个监听器。
本接口为异步接口,本接口返回成功后需以返回的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
* @param req DeleteLoadBalancerListenersRequest
* @return DeleteLoadBalancerListenersResponse
* @throws TencentCloudSDKException
*/
public DeleteLoadBalancerListenersResponse DeleteLoadBalancerListeners(DeleteLoadBalancerListenersRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DeleteLoadBalancerListeners"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*对于SnatPro的负载均衡,这个接口用于删除SnatIp
* @param req DeleteLoadBalancerSnatIpsRequest
* @return DeleteLoadBalancerSnatIpsResponse
* @throws TencentCloudSDKException
*/
public DeleteLoadBalancerSnatIpsResponse DeleteLoadBalancerSnatIps(DeleteLoadBalancerSnatIpsRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DeleteLoadBalancerSnatIps"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*DeleteRewrite 接口支持删除指定转发规则之间的重定向关系。
本接口为异步接口,本接口返回成功后需以返回的RequestID为入参,调用DescribeTaskStatus接口查询本次任务是否成功。
* @param req DeleteRewriteRequest
* @return DeleteRewriteResponse
* @throws TencentCloudSDKException
*/
public DeleteRewriteResponse DeleteRewrite(DeleteRewriteRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DeleteRewrite"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*DeleteRule 接口用来删除负载均衡实例七层监听器下的转发规则。
本接口为异步接口,本接口返回成功后需以返回的RequestID为入参,调用DescribeTaskStatus接口查询本次任务是否成功。
* @param req DeleteRuleRequest
* @return DeleteRuleResponse
* @throws TencentCloudSDKException
*/
public DeleteRuleResponse DeleteRule(DeleteRuleRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DeleteRule"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*删除目标组
* @param req DeleteTargetGroupsRequest
* @return DeleteTargetGroupsResponse
* @throws TencentCloudSDKException
*/
public DeleteTargetGroupsResponse DeleteTargetGroups(DeleteTargetGroupsRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DeleteTargetGroups"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*将服务器从目标组中解绑。
本接口为异步接口,本接口返回成功后需以返回的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
* @param req DeregisterTargetGroupInstancesRequest
* @return DeregisterTargetGroupInstancesResponse
* @throws TencentCloudSDKException
*/
public DeregisterTargetGroupInstancesResponse DeregisterTargetGroupInstances(DeregisterTargetGroupInstancesRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DeregisterTargetGroupInstances"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*DeregisterTargets 接口用来将一台或多台后端服务从负载均衡的监听器或转发规则上解绑,对于四层监听器,只需指定监听器ID即可,对于七层监听器,还需通过LocationId或Domain+Url指定转发规则。
本接口为异步接口,本接口返回成功后需以返回的RequestID为入参,调用DescribeTaskStatus接口查询本次任务是否成功。
* @param req DeregisterTargetsRequest
* @return DeregisterTargetsResponse
* @throws TencentCloudSDKException
*/
public DeregisterTargetsResponse DeregisterTargets(DeregisterTargetsRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DeregisterTargets"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*DeregisterTargetsFromClassicalLB 接口用于解绑负载均衡后端服务。
本接口为异步接口,接口返回成功后,需以返回的 RequestId 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
* @param req DeregisterTargetsFromClassicalLBRequest
* @return DeregisterTargetsFromClassicalLBResponse
* @throws TencentCloudSDKException
*/
public DeregisterTargetsFromClassicalLBResponse DeregisterTargetsFromClassicalLB(DeregisterTargetsFromClassicalLBRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DeregisterTargetsFromClassicalLB"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*查询一个负载均衡所封禁的IP列表(黑名单)。(接口灰度中,如需使用请提工单)
* @param req DescribeBlockIPListRequest
* @return DescribeBlockIPListResponse
* @throws TencentCloudSDKException
*/
public DescribeBlockIPListResponse DescribeBlockIPList(DescribeBlockIPListRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeBlockIPList"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*根据 ModifyBlockIPList 接口返回的异步任务的ID,查询封禁IP(黑名单)异步任务的执行状态。(接口灰度中,如需使用请提工单)
* @param req DescribeBlockIPTaskRequest
* @return DescribeBlockIPTaskResponse
* @throws TencentCloudSDKException
*/
public DescribeBlockIPTaskResponse DescribeBlockIPTask(DescribeBlockIPTaskRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeBlockIPTask"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*DescribeClassicalLBByInstanceId用于通过后端实例ID获取传统型负载均衡ID列表
* @param req DescribeClassicalLBByInstanceIdRequest
* @return DescribeClassicalLBByInstanceIdResponse
* @throws TencentCloudSDKException
*/
public DescribeClassicalLBByInstanceIdResponse DescribeClassicalLBByInstanceId(DescribeClassicalLBByInstanceIdRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeClassicalLBByInstanceId"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*DescribeClassicalLBHealthStatus用于获取传统型负载均衡后端的健康状态
* @param req DescribeClassicalLBHealthStatusRequest
* @return DescribeClassicalLBHealthStatusResponse
* @throws TencentCloudSDKException
*/
public DescribeClassicalLBHealthStatusResponse DescribeClassicalLBHealthStatus(DescribeClassicalLBHealthStatusRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeClassicalLBHealthStatus"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*DescribeClassicalLBListeners 接口用于获取传统型负载均衡的监听器信息。
* @param req DescribeClassicalLBListenersRequest
* @return DescribeClassicalLBListenersResponse
* @throws TencentCloudSDKException
*/
public DescribeClassicalLBListenersResponse DescribeClassicalLBListeners(DescribeClassicalLBListenersRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeClassicalLBListeners"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*DescribeClassicalLBTargets用于获取传统型负载均衡绑定的后端服务
* @param req DescribeClassicalLBTargetsRequest
* @return DescribeClassicalLBTargetsResponse
* @throws TencentCloudSDKException
*/
public DescribeClassicalLBTargetsResponse DescribeClassicalLBTargets(DescribeClassicalLBTargetsRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeClassicalLBTargets"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*DescribeListeners 接口可根据负载均衡器 ID,监听器的协议或端口作为过滤条件获取监听器列表。如果不指定任何过滤条件,则返回该负载均衡实例下的所有监听器。
* @param req DescribeListenersRequest
* @return DescribeListenersResponse
* @throws TencentCloudSDKException
*/
public DescribeListenersResponse DescribeListeners(DescribeListenersRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeListeners"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*根据证书ID查询其在一个地域中所关联到负载均衡实例列表
* @param req DescribeLoadBalancerListByCertIdRequest
* @return DescribeLoadBalancerListByCertIdResponse
* @throws TencentCloudSDKException
*/
public DescribeLoadBalancerListByCertIdResponse DescribeLoadBalancerListByCertId(DescribeLoadBalancerListByCertIdRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeLoadBalancerListByCertId"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*查询一个地域的负载均衡实例列表
* @param req DescribeLoadBalancersRequest
* @return DescribeLoadBalancersResponse
* @throws TencentCloudSDKException
*/
public DescribeLoadBalancersResponse DescribeLoadBalancers(DescribeLoadBalancersRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeLoadBalancers"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*DescribeRewrite 接口可根据负载均衡实例ID,查询一个负载均衡实例下转发规则的重定向关系。如果不指定监听器ID或转发规则ID,则返回该负载均衡实例下的所有重定向关系。
* @param req DescribeRewriteRequest
* @return DescribeRewriteResponse
* @throws TencentCloudSDKException
*/
public DescribeRewriteResponse DescribeRewrite(DescribeRewriteRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeRewrite"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*获取目标组绑定的服务器信息
* @param req DescribeTargetGroupInstancesRequest
* @return DescribeTargetGroupInstancesResponse
* @throws TencentCloudSDKException
*/
public DescribeTargetGroupInstancesResponse DescribeTargetGroupInstances(DescribeTargetGroupInstancesRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeTargetGroupInstances"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*获取目标组列表
* @param req DescribeTargetGroupListRequest
* @return DescribeTargetGroupListResponse
* @throws TencentCloudSDKException
*/
public DescribeTargetGroupListResponse DescribeTargetGroupList(DescribeTargetGroupListRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeTargetGroupList"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*查询目标组信息
* @param req DescribeTargetGroupsRequest
* @return DescribeTargetGroupsResponse
* @throws TencentCloudSDKException
*/
public DescribeTargetGroupsResponse DescribeTargetGroups(DescribeTargetGroupsRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeTargetGroups"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*DescribeTargetHealth 接口用来获取负载均衡后端服务的健康检查结果,不支持传统型负载均衡。
* @param req DescribeTargetHealthRequest
* @return DescribeTargetHealthResponse
* @throws TencentCloudSDKException
*/
public DescribeTargetHealthResponse DescribeTargetHealth(DescribeTargetHealthRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeTargetHealth"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*DescribeTargets 接口用来查询负载均衡实例的某些监听器绑定的后端服务列表。
* @param req DescribeTargetsRequest
* @return DescribeTargetsResponse
* @throws TencentCloudSDKException
*/
public DescribeTargetsResponse DescribeTargets(DescribeTargetsRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeTargets"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*本接口用于查询异步任务的执行状态,对于非查询类的接口(创建/删除负载均衡实例、监听器、规则以及绑定或解绑后端服务等),在接口调用成功后,都需要使用本接口查询任务最终是否执行成功。
* @param req DescribeTaskStatusRequest
* @return DescribeTaskStatusResponse
* @throws TencentCloudSDKException
*/
public DescribeTaskStatusResponse DescribeTaskStatus(DescribeTaskStatusRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DescribeTaskStatus"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*解除规则的目标组关联关系。
本接口为异步接口,本接口返回成功后需以返回的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
* @param req DisassociateTargetGroupsRequest
* @return DisassociateTargetGroupsResponse
* @throws TencentCloudSDKException
*/
public DisassociateTargetGroupsResponse DisassociateTargetGroups(DisassociateTargetGroupsRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "DisassociateTargetGroups"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*用户手动配置原访问地址和重定向地址,系统自动将原访问地址的请求重定向至对应路径的目的地址。同一域名下可以配置多条路径作为重定向策略,实现http/https之间请求的自动跳转。设置重定向时,需满足如下约束条件:若A已经重定向至B,则A不能再重定向至C(除非先删除老的重定向关系,再建立新的重定向关系),B不能重定向至任何其它地址。
本接口为异步接口,本接口返回成功后需以返回的RequestID为入参,调用DescribeTaskStatus接口查询本次任务是否成功。
* @param req ManualRewriteRequest
* @return ManualRewriteResponse
* @throws TencentCloudSDKException
*/
public ManualRewriteResponse ManualRewrite(ManualRewriteRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "ManualRewrite"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*修改负载均衡的IP(client IP)封禁黑名单列表,一个转发规则最多支持封禁 2000000 个IP,及黑名单容量为 2000000。
(接口灰度中,如需使用请提工单)
* @param req ModifyBlockIPListRequest
* @return ModifyBlockIPListResponse
* @throws TencentCloudSDKException
*/
public ModifyBlockIPListResponse ModifyBlockIPList(ModifyBlockIPListRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "ModifyBlockIPList"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*ModifyDomain接口用来修改负载均衡七层监听器下的域名。
本接口为异步接口,本接口返回成功后需以返回的RequestID为入参,调用DescribeTaskStatus接口查询本次任务是否成功。
* @param req ModifyDomainRequest
* @return ModifyDomainResponse
* @throws TencentCloudSDKException
*/
public ModifyDomainResponse ModifyDomain(ModifyDomainRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "ModifyDomain"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*ModifyDomainAttributes接口用于修改负载均衡7层监听器转发规则的域名级别属性,如修改域名、修改DefaultServer、开启/关闭Http2、修改证书。
本接口为异步接口,本接口返回成功后,需以返回的RequestId为入参,调用DescribeTaskStatus接口查询本次任务是否成功。
* @param req ModifyDomainAttributesRequest
* @return ModifyDomainAttributesResponse
* @throws TencentCloudSDKException
*/
public ModifyDomainAttributesResponse ModifyDomainAttributes(ModifyDomainAttributesRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "ModifyDomainAttributes"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*ModifyListener接口用来修改负载均衡监听器的属性,包括监听器名称、健康检查参数、证书信息、转发策略等。本接口不支持传统型负载均衡。
本接口为异步接口,本接口返回成功后需以返回的RequestID为入参,调用DescribeTaskStatus接口查询本次任务是否成功。
* @param req ModifyListenerRequest
* @return ModifyListenerResponse
* @throws TencentCloudSDKException
*/
public ModifyListenerResponse ModifyListener(ModifyListenerRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "ModifyListener"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*修改负载均衡实例的属性。支持修改负载均衡实例的名称、设置负载均衡的跨域属性。
* @param req ModifyLoadBalancerAttributesRequest
* @return ModifyLoadBalancerAttributesResponse
* @throws TencentCloudSDKException
*/
public ModifyLoadBalancerAttributesResponse ModifyLoadBalancerAttributes(ModifyLoadBalancerAttributesRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "ModifyLoadBalancerAttributes"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*ModifyRule 接口用来修改负载均衡七层监听器下的转发规则的各项属性,包括转发路径、健康检查属性、转发策略等。
本接口为异步接口,本接口返回成功后需以返回的RequestID为入参,调用DescribeTaskStatus接口查询本次任务是否成功。
* @param req ModifyRuleRequest
* @return ModifyRuleResponse
* @throws TencentCloudSDKException
*/
public ModifyRuleResponse ModifyRule(ModifyRuleRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "ModifyRule"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*修改目标组的名称或者默认端口属性
* @param req ModifyTargetGroupAttributeRequest
* @return ModifyTargetGroupAttributeResponse
* @throws TencentCloudSDKException
*/
public ModifyTargetGroupAttributeResponse ModifyTargetGroupAttribute(ModifyTargetGroupAttributeRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "ModifyTargetGroupAttribute"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*批量修改目标组服务器端口。
本接口为异步接口,本接口返回成功后需以返回的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
* @param req ModifyTargetGroupInstancesPortRequest
* @return ModifyTargetGroupInstancesPortResponse
* @throws TencentCloudSDKException
*/
public ModifyTargetGroupInstancesPortResponse ModifyTargetGroupInstancesPort(ModifyTargetGroupInstancesPortRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "ModifyTargetGroupInstancesPort"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*批量修改目标组的服务器权重。
本接口为异步接口,本接口返回成功后需以返回的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
* @param req ModifyTargetGroupInstancesWeightRequest
* @return ModifyTargetGroupInstancesWeightResponse
* @throws TencentCloudSDKException
*/
public ModifyTargetGroupInstancesWeightResponse ModifyTargetGroupInstancesWeight(ModifyTargetGroupInstancesWeightRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "ModifyTargetGroupInstancesWeight"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*ModifyTargetPort接口用于修改监听器绑定的后端服务的端口。
本接口为异步接口,本接口返回成功后需以返回的RequestID为入参,调用DescribeTaskStatus接口查询本次任务是否成功。
* @param req ModifyTargetPortRequest
* @return ModifyTargetPortResponse
* @throws TencentCloudSDKException
*/
public ModifyTargetPortResponse ModifyTargetPort(ModifyTargetPortRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "ModifyTargetPort"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*ModifyTargetWeight 接口用于修改负载均衡绑定的后端服务的转发权重。
本接口为异步接口,本接口返回成功后需以返回的RequestID为入参,调用DescribeTaskStatus接口查询本次任务是否成功。
* @param req ModifyTargetWeightRequest
* @return ModifyTargetWeightResponse
* @throws TencentCloudSDKException
*/
public ModifyTargetWeightResponse ModifyTargetWeight(ModifyTargetWeightRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "ModifyTargetWeight"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*注册服务器到目标组。
本接口为异步接口,本接口返回成功后需以返回的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
* @param req RegisterTargetGroupInstancesRequest
* @return RegisterTargetGroupInstancesResponse
* @throws TencentCloudSDKException
*/
public RegisterTargetGroupInstancesResponse RegisterTargetGroupInstances(RegisterTargetGroupInstancesRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "RegisterTargetGroupInstances"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*RegisterTargets 接口用来将一台或多台后端服务绑定到负载均衡的监听器(或7层转发规则),在此之前您需要先行创建相关的4层监听器或7层转发规则。对于四层监听器(TCP、UDP),只需指定监听器ID即可,对于七层监听器(HTTP、HTTPS),还需通过LocationId或者Domain+Url指定转发规则。
本接口为异步接口,本接口返回成功后需以返回的RequestID为入参,调用DescribeTaskStatus接口查询本次任务是否成功。
* @param req RegisterTargetsRequest
* @return RegisterTargetsResponse
* @throws TencentCloudSDKException
*/
public RegisterTargetsResponse RegisterTargets(RegisterTargetsRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "RegisterTargets"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*RegisterTargetsWithClassicalLB 接口用于绑定后端服务到传统型负载均衡。
本接口为异步接口,接口返回成功后,需以返回的 RequestId 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
* @param req RegisterTargetsWithClassicalLBRequest
* @return RegisterTargetsWithClassicalLBResponse
* @throws TencentCloudSDKException
*/
public RegisterTargetsWithClassicalLBResponse RegisterTargetsWithClassicalLB(RegisterTargetsWithClassicalLBRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "RegisterTargetsWithClassicalLB"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*ReplaceCertForLoadBalancers 接口用以替换负载均衡实例所关联的证书,对于各个地域的负载均衡,如果指定的老的证书ID与其有关联关系,则会先解除关联,再建立新证书与该负载均衡的关联关系。
此接口支持替换服务端证书或客户端证书。
需要使用的新证书,可以通过传入证书ID来指定,如果不指定证书ID,则必须传入证书内容等相关信息,用以新建证书并绑定至负载均衡。
注:本接口仅可从广州地域调用。
* @param req ReplaceCertForLoadBalancersRequest
* @return ReplaceCertForLoadBalancersResponse
* @throws TencentCloudSDKException
*/
public ReplaceCertForLoadBalancersResponse ReplaceCertForLoadBalancers(ReplaceCertForLoadBalancersRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "ReplaceCertForLoadBalancers"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*SetLoadBalancerSecurityGroups 接口支持对一个公网负载均衡实例执行设置(绑定、解绑)安全组操作。查询一个负载均衡实例目前已绑定的安全组,可使用 DescribeLoadBalancers 接口。本接口是set语义,
绑定操作时,入参需要传入负载均衡实例要绑定的所有安全组(已绑定的+新增绑定的)。
解绑操作时,入参需要传入负载均衡实例执行解绑后所绑定的所有安全组;如果要解绑所有安全组,可不传此参数,或传入空数组。注意:内网负载均衡不支持绑定安全组。
* @param req SetLoadBalancerSecurityGroupsRequest
* @return SetLoadBalancerSecurityGroupsResponse
* @throws TencentCloudSDKException
*/
public SetLoadBalancerSecurityGroupsResponse SetLoadBalancerSecurityGroups(SetLoadBalancerSecurityGroupsRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "SetLoadBalancerSecurityGroups"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
/**
*绑定或解绑一个安全组到多个公网负载均衡实例。注意:内网负载均衡不支持绑定安全组。
* @param req SetSecurityGroupForLoadbalancersRequest
* @return SetSecurityGroupForLoadbalancersResponse
* @throws TencentCloudSDKException
*/
public SetSecurityGroupForLoadbalancersResponse SetSecurityGroupForLoadbalancers(SetSecurityGroupForLoadbalancersRequest req) throws TencentCloudSDKException{
JsonResponseModel rsp = null;
try {
Type type = new TypeToken>() {
}.getType();
rsp = gson.fromJson(this.internalRequest(req, "SetSecurityGroupForLoadbalancers"), type);
} catch (JsonSyntaxException e) {
throw new TencentCloudSDKException(e.getMessage());
}
return rsp.response;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy