/*
* Copyright (c) 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.
*/
namespace TencentCloud.Cis.V20180408
{
using Newtonsoft.Json;
using System.Threading.Tasks;
using TencentCloud.Common;
using TencentCloud.Common.Profile;
using TencentCloud.Cis.V20180408.Models;
public class CisClient : AbstractClient{
private const string endpoint = "cis.tencentcloudapi.com";
private const string version = "2018-04-08";
///
/// Client constructor.
///
/// Credentials.
/// Region name, such as "ap-guangzhou".
public CisClient(Credential credential, string region)
: this(credential, region, new ClientProfile())
{
}
///
/// Client Constructor.
///
/// Credentials.
/// Region name, such as "ap-guangzhou".
/// Client profiles.
public CisClient(Credential credential, string region, ClientProfile profile)
: base(endpoint, version, credential, region, profile)
{
}
///
/// 此接口(CreateContainerInstance)用于创建容器实例
///
///
///
public async Task CreateContainerInstance(CreateContainerInstanceRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "CreateContainerInstance");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 此接口(CreateContainerInstance)用于创建容器实例
///
///
///
public CreateContainerInstanceResponse CreateContainerInstanceSync(CreateContainerInstanceRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "CreateContainerInstance");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 此接口(DeleteContainerInstance)用于删除容器实例
///
///
///
public async Task DeleteContainerInstance(DeleteContainerInstanceRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DeleteContainerInstance");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 此接口(DeleteContainerInstance)用于删除容器实例
///
///
///
public DeleteContainerInstanceResponse DeleteContainerInstanceSync(DeleteContainerInstanceRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DeleteContainerInstance");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 此接口(DescribeContainerInstance)用于获取容器实例详情
///
///
///
public async Task DescribeContainerInstance(DescribeContainerInstanceRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DescribeContainerInstance");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 此接口(DescribeContainerInstance)用于获取容器实例详情
///
///
///
public DescribeContainerInstanceResponse DescribeContainerInstanceSync(DescribeContainerInstanceRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DescribeContainerInstance");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 此接口(DescribeContainerInstanceEvents)用于查询容器实例事件列表
///
///
///
public async Task DescribeContainerInstanceEvents(DescribeContainerInstanceEventsRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DescribeContainerInstanceEvents");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 此接口(DescribeContainerInstanceEvents)用于查询容器实例事件列表
///
///
///
public DescribeContainerInstanceEventsResponse DescribeContainerInstanceEventsSync(DescribeContainerInstanceEventsRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DescribeContainerInstanceEvents");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 此接口(DescribeContainerInstances)查询容器实例列表
///
///
///
public async Task DescribeContainerInstances(DescribeContainerInstancesRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DescribeContainerInstances");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 此接口(DescribeContainerInstances)查询容器实例列表
///
///
///
public DescribeContainerInstancesResponse DescribeContainerInstancesSync(DescribeContainerInstancesRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DescribeContainerInstances");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 此接口(DescribeContainerLog)用于获取容器日志信息
///
///
///
public async Task DescribeContainerLog(DescribeContainerLogRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DescribeContainerLog");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 此接口(DescribeContainerLog)用于获取容器日志信息
///
///
///
public DescribeContainerLogResponse DescribeContainerLogSync(DescribeContainerLogRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DescribeContainerLog");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 此接口(InquiryPriceCreateCis)用于查询容器实例价格
///
///
///
public async Task InquiryPriceCreateCis(InquiryPriceCreateCisRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "InquiryPriceCreateCis");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 此接口(InquiryPriceCreateCis)用于查询容器实例价格
///
///
///
public InquiryPriceCreateCisResponse InquiryPriceCreateCisSync(InquiryPriceCreateCisRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "InquiryPriceCreateCis");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
}
}