use of com.tencentcloudapi.common.exception.TencentCloudSDKException in project tencentcloud-sdk-java-intl-en by TencentCloud.
the class VpcClient method DisassociateNetworkAclSubnets.
/**
*This API is used to disassociate a network ACL from subnets in a VPC instance.
* @param req DisassociateNetworkAclSubnetsRequest
* @return DisassociateNetworkAclSubnetsResponse
* @throws TencentCloudSDKException
*/
public DisassociateNetworkAclSubnetsResponse DisassociateNetworkAclSubnets(DisassociateNetworkAclSubnetsRequest req) throws TencentCloudSDKException {
JsonResponseModel<DisassociateNetworkAclSubnetsResponse> rsp = null;
String rspStr = "";
try {
Type type = new TypeToken<JsonResponseModel<DisassociateNetworkAclSubnetsResponse>>() {
}.getType();
rspStr = this.internalRequest(req, "DisassociateNetworkAclSubnets");
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 VpcClient method DeleteNatGatewayDestinationIpPortTranslationNatRule.
/**
*This API (DeleteNatGatewayDestinationIpPortTranslationNatRule) is used to delete a port forwarding rule for a NAT gateway.
* @param req DeleteNatGatewayDestinationIpPortTranslationNatRuleRequest
* @return DeleteNatGatewayDestinationIpPortTranslationNatRuleResponse
* @throws TencentCloudSDKException
*/
public DeleteNatGatewayDestinationIpPortTranslationNatRuleResponse DeleteNatGatewayDestinationIpPortTranslationNatRule(DeleteNatGatewayDestinationIpPortTranslationNatRuleRequest req) throws TencentCloudSDKException {
JsonResponseModel<DeleteNatGatewayDestinationIpPortTranslationNatRuleResponse> rsp = null;
String rspStr = "";
try {
Type type = new TypeToken<JsonResponseModel<DeleteNatGatewayDestinationIpPortTranslationNatRuleResponse>>() {
}.getType();
rspStr = this.internalRequest(req, "DeleteNatGatewayDestinationIpPortTranslationNatRule");
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 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.exception.TencentCloudSDKException 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.exception.TencentCloudSDKException 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;
}
Aggregations