blob: e99911af31ad13e2df7c9dd57c0fd10d48adcf1e [file] [log] [blame]
// This file is auto-generated, don't edit it. Thanks.
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using Tea;
using Tea.Utils;
using RocketMQ.Eventbridge.SDK.Models;
namespace RocketMQ.Eventbridge.SDK
{
public class SDKClient : AlibabaCloud.OpenApiClient.Client
{
public SDKClient(AlibabaCloud.OpenApiClient.Models.Config config): base(config)
{
this._endpointRule = "";
CheckConfig(config);
this._endpoint = GetEndpoint("eventbridge", _regionId, _endpointRule, _network, _suffix, _endpointMap, _endpoint);
}
public string GetEndpoint(string productId, string regionId, string endpointRule, string network, string suffix, Dictionary<string, string> endpointMap, string endpoint)
{
if (!AlibabaCloud.TeaUtil.Common.Empty(endpoint))
{
return endpoint;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(endpointMap) && !AlibabaCloud.TeaUtil.Common.Empty(endpointMap.Get(regionId)))
{
return endpointMap.Get(regionId);
}
string result = "";
if (!AlibabaCloud.TeaUtil.Common.Empty(network) && !AlibabaCloud.TeaUtil.Common.EqualString(network, "public"))
{
network = "-" + network;
}
else
{
network = "";
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(suffix))
{
suffix = "";
}
else
{
suffix = "-" + suffix;
}
if (AlibabaCloud.TeaUtil.Common.EqualString(endpointRule, "regional"))
{
if (AlibabaCloud.TeaUtil.Common.Empty(regionId))
{
throw new TeaException(new Dictionary<string, string>
{
{"message", "RegionId is empty, please set a valid RegionId"},
});
}
result = "" + productId + suffix + network + "." + regionId + ".aliyuncs.com";
}
else
{
result = "" + productId + suffix + network + ".aliyuncs.com";
}
return result;
// return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Creates an event bus.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to create an event bus.</para>
/// </description>
///
/// <param name="request">
/// CreateEventBusRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// CreateEventBusResponse
/// </returns>
public CreateEventBusResponse CreateEventBusWithOptions(CreateEventBusRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description))
{
body["description"] = request.Description;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName))
{
body["eventBusName"] = request.EventBusName;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "CreateEventBus",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/bus/createEventBus",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<CreateEventBusResponse>(CallApi(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Creates an event bus.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to create an event bus.</para>
/// </description>
///
/// <param name="request">
/// CreateEventBusRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// CreateEventBusResponse
/// </returns>
public async Task<CreateEventBusResponse> CreateEventBusWithOptionsAsync(CreateEventBusRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description))
{
body["description"] = request.Description;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName))
{
body["eventBusName"] = request.EventBusName;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "CreateEventBus",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/bus/createEventBus",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<CreateEventBusResponse>(await CallApiAsync(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Creates an event bus.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to create an event bus.</para>
/// </description>
///
/// <param name="request">
/// CreateEventBusRequest
/// </param>
///
/// <returns>
/// CreateEventBusResponse
/// </returns>
public CreateEventBusResponse CreateEventBus(CreateEventBusRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return CreateEventBusWithOptions(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Creates an event bus.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to create an event bus.</para>
/// </description>
///
/// <param name="request">
/// CreateEventBusRequest
/// </param>
///
/// <returns>
/// CreateEventBusResponse
/// </returns>
public async Task<CreateEventBusResponse> CreateEventBusAsync(CreateEventBusRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return await CreateEventBusWithOptionsAsync(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries the detailed information about an event bus.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query the detailed information about an event bus.</para>
/// </description>
///
/// <param name="request">
/// GetEventBusRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// GetEventBusResponse
/// </returns>
public GetEventBusResponse GetEventBusWithOptions(GetEventBusRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName))
{
body["eventBusName"] = request.EventBusName;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "GetEventBus",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/bus/getEventBus",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<GetEventBusResponse>(CallApi(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries the detailed information about an event bus.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query the detailed information about an event bus.</para>
/// </description>
///
/// <param name="request">
/// GetEventBusRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// GetEventBusResponse
/// </returns>
public async Task<GetEventBusResponse> GetEventBusWithOptionsAsync(GetEventBusRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName))
{
body["eventBusName"] = request.EventBusName;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "GetEventBus",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/bus/getEventBus",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<GetEventBusResponse>(await CallApiAsync(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries the detailed information about an event bus.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query the detailed information about an event bus.</para>
/// </description>
///
/// <param name="request">
/// GetEventBusRequest
/// </param>
///
/// <returns>
/// GetEventBusResponse
/// </returns>
public GetEventBusResponse GetEventBus(GetEventBusRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return GetEventBusWithOptions(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries the detailed information about an event bus.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query the detailed information about an event bus.</para>
/// </description>
///
/// <param name="request">
/// GetEventBusRequest
/// </param>
///
/// <returns>
/// GetEventBusResponse
/// </returns>
public async Task<GetEventBusResponse> GetEventBusAsync(GetEventBusRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return await GetEventBusWithOptionsAsync(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries all event buses.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query all event buses.</para>
/// </description>
///
/// <param name="request">
/// ListEventBusesRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// ListEventBusesResponse
/// </returns>
public ListEventBusesResponse ListEventBusesWithOptions(ListEventBusesRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.MaxResults))
{
body["maxResults"] = request.MaxResults;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NextToken))
{
body["nextToken"] = request.NextToken;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "ListEventBuses",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/bus/listEventBuses",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<ListEventBusesResponse>(CallApi(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries all event buses.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query all event buses.</para>
/// </description>
///
/// <param name="request">
/// ListEventBusesRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// ListEventBusesResponse
/// </returns>
public async Task<ListEventBusesResponse> ListEventBusesWithOptionsAsync(ListEventBusesRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.MaxResults))
{
body["maxResults"] = request.MaxResults;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NextToken))
{
body["nextToken"] = request.NextToken;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "ListEventBuses",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/bus/listEventBuses",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<ListEventBusesResponse>(await CallApiAsync(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries all event buses.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query all event buses.</para>
/// </description>
///
/// <param name="request">
/// ListEventBusesRequest
/// </param>
///
/// <returns>
/// ListEventBusesResponse
/// </returns>
public ListEventBusesResponse ListEventBuses(ListEventBusesRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return ListEventBusesWithOptions(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries all event buses.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query all event buses.</para>
/// </description>
///
/// <param name="request">
/// ListEventBusesRequest
/// </param>
///
/// <returns>
/// ListEventBusesResponse
/// </returns>
public async Task<ListEventBusesResponse> ListEventBusesAsync(ListEventBusesRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return await ListEventBusesWithOptionsAsync(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Deletes an event bus.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to delete an event bus.</para>
/// </description>
///
/// <param name="request">
/// DeleteEventBusRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// DeleteEventBusResponse
/// </returns>
public DeleteEventBusResponse DeleteEventBusWithOptions(DeleteEventBusRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName))
{
body["eventBusName"] = request.EventBusName;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "DeleteEventBus",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/bus/deleteEventBus",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<DeleteEventBusResponse>(CallApi(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Deletes an event bus.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to delete an event bus.</para>
/// </description>
///
/// <param name="request">
/// DeleteEventBusRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// DeleteEventBusResponse
/// </returns>
public async Task<DeleteEventBusResponse> DeleteEventBusWithOptionsAsync(DeleteEventBusRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName))
{
body["eventBusName"] = request.EventBusName;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "DeleteEventBus",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/bus/deleteEventBus",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<DeleteEventBusResponse>(await CallApiAsync(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Deletes an event bus.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to delete an event bus.</para>
/// </description>
///
/// <param name="request">
/// DeleteEventBusRequest
/// </param>
///
/// <returns>
/// DeleteEventBusResponse
/// </returns>
public DeleteEventBusResponse DeleteEventBus(DeleteEventBusRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return DeleteEventBusWithOptions(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Deletes an event bus.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to delete an event bus.</para>
/// </description>
///
/// <param name="request">
/// DeleteEventBusRequest
/// </param>
///
/// <returns>
/// DeleteEventBusResponse
/// </returns>
public async Task<DeleteEventBusResponse> DeleteEventBusAsync(DeleteEventBusRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return await DeleteEventBusWithOptionsAsync(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Creates an API destination.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to create an API destination.</para>
/// </description>
///
/// <param name="request">
/// CreateApiDestinationRequest (tmpReq before)
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// CreateApiDestinationResponse
/// </returns>
public CreateApiDestinationResponse CreateApiDestinationWithOptions(CreateApiDestinationRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ApiDestinationName))
{
body["apiDestinationName"] = request.ApiDestinationName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName))
{
body["connectionName"] = request.ConnectionName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description))
{
body["description"] = request.Description;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.HttpApiParameters))
{
body["httpApiParameters"] = request.HttpApiParameters;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.InvocationRateLimitPerSecond))
{
body["invocationRateLimitPerSecond"] = request.InvocationRateLimitPerSecond;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "CreateApiDestination",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/api-destination/createApiDestination",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<CreateApiDestinationResponse>(CallApi(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Creates an API destination.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to create an API destination.</para>
/// </description>
///
/// <param name="request">
/// CreateApiDestinationRequest (tmpReq before)
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// CreateApiDestinationResponse
/// </returns>
public async Task<CreateApiDestinationResponse> CreateApiDestinationWithOptionsAsync(CreateApiDestinationRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ApiDestinationName))
{
body["apiDestinationName"] = request.ApiDestinationName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName))
{
body["connectionName"] = request.ConnectionName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description))
{
body["description"] = request.Description;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.HttpApiParameters))
{
body["httpApiParameters"] = request.HttpApiParameters;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.InvocationRateLimitPerSecond))
{
body["invocationRateLimitPerSecond"] = request.InvocationRateLimitPerSecond;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "CreateApiDestination",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/api-destination/createApiDestination",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<CreateApiDestinationResponse>(await CallApiAsync(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Creates an API destination.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to create an API destination.</para>
/// </description>
///
/// <param name="request">
/// CreateApiDestinationRequest
/// </param>
///
/// <returns>
/// CreateApiDestinationResponse
/// </returns>
public CreateApiDestinationResponse CreateApiDestination(CreateApiDestinationRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return CreateApiDestinationWithOptions(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Creates an API destination.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to create an API destination.</para>
/// </description>
///
/// <param name="request">
/// CreateApiDestinationRequest
/// </param>
///
/// <returns>
/// CreateApiDestinationResponse
/// </returns>
public async Task<CreateApiDestinationResponse> CreateApiDestinationAsync(CreateApiDestinationRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return await CreateApiDestinationWithOptionsAsync(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Updates an API destination.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to update an API destination.</para>
/// </description>
///
/// <param name="request">
/// UpdateApiDestinationRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// UpdateApiDestinationResponse
/// </returns>
public UpdateApiDestinationResponse UpdateApiDestinationWithOptions(UpdateApiDestinationRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ApiDestinationName))
{
body["apiDestinationName"] = request.ApiDestinationName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName))
{
body["connectionName"] = request.ConnectionName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description))
{
body["description"] = request.Description;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.HttpApiParameters))
{
body["httpApiParameters"] = request.HttpApiParameters;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.InvocationRateLimitPerSecond))
{
body["invocationRateLimitPerSecond"] = request.InvocationRateLimitPerSecond;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "UpdateApiDestination",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/api-destination/updateApiDestination",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<UpdateApiDestinationResponse>(CallApi(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Updates an API destination.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to update an API destination.</para>
/// </description>
///
/// <param name="request">
/// UpdateApiDestinationRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// UpdateApiDestinationResponse
/// </returns>
public async Task<UpdateApiDestinationResponse> UpdateApiDestinationWithOptionsAsync(UpdateApiDestinationRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ApiDestinationName))
{
body["apiDestinationName"] = request.ApiDestinationName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName))
{
body["connectionName"] = request.ConnectionName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description))
{
body["description"] = request.Description;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.HttpApiParameters))
{
body["httpApiParameters"] = request.HttpApiParameters;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.InvocationRateLimitPerSecond))
{
body["invocationRateLimitPerSecond"] = request.InvocationRateLimitPerSecond;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "UpdateApiDestination",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/api-destination/updateApiDestination",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<UpdateApiDestinationResponse>(await CallApiAsync(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Updates an API destination.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to update an API destination.</para>
/// </description>
///
/// <param name="request">
/// UpdateApiDestinationRequest
/// </param>
///
/// <returns>
/// UpdateApiDestinationResponse
/// </returns>
public UpdateApiDestinationResponse UpdateApiDestination(UpdateApiDestinationRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return UpdateApiDestinationWithOptions(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Updates an API destination.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to update an API destination.</para>
/// </description>
///
/// <param name="request">
/// UpdateApiDestinationRequest
/// </param>
///
/// <returns>
/// UpdateApiDestinationResponse
/// </returns>
public async Task<UpdateApiDestinationResponse> UpdateApiDestinationAsync(UpdateApiDestinationRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return await UpdateApiDestinationWithOptionsAsync(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries the information about an API destination.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query the information about an API destination.</para>
/// </description>
///
/// <param name="request">
/// GetApiDestinationRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// GetApiDestinationResponse
/// </returns>
public GetApiDestinationResponse GetApiDestinationWithOptions(GetApiDestinationRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ApiDestinationName))
{
body["apiDestinationName"] = request.ApiDestinationName;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "GetApiDestination",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/api-destination/getApiDestination",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<GetApiDestinationResponse>(CallApi(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries the information about an API destination.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query the information about an API destination.</para>
/// </description>
///
/// <param name="request">
/// GetApiDestinationRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// GetApiDestinationResponse
/// </returns>
public async Task<GetApiDestinationResponse> GetApiDestinationWithOptionsAsync(GetApiDestinationRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ApiDestinationName))
{
body["apiDestinationName"] = request.ApiDestinationName;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "GetApiDestination",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/api-destination/getApiDestination",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<GetApiDestinationResponse>(await CallApiAsync(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries the information about an API destination.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query the information about an API destination.</para>
/// </description>
///
/// <param name="request">
/// GetApiDestinationRequest
/// </param>
///
/// <returns>
/// GetApiDestinationResponse
/// </returns>
public GetApiDestinationResponse GetApiDestination(GetApiDestinationRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return GetApiDestinationWithOptions(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries the information about an API destination.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query the information about an API destination.</para>
/// </description>
///
/// <param name="request">
/// GetApiDestinationRequest
/// </param>
///
/// <returns>
/// GetApiDestinationResponse
/// </returns>
public async Task<GetApiDestinationResponse> GetApiDestinationAsync(GetApiDestinationRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return await GetApiDestinationWithOptionsAsync(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Deletes an API destination.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to delete an API destination.</para>
/// </description>
///
/// <param name="request">
/// DeleteApiDestinationRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// DeleteApiDestinationResponse
/// </returns>
public DeleteApiDestinationResponse DeleteApiDestinationWithOptions(DeleteApiDestinationRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ApiDestinationName))
{
body["apiDestinationName"] = request.ApiDestinationName;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "DeleteApiDestination",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/api-destination/deleteApiDestination",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<DeleteApiDestinationResponse>(CallApi(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Deletes an API destination.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to delete an API destination.</para>
/// </description>
///
/// <param name="request">
/// DeleteApiDestinationRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// DeleteApiDestinationResponse
/// </returns>
public async Task<DeleteApiDestinationResponse> DeleteApiDestinationWithOptionsAsync(DeleteApiDestinationRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ApiDestinationName))
{
body["apiDestinationName"] = request.ApiDestinationName;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "DeleteApiDestination",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/api-destination/deleteApiDestination",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<DeleteApiDestinationResponse>(await CallApiAsync(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Deletes an API destination.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to delete an API destination.</para>
/// </description>
///
/// <param name="request">
/// DeleteApiDestinationRequest
/// </param>
///
/// <returns>
/// DeleteApiDestinationResponse
/// </returns>
public DeleteApiDestinationResponse DeleteApiDestination(DeleteApiDestinationRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return DeleteApiDestinationWithOptions(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Deletes an API destination.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to delete an API destination.</para>
/// </description>
///
/// <param name="request">
/// DeleteApiDestinationRequest
/// </param>
///
/// <returns>
/// DeleteApiDestinationResponse
/// </returns>
public async Task<DeleteApiDestinationResponse> DeleteApiDestinationAsync(DeleteApiDestinationRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return await DeleteApiDestinationWithOptionsAsync(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries a list of API destinations.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can use this API operation to query a list of API destinations.</para>
/// </description>
///
/// <param name="request">
/// ListApiDestinationsRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// ListApiDestinationsResponse
/// </returns>
public ListApiDestinationsResponse ListApiDestinationsWithOptions(ListApiDestinationsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ApiDestinationNamePrefix))
{
body["apiDestinationNamePrefix"] = request.ApiDestinationNamePrefix;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName))
{
body["connectionName"] = request.ConnectionName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.MaxResults))
{
body["maxResults"] = request.MaxResults;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NextToken))
{
body["nextToken"] = request.NextToken;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "ListApiDestinations",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/api-destination/listApiDestinations",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<ListApiDestinationsResponse>(CallApi(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries a list of API destinations.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can use this API operation to query a list of API destinations.</para>
/// </description>
///
/// <param name="request">
/// ListApiDestinationsRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// ListApiDestinationsResponse
/// </returns>
public async Task<ListApiDestinationsResponse> ListApiDestinationsWithOptionsAsync(ListApiDestinationsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ApiDestinationNamePrefix))
{
body["apiDestinationNamePrefix"] = request.ApiDestinationNamePrefix;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName))
{
body["connectionName"] = request.ConnectionName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.MaxResults))
{
body["maxResults"] = request.MaxResults;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NextToken))
{
body["nextToken"] = request.NextToken;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "ListApiDestinations",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/api-destination/listApiDestinations",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<ListApiDestinationsResponse>(await CallApiAsync(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries a list of API destinations.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can use this API operation to query a list of API destinations.</para>
/// </description>
///
/// <param name="request">
/// ListApiDestinationsRequest
/// </param>
///
/// <returns>
/// ListApiDestinationsResponse
/// </returns>
public ListApiDestinationsResponse ListApiDestinations(ListApiDestinationsRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return ListApiDestinationsWithOptions(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries a list of API destinations.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can use this API operation to query a list of API destinations.</para>
/// </description>
///
/// <param name="request">
/// ListApiDestinationsRequest
/// </param>
///
/// <returns>
/// ListApiDestinationsResponse
/// </returns>
public async Task<ListApiDestinationsResponse> ListApiDestinationsAsync(ListApiDestinationsRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return await ListApiDestinationsWithOptionsAsync(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Creates a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to create a connection.</para>
/// </description>
///
/// <param name="request">
/// CreateConnectionRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// CreateConnectionResponse
/// </returns>
public CreateConnectionResponse CreateConnectionWithOptions(CreateConnectionRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.AuthParameters))
{
body["authParameters"] = request.AuthParameters;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName))
{
body["connectionName"] = request.ConnectionName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description))
{
body["description"] = request.Description;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NetworkParameters))
{
body["networkParameters"] = request.NetworkParameters;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "CreateConnection",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/connection/createConnection",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<CreateConnectionResponse>(CallApi(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Creates a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to create a connection.</para>
/// </description>
///
/// <param name="request">
/// CreateConnectionRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// CreateConnectionResponse
/// </returns>
public async Task<CreateConnectionResponse> CreateConnectionWithOptionsAsync(CreateConnectionRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.AuthParameters))
{
body["authParameters"] = request.AuthParameters;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName))
{
body["connectionName"] = request.ConnectionName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description))
{
body["description"] = request.Description;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NetworkParameters))
{
body["networkParameters"] = request.NetworkParameters;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "CreateConnection",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/connection/createConnection",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<CreateConnectionResponse>(await CallApiAsync(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Creates a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to create a connection.</para>
/// </description>
///
/// <param name="request">
/// CreateConnectionRequest
/// </param>
///
/// <returns>
/// CreateConnectionResponse
/// </returns>
public CreateConnectionResponse CreateConnection(CreateConnectionRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return CreateConnectionWithOptions(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Creates a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to create a connection.</para>
/// </description>
///
/// <param name="request">
/// CreateConnectionRequest
/// </param>
///
/// <returns>
/// CreateConnectionResponse
/// </returns>
public async Task<CreateConnectionResponse> CreateConnectionAsync(CreateConnectionRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return await CreateConnectionWithOptionsAsync(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Deletes a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to delete a connection.</para>
/// </description>
///
/// <param name="request">
/// DeleteConnectionRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// DeleteConnectionResponse
/// </returns>
public DeleteConnectionResponse DeleteConnectionWithOptions(DeleteConnectionRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName))
{
body["connectionName"] = request.ConnectionName;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "DeleteConnection",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/connection/deleteConnection",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<DeleteConnectionResponse>(CallApi(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Deletes a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to delete a connection.</para>
/// </description>
///
/// <param name="request">
/// DeleteConnectionRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// DeleteConnectionResponse
/// </returns>
public async Task<DeleteConnectionResponse> DeleteConnectionWithOptionsAsync(DeleteConnectionRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName))
{
body["connectionName"] = request.ConnectionName;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "DeleteConnection",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/connection/deleteConnection",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<DeleteConnectionResponse>(await CallApiAsync(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Deletes a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to delete a connection.</para>
/// </description>
///
/// <param name="request">
/// DeleteConnectionRequest
/// </param>
///
/// <returns>
/// DeleteConnectionResponse
/// </returns>
public DeleteConnectionResponse DeleteConnection(DeleteConnectionRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return DeleteConnectionWithOptions(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Deletes a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to delete a connection.</para>
/// </description>
///
/// <param name="request">
/// DeleteConnectionRequest
/// </param>
///
/// <returns>
/// DeleteConnectionResponse
/// </returns>
public async Task<DeleteConnectionResponse> DeleteConnectionAsync(DeleteConnectionRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return await DeleteConnectionWithOptionsAsync(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Updates a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to update a connection.</para>
/// </description>
///
/// <param name="request">
/// UpdateConnectionRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// UpdateConnectionResponse
/// </returns>
public UpdateConnectionResponse UpdateConnectionWithOptions(UpdateConnectionRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.AuthParameters))
{
body["authParameters"] = request.AuthParameters;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName))
{
body["connectionName"] = request.ConnectionName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description))
{
body["description"] = request.Description;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NetworkParameters))
{
body["networkParameters"] = request.NetworkParameters;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "UpdateConnection",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/connection/updateConnection",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<UpdateConnectionResponse>(CallApi(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Updates a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to update a connection.</para>
/// </description>
///
/// <param name="request">
/// UpdateConnectionRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// UpdateConnectionResponse
/// </returns>
public async Task<UpdateConnectionResponse> UpdateConnectionWithOptionsAsync(UpdateConnectionRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.AuthParameters))
{
body["authParameters"] = request.AuthParameters;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName))
{
body["connectionName"] = request.ConnectionName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description))
{
body["description"] = request.Description;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NetworkParameters))
{
body["networkParameters"] = request.NetworkParameters;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "UpdateConnection",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/connection/updateConnection",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<UpdateConnectionResponse>(await CallApiAsync(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Updates a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to update a connection.</para>
/// </description>
///
/// <param name="request">
/// UpdateConnectionRequest
/// </param>
///
/// <returns>
/// UpdateConnectionResponse
/// </returns>
public UpdateConnectionResponse UpdateConnection(UpdateConnectionRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return UpdateConnectionWithOptions(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Updates a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to update a connection.</para>
/// </description>
///
/// <param name="request">
/// UpdateConnectionRequest
/// </param>
///
/// <returns>
/// UpdateConnectionResponse
/// </returns>
public async Task<UpdateConnectionResponse> UpdateConnectionAsync(UpdateConnectionRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return await UpdateConnectionWithOptionsAsync(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries the configurations of a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query the configurations of a connection.</para>
/// </description>
///
/// <param name="request">
/// GetConnectionRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// GetConnectionResponse
/// </returns>
public GetConnectionResponse GetConnectionWithOptions(GetConnectionRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName))
{
body["connectionName"] = request.ConnectionName;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "GetConnection",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/connection/getConnection",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<GetConnectionResponse>(CallApi(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries the configurations of a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query the configurations of a connection.</para>
/// </description>
///
/// <param name="request">
/// GetConnectionRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// GetConnectionResponse
/// </returns>
public async Task<GetConnectionResponse> GetConnectionWithOptionsAsync(GetConnectionRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName))
{
body["connectionName"] = request.ConnectionName;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "GetConnection",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/connection/getConnection",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<GetConnectionResponse>(await CallApiAsync(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries the configurations of a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query the configurations of a connection.</para>
/// </description>
///
/// <param name="request">
/// GetConnectionRequest
/// </param>
///
/// <returns>
/// GetConnectionResponse
/// </returns>
public GetConnectionResponse GetConnection(GetConnectionRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return GetConnectionWithOptions(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries the configurations of a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query the configurations of a connection.</para>
/// </description>
///
/// <param name="request">
/// GetConnectionRequest
/// </param>
///
/// <returns>
/// GetConnectionResponse
/// </returns>
public async Task<GetConnectionResponse> GetConnectionAsync(GetConnectionRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return await GetConnectionWithOptionsAsync(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries the configurations of a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query the configurations of a connection.</para>
/// </description>
///
/// <param name="request">
/// GetConnectionRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// GetConnectionResponse
/// </returns>
public GetConnectionResponse SelectOneConnectionWithOptions(GetConnectionRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName))
{
body["connectionName"] = request.ConnectionName;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "selectOneConnection",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/connection/selectOneConnection",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<GetConnectionResponse>(CallApi(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries the configurations of a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query the configurations of a connection.</para>
/// </description>
///
/// <param name="request">
/// GetConnectionRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// GetConnectionResponse
/// </returns>
public async Task<GetConnectionResponse> SelectOneConnectionWithOptionsAsync(GetConnectionRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName))
{
body["connectionName"] = request.ConnectionName;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "selectOneConnection",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/connection/selectOneConnection",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<GetConnectionResponse>(await CallApiAsync(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries the configurations of a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query the configurations of a connection.</para>
/// </description>
///
/// <param name="request">
/// GetConnectionRequest
/// </param>
///
/// <returns>
/// GetConnectionResponse
/// </returns>
public GetConnectionResponse SelectOneConnection(GetConnectionRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return SelectOneConnectionWithOptions(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries the configurations of a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query the configurations of a connection.</para>
/// </description>
///
/// <param name="request">
/// GetConnectionRequest
/// </param>
///
/// <returns>
/// GetConnectionResponse
/// </returns>
public async Task<GetConnectionResponse> SelectOneConnectionAsync(GetConnectionRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return await SelectOneConnectionWithOptionsAsync(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries connections.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query connections.</para>
/// </description>
///
/// <param name="request">
/// ListConnectionsRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// ListConnectionsResponse
/// </returns>
public ListConnectionsResponse ListConnectionsWithOptions(ListConnectionsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionNamePrefix))
{
body["connectionNamePrefix"] = request.ConnectionNamePrefix;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.MaxResults))
{
body["maxResults"] = request.MaxResults;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NextToken))
{
body["nextToken"] = request.NextToken;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "ListConnections",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/connection/listConnections",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<ListConnectionsResponse>(CallApi(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries connections.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query connections.</para>
/// </description>
///
/// <param name="request">
/// ListConnectionsRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// ListConnectionsResponse
/// </returns>
public async Task<ListConnectionsResponse> ListConnectionsWithOptionsAsync(ListConnectionsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionNamePrefix))
{
body["connectionNamePrefix"] = request.ConnectionNamePrefix;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.MaxResults))
{
body["maxResults"] = request.MaxResults;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NextToken))
{
body["nextToken"] = request.NextToken;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "ListConnections",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/connection/listConnections",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<ListConnectionsResponse>(await CallApiAsync(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>list connections.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to list connections.</para>
/// </description>
///
/// <param name="request">
/// ListConnectionsRequest
/// </param>
///
/// <returns>
/// ListConnectionsResponse
/// </returns>
public ListConnectionsResponse ListConnections(ListConnectionsRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return ListConnectionsWithOptions(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>list connections.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to list connections.</para>
/// </description>
///
/// <param name="request">
/// ListConnectionsRequest
/// </param>
///
/// <returns>
/// ListConnectionsResponse
/// </returns>
public async Task<ListConnectionsResponse> ListConnectionsAsync(ListConnectionsRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return await ListConnectionsWithOptionsAsync(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Updates a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to update a connection.</para>
/// </description>
///
/// <returns>
/// ListEnumsResponseResponse
/// </returns>
public ListEnumsResponseResponse ListEnumsResponse()
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
Dictionary<string, object> body = new Dictionary<string, object>(){};
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "listEnumsResponse",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/connection/listEnumsResponse",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<ListEnumsResponseResponse>(CallApi(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Updates a connection.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to update a connection.</para>
/// </description>
///
/// <returns>
/// ListEnumsResponseResponse
/// </returns>
public async Task<ListEnumsResponseResponse> ListEnumsResponseAsync()
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
Dictionary<string, object> body = new Dictionary<string, object>(){};
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "listEnumsResponse",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/connection/listEnumsResponse",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<ListEnumsResponseResponse>(await CallApiAsync(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries the content of an event.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query the content of an event.</para>
/// </description>
///
/// <param name="request">
/// PutEventsRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// PutEventsResponse
/// </returns>
public PutEventsResponse PutEventsWithOptions(PutEventsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, string> headers = new Dictionary<string, string>
{
{"ce-specversion", "1.0"},
{"ce-type", "com.github.pull_request.opened"},
{"ce-source", "https://github.com/cloudevents/spec/pull"},
{"ce-subject", "demo"},
{"ce-id", "1234-1234-1234"},
{"ce-datacontenttype", "application/json"},
{"ce-time", "2024-07-01T17:31:00Z"},
{"ce-eventbusname", "demo-bus"},
};
string body = "{}";
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName))
{
headers["ce-eventbusname"] = request.EventBusName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Event))
{
body = request.Event;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = body,
Headers = headers,
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "putEvents",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/putEvents",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<PutEventsResponse>(CallApi(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries the content of an event.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query the content of an event.</para>
/// </description>
///
/// <param name="request">
/// PutEventsRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// PutEventsResponse
/// </returns>
public async Task<PutEventsResponse> PutEventsWithOptionsAsync(PutEventsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, string> headers = new Dictionary<string, string>
{
{"ce-specversion", "1.0"},
{"ce-type", "com.github.pull_request.opened"},
{"ce-source", "https://github.com/cloudevents/spec/pull"},
{"ce-subject", "demo"},
{"ce-id", "1234-1234-1234"},
{"ce-datacontenttype", "application/json"},
{"ce-time", "2024-07-01T17:31:00Z"},
{"ce-eventbusname", "demo-bus"},
};
string body = "{}";
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName))
{
headers["ce-eventbusname"] = request.EventBusName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Event))
{
body = request.Event;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = body,
Headers = headers,
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "putEvents",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/putEvents",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<PutEventsResponse>(await CallApiAsync(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries the content of an event.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query the content of an event.</para>
/// </description>
///
/// <param name="request">
/// PutEventsRequest
/// </param>
///
/// <returns>
/// PutEventsResponse
/// </returns>
public PutEventsResponse PutEvents(PutEventsRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return PutEventsWithOptions(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Queries the content of an event.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this API operation to query the content of an event.</para>
/// </description>
///
/// <param name="request">
/// PutEventsRequest
/// </param>
///
/// <returns>
/// PutEventsResponse
/// </returns>
public async Task<PutEventsResponse> PutEventsAsync(PutEventsRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return await PutEventsWithOptionsAsync(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Creates an event rule.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this operation to create an event rule.</para>
/// </description>
///
/// <param name="request">
/// CreateEventRuleRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// CreateEventRuleResponse
/// </returns>
public CreateEventRuleResponse CreateEventRuleWithOptions(CreateEventRuleRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName))
{
body["eventBusName"] = request.EventBusName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName))
{
body["eventRuleName"] = request.EventRuleName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description))
{
body["description"] = request.Description;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.FilterPattern))
{
body["filterPattern"] = request.FilterPattern;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "CreateEventRule",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/rule/createEventRule",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<CreateEventRuleResponse>(CallApi(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Creates an event rule.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this operation to create an event rule.</para>
/// </description>
///
/// <param name="request">
/// CreateEventRuleRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// CreateEventRuleResponse
/// </returns>
public async Task<CreateEventRuleResponse> CreateEventRuleWithOptionsAsync(CreateEventRuleRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName))
{
body["eventBusName"] = request.EventBusName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName))
{
body["eventRuleName"] = request.EventRuleName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description))
{
body["description"] = request.Description;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.FilterPattern))
{
body["filterPattern"] = request.FilterPattern;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "CreateEventRule",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/rule/createEventRule",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<CreateEventRuleResponse>(await CallApiAsync(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Creates an event rule.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this operation to create an event rule.</para>
/// </description>
///
/// <param name="request">
/// CreateEventRuleRequest
/// </param>
///
/// <returns>
/// CreateEventRuleResponse
/// </returns>
public CreateEventRuleResponse CreateEventRule(CreateEventRuleRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return CreateEventRuleWithOptions(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Creates an event rule.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this operation to create an event rule.</para>
/// </description>
///
/// <param name="request">
/// CreateEventRuleRequest
/// </param>
///
/// <returns>
/// CreateEventRuleResponse
/// </returns>
public async Task<CreateEventRuleResponse> CreateEventRuleAsync(CreateEventRuleRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return await CreateEventRuleWithOptionsAsync(request, runtime);
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Gets an event rule.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this operation to get an event rule.</para>
/// </description>
///
/// <param name="request">
/// GetEventRuleRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// GetEventRuleResponse
/// </returns>
public GetEventRuleResponse GetEventRuleWithOptions(GetEventRuleRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName))
{
body["eventBusName"] = request.EventBusName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName))
{
body["eventRuleName"] = request.EventRuleName;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "GetEventRule",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/rule/getEventRule",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<GetEventRuleResponse>(CallApi(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Gets an event rule.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this operation to get an event rule.</para>
/// </description>
///
/// <param name="request">
/// GetEventRuleRequest
/// </param>
/// <param name="runtime">
/// runtime options for this request RuntimeOptions
/// </param>
///
/// <returns>
/// GetEventRuleResponse
/// </returns>
public async Task<GetEventRuleResponse> GetEventRuleWithOptionsAsync(GetEventRuleRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
Dictionary<string, object> body = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName))
{
body["eventBusName"] = request.EventBusName;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName))
{
body["eventRuleName"] = request.EventRuleName;
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "GetEventRule",
Version = "2024-07-01",
Protocol = "HTTP",
Pathname = "/rule/getEventRule",
Method = "POST",
AuthType = "Anonymous",
Style = "RPC",
ReqBodyType = "json",
BodyType = "json",
};
return TeaModel.ToObject<GetEventRuleResponse>(await CallApiAsync(params_, req, runtime));
}
/// <term><b>Summary:</b></term>
/// <summary>
/// <para>Gets an event rule.</para>
/// </summary>
///
/// <term><b>Description:</b></term>
/// <description>
/// <para>You can call this operation to get an event rule.</para>
/// </description>
///
/// <param name="request">
/// GetEventRuleRequest
/// </param>
///
/// <returns>
/// GetEventRuleResponse
/// </returns>
public GetEventRuleResponse GetEventRule(GetEventRuleRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
return GetEventRuleWithOptions(request, runtime);
}