oceanbasepro-20190901/Sources/AlibabacloudOceanBasePro20190901/Client.swift (6,451 lines of code) (raw):
import Foundation
import Tea
import TeaUtils
import AlibabacloudOpenApi
import AlibabaCloudOpenApiUtil
import AlibabacloudEndpointUtil
open class Client : AlibabacloudOpenApi.Client {
public override init(_ config: AlibabacloudOpenApi.Config) throws {
try super.init(config)
self._endpointRule = "regional"
try checkConfig(config as! AlibabacloudOpenApi.Config)
self._endpoint = try getEndpoint("oceanbasepro", self._regionId ?? "", self._endpointRule ?? "", self._network ?? "", self._suffix ?? "", self._endpointMap ?? [:], self._endpoint ?? "")
}
public func getEndpoint(_ productId: String, _ regionId: String, _ endpointRule: String, _ network: String, _ suffix: String, _ endpointMap: [String: String], _ endpoint: String) throws -> String {
if (!TeaUtils.Client.empty(endpoint)) {
return endpoint as! String
}
if (!TeaUtils.Client.isUnset(endpointMap) && !TeaUtils.Client.empty(endpointMap[regionId as! String])) {
return endpointMap[regionId as! String] ?? ""
}
return try AlibabacloudEndpointUtil.Client.getEndpointRules(productId, regionId, endpointRule, network, suffix)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func batchKillProcessListWithOptions(_ request: BatchKillProcessListRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> BatchKillProcessListResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.sessionList)) {
body["SessionList"] = request.sessionList ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "BatchKillProcessList",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(BatchKillProcessListResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(BatchKillProcessListResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func batchKillProcessList(_ request: BatchKillProcessListRequest) async throws -> BatchKillProcessListResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await batchKillProcessListWithOptions(request as! BatchKillProcessListRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func batchKillSessionListWithOptions(_ request: BatchKillSessionListRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> BatchKillSessionListResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.sessionList)) {
body["SessionList"] = request.sessionList ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "BatchKillSessionList",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(BatchKillSessionListResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(BatchKillSessionListResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func batchKillSessionList(_ request: BatchKillSessionListRequest) async throws -> BatchKillSessionListResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await batchKillSessionListWithOptions(request as! BatchKillSessionListRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func cancelProjectModifyRecordWithOptions(_ request: CancelProjectModifyRecordRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> CancelProjectModifyRecordResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.id)) {
body["Id"] = request.id ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CancelProjectModifyRecord",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CancelProjectModifyRecordResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CancelProjectModifyRecordResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func cancelProjectModifyRecord(_ request: CancelProjectModifyRecordRequest) async throws -> CancelProjectModifyRecordResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await cancelProjectModifyRecordWithOptions(request as! CancelProjectModifyRecordRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createBackupSetDownloadLinkWithOptions(_ request: CreateBackupSetDownloadLinkRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateBackupSetDownloadLinkResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.backupSetId)) {
body["BackupSetId"] = request.backupSetId ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateBackupSetDownloadLink",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateBackupSetDownloadLinkResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateBackupSetDownloadLinkResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createBackupSetDownloadLink(_ request: CreateBackupSetDownloadLinkRequest) async throws -> CreateBackupSetDownloadLinkResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await createBackupSetDownloadLinkWithOptions(request as! CreateBackupSetDownloadLinkRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createDatabaseWithOptions(_ request: CreateDatabaseRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateDatabaseResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["ClientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.collation)) {
body["Collation"] = request.collation ?? "";
}
if (!TeaUtils.Client.isUnset(request.databaseName)) {
body["DatabaseName"] = request.databaseName ?? "";
}
if (!TeaUtils.Client.isUnset(request.description_)) {
body["Description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.encoding)) {
body["Encoding"] = request.encoding ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateDatabase",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateDatabaseResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateDatabaseResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createDatabase(_ request: CreateDatabaseRequest) async throws -> CreateDatabaseResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await createDatabaseWithOptions(request as! CreateDatabaseRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createInstanceWithOptions(_ request: CreateInstanceRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateInstanceResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.autoRenew)) {
body["AutoRenew"] = request.autoRenew!;
}
if (!TeaUtils.Client.isUnset(request.autoRenewPeriod)) {
body["AutoRenewPeriod"] = request.autoRenewPeriod!;
}
if (!TeaUtils.Client.isUnset(request.chargeType)) {
body["ChargeType"] = request.chargeType ?? "";
}
if (!TeaUtils.Client.isUnset(request.cpuArch)) {
body["CpuArch"] = request.cpuArch ?? "";
}
if (!TeaUtils.Client.isUnset(request.diskSize)) {
body["DiskSize"] = request.diskSize!;
}
if (!TeaUtils.Client.isUnset(request.diskType)) {
body["DiskType"] = request.diskType ?? "";
}
if (!TeaUtils.Client.isUnset(request.dryRun)) {
body["DryRun"] = request.dryRun!;
}
if (!TeaUtils.Client.isUnset(request.instanceClass)) {
body["InstanceClass"] = request.instanceClass ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceName)) {
body["InstanceName"] = request.instanceName ?? "";
}
if (!TeaUtils.Client.isUnset(request.isolationOptimization)) {
body["IsolationOptimization"] = request.isolationOptimization ?? "";
}
if (!TeaUtils.Client.isUnset(request.obVersion)) {
body["ObVersion"] = request.obVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.period)) {
body["Period"] = request.period!;
}
if (!TeaUtils.Client.isUnset(request.periodUnit)) {
body["PeriodUnit"] = request.periodUnit ?? "";
}
if (!TeaUtils.Client.isUnset(request.primaryInstance)) {
body["PrimaryInstance"] = request.primaryInstance ?? "";
}
if (!TeaUtils.Client.isUnset(request.primaryRegion)) {
body["PrimaryRegion"] = request.primaryRegion ?? "";
}
if (!TeaUtils.Client.isUnset(request.replicaMode)) {
body["ReplicaMode"] = request.replicaMode ?? "";
}
if (!TeaUtils.Client.isUnset(request.resourceGroupId)) {
body["ResourceGroupId"] = request.resourceGroupId ?? "";
}
if (!TeaUtils.Client.isUnset(request.series)) {
body["Series"] = request.series ?? "";
}
if (!TeaUtils.Client.isUnset(request.zones)) {
body["Zones"] = request.zones ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateInstance",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateInstanceResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateInstanceResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createInstance(_ request: CreateInstanceRequest) async throws -> CreateInstanceResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await createInstanceWithOptions(request as! CreateInstanceRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createLabelWithOptions(_ request: CreateLabelRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateLabelResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.name)) {
body["Name"] = request.name ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateLabel",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateLabelResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateLabelResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createLabel(_ request: CreateLabelRequest) async throws -> CreateLabelResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await createLabelWithOptions(request as! CreateLabelRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createMySqlDataSourceWithOptions(_ request: CreateMySqlDataSourceRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateMySqlDataSourceResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.description_)) {
body["Description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.dgInstanceId)) {
body["DgInstanceId"] = request.dgInstanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.ip)) {
body["Ip"] = request.ip ?? "";
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["Name"] = request.name ?? "";
}
if (!TeaUtils.Client.isUnset(request.password)) {
body["Password"] = request.password ?? "";
}
if (!TeaUtils.Client.isUnset(request.port)) {
body["Port"] = request.port!;
}
if (!TeaUtils.Client.isUnset(request.schema)) {
body["Schema"] = request.schema ?? "";
}
if (!TeaUtils.Client.isUnset(request.type)) {
body["Type"] = request.type ?? "";
}
if (!TeaUtils.Client.isUnset(request.useSsl)) {
body["UseSsl"] = request.useSsl!;
}
if (!TeaUtils.Client.isUnset(request.userName)) {
body["UserName"] = request.userName ?? "";
}
if (!TeaUtils.Client.isUnset(request.vpcId)) {
body["VpcId"] = request.vpcId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateMySqlDataSource",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateMySqlDataSourceResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateMySqlDataSourceResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createMySqlDataSource(_ request: CreateMySqlDataSourceRequest) async throws -> CreateMySqlDataSourceResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await createMySqlDataSourceWithOptions(request as! CreateMySqlDataSourceRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createOceanBaseDataSourceWithOptions(_ request: CreateOceanBaseDataSourceRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateOceanBaseDataSourceResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.cluster)) {
body["Cluster"] = request.cluster ?? "";
}
if (!TeaUtils.Client.isUnset(request.configUrl)) {
body["ConfigUrl"] = request.configUrl ?? "";
}
if (!TeaUtils.Client.isUnset(request.description_)) {
body["Description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.drcPassword)) {
body["DrcPassword"] = request.drcPassword ?? "";
}
if (!TeaUtils.Client.isUnset(request.drcUserName)) {
body["DrcUserName"] = request.drcUserName ?? "";
}
if (!TeaUtils.Client.isUnset(request.innerDrcPassword)) {
body["InnerDrcPassword"] = request.innerDrcPassword ?? "";
}
if (!TeaUtils.Client.isUnset(request.ip)) {
body["Ip"] = request.ip ?? "";
}
if (!TeaUtils.Client.isUnset(request.logProxyIp)) {
body["LogProxyIp"] = request.logProxyIp ?? "";
}
if (!TeaUtils.Client.isUnset(request.logProxyPort)) {
body["LogProxyPort"] = request.logProxyPort ?? "";
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["Name"] = request.name ?? "";
}
if (!TeaUtils.Client.isUnset(request.password)) {
body["Password"] = request.password ?? "";
}
if (!TeaUtils.Client.isUnset(request.port)) {
body["Port"] = request.port!;
}
if (!TeaUtils.Client.isUnset(request.tenant)) {
body["Tenant"] = request.tenant ?? "";
}
if (!TeaUtils.Client.isUnset(request.type)) {
body["Type"] = request.type ?? "";
}
if (!TeaUtils.Client.isUnset(request.userName)) {
body["UserName"] = request.userName ?? "";
}
if (!TeaUtils.Client.isUnset(request.vpcId)) {
body["VpcId"] = request.vpcId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateOceanBaseDataSource",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateOceanBaseDataSourceResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateOceanBaseDataSourceResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createOceanBaseDataSource(_ request: CreateOceanBaseDataSourceRequest) async throws -> CreateOceanBaseDataSourceResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await createOceanBaseDataSourceWithOptions(request as! CreateOceanBaseDataSourceRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createOmsMysqlDataSourceWithOptions(_ request: CreateOmsMysqlDataSourceRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateOmsMysqlDataSourceResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.description_)) {
body["Description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.dgDatabaseId)) {
body["DgDatabaseId"] = request.dgDatabaseId ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.ip)) {
body["Ip"] = request.ip ?? "";
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["Name"] = request.name ?? "";
}
if (!TeaUtils.Client.isUnset(request.password)) {
body["Password"] = request.password ?? "";
}
if (!TeaUtils.Client.isUnset(request.port)) {
body["Port"] = request.port ?? "";
}
if (!TeaUtils.Client.isUnset(request.schema)) {
body["Schema"] = request.schema ?? "";
}
if (!TeaUtils.Client.isUnset(request.type)) {
body["Type"] = request.type ?? "";
}
if (!TeaUtils.Client.isUnset(request.username)) {
body["Username"] = request.username ?? "";
}
if (!TeaUtils.Client.isUnset(request.vpcId)) {
body["VpcId"] = request.vpcId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateOmsMysqlDataSource",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateOmsMysqlDataSourceResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateOmsMysqlDataSourceResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createOmsMysqlDataSource(_ request: CreateOmsMysqlDataSourceRequest) async throws -> CreateOmsMysqlDataSourceResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await createOmsMysqlDataSourceWithOptions(request as! CreateOmsMysqlDataSourceRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createProjectWithOptions(_ tmpReq: CreateProjectRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateProjectResponse {
try TeaUtils.Client.validateModel(tmpReq)
var request: CreateProjectShrinkRequest = CreateProjectShrinkRequest([:])
AlibabaCloudOpenApiUtil.Client.convert(tmpReq, request)
if (!TeaUtils.Client.isUnset(tmpReq.commonTransferConfig)) {
request.commonTransferConfigShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.commonTransferConfig, "CommonTransferConfig", "json")
}
if (!TeaUtils.Client.isUnset(tmpReq.fullTransferConfig)) {
request.fullTransferConfigShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.fullTransferConfig, "FullTransferConfig", "json")
}
if (!TeaUtils.Client.isUnset(tmpReq.incrTransferConfig)) {
request.incrTransferConfigShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.incrTransferConfig, "IncrTransferConfig", "json")
}
if (!TeaUtils.Client.isUnset(tmpReq.labelIds)) {
request.labelIdsShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.labelIds, "LabelIds", "json")
}
if (!TeaUtils.Client.isUnset(tmpReq.reverseIncrTransferConfig)) {
request.reverseIncrTransferConfigShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.reverseIncrTransferConfig, "ReverseIncrTransferConfig", "json")
}
if (!TeaUtils.Client.isUnset(tmpReq.structTransferConfig)) {
request.structTransferConfigShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.structTransferConfig, "StructTransferConfig", "json")
}
if (!TeaUtils.Client.isUnset(tmpReq.transferMapping)) {
request.transferMappingShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.transferMapping, "TransferMapping", "json")
}
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.commonTransferConfigShrink)) {
body["CommonTransferConfig"] = request.commonTransferConfigShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.enableFullTransfer)) {
body["EnableFullTransfer"] = request.enableFullTransfer!;
}
if (!TeaUtils.Client.isUnset(request.enableFullVerify)) {
body["EnableFullVerify"] = request.enableFullVerify!;
}
if (!TeaUtils.Client.isUnset(request.enableIncrTransfer)) {
body["EnableIncrTransfer"] = request.enableIncrTransfer!;
}
if (!TeaUtils.Client.isUnset(request.enableReverseIncrTransfer)) {
body["EnableReverseIncrTransfer"] = request.enableReverseIncrTransfer!;
}
if (!TeaUtils.Client.isUnset(request.enableStructTransfer)) {
body["EnableStructTransfer"] = request.enableStructTransfer!;
}
if (!TeaUtils.Client.isUnset(request.fullTransferConfigShrink)) {
body["FullTransferConfig"] = request.fullTransferConfigShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.id)) {
body["Id"] = request.id ?? "";
}
if (!TeaUtils.Client.isUnset(request.incrTransferConfigShrink)) {
body["IncrTransferConfig"] = request.incrTransferConfigShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.labelIdsShrink)) {
body["LabelIds"] = request.labelIdsShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["Name"] = request.name ?? "";
}
if (!TeaUtils.Client.isUnset(request.ossKey)) {
body["OssKey"] = request.ossKey ?? "";
}
if (!TeaUtils.Client.isUnset(request.reverseIncrTransferConfigShrink)) {
body["ReverseIncrTransferConfig"] = request.reverseIncrTransferConfigShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.sinkEndpointId)) {
body["SinkEndpointId"] = request.sinkEndpointId ?? "";
}
if (!TeaUtils.Client.isUnset(request.sourceEndpointId)) {
body["SourceEndpointId"] = request.sourceEndpointId ?? "";
}
if (!TeaUtils.Client.isUnset(request.structTransferConfigShrink)) {
body["StructTransferConfig"] = request.structTransferConfigShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.transferMappingShrink)) {
body["TransferMapping"] = request.transferMappingShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.type)) {
body["Type"] = request.type ?? "";
}
if (!TeaUtils.Client.isUnset(request.useOss)) {
body["UseOss"] = request.useOss!;
}
if (!TeaUtils.Client.isUnset(request.workerGradeId)) {
body["WorkerGradeId"] = request.workerGradeId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateProject",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateProjectResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateProjectResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createProject(_ request: CreateProjectRequest) async throws -> CreateProjectResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await createProjectWithOptions(request as! CreateProjectRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createProjectModifyRecordsWithOptions(_ tmpReq: CreateProjectModifyRecordsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateProjectModifyRecordsResponse {
try TeaUtils.Client.validateModel(tmpReq)
var request: CreateProjectModifyRecordsShrinkRequest = CreateProjectModifyRecordsShrinkRequest([:])
AlibabaCloudOpenApiUtil.Client.convert(tmpReq, request)
if (!TeaUtils.Client.isUnset(tmpReq.databases)) {
request.databasesShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.databases, "Databases", "json")
}
if (!TeaUtils.Client.isUnset(tmpReq.transferMapping)) {
request.transferMappingShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.transferMapping, "TransferMapping", "json")
}
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.databasesShrink)) {
body["Databases"] = request.databasesShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.id)) {
body["Id"] = request.id ?? "";
}
if (!TeaUtils.Client.isUnset(request.transferMappingShrink)) {
body["TransferMapping"] = request.transferMappingShrink ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateProjectModifyRecords",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateProjectModifyRecordsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateProjectModifyRecordsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createProjectModifyRecords(_ request: CreateProjectModifyRecordsRequest) async throws -> CreateProjectModifyRecordsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await createProjectModifyRecordsWithOptions(request as! CreateProjectModifyRecordsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createRdsPostgreSQLDataSourceWithOptions(_ request: CreateRdsPostgreSQLDataSourceRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateRdsPostgreSQLDataSourceResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.databaseName)) {
body["DatabaseName"] = request.databaseName ?? "";
}
if (!TeaUtils.Client.isUnset(request.description_)) {
body["Description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["Name"] = request.name ?? "";
}
if (!TeaUtils.Client.isUnset(request.password)) {
body["Password"] = request.password ?? "";
}
if (!TeaUtils.Client.isUnset(request.userName)) {
body["UserName"] = request.userName ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateRdsPostgreSQLDataSource",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateRdsPostgreSQLDataSourceResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateRdsPostgreSQLDataSourceResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createRdsPostgreSQLDataSource(_ request: CreateRdsPostgreSQLDataSourceRequest) async throws -> CreateRdsPostgreSQLDataSourceResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await createRdsPostgreSQLDataSourceWithOptions(request as! CreateRdsPostgreSQLDataSourceRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createSecurityIpGroupWithOptions(_ request: CreateSecurityIpGroupRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateSecurityIpGroupResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.securityIpGroupName)) {
body["SecurityIpGroupName"] = request.securityIpGroupName ?? "";
}
if (!TeaUtils.Client.isUnset(request.securityIps)) {
body["SecurityIps"] = request.securityIps ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateSecurityIpGroup",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateSecurityIpGroupResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateSecurityIpGroupResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createSecurityIpGroup(_ request: CreateSecurityIpGroupRequest) async throws -> CreateSecurityIpGroupResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await createSecurityIpGroupWithOptions(request as! CreateSecurityIpGroupRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createTagWithOptions(_ request: CreateTagRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateTagResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["ClientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.key)) {
body["Key"] = request.key ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateTag",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateTagResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateTagResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createTag(_ request: CreateTagRequest) async throws -> CreateTagResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await createTagWithOptions(request as! CreateTagRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createTagValueWithOptions(_ request: CreateTagValueRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateTagValueResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["ClientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.key)) {
body["Key"] = request.key ?? "";
}
if (!TeaUtils.Client.isUnset(request.value)) {
body["Value"] = request.value ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateTagValue",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateTagValueResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateTagValueResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createTagValue(_ request: CreateTagValueRequest) async throws -> CreateTagValueResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await createTagValueWithOptions(request as! CreateTagValueRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createTenantWithOptions(_ tmpReq: CreateTenantRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateTenantResponse {
try TeaUtils.Client.validateModel(tmpReq)
var request: CreateTenantShrinkRequest = CreateTenantShrinkRequest([:])
AlibabaCloudOpenApiUtil.Client.convert(tmpReq, request)
if (!TeaUtils.Client.isUnset(tmpReq.createParams)) {
request.createParamsShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.createParams, "CreateParams", "json")
}
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.charset)) {
body["Charset"] = request.charset ?? "";
}
if (!TeaUtils.Client.isUnset(request.cpu)) {
body["Cpu"] = request.cpu!;
}
if (!TeaUtils.Client.isUnset(request.createParamsShrink)) {
body["CreateParams"] = request.createParamsShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.description_)) {
body["Description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.logDisk)) {
body["LogDisk"] = request.logDisk!;
}
if (!TeaUtils.Client.isUnset(request.memory)) {
body["Memory"] = request.memory!;
}
if (!TeaUtils.Client.isUnset(request.primaryZone)) {
body["PrimaryZone"] = request.primaryZone ?? "";
}
if (!TeaUtils.Client.isUnset(request.readOnlyZoneList)) {
body["ReadOnlyZoneList"] = request.readOnlyZoneList ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantMode)) {
body["TenantMode"] = request.tenantMode ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantName)) {
body["TenantName"] = request.tenantName ?? "";
}
if (!TeaUtils.Client.isUnset(request.timeZone)) {
body["TimeZone"] = request.timeZone ?? "";
}
if (!TeaUtils.Client.isUnset(request.unitNum)) {
body["UnitNum"] = request.unitNum!;
}
if (!TeaUtils.Client.isUnset(request.userVSwitchId)) {
body["UserVSwitchId"] = request.userVSwitchId ?? "";
}
if (!TeaUtils.Client.isUnset(request.userVpcId)) {
body["UserVpcId"] = request.userVpcId ?? "";
}
if (!TeaUtils.Client.isUnset(request.userVpcOwnerId)) {
body["UserVpcOwnerId"] = request.userVpcOwnerId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateTenant",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateTenantResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateTenantResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createTenant(_ request: CreateTenantRequest) async throws -> CreateTenantResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await createTenantWithOptions(request as! CreateTenantRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createTenantReadOnlyConnectionWithOptions(_ request: CreateTenantReadOnlyConnectionRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateTenantReadOnlyConnectionResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
if (!TeaUtils.Client.isUnset(request.vSwitchId)) {
body["VSwitchId"] = request.vSwitchId ?? "";
}
if (!TeaUtils.Client.isUnset(request.vpcId)) {
body["VpcId"] = request.vpcId ?? "";
}
if (!TeaUtils.Client.isUnset(request.zoneId)) {
body["ZoneId"] = request.zoneId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateTenantReadOnlyConnection",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateTenantReadOnlyConnectionResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateTenantReadOnlyConnectionResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createTenantReadOnlyConnection(_ request: CreateTenantReadOnlyConnectionRequest) async throws -> CreateTenantReadOnlyConnectionResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await createTenantReadOnlyConnectionWithOptions(request as! CreateTenantReadOnlyConnectionRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createTenantSecurityIpGroupWithOptions(_ request: CreateTenantSecurityIpGroupRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateTenantSecurityIpGroupResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.securityIpGroupName)) {
body["SecurityIpGroupName"] = request.securityIpGroupName ?? "";
}
if (!TeaUtils.Client.isUnset(request.securityIps)) {
body["SecurityIps"] = request.securityIps ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateTenantSecurityIpGroup",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateTenantSecurityIpGroupResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateTenantSecurityIpGroupResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createTenantSecurityIpGroup(_ request: CreateTenantSecurityIpGroupRequest) async throws -> CreateTenantSecurityIpGroupResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await createTenantSecurityIpGroupWithOptions(request as! CreateTenantSecurityIpGroupRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createTenantUserWithOptions(_ request: CreateTenantUserRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateTenantUserResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.description_)) {
body["Description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.encryptionType)) {
body["EncryptionType"] = request.encryptionType ?? "";
}
if (!TeaUtils.Client.isUnset(request.globalPermissions)) {
body["GlobalPermissions"] = request.globalPermissions ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.roles)) {
body["Roles"] = request.roles ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
if (!TeaUtils.Client.isUnset(request.userName)) {
body["UserName"] = request.userName ?? "";
}
if (!TeaUtils.Client.isUnset(request.userPassword)) {
body["UserPassword"] = request.userPassword ?? "";
}
if (!TeaUtils.Client.isUnset(request.userType)) {
body["UserType"] = request.userType ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateTenantUser",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateTenantUserResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateTenantUserResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createTenantUser(_ request: CreateTenantUserRequest) async throws -> CreateTenantUserResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await createTenantUserWithOptions(request as! CreateTenantUserRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteDataSourceWithOptions(_ request: DeleteDataSourceRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteDataSourceResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.id)) {
body["Id"] = request.id ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DeleteDataSource",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteDataSourceResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteDataSourceResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteDataSource(_ request: DeleteDataSourceRequest) async throws -> DeleteDataSourceResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await deleteDataSourceWithOptions(request as! DeleteDataSourceRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteDatabasesWithOptions(_ request: DeleteDatabasesRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteDatabasesResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.databaseNames)) {
body["DatabaseNames"] = request.databaseNames ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DeleteDatabases",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteDatabasesResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteDatabasesResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteDatabases(_ request: DeleteDatabasesRequest) async throws -> DeleteDatabasesResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await deleteDatabasesWithOptions(request as! DeleteDatabasesRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteInstancesWithOptions(_ request: DeleteInstancesRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteInstancesResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.backupRetainMode)) {
body["BackupRetainMode"] = request.backupRetainMode ?? "";
}
if (!TeaUtils.Client.isUnset(request.dryRun)) {
body["DryRun"] = request.dryRun!;
}
if (!TeaUtils.Client.isUnset(request.instanceIds)) {
body["InstanceIds"] = request.instanceIds ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DeleteInstances",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteInstancesResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteInstancesResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteInstances(_ request: DeleteInstancesRequest) async throws -> DeleteInstancesResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await deleteInstancesWithOptions(request as! DeleteInstancesRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteProjectWithOptions(_ request: DeleteProjectRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteProjectResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.id)) {
body["Id"] = request.id ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DeleteProject",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteProjectResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteProjectResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteProject(_ request: DeleteProjectRequest) async throws -> DeleteProjectResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await deleteProjectWithOptions(request as! DeleteProjectRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteSecurityIpGroupWithOptions(_ request: DeleteSecurityIpGroupRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteSecurityIpGroupResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.securityIpGroupName)) {
body["SecurityIpGroupName"] = request.securityIpGroupName ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DeleteSecurityIpGroup",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteSecurityIpGroupResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteSecurityIpGroupResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteSecurityIpGroup(_ request: DeleteSecurityIpGroupRequest) async throws -> DeleteSecurityIpGroupResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await deleteSecurityIpGroupWithOptions(request as! DeleteSecurityIpGroupRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteTagWithOptions(_ request: DeleteTagRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteTagResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.key)) {
body["Key"] = request.key ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DeleteTag",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteTagResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteTagResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteTag(_ request: DeleteTagRequest) async throws -> DeleteTagResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await deleteTagWithOptions(request as! DeleteTagRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteTagValueWithOptions(_ request: DeleteTagValueRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteTagValueResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.key)) {
body["Key"] = request.key ?? "";
}
if (!TeaUtils.Client.isUnset(request.value)) {
body["Value"] = request.value ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DeleteTagValue",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteTagValueResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteTagValueResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteTagValue(_ request: DeleteTagValueRequest) async throws -> DeleteTagValueResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await deleteTagValueWithOptions(request as! DeleteTagValueRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteTenantSecurityIpGroupWithOptions(_ request: DeleteTenantSecurityIpGroupRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteTenantSecurityIpGroupResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.securityIpGroupName)) {
body["SecurityIpGroupName"] = request.securityIpGroupName ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DeleteTenantSecurityIpGroup",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteTenantSecurityIpGroupResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteTenantSecurityIpGroupResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteTenantSecurityIpGroup(_ request: DeleteTenantSecurityIpGroupRequest) async throws -> DeleteTenantSecurityIpGroupResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await deleteTenantSecurityIpGroupWithOptions(request as! DeleteTenantSecurityIpGroupRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteTenantUsersWithOptions(_ request: DeleteTenantUsersRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteTenantUsersResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
if (!TeaUtils.Client.isUnset(request.users)) {
body["Users"] = request.users ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DeleteTenantUsers",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteTenantUsersResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteTenantUsersResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteTenantUsers(_ request: DeleteTenantUsersRequest) async throws -> DeleteTenantUsersResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await deleteTenantUsersWithOptions(request as! DeleteTenantUsersRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteTenantsWithOptions(_ request: DeleteTenantsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteTenantsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantIds)) {
body["TenantIds"] = request.tenantIds ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DeleteTenants",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteTenantsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteTenantsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteTenants(_ request: DeleteTenantsRequest) async throws -> DeleteTenantsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await deleteTenantsWithOptions(request as! DeleteTenantsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeAnomalySQLListWithOptions(_ tmpReq: DescribeAnomalySQLListRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeAnomalySQLListResponse {
try TeaUtils.Client.validateModel(tmpReq)
var request: DescribeAnomalySQLListShrinkRequest = DescribeAnomalySQLListShrinkRequest([:])
AlibabaCloudOpenApiUtil.Client.convert(tmpReq, request)
if (!TeaUtils.Client.isUnset(tmpReq.filterCondition)) {
request.filterConditionShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.filterCondition, "FilterCondition", "json")
}
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.acceptLanguage)) {
body["AcceptLanguage"] = request.acceptLanguage ?? "";
}
if (!TeaUtils.Client.isUnset(request.dbName)) {
body["DbName"] = request.dbName ?? "";
}
if (!TeaUtils.Client.isUnset(request.endTime)) {
body["EndTime"] = request.endTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.filterConditionShrink)) {
body["FilterCondition"] = request.filterConditionShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.nodeIp)) {
body["NodeIp"] = request.nodeIp ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
body["PageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
body["PageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.SQLId)) {
body["SQLId"] = request.SQLId ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchKeyWord)) {
body["SearchKeyWord"] = request.searchKeyWord ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchParameter)) {
body["SearchParameter"] = request.searchParameter ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchRule)) {
body["SearchRule"] = request.searchRule ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchValue)) {
body["SearchValue"] = request.searchValue ?? "";
}
if (!TeaUtils.Client.isUnset(request.sortColumn)) {
body["SortColumn"] = request.sortColumn ?? "";
}
if (!TeaUtils.Client.isUnset(request.sortOrder)) {
body["SortOrder"] = request.sortOrder ?? "";
}
if (!TeaUtils.Client.isUnset(request.startTime)) {
body["StartTime"] = request.startTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeAnomalySQLList",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeAnomalySQLListResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeAnomalySQLListResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeAnomalySQLList(_ request: DescribeAnomalySQLListRequest) async throws -> DescribeAnomalySQLListResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeAnomalySQLListWithOptions(request as! DescribeAnomalySQLListRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeAvailableCpuResourceWithOptions(_ request: DescribeAvailableCpuResourceRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeAvailableCpuResourceResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.modifyType)) {
body["ModifyType"] = request.modifyType ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeAvailableCpuResource",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeAvailableCpuResourceResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeAvailableCpuResourceResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeAvailableCpuResource(_ request: DescribeAvailableCpuResourceRequest) async throws -> DescribeAvailableCpuResourceResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeAvailableCpuResourceWithOptions(request as! DescribeAvailableCpuResourceRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeAvailableMemResourceWithOptions(_ request: DescribeAvailableMemResourceRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeAvailableMemResourceResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.cpuNum)) {
body["CpuNum"] = request.cpuNum!;
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
if (!TeaUtils.Client.isUnset(request.unitNum)) {
body["UnitNum"] = request.unitNum!;
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeAvailableMemResource",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeAvailableMemResourceResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeAvailableMemResourceResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeAvailableMemResource(_ request: DescribeAvailableMemResourceRequest) async throws -> DescribeAvailableMemResourceResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeAvailableMemResourceWithOptions(request as! DescribeAvailableMemResourceRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeAvailableSpecWithOptions(_ request: DescribeAvailableSpecRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeAvailableSpecResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.spec)) {
body["Spec"] = request.spec ?? "";
}
if (!TeaUtils.Client.isUnset(request.upgradeType)) {
body["UpgradeType"] = request.upgradeType ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeAvailableSpec",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeAvailableSpecResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeAvailableSpecResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeAvailableSpec(_ request: DescribeAvailableSpecRequest) async throws -> DescribeAvailableSpecResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeAvailableSpecWithOptions(request as! DescribeAvailableSpecRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeAvailableZoneWithOptions(_ request: DescribeAvailableZoneRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeAvailableZoneResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.cpuArch)) {
body["CpuArch"] = request.cpuArch ?? "";
}
if (!TeaUtils.Client.isUnset(request.deployType)) {
body["DeployType"] = request.deployType ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceType)) {
body["InstanceType"] = request.instanceType ?? "";
}
if (!TeaUtils.Client.isUnset(request.obVersion)) {
body["ObVersion"] = request.obVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.series)) {
body["Series"] = request.series ?? "";
}
if (!TeaUtils.Client.isUnset(request.spec)) {
body["Spec"] = request.spec ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeAvailableZone",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeAvailableZoneResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeAvailableZoneResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeAvailableZone(_ request: DescribeAvailableZoneRequest) async throws -> DescribeAvailableZoneResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeAvailableZoneWithOptions(request as! DescribeAvailableZoneRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeBackupEncryptedStringWithOptions(_ request: DescribeBackupEncryptedStringRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeBackupEncryptedStringResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeBackupEncryptedString",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeBackupEncryptedStringResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeBackupEncryptedStringResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeBackupEncryptedString(_ request: DescribeBackupEncryptedStringRequest) async throws -> DescribeBackupEncryptedStringResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeBackupEncryptedStringWithOptions(request as! DescribeBackupEncryptedStringRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeBackupSetDownloadLinkWithOptions(_ request: DescribeBackupSetDownloadLinkRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeBackupSetDownloadLinkResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.downloadTaskId)) {
body["DownloadTaskId"] = request.downloadTaskId ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeBackupSetDownloadLink",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeBackupSetDownloadLinkResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeBackupSetDownloadLinkResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeBackupSetDownloadLink(_ request: DescribeBackupSetDownloadLinkRequest) async throws -> DescribeBackupSetDownloadLinkResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeBackupSetDownloadLinkWithOptions(request as! DescribeBackupSetDownloadLinkRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeCharsetWithOptions(_ request: DescribeCharsetRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeCharsetResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.series)) {
body["Series"] = request.series ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantMode)) {
body["TenantMode"] = request.tenantMode ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeCharset",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeCharsetResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeCharsetResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeCharset(_ request: DescribeCharsetRequest) async throws -> DescribeCharsetResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeCharsetWithOptions(request as! DescribeCharsetRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeDataBackupSetWithOptions(_ request: DescribeDataBackupSetRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeDataBackupSetResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.backupObjectType)) {
body["BackupObjectType"] = request.backupObjectType ?? "";
}
if (!TeaUtils.Client.isUnset(request.endTime)) {
body["EndTime"] = request.endTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
body["PageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
body["PageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.startTime)) {
body["StartTime"] = request.startTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.status)) {
body["Status"] = request.status ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeDataBackupSet",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeDataBackupSetResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeDataBackupSetResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeDataBackupSet(_ request: DescribeDataBackupSetRequest) async throws -> DescribeDataBackupSetResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeDataBackupSetWithOptions(request as! DescribeDataBackupSetRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeDatabasesWithOptions(_ request: DescribeDatabasesRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeDatabasesResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.databaseName)) {
body["DatabaseName"] = request.databaseName ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
body["PageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
body["PageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.searchKey)) {
body["SearchKey"] = request.searchKey ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
if (!TeaUtils.Client.isUnset(request.withTables)) {
body["WithTables"] = request.withTables!;
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeDatabases",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeDatabasesResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeDatabasesResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeDatabases(_ request: DescribeDatabasesRequest) async throws -> DescribeDatabasesResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeDatabasesWithOptions(request as! DescribeDatabasesRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeInstanceWithOptions(_ request: DescribeInstanceRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeInstanceResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
body["PageNumber"] = request.pageNumber!;
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeInstance",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeInstanceResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeInstanceResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeInstance(_ request: DescribeInstanceRequest) async throws -> DescribeInstanceResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeInstanceWithOptions(request as! DescribeInstanceRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeInstanceCreatableZoneWithOptions(_ request: DescribeInstanceCreatableZoneRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeInstanceCreatableZoneResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeInstanceCreatableZone",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeInstanceCreatableZoneResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeInstanceCreatableZoneResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeInstanceCreatableZone(_ request: DescribeInstanceCreatableZoneRequest) async throws -> DescribeInstanceCreatableZoneResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeInstanceCreatableZoneWithOptions(request as! DescribeInstanceCreatableZoneRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeInstanceSSLWithOptions(_ request: DescribeInstanceSSLRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeInstanceSSLResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeInstanceSSL",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeInstanceSSLResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeInstanceSSLResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeInstanceSSL(_ request: DescribeInstanceSSLRequest) async throws -> DescribeInstanceSSLResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeInstanceSSLWithOptions(request as! DescribeInstanceSSLRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeInstanceSecurityConfigsWithOptions(_ request: DescribeInstanceSecurityConfigsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeInstanceSecurityConfigsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.checkId)) {
body["CheckId"] = request.checkId ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeInstanceSecurityConfigs",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeInstanceSecurityConfigsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeInstanceSecurityConfigsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeInstanceSecurityConfigs(_ request: DescribeInstanceSecurityConfigsRequest) async throws -> DescribeInstanceSecurityConfigsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeInstanceSecurityConfigsWithOptions(request as! DescribeInstanceSecurityConfigsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeInstanceSummaryWithOptions(_ request: DescribeInstanceSummaryRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeInstanceSummaryResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
body["PageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
body["PageSize"] = request.pageSize!;
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeInstanceSummary",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeInstanceSummaryResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeInstanceSummaryResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeInstanceSummary(_ request: DescribeInstanceSummaryRequest) async throws -> DescribeInstanceSummaryResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeInstanceSummaryWithOptions(request as! DescribeInstanceSummaryRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeInstanceTagsWithOptions(_ request: DescribeInstanceTagsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeInstanceTagsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceIds)) {
body["InstanceIds"] = request.instanceIds ?? "";
}
if (!TeaUtils.Client.isUnset(request.tags)) {
body["Tags"] = request.tags ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeInstanceTags",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeInstanceTagsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeInstanceTagsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeInstanceTags(_ request: DescribeInstanceTagsRequest) async throws -> DescribeInstanceTagsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeInstanceTagsWithOptions(request as! DescribeInstanceTagsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeInstanceTenantModesWithOptions(_ request: DescribeInstanceTenantModesRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeInstanceTenantModesResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeInstanceTenantModes",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeInstanceTenantModesResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeInstanceTenantModesResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeInstanceTenantModes(_ request: DescribeInstanceTenantModesRequest) async throws -> DescribeInstanceTenantModesResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeInstanceTenantModesWithOptions(request as! DescribeInstanceTenantModesRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeInstanceTopologyWithOptions(_ request: DescribeInstanceTopologyRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeInstanceTopologyResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeInstanceTopology",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeInstanceTopologyResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeInstanceTopologyResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeInstanceTopology(_ request: DescribeInstanceTopologyRequest) async throws -> DescribeInstanceTopologyResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeInstanceTopologyWithOptions(request as! DescribeInstanceTopologyRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeInstancesWithOptions(_ request: DescribeInstancesRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeInstancesResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceName)) {
body["InstanceName"] = request.instanceName ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
body["PageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
body["PageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.resourceGroupId)) {
body["ResourceGroupId"] = request.resourceGroupId ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchKey)) {
body["SearchKey"] = request.searchKey ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeInstances",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeInstancesResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeInstancesResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeInstances(_ request: DescribeInstancesRequest) async throws -> DescribeInstancesResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeInstancesWithOptions(request as! DescribeInstancesRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeMetricsDataWithOptions(_ request: DescribeMetricsDataRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeMetricsDataResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.endTime)) {
query["EndTime"] = request.endTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.groupByLabels)) {
query["GroupByLabels"] = request.groupByLabels ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
query["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.labels)) {
query["Labels"] = request.labels ?? "";
}
if (!TeaUtils.Client.isUnset(request.limit)) {
query["Limit"] = request.limit ?? "";
}
if (!TeaUtils.Client.isUnset(request.metrics)) {
query["Metrics"] = request.metrics ?? "";
}
if (!TeaUtils.Client.isUnset(request.sortMetricKey)) {
query["SortMetricKey"] = request.sortMetricKey ?? "";
}
if (!TeaUtils.Client.isUnset(request.sortOrder)) {
query["SortOrder"] = request.sortOrder ?? "";
}
if (!TeaUtils.Client.isUnset(request.startTime)) {
query["StartTime"] = request.startTime ?? "";
}
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.replicaType)) {
body["ReplicaType"] = request.replicaType ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"query": AlibabaCloudOpenApiUtil.Client.query(query),
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeMetricsData",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeMetricsDataResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeMetricsDataResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeMetricsData(_ request: DescribeMetricsDataRequest) async throws -> DescribeMetricsDataResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeMetricsDataWithOptions(request as! DescribeMetricsDataRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeNodeMetricsWithOptions(_ request: DescribeNodeMetricsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeNodeMetricsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.endTime)) {
body["EndTime"] = request.endTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.metrics)) {
body["Metrics"] = request.metrics ?? "";
}
if (!TeaUtils.Client.isUnset(request.nodeIdList)) {
body["NodeIdList"] = request.nodeIdList ?? "";
}
if (!TeaUtils.Client.isUnset(request.nodeName)) {
body["NodeName"] = request.nodeName ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
body["PageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
body["PageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.startTime)) {
body["StartTime"] = request.startTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeNodeMetrics",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeNodeMetricsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeNodeMetricsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeNodeMetrics(_ request: DescribeNodeMetricsRequest) async throws -> DescribeNodeMetricsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeNodeMetricsWithOptions(request as! DescribeNodeMetricsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeOasAnomalySQLListWithOptions(_ request: DescribeOasAnomalySQLListRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeOasAnomalySQLListResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.acceptLanguage)) {
body["AcceptLanguage"] = request.acceptLanguage ?? "";
}
if (!TeaUtils.Client.isUnset(request.current)) {
body["Current"] = request.current!;
}
if (!TeaUtils.Client.isUnset(request.dbName)) {
body["DbName"] = request.dbName ?? "";
}
if (!TeaUtils.Client.isUnset(request.dynamicSql)) {
body["DynamicSql"] = request.dynamicSql!;
}
if (!TeaUtils.Client.isUnset(request.endTime)) {
body["EndTime"] = request.endTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.filterCondition)) {
body["FilterCondition"] = request.filterCondition ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.mergeDynamicSql)) {
body["MergeDynamicSql"] = request.mergeDynamicSql!;
}
if (!TeaUtils.Client.isUnset(request.nodeIp)) {
body["NodeIp"] = request.nodeIp ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
body["PageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.searchKeyWord)) {
body["SearchKeyWord"] = request.searchKeyWord ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchParam)) {
body["SearchParam"] = request.searchParam ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchRule)) {
body["SearchRule"] = request.searchRule ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchValue)) {
body["SearchValue"] = request.searchValue ?? "";
}
if (!TeaUtils.Client.isUnset(request.sqlId)) {
body["SqlId"] = request.sqlId ?? "";
}
if (!TeaUtils.Client.isUnset(request.sqlTextLength)) {
body["SqlTextLength"] = request.sqlTextLength!;
}
if (!TeaUtils.Client.isUnset(request.startTime)) {
body["StartTime"] = request.startTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeOasAnomalySQLList",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeOasAnomalySQLListResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeOasAnomalySQLListResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeOasAnomalySQLList(_ request: DescribeOasAnomalySQLListRequest) async throws -> DescribeOasAnomalySQLListResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeOasAnomalySQLListWithOptions(request as! DescribeOasAnomalySQLListRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeOasSQLDetailsWithOptions(_ request: DescribeOasSQLDetailsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeOasSQLDetailsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.dbName)) {
body["DbName"] = request.dbName ?? "";
}
if (!TeaUtils.Client.isUnset(request.dynamicSql)) {
body["DynamicSql"] = request.dynamicSql!;
}
if (!TeaUtils.Client.isUnset(request.endTime)) {
body["EndTime"] = request.endTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.parseTable)) {
body["ParseTable"] = request.parseTable!;
}
if (!TeaUtils.Client.isUnset(request.sqlId)) {
body["SqlId"] = request.sqlId ?? "";
}
if (!TeaUtils.Client.isUnset(request.startTime)) {
body["StartTime"] = request.startTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeOasSQLDetails",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeOasSQLDetailsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeOasSQLDetailsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeOasSQLDetails(_ request: DescribeOasSQLDetailsRequest) async throws -> DescribeOasSQLDetailsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeOasSQLDetailsWithOptions(request as! DescribeOasSQLDetailsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeOasSQLHistoryListWithOptions(_ request: DescribeOasSQLHistoryListRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeOasSQLHistoryListResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.acceptLanguage)) {
body["AcceptLanguage"] = request.acceptLanguage ?? "";
}
if (!TeaUtils.Client.isUnset(request.dbName)) {
body["DbName"] = request.dbName ?? "";
}
if (!TeaUtils.Client.isUnset(request.dynamicSql)) {
body["DynamicSql"] = request.dynamicSql!;
}
if (!TeaUtils.Client.isUnset(request.endTime)) {
body["EndTime"] = request.endTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.nodeIp)) {
body["NodeIp"] = request.nodeIp ?? "";
}
if (!TeaUtils.Client.isUnset(request.sqlId)) {
body["SqlId"] = request.sqlId ?? "";
}
if (!TeaUtils.Client.isUnset(request.startTime)) {
body["StartTime"] = request.startTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeOasSQLHistoryList",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeOasSQLHistoryListResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeOasSQLHistoryListResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeOasSQLHistoryList(_ request: DescribeOasSQLHistoryListRequest) async throws -> DescribeOasSQLHistoryListResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeOasSQLHistoryListWithOptions(request as! DescribeOasSQLHistoryListRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeOasSQLPlansWithOptions(_ request: DescribeOasSQLPlansRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeOasSQLPlansResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.acceptLanguage)) {
body["AcceptLanguage"] = request.acceptLanguage ?? "";
}
if (!TeaUtils.Client.isUnset(request.dbName)) {
body["DbName"] = request.dbName ?? "";
}
if (!TeaUtils.Client.isUnset(request.dynamicSql)) {
body["DynamicSql"] = request.dynamicSql!;
}
if (!TeaUtils.Client.isUnset(request.endTime)) {
body["EndTime"] = request.endTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.planUnionHash)) {
body["PlanUnionHash"] = request.planUnionHash ?? "";
}
if (!TeaUtils.Client.isUnset(request.returnBriefInfo)) {
body["ReturnBriefInfo"] = request.returnBriefInfo!;
}
if (!TeaUtils.Client.isUnset(request.sqlId)) {
body["SqlId"] = request.sqlId ?? "";
}
if (!TeaUtils.Client.isUnset(request.startTime)) {
body["StartTime"] = request.startTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeOasSQLPlans",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeOasSQLPlansResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeOasSQLPlansResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeOasSQLPlans(_ request: DescribeOasSQLPlansRequest) async throws -> DescribeOasSQLPlansResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeOasSQLPlansWithOptions(request as! DescribeOasSQLPlansRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeOasSlowSQLListWithOptions(_ request: DescribeOasSlowSQLListRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeOasSlowSQLListResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.acceptLanguage)) {
body["AcceptLanguage"] = request.acceptLanguage ?? "";
}
if (!TeaUtils.Client.isUnset(request.dbName)) {
body["DbName"] = request.dbName ?? "";
}
if (!TeaUtils.Client.isUnset(request.dynamicSql)) {
body["DynamicSql"] = request.dynamicSql!;
}
if (!TeaUtils.Client.isUnset(request.endTime)) {
body["EndTime"] = request.endTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.filterCondition)) {
body["FilterCondition"] = request.filterCondition ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.mergeDynamicSql)) {
body["MergeDynamicSql"] = request.mergeDynamicSql!;
}
if (!TeaUtils.Client.isUnset(request.nodeIp)) {
body["NodeIp"] = request.nodeIp ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchKeyWord)) {
body["SearchKeyWord"] = request.searchKeyWord ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchParam)) {
body["SearchParam"] = request.searchParam ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchRule)) {
body["SearchRule"] = request.searchRule ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchValue)) {
body["SearchValue"] = request.searchValue ?? "";
}
if (!TeaUtils.Client.isUnset(request.sqlId)) {
body["SqlId"] = request.sqlId ?? "";
}
if (!TeaUtils.Client.isUnset(request.sqlTextLength)) {
body["SqlTextLength"] = request.sqlTextLength!;
}
if (!TeaUtils.Client.isUnset(request.startTime)) {
body["StartTime"] = request.startTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeOasSlowSQLList",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeOasSlowSQLListResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeOasSlowSQLListResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeOasSlowSQLList(_ request: DescribeOasSlowSQLListRequest) async throws -> DescribeOasSlowSQLListResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeOasSlowSQLListWithOptions(request as! DescribeOasSlowSQLListRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeOasTopSQLListWithOptions(_ request: DescribeOasTopSQLListRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeOasTopSQLListResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.acceptLanguage)) {
body["AcceptLanguage"] = request.acceptLanguage ?? "";
}
if (!TeaUtils.Client.isUnset(request.dbName)) {
body["DbName"] = request.dbName ?? "";
}
if (!TeaUtils.Client.isUnset(request.dynamicSql)) {
body["DynamicSql"] = request.dynamicSql!;
}
if (!TeaUtils.Client.isUnset(request.endTime)) {
body["EndTime"] = request.endTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.filterCondition)) {
body["FilterCondition"] = request.filterCondition ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.mergeDynamicSql)) {
body["MergeDynamicSql"] = request.mergeDynamicSql!;
}
if (!TeaUtils.Client.isUnset(request.nodeIp)) {
body["NodeIp"] = request.nodeIp ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchKeyWord)) {
body["SearchKeyWord"] = request.searchKeyWord ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchParam)) {
body["SearchParam"] = request.searchParam ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchRule)) {
body["SearchRule"] = request.searchRule ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchValue)) {
body["SearchValue"] = request.searchValue ?? "";
}
if (!TeaUtils.Client.isUnset(request.sqlId)) {
body["SqlId"] = request.sqlId ?? "";
}
if (!TeaUtils.Client.isUnset(request.sqlTextLength)) {
body["SqlTextLength"] = request.sqlTextLength!;
}
if (!TeaUtils.Client.isUnset(request.startTime)) {
body["StartTime"] = request.startTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeOasTopSQLList",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeOasTopSQLListResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeOasTopSQLListResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeOasTopSQLList(_ request: DescribeOasTopSQLListRequest) async throws -> DescribeOasTopSQLListResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeOasTopSQLListWithOptions(request as! DescribeOasTopSQLListRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeOutlineBindingWithOptions(_ request: DescribeOutlineBindingRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeOutlineBindingResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.databaseName)) {
body["DatabaseName"] = request.databaseName ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.isConcurrentLimit)) {
body["IsConcurrentLimit"] = request.isConcurrentLimit!;
}
if (!TeaUtils.Client.isUnset(request.SQLId)) {
body["SQLId"] = request.SQLId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tableName)) {
body["TableName"] = request.tableName ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeOutlineBinding",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeOutlineBindingResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeOutlineBindingResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeOutlineBinding(_ request: DescribeOutlineBindingRequest) async throws -> DescribeOutlineBindingResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeOutlineBindingWithOptions(request as! DescribeOutlineBindingRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeParametersWithOptions(_ request: DescribeParametersRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeParametersResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.dimension)) {
body["Dimension"] = request.dimension ?? "";
}
if (!TeaUtils.Client.isUnset(request.dimensionValue)) {
body["DimensionValue"] = request.dimensionValue ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeParameters",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeParametersResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeParametersResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeParameters(_ request: DescribeParametersRequest) async throws -> DescribeParametersResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeParametersWithOptions(request as! DescribeParametersRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeParametersHistoryWithOptions(_ request: DescribeParametersHistoryRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeParametersHistoryResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.dimension)) {
body["Dimension"] = request.dimension ?? "";
}
if (!TeaUtils.Client.isUnset(request.dimensionValue)) {
body["DimensionValue"] = request.dimensionValue ?? "";
}
if (!TeaUtils.Client.isUnset(request.endTime)) {
body["EndTime"] = request.endTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
body["PageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
body["PageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.startTime)) {
body["StartTime"] = request.startTime ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeParametersHistory",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeParametersHistoryResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeParametersHistoryResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeParametersHistory(_ request: DescribeParametersHistoryRequest) async throws -> DescribeParametersHistoryResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeParametersHistoryWithOptions(request as! DescribeParametersHistoryRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeProcessStatsCompositionWithOptions(_ request: DescribeProcessStatsCompositionRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeProcessStatsCompositionResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.clientIp)) {
body["ClientIp"] = request.clientIp ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.serverIp)) {
body["ServerIp"] = request.serverIp ?? "";
}
if (!TeaUtils.Client.isUnset(request.sqlText)) {
body["SqlText"] = request.sqlText ?? "";
}
if (!TeaUtils.Client.isUnset(request.status)) {
body["Status"] = request.status ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
if (!TeaUtils.Client.isUnset(request.UId)) {
body["UId"] = request.UId ?? "";
}
if (!TeaUtils.Client.isUnset(request.users)) {
body["Users"] = request.users ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeProcessStatsComposition",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeProcessStatsCompositionResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeProcessStatsCompositionResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeProcessStatsComposition(_ request: DescribeProcessStatsCompositionRequest) async throws -> DescribeProcessStatsCompositionResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeProcessStatsCompositionWithOptions(request as! DescribeProcessStatsCompositionRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeProjectWithOptions(_ request: DescribeProjectRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeProjectResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.id)) {
body["Id"] = request.id ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeProject",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeProjectResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeProjectResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeProject(_ request: DescribeProjectRequest) async throws -> DescribeProjectResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeProjectWithOptions(request as! DescribeProjectRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeProjectComponentsWithOptions(_ request: DescribeProjectComponentsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeProjectComponentsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.id)) {
body["Id"] = request.id ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeProjectComponents",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeProjectComponentsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeProjectComponentsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeProjectComponents(_ request: DescribeProjectComponentsRequest) async throws -> DescribeProjectComponentsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeProjectComponentsWithOptions(request as! DescribeProjectComponentsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeProjectProgressWithOptions(_ request: DescribeProjectProgressRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeProjectProgressResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.id)) {
body["Id"] = request.id ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeProjectProgress",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeProjectProgressResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeProjectProgressResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeProjectProgress(_ request: DescribeProjectProgressRequest) async throws -> DescribeProjectProgressResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeProjectProgressWithOptions(request as! DescribeProjectProgressRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeProjectStepMetricWithOptions(_ request: DescribeProjectStepMetricRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeProjectStepMetricResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.aggregator)) {
body["Aggregator"] = request.aggregator ?? "";
}
if (!TeaUtils.Client.isUnset(request.beginTimestamp)) {
body["BeginTimestamp"] = request.beginTimestamp!;
}
if (!TeaUtils.Client.isUnset(request.endTimestamp)) {
body["EndTimestamp"] = request.endTimestamp!;
}
if (!TeaUtils.Client.isUnset(request.maxPointNum)) {
body["MaxPointNum"] = request.maxPointNum!;
}
if (!TeaUtils.Client.isUnset(request.metricType)) {
body["MetricType"] = request.metricType ?? "";
}
if (!TeaUtils.Client.isUnset(request.projectId)) {
body["ProjectId"] = request.projectId ?? "";
}
if (!TeaUtils.Client.isUnset(request.stepName)) {
body["StepName"] = request.stepName ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeProjectStepMetric",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeProjectStepMetricResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeProjectStepMetricResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeProjectStepMetric(_ request: DescribeProjectStepMetricRequest) async throws -> DescribeProjectStepMetricResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeProjectStepMetricWithOptions(request as! DescribeProjectStepMetricRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeProjectStepsWithOptions(_ request: DescribeProjectStepsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeProjectStepsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.id)) {
body["Id"] = request.id ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeProjectSteps",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeProjectStepsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeProjectStepsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeProjectSteps(_ request: DescribeProjectStepsRequest) async throws -> DescribeProjectStepsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeProjectStepsWithOptions(request as! DescribeProjectStepsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeProxyServiceWithOptions(_ request: DescribeProxyServiceRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeProxyServiceResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeProxyService",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeProxyServiceResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeProxyServiceResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeProxyService(_ request: DescribeProxyServiceRequest) async throws -> DescribeProxyServiceResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeProxyServiceWithOptions(request as! DescribeProxyServiceRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeRecommendIndexWithOptions(_ request: DescribeRecommendIndexRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeRecommendIndexResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.SQLId)) {
body["SQLId"] = request.SQLId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeRecommendIndex",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeRecommendIndexResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeRecommendIndexResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeRecommendIndex(_ request: DescribeRecommendIndexRequest) async throws -> DescribeRecommendIndexResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeRecommendIndexWithOptions(request as! DescribeRecommendIndexRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeRestorableTenantsWithOptions(_ request: DescribeRestorableTenantsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeRestorableTenantsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.isOnline)) {
body["IsOnline"] = request.isOnline!;
}
if (!TeaUtils.Client.isUnset(request.isRemote)) {
body["IsRemote"] = request.isRemote!;
}
if (!TeaUtils.Client.isUnset(request.method)) {
body["Method"] = request.method ?? "";
}
if (!TeaUtils.Client.isUnset(request.restoreMode)) {
body["RestoreMode"] = request.restoreMode ?? "";
}
if (!TeaUtils.Client.isUnset(request.restoreObjectType)) {
body["RestoreObjectType"] = request.restoreObjectType ?? "";
}
if (!TeaUtils.Client.isUnset(request.setId)) {
body["SetId"] = request.setId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeRestorableTenants",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeRestorableTenantsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeRestorableTenantsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeRestorableTenants(_ request: DescribeRestorableTenantsRequest) async throws -> DescribeRestorableTenantsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeRestorableTenantsWithOptions(request as! DescribeRestorableTenantsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSQLDetailsWithOptions(_ request: DescribeSQLDetailsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeSQLDetailsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.SQLId)) {
body["SQLId"] = request.SQLId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeSQLDetails",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSQLDetailsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSQLDetailsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSQLDetails(_ request: DescribeSQLDetailsRequest) async throws -> DescribeSQLDetailsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeSQLDetailsWithOptions(request as! DescribeSQLDetailsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSQLHistoryListWithOptions(_ request: DescribeSQLHistoryListRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeSQLHistoryListResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.endTime)) {
body["EndTime"] = request.endTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
body["PageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
body["PageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.SQLId)) {
body["SQLId"] = request.SQLId ?? "";
}
if (!TeaUtils.Client.isUnset(request.startTime)) {
body["StartTime"] = request.startTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeSQLHistoryList",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSQLHistoryListResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSQLHistoryListResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSQLHistoryList(_ request: DescribeSQLHistoryListRequest) async throws -> DescribeSQLHistoryListResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeSQLHistoryListWithOptions(request as! DescribeSQLHistoryListRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSQLPlansWithOptions(_ request: DescribeSQLPlansRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeSQLPlansResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.SQLId)) {
body["SQLId"] = request.SQLId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeSQLPlans",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSQLPlansResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSQLPlansResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSQLPlans(_ request: DescribeSQLPlansRequest) async throws -> DescribeSQLPlansResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeSQLPlansWithOptions(request as! DescribeSQLPlansRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSQLSamplesWithOptions(_ request: DescribeSQLSamplesRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeSQLSamplesResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.dbName)) {
body["DbName"] = request.dbName ?? "";
}
if (!TeaUtils.Client.isUnset(request.endTime)) {
body["EndTime"] = request.endTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.returnSqlText)) {
body["ReturnSqlText"] = request.returnSqlText!;
}
if (!TeaUtils.Client.isUnset(request.sqlId)) {
body["SqlId"] = request.sqlId ?? "";
}
if (!TeaUtils.Client.isUnset(request.startTime)) {
body["StartTime"] = request.startTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeSQLSamples",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSQLSamplesResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSQLSamplesResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSQLSamples(_ request: DescribeSQLSamplesRequest) async throws -> DescribeSQLSamplesResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeSQLSamplesWithOptions(request as! DescribeSQLSamplesRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSQLTuningAdvicesWithOptions(_ request: DescribeSQLTuningAdvicesRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeSQLTuningAdvicesResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.acceptLanguage)) {
body["AcceptLanguage"] = request.acceptLanguage ?? "";
}
if (!TeaUtils.Client.isUnset(request.dbName)) {
body["DbName"] = request.dbName ?? "";
}
if (!TeaUtils.Client.isUnset(request.endTime)) {
body["EndTime"] = request.endTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.sqlId)) {
body["SqlId"] = request.sqlId ?? "";
}
if (!TeaUtils.Client.isUnset(request.startTime)) {
body["StartTime"] = request.startTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeSQLTuningAdvices",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSQLTuningAdvicesResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSQLTuningAdvicesResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSQLTuningAdvices(_ request: DescribeSQLTuningAdvicesRequest) async throws -> DescribeSQLTuningAdvicesResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeSQLTuningAdvicesWithOptions(request as! DescribeSQLTuningAdvicesRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSampleSqlRawTextsWithOptions(_ request: DescribeSampleSqlRawTextsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeSampleSqlRawTextsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.dbName)) {
body["DbName"] = request.dbName ?? "";
}
if (!TeaUtils.Client.isUnset(request.dynamicSql)) {
body["DynamicSql"] = request.dynamicSql!;
}
if (!TeaUtils.Client.isUnset(request.endTime)) {
body["EndTime"] = request.endTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.limit)) {
body["Limit"] = request.limit ?? "";
}
if (!TeaUtils.Client.isUnset(request.sqlId)) {
body["SqlId"] = request.sqlId ?? "";
}
if (!TeaUtils.Client.isUnset(request.startTime)) {
body["StartTime"] = request.startTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
if (!TeaUtils.Client.isUnset(request.traceId)) {
body["TraceId"] = request.traceId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeSampleSqlRawTexts",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSampleSqlRawTextsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSampleSqlRawTextsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSampleSqlRawTexts(_ request: DescribeSampleSqlRawTextsRequest) async throws -> DescribeSampleSqlRawTextsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeSampleSqlRawTextsWithOptions(request as! DescribeSampleSqlRawTextsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSecurityIpGroupsWithOptions(_ request: DescribeSecurityIpGroupsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeSecurityIpGroupsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeSecurityIpGroups",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSecurityIpGroupsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSecurityIpGroupsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSecurityIpGroups(_ request: DescribeSecurityIpGroupsRequest) async throws -> DescribeSecurityIpGroupsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeSecurityIpGroupsWithOptions(request as! DescribeSecurityIpGroupsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSessionListWithOptions(_ request: DescribeSessionListRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeSessionListResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeSessionList",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSessionListResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSessionListResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSessionList(_ request: DescribeSessionListRequest) async throws -> DescribeSessionListResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeSessionListWithOptions(request as! DescribeSessionListRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSlowSQLHistoryListWithOptions(_ request: DescribeSlowSQLHistoryListRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeSlowSQLHistoryListResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.endTime)) {
body["EndTime"] = request.endTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
body["PageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
body["PageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.SQLId)) {
body["SQLId"] = request.SQLId ?? "";
}
if (!TeaUtils.Client.isUnset(request.startTime)) {
body["StartTime"] = request.startTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeSlowSQLHistoryList",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSlowSQLHistoryListResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSlowSQLHistoryListResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSlowSQLHistoryList(_ request: DescribeSlowSQLHistoryListRequest) async throws -> DescribeSlowSQLHistoryListResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeSlowSQLHistoryListWithOptions(request as! DescribeSlowSQLHistoryListRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSlowSQLListWithOptions(_ tmpReq: DescribeSlowSQLListRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeSlowSQLListResponse {
try TeaUtils.Client.validateModel(tmpReq)
var request: DescribeSlowSQLListShrinkRequest = DescribeSlowSQLListShrinkRequest([:])
AlibabaCloudOpenApiUtil.Client.convert(tmpReq, request)
if (!TeaUtils.Client.isUnset(tmpReq.filterCondition)) {
request.filterConditionShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.filterCondition, "FilterCondition", "json")
}
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.dbName)) {
body["DbName"] = request.dbName ?? "";
}
if (!TeaUtils.Client.isUnset(request.endTime)) {
body["EndTime"] = request.endTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.filterConditionShrink)) {
body["FilterCondition"] = request.filterConditionShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.nodeIp)) {
body["NodeIp"] = request.nodeIp ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
body["PageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
body["PageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.SQLId)) {
body["SQLId"] = request.SQLId ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchKeyWord)) {
body["SearchKeyWord"] = request.searchKeyWord ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchParameter)) {
body["SearchParameter"] = request.searchParameter ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchRule)) {
body["SearchRule"] = request.searchRule ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchValue)) {
body["SearchValue"] = request.searchValue ?? "";
}
if (!TeaUtils.Client.isUnset(request.sortColumn)) {
body["SortColumn"] = request.sortColumn ?? "";
}
if (!TeaUtils.Client.isUnset(request.sortOrder)) {
body["SortOrder"] = request.sortOrder ?? "";
}
if (!TeaUtils.Client.isUnset(request.startTime)) {
body["StartTime"] = request.startTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeSlowSQLList",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSlowSQLListResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSlowSQLListResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSlowSQLList(_ request: DescribeSlowSQLListRequest) async throws -> DescribeSlowSQLListResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeSlowSQLListWithOptions(request as! DescribeSlowSQLListRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSqlAuditStatWithOptions(_ request: DescribeSqlAuditStatRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeSqlAuditStatResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.endTime)) {
body["EndTime"] = request.endTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
body["PageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
body["PageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.startTime)) {
body["StartTime"] = request.startTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeSqlAuditStat",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSqlAuditStatResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeSqlAuditStatResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeSqlAuditStat(_ request: DescribeSqlAuditStatRequest) async throws -> DescribeSqlAuditStatResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeSqlAuditStatWithOptions(request as! DescribeSqlAuditStatRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeStandbyCreateModeWithOptions(_ request: DescribeStandbyCreateModeRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeStandbyCreateModeResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeStandbyCreateMode",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeStandbyCreateModeResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeStandbyCreateModeResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeStandbyCreateMode(_ request: DescribeStandbyCreateModeRequest) async throws -> DescribeStandbyCreateModeResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeStandbyCreateModeWithOptions(request as! DescribeStandbyCreateModeRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTagValuesWithOptions(_ request: DescribeTagValuesRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeTagValuesResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.resourceType)) {
body["ResourceType"] = request.resourceType ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeTagValues",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTagValuesResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTagValuesResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTagValues(_ request: DescribeTagValuesRequest) async throws -> DescribeTagValuesResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeTagValuesWithOptions(request as! DescribeTagValuesRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenantWithOptions(_ request: DescribeTenantRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeTenantResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeTenant",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenant(_ request: DescribeTenantRequest) async throws -> DescribeTenantResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeTenantWithOptions(request as! DescribeTenantRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenantEncryptionWithOptions(_ request: DescribeTenantEncryptionRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeTenantEncryptionResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
body["PageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
body["PageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantName)) {
body["TenantName"] = request.tenantName ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeTenantEncryption",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantEncryptionResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantEncryptionResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenantEncryption(_ request: DescribeTenantEncryptionRequest) async throws -> DescribeTenantEncryptionResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeTenantEncryptionWithOptions(request as! DescribeTenantEncryptionRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenantMetricsWithOptions(_ request: DescribeTenantMetricsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeTenantMetricsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.endTime)) {
body["EndTime"] = request.endTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.metrics)) {
body["Metrics"] = request.metrics ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
body["PageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
body["PageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.startTime)) {
body["StartTime"] = request.startTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantIdList)) {
body["TenantIdList"] = request.tenantIdList ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantName)) {
body["TenantName"] = request.tenantName ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeTenantMetrics",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantMetricsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantMetricsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenantMetrics(_ request: DescribeTenantMetricsRequest) async throws -> DescribeTenantMetricsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeTenantMetricsWithOptions(request as! DescribeTenantMetricsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenantReadableScnWithOptions(_ request: DescribeTenantReadableScnRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeTenantReadableScnResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeTenantReadableScn",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantReadableScnResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantReadableScnResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenantReadableScn(_ request: DescribeTenantReadableScnRequest) async throws -> DescribeTenantReadableScnResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeTenantReadableScnWithOptions(request as! DescribeTenantReadableScnRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenantSecurityConfigsWithOptions(_ request: DescribeTenantSecurityConfigsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeTenantSecurityConfigsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.checkId)) {
body["CheckId"] = request.checkId ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeTenantSecurityConfigs",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantSecurityConfigsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantSecurityConfigsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenantSecurityConfigs(_ request: DescribeTenantSecurityConfigsRequest) async throws -> DescribeTenantSecurityConfigsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeTenantSecurityConfigsWithOptions(request as! DescribeTenantSecurityConfigsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenantSecurityIpGroupsWithOptions(_ request: DescribeTenantSecurityIpGroupsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeTenantSecurityIpGroupsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeTenantSecurityIpGroups",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantSecurityIpGroupsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantSecurityIpGroupsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenantSecurityIpGroups(_ request: DescribeTenantSecurityIpGroupsRequest) async throws -> DescribeTenantSecurityIpGroupsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeTenantSecurityIpGroupsWithOptions(request as! DescribeTenantSecurityIpGroupsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenantTagsWithOptions(_ request: DescribeTenantTagsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeTenantTagsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tags)) {
body["Tags"] = request.tags ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantIds)) {
body["TenantIds"] = request.tenantIds ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeTenantTags",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantTagsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantTagsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenantTags(_ request: DescribeTenantTagsRequest) async throws -> DescribeTenantTagsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeTenantTagsWithOptions(request as! DescribeTenantTagsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenantUserRolesWithOptions(_ request: DescribeTenantUserRolesRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeTenantUserRolesResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeTenantUserRoles",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantUserRolesResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantUserRolesResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenantUserRoles(_ request: DescribeTenantUserRolesRequest) async throws -> DescribeTenantUserRolesResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeTenantUserRolesWithOptions(request as! DescribeTenantUserRolesRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenantUsersWithOptions(_ request: DescribeTenantUsersRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeTenantUsersResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
body["PageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
body["PageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.searchKey)) {
body["SearchKey"] = request.searchKey ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
if (!TeaUtils.Client.isUnset(request.userName)) {
body["UserName"] = request.userName ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeTenantUsers",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantUsersResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantUsersResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenantUsers(_ request: DescribeTenantUsersRequest) async throws -> DescribeTenantUsersResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeTenantUsersWithOptions(request as! DescribeTenantUsersRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenantZonesReadWithOptions(_ request: DescribeTenantZonesReadRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeTenantZonesReadResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeTenantZonesRead",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantZonesReadResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantZonesReadResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenantZonesRead(_ request: DescribeTenantZonesReadRequest) async throws -> DescribeTenantZonesReadResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeTenantZonesReadWithOptions(request as! DescribeTenantZonesReadRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenantsWithOptions(_ request: DescribeTenantsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeTenantsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
body["PageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
body["PageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.searchKey)) {
body["SearchKey"] = request.searchKey ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantName)) {
body["TenantName"] = request.tenantName ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeTenants",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTenantsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTenants(_ request: DescribeTenantsRequest) async throws -> DescribeTenantsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeTenantsWithOptions(request as! DescribeTenantsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTimeZonesWithOptions(_ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeTimeZonesResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([:])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeTimeZones",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTimeZonesResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTimeZonesResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTimeZones() async throws -> DescribeTimeZonesResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeTimeZonesWithOptions(runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTopSQLListWithOptions(_ tmpReq: DescribeTopSQLListRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeTopSQLListResponse {
try TeaUtils.Client.validateModel(tmpReq)
var request: DescribeTopSQLListShrinkRequest = DescribeTopSQLListShrinkRequest([:])
AlibabaCloudOpenApiUtil.Client.convert(tmpReq, request)
if (!TeaUtils.Client.isUnset(tmpReq.filterCondition)) {
request.filterConditionShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.filterCondition, "FilterCondition", "json")
}
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.dbName)) {
body["DbName"] = request.dbName ?? "";
}
if (!TeaUtils.Client.isUnset(request.endTime)) {
body["EndTime"] = request.endTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.filterConditionShrink)) {
body["FilterCondition"] = request.filterConditionShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.nodeIp)) {
body["NodeIp"] = request.nodeIp ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
body["PageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
body["PageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.SQLId)) {
body["SQLId"] = request.SQLId ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchKeyWord)) {
body["SearchKeyWord"] = request.searchKeyWord ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchParameter)) {
body["SearchParameter"] = request.searchParameter ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchRule)) {
body["SearchRule"] = request.searchRule ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchValue)) {
body["SearchValue"] = request.searchValue ?? "";
}
if (!TeaUtils.Client.isUnset(request.sortColumn)) {
body["SortColumn"] = request.sortColumn ?? "";
}
if (!TeaUtils.Client.isUnset(request.sortOrder)) {
body["SortOrder"] = request.sortOrder ?? "";
}
if (!TeaUtils.Client.isUnset(request.startTime)) {
body["StartTime"] = request.startTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeTopSQLList",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTopSQLListResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeTopSQLListResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeTopSQLList(_ request: DescribeTopSQLListRequest) async throws -> DescribeTopSQLListResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeTopSQLListWithOptions(request as! DescribeTopSQLListRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeZonesWithOptions(_ request: DescribeZonesRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DescribeZonesResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.cpuArch)) {
body["CpuArch"] = request.cpuArch ?? "";
}
if (!TeaUtils.Client.isUnset(request.deployType)) {
body["DeployType"] = request.deployType ?? "";
}
if (!TeaUtils.Client.isUnset(request.series)) {
body["Series"] = request.series ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DescribeZones",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeZonesResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DescribeZonesResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func describeZones(_ request: DescribeZonesRequest) async throws -> DescribeZonesResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await describeZonesWithOptions(request as! DescribeZonesRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getUploadOssUrlWithOptions(_ request: GetUploadOssUrlRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> GetUploadOssUrlResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.effectiveTimeMinutes)) {
body["EffectiveTimeMinutes"] = request.effectiveTimeMinutes!;
}
if (!TeaUtils.Client.isUnset(request.type)) {
body["Type"] = request.type ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "GetUploadOssUrl",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(GetUploadOssUrlResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(GetUploadOssUrlResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getUploadOssUrl(_ request: GetUploadOssUrlRequest) async throws -> GetUploadOssUrlResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await getUploadOssUrlWithOptions(request as! GetUploadOssUrlRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func killProcessListWithOptions(_ request: KillProcessListRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> KillProcessListResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.sessionList)) {
body["SessionList"] = request.sessionList ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "KillProcessList",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(KillProcessListResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(KillProcessListResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func killProcessList(_ request: KillProcessListRequest) async throws -> KillProcessListResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await killProcessListWithOptions(request as! KillProcessListRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listAllLabelsWithOptions(_ runtime: TeaUtils.RuntimeOptions) async throws -> ListAllLabelsResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([:])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListAllLabels",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListAllLabelsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListAllLabelsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listAllLabels() async throws -> ListAllLabelsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await listAllLabelsWithOptions(runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listDataSourceWithOptions(_ tmpReq: ListDataSourceRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ListDataSourceResponse {
try TeaUtils.Client.validateModel(tmpReq)
var request: ListDataSourceShrinkRequest = ListDataSourceShrinkRequest([:])
AlibabaCloudOpenApiUtil.Client.convert(tmpReq, request)
if (!TeaUtils.Client.isUnset(tmpReq.types)) {
request.typesShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.types, "Types", "json")
}
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.order)) {
body["Order"] = request.order ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
body["PageNumber"] = request.pageNumber ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
body["PageSize"] = request.pageSize ?? "";
}
if (!TeaUtils.Client.isUnset(request.searchKey)) {
body["SearchKey"] = request.searchKey ?? "";
}
if (!TeaUtils.Client.isUnset(request.sortField)) {
body["SortField"] = request.sortField ?? "";
}
if (!TeaUtils.Client.isUnset(request.typesShrink)) {
body["Types"] = request.typesShrink ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListDataSource",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListDataSourceResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListDataSourceResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listDataSource(_ request: ListDataSourceRequest) async throws -> ListDataSourceResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await listDataSourceWithOptions(request as! ListDataSourceRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listProjectFullVerifyResultWithOptions(_ tmpReq: ListProjectFullVerifyResultRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ListProjectFullVerifyResultResponse {
try TeaUtils.Client.validateModel(tmpReq)
var request: ListProjectFullVerifyResultShrinkRequest = ListProjectFullVerifyResultShrinkRequest([:])
AlibabaCloudOpenApiUtil.Client.convert(tmpReq, request)
if (!TeaUtils.Client.isUnset(tmpReq.destSchemas)) {
request.destSchemasShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.destSchemas, "DestSchemas", "json")
}
if (!TeaUtils.Client.isUnset(tmpReq.sourceSchemas)) {
request.sourceSchemasShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.sourceSchemas, "SourceSchemas", "json")
}
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.destSchemasShrink)) {
body["DestSchemas"] = request.destSchemasShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
body["PageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
body["PageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.projectId)) {
body["ProjectId"] = request.projectId ?? "";
}
if (!TeaUtils.Client.isUnset(request.sourceSchemasShrink)) {
body["SourceSchemas"] = request.sourceSchemasShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.status)) {
body["Status"] = request.status ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListProjectFullVerifyResult",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListProjectFullVerifyResultResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListProjectFullVerifyResultResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listProjectFullVerifyResult(_ request: ListProjectFullVerifyResultRequest) async throws -> ListProjectFullVerifyResultResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await listProjectFullVerifyResultWithOptions(request as! ListProjectFullVerifyResultRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listProjectModifyRecordsWithOptions(_ request: ListProjectModifyRecordsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ListProjectModifyRecordsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.id)) {
body["Id"] = request.id ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListProjectModifyRecords",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListProjectModifyRecordsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListProjectModifyRecordsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listProjectModifyRecords(_ request: ListProjectModifyRecordsRequest) async throws -> ListProjectModifyRecordsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await listProjectModifyRecordsWithOptions(request as! ListProjectModifyRecordsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listProjectsWithOptions(_ tmpReq: ListProjectsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ListProjectsResponse {
try TeaUtils.Client.validateModel(tmpReq)
var request: ListProjectsShrinkRequest = ListProjectsShrinkRequest([:])
AlibabaCloudOpenApiUtil.Client.convert(tmpReq, request)
if (!TeaUtils.Client.isUnset(tmpReq.labelIds)) {
request.labelIdsShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.labelIds, "LabelIds", "json")
}
if (!TeaUtils.Client.isUnset(tmpReq.sinkEndpointTypes)) {
request.sinkEndpointTypesShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.sinkEndpointTypes, "SinkEndpointTypes", "json")
}
if (!TeaUtils.Client.isUnset(tmpReq.sourceEndpointTypes)) {
request.sourceEndpointTypesShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.sourceEndpointTypes, "SourceEndpointTypes", "json")
}
if (!TeaUtils.Client.isUnset(tmpReq.status)) {
request.statusShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.status, "Status", "json")
}
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.labelIdsShrink)) {
body["LabelIds"] = request.labelIdsShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.needRelatedInfo)) {
body["NeedRelatedInfo"] = request.needRelatedInfo!;
}
if (!TeaUtils.Client.isUnset(request.order)) {
body["Order"] = request.order ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
body["PageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
body["PageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.searchKey)) {
body["SearchKey"] = request.searchKey ?? "";
}
if (!TeaUtils.Client.isUnset(request.sinkEndpointTypesShrink)) {
body["SinkEndpointTypes"] = request.sinkEndpointTypesShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.sortField)) {
body["SortField"] = request.sortField ?? "";
}
if (!TeaUtils.Client.isUnset(request.sourceEndpointTypesShrink)) {
body["SourceEndpointTypes"] = request.sourceEndpointTypesShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.statusShrink)) {
body["Status"] = request.statusShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.type)) {
body["Type"] = request.type ?? "";
}
if (!TeaUtils.Client.isUnset(request.visibleSubProject)) {
body["VisibleSubProject"] = request.visibleSubProject!;
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListProjects",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListProjectsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListProjectsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listProjects(_ request: ListProjectsRequest) async throws -> ListProjectsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await listProjectsWithOptions(request as! ListProjectsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listWorkerInstancesWithOptions(_ tmpReq: ListWorkerInstancesRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ListWorkerInstancesResponse {
try TeaUtils.Client.validateModel(tmpReq)
var request: ListWorkerInstancesShrinkRequest = ListWorkerInstancesShrinkRequest([:])
AlibabaCloudOpenApiUtil.Client.convert(tmpReq, request)
if (!TeaUtils.Client.isUnset(tmpReq.specs)) {
request.specsShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.specs, "Specs", "json")
}
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.destType)) {
body["DestType"] = request.destType ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceName)) {
body["InstanceName"] = request.instanceName ?? "";
}
if (!TeaUtils.Client.isUnset(request.onlyBindable)) {
body["OnlyBindable"] = request.onlyBindable!;
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
body["PageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
body["PageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.sourceType)) {
body["SourceType"] = request.sourceType ?? "";
}
if (!TeaUtils.Client.isUnset(request.specsShrink)) {
body["Specs"] = request.specsShrink ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListWorkerInstances",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListWorkerInstancesResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListWorkerInstancesResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listWorkerInstances(_ request: ListWorkerInstancesRequest) async throws -> ListWorkerInstancesResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await listWorkerInstancesWithOptions(request as! ListWorkerInstancesRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyDatabaseDescriptionWithOptions(_ request: ModifyDatabaseDescriptionRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ModifyDatabaseDescriptionResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.databaseName)) {
body["DatabaseName"] = request.databaseName ?? "";
}
if (!TeaUtils.Client.isUnset(request.description_)) {
body["Description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ModifyDatabaseDescription",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyDatabaseDescriptionResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyDatabaseDescriptionResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyDatabaseDescription(_ request: ModifyDatabaseDescriptionRequest) async throws -> ModifyDatabaseDescriptionResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await modifyDatabaseDescriptionWithOptions(request as! ModifyDatabaseDescriptionRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyDatabaseUserRolesWithOptions(_ request: ModifyDatabaseUserRolesRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ModifyDatabaseUserRolesResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.databaseName)) {
body["DatabaseName"] = request.databaseName ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
if (!TeaUtils.Client.isUnset(request.users)) {
body["Users"] = request.users ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ModifyDatabaseUserRoles",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyDatabaseUserRolesResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyDatabaseUserRolesResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyDatabaseUserRoles(_ request: ModifyDatabaseUserRolesRequest) async throws -> ModifyDatabaseUserRolesResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await modifyDatabaseUserRolesWithOptions(request as! ModifyDatabaseUserRolesRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyInstanceNameWithOptions(_ request: ModifyInstanceNameRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ModifyInstanceNameResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceName)) {
body["InstanceName"] = request.instanceName ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ModifyInstanceName",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyInstanceNameResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyInstanceNameResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyInstanceName(_ request: ModifyInstanceNameRequest) async throws -> ModifyInstanceNameResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await modifyInstanceNameWithOptions(request as! ModifyInstanceNameRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyInstanceNodeNumWithOptions(_ request: ModifyInstanceNodeNumRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ModifyInstanceNodeNumResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.dryRun)) {
body["DryRun"] = request.dryRun!;
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.nodeNum)) {
body["NodeNum"] = request.nodeNum ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ModifyInstanceNodeNum",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyInstanceNodeNumResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyInstanceNodeNumResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyInstanceNodeNum(_ request: ModifyInstanceNodeNumRequest) async throws -> ModifyInstanceNodeNumResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await modifyInstanceNodeNumWithOptions(request as! ModifyInstanceNodeNumRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyInstanceSSLWithOptions(_ request: ModifyInstanceSSLRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ModifyInstanceSSLResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.enableSSL)) {
body["EnableSSL"] = request.enableSSL ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ModifyInstanceSSL",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyInstanceSSLResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyInstanceSSLResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyInstanceSSL(_ request: ModifyInstanceSSLRequest) async throws -> ModifyInstanceSSLResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await modifyInstanceSSLWithOptions(request as! ModifyInstanceSSLRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyInstanceSpecWithOptions(_ request: ModifyInstanceSpecRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ModifyInstanceSpecResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.diskSize)) {
body["DiskSize"] = request.diskSize!;
}
if (!TeaUtils.Client.isUnset(request.diskType)) {
body["DiskType"] = request.diskType ?? "";
}
if (!TeaUtils.Client.isUnset(request.dryRun)) {
body["DryRun"] = request.dryRun!;
}
if (!TeaUtils.Client.isUnset(request.instanceClass)) {
body["InstanceClass"] = request.instanceClass ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.upgradeSpecNative)) {
body["UpgradeSpecNative"] = request.upgradeSpecNative!;
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ModifyInstanceSpec",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyInstanceSpecResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyInstanceSpecResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyInstanceSpec(_ request: ModifyInstanceSpecRequest) async throws -> ModifyInstanceSpecResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await modifyInstanceSpecWithOptions(request as! ModifyInstanceSpecRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyInstanceTagsWithOptions(_ request: ModifyInstanceTagsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ModifyInstanceTagsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tags)) {
body["Tags"] = request.tags ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ModifyInstanceTags",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyInstanceTagsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyInstanceTagsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyInstanceTags(_ request: ModifyInstanceTagsRequest) async throws -> ModifyInstanceTagsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await modifyInstanceTagsWithOptions(request as! ModifyInstanceTagsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyInstanceTemporaryCapacityWithOptions(_ request: ModifyInstanceTemporaryCapacityRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ModifyInstanceTemporaryCapacityResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.acceptLanguage)) {
body["AcceptLanguage"] = request.acceptLanguage ?? "";
}
if (!TeaUtils.Client.isUnset(request.diskSize)) {
body["DiskSize"] = request.diskSize ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.spec)) {
body["Spec"] = request.spec ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ModifyInstanceTemporaryCapacity",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyInstanceTemporaryCapacityResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyInstanceTemporaryCapacityResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyInstanceTemporaryCapacity(_ request: ModifyInstanceTemporaryCapacityRequest) async throws -> ModifyInstanceTemporaryCapacityResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await modifyInstanceTemporaryCapacityWithOptions(request as! ModifyInstanceTemporaryCapacityRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyParametersWithOptions(_ request: ModifyParametersRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ModifyParametersResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.dimension)) {
body["Dimension"] = request.dimension ?? "";
}
if (!TeaUtils.Client.isUnset(request.dimensionValue)) {
body["DimensionValue"] = request.dimensionValue ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.parameters)) {
body["Parameters"] = request.parameters ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ModifyParameters",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyParametersResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyParametersResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyParameters(_ request: ModifyParametersRequest) async throws -> ModifyParametersResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await modifyParametersWithOptions(request as! ModifyParametersRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifySecurityIpsWithOptions(_ request: ModifySecurityIpsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ModifySecurityIpsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.securityIpGroupName)) {
body["SecurityIpGroupName"] = request.securityIpGroupName ?? "";
}
if (!TeaUtils.Client.isUnset(request.securityIps)) {
body["SecurityIps"] = request.securityIps ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ModifySecurityIps",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifySecurityIpsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifySecurityIpsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifySecurityIps(_ request: ModifySecurityIpsRequest) async throws -> ModifySecurityIpsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await modifySecurityIpsWithOptions(request as! ModifySecurityIpsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTagNameWithOptions(_ request: ModifyTagNameRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ModifyTagNameResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.key)) {
body["Key"] = request.key ?? "";
}
if (!TeaUtils.Client.isUnset(request.newKey)) {
body["NewKey"] = request.newKey ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ModifyTagName",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTagNameResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTagNameResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTagName(_ request: ModifyTagNameRequest) async throws -> ModifyTagNameResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await modifyTagNameWithOptions(request as! ModifyTagNameRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTagValueNameWithOptions(_ request: ModifyTagValueNameRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ModifyTagValueNameResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.key)) {
body["Key"] = request.key ?? "";
}
if (!TeaUtils.Client.isUnset(request.newValue)) {
body["NewValue"] = request.newValue ?? "";
}
if (!TeaUtils.Client.isUnset(request.value)) {
body["Value"] = request.value ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ModifyTagValueName",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTagValueNameResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTagValueNameResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTagValueName(_ request: ModifyTagValueNameRequest) async throws -> ModifyTagValueNameResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await modifyTagValueNameWithOptions(request as! ModifyTagValueNameRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTenantEncryptionWithOptions(_ request: ModifyTenantEncryptionRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ModifyTenantEncryptionResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.encryptionKeyId)) {
body["EncryptionKeyId"] = request.encryptionKeyId ?? "";
}
if (!TeaUtils.Client.isUnset(request.encryptionType)) {
body["EncryptionType"] = request.encryptionType ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ModifyTenantEncryption",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTenantEncryptionResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTenantEncryptionResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTenantEncryption(_ request: ModifyTenantEncryptionRequest) async throws -> ModifyTenantEncryptionResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await modifyTenantEncryptionWithOptions(request as! ModifyTenantEncryptionRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTenantPrimaryZoneWithOptions(_ request: ModifyTenantPrimaryZoneRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ModifyTenantPrimaryZoneResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.masterIntranetAddressZone)) {
body["MasterIntranetAddressZone"] = request.masterIntranetAddressZone ?? "";
}
if (!TeaUtils.Client.isUnset(request.primaryZone)) {
body["PrimaryZone"] = request.primaryZone ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantEndpointDirectId)) {
body["TenantEndpointDirectId"] = request.tenantEndpointDirectId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantEndpointId)) {
body["TenantEndpointId"] = request.tenantEndpointId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
if (!TeaUtils.Client.isUnset(request.userDirectVSwitchId)) {
body["UserDirectVSwitchId"] = request.userDirectVSwitchId ?? "";
}
if (!TeaUtils.Client.isUnset(request.userVSwitchId)) {
body["UserVSwitchId"] = request.userVSwitchId ?? "";
}
if (!TeaUtils.Client.isUnset(request.userVpcOwnerId)) {
body["UserVpcOwnerId"] = request.userVpcOwnerId ?? "";
}
if (!TeaUtils.Client.isUnset(request.vpcId)) {
body["VpcId"] = request.vpcId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ModifyTenantPrimaryZone",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTenantPrimaryZoneResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTenantPrimaryZoneResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTenantPrimaryZone(_ request: ModifyTenantPrimaryZoneRequest) async throws -> ModifyTenantPrimaryZoneResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await modifyTenantPrimaryZoneWithOptions(request as! ModifyTenantPrimaryZoneRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTenantResourceWithOptions(_ request: ModifyTenantResourceRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ModifyTenantResourceResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.cpu)) {
body["Cpu"] = request.cpu!;
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.logDisk)) {
body["LogDisk"] = request.logDisk!;
}
if (!TeaUtils.Client.isUnset(request.memory)) {
body["Memory"] = request.memory!;
}
if (!TeaUtils.Client.isUnset(request.readOnlyZoneList)) {
body["ReadOnlyZoneList"] = request.readOnlyZoneList ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ModifyTenantResource",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTenantResourceResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTenantResourceResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTenantResource(_ request: ModifyTenantResourceRequest) async throws -> ModifyTenantResourceResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await modifyTenantResourceWithOptions(request as! ModifyTenantResourceRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTenantSecurityIpGroupWithOptions(_ request: ModifyTenantSecurityIpGroupRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ModifyTenantSecurityIpGroupResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.securityIpGroupName)) {
body["SecurityIpGroupName"] = request.securityIpGroupName ?? "";
}
if (!TeaUtils.Client.isUnset(request.securityIps)) {
body["SecurityIps"] = request.securityIps ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ModifyTenantSecurityIpGroup",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTenantSecurityIpGroupResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTenantSecurityIpGroupResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTenantSecurityIpGroup(_ request: ModifyTenantSecurityIpGroupRequest) async throws -> ModifyTenantSecurityIpGroupResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await modifyTenantSecurityIpGroupWithOptions(request as! ModifyTenantSecurityIpGroupRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTenantTagsWithOptions(_ request: ModifyTenantTagsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ModifyTenantTagsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tags)) {
body["Tags"] = request.tags ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ModifyTenantTags",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTenantTagsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTenantTagsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTenantTags(_ request: ModifyTenantTagsRequest) async throws -> ModifyTenantTagsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await modifyTenantTagsWithOptions(request as! ModifyTenantTagsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTenantUserDescriptionWithOptions(_ request: ModifyTenantUserDescriptionRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ModifyTenantUserDescriptionResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.description_)) {
body["Description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
if (!TeaUtils.Client.isUnset(request.userName)) {
body["UserName"] = request.userName ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ModifyTenantUserDescription",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTenantUserDescriptionResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTenantUserDescriptionResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTenantUserDescription(_ request: ModifyTenantUserDescriptionRequest) async throws -> ModifyTenantUserDescriptionResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await modifyTenantUserDescriptionWithOptions(request as! ModifyTenantUserDescriptionRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTenantUserPasswordWithOptions(_ request: ModifyTenantUserPasswordRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ModifyTenantUserPasswordResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.encryptionType)) {
body["EncryptionType"] = request.encryptionType ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
if (!TeaUtils.Client.isUnset(request.userName)) {
body["UserName"] = request.userName ?? "";
}
if (!TeaUtils.Client.isUnset(request.userPassword)) {
body["UserPassword"] = request.userPassword ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ModifyTenantUserPassword",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTenantUserPasswordResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTenantUserPasswordResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTenantUserPassword(_ request: ModifyTenantUserPasswordRequest) async throws -> ModifyTenantUserPasswordResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await modifyTenantUserPasswordWithOptions(request as! ModifyTenantUserPasswordRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTenantUserRolesWithOptions(_ request: ModifyTenantUserRolesRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ModifyTenantUserRolesResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.globalPermissions)) {
body["GlobalPermissions"] = request.globalPermissions ?? "";
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.modifyType)) {
body["ModifyType"] = request.modifyType ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
if (!TeaUtils.Client.isUnset(request.userName)) {
body["UserName"] = request.userName ?? "";
}
if (!TeaUtils.Client.isUnset(request.userRole)) {
body["UserRole"] = request.userRole ?? "";
}
if (!TeaUtils.Client.isUnset(request.userType)) {
body["UserType"] = request.userType ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ModifyTenantUserRoles",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTenantUserRolesResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTenantUserRolesResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTenantUserRoles(_ request: ModifyTenantUserRolesRequest) async throws -> ModifyTenantUserRolesResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await modifyTenantUserRolesWithOptions(request as! ModifyTenantUserRolesRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTenantUserStatusWithOptions(_ request: ModifyTenantUserStatusRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ModifyTenantUserStatusResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tenantId)) {
body["TenantId"] = request.tenantId ?? "";
}
if (!TeaUtils.Client.isUnset(request.userName)) {
body["UserName"] = request.userName ?? "";
}
if (!TeaUtils.Client.isUnset(request.userStatus)) {
body["UserStatus"] = request.userStatus ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ModifyTenantUserStatus",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTenantUserStatusResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ModifyTenantUserStatusResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func modifyTenantUserStatus(_ request: ModifyTenantUserStatusRequest) async throws -> ModifyTenantUserStatusResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await modifyTenantUserStatusWithOptions(request as! ModifyTenantUserStatusRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func releaseProjectWithOptions(_ request: ReleaseProjectRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ReleaseProjectResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.id)) {
body["Id"] = request.id ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ReleaseProject",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ReleaseProjectResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ReleaseProjectResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func releaseProject(_ request: ReleaseProjectRequest) async throws -> ReleaseProjectResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await releaseProjectWithOptions(request as! ReleaseProjectRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func releaseWorkerInstanceWithOptions(_ request: ReleaseWorkerInstanceRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ReleaseWorkerInstanceResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.id)) {
body["Id"] = request.id ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ReleaseWorkerInstance",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ReleaseWorkerInstanceResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ReleaseWorkerInstanceResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func releaseWorkerInstance(_ request: ReleaseWorkerInstanceRequest) async throws -> ReleaseWorkerInstanceResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await releaseWorkerInstanceWithOptions(request as! ReleaseWorkerInstanceRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func removeStandbyInstanceWithOptions(_ request: RemoveStandbyInstanceRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> RemoveStandbyInstanceResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.forced)) {
body["Forced"] = request.forced!;
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.targetInstanceId)) {
body["TargetInstanceId"] = request.targetInstanceId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "RemoveStandbyInstance",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(RemoveStandbyInstanceResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(RemoveStandbyInstanceResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func removeStandbyInstance(_ request: RemoveStandbyInstanceRequest) async throws -> RemoveStandbyInstanceResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await removeStandbyInstanceWithOptions(request as! RemoveStandbyInstanceRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func resumeProjectWithOptions(_ request: ResumeProjectRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ResumeProjectResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.id)) {
body["Id"] = request.id ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ResumeProject",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ResumeProjectResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ResumeProjectResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func resumeProject(_ request: ResumeProjectRequest) async throws -> ResumeProjectResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await resumeProjectWithOptions(request as! ResumeProjectRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func retryProjectModifyRecordsWithOptions(_ request: RetryProjectModifyRecordsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> RetryProjectModifyRecordsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.id)) {
body["Id"] = request.id ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "RetryProjectModifyRecords",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(RetryProjectModifyRecordsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(RetryProjectModifyRecordsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func retryProjectModifyRecords(_ request: RetryProjectModifyRecordsRequest) async throws -> RetryProjectModifyRecordsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await retryProjectModifyRecordsWithOptions(request as! RetryProjectModifyRecordsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func startProjectWithOptions(_ request: StartProjectRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> StartProjectResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.id)) {
body["Id"] = request.id ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "StartProject",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(StartProjectResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(StartProjectResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func startProject(_ request: StartProjectRequest) async throws -> StartProjectResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await startProjectWithOptions(request as! StartProjectRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func startProjectsByLabelWithOptions(_ request: StartProjectsByLabelRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> StartProjectsByLabelResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.id)) {
body["Id"] = request.id ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "StartProjectsByLabel",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(StartProjectsByLabelResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(StartProjectsByLabelResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func startProjectsByLabel(_ request: StartProjectsByLabelRequest) async throws -> StartProjectsByLabelResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await startProjectsByLabelWithOptions(request as! StartProjectsByLabelRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func stopProjectWithOptions(_ request: StopProjectRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> StopProjectResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.id)) {
body["Id"] = request.id ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "StopProject",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(StopProjectResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(StopProjectResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func stopProject(_ request: StopProjectRequest) async throws -> StopProjectResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await stopProjectWithOptions(request as! StopProjectRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func stopProjectModifyRecordsWithOptions(_ request: StopProjectModifyRecordsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> StopProjectModifyRecordsResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.id)) {
body["Id"] = request.id ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "StopProjectModifyRecords",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(StopProjectModifyRecordsResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(StopProjectModifyRecordsResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func stopProjectModifyRecords(_ request: StopProjectModifyRecordsRequest) async throws -> StopProjectModifyRecordsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await stopProjectModifyRecordsWithOptions(request as! StopProjectModifyRecordsRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func stopProjectsByLabelWithOptions(_ request: StopProjectsByLabelRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> StopProjectsByLabelResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.id)) {
body["Id"] = request.id ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "StopProjectsByLabel",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(StopProjectsByLabelResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(StopProjectsByLabelResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func stopProjectsByLabel(_ request: StopProjectsByLabelRequest) async throws -> StopProjectsByLabelResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await stopProjectsByLabelWithOptions(request as! StopProjectsByLabelRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func switchoverInstanceWithOptions(_ request: SwitchoverInstanceRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> SwitchoverInstanceResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.forced)) {
body["Forced"] = request.forced!;
}
if (!TeaUtils.Client.isUnset(request.instanceId)) {
body["InstanceId"] = request.instanceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.targetInstanceId)) {
body["TargetInstanceId"] = request.targetInstanceId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "SwitchoverInstance",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(SwitchoverInstanceResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(SwitchoverInstanceResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func switchoverInstance(_ request: SwitchoverInstanceRequest) async throws -> SwitchoverInstanceResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await switchoverInstanceWithOptions(request as! SwitchoverInstanceRequest, runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateProjectConfigWithOptions(_ tmpReq: UpdateProjectConfigRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> UpdateProjectConfigResponse {
try TeaUtils.Client.validateModel(tmpReq)
var request: UpdateProjectConfigShrinkRequest = UpdateProjectConfigShrinkRequest([:])
AlibabaCloudOpenApiUtil.Client.convert(tmpReq, request)
if (!TeaUtils.Client.isUnset(tmpReq.commonTransferConfig)) {
request.commonTransferConfigShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.commonTransferConfig, "CommonTransferConfig", "json")
}
if (!TeaUtils.Client.isUnset(tmpReq.fullTransferConfig)) {
request.fullTransferConfigShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.fullTransferConfig, "FullTransferConfig", "json")
}
if (!TeaUtils.Client.isUnset(tmpReq.incrTransferConfig)) {
request.incrTransferConfigShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.incrTransferConfig, "IncrTransferConfig", "json")
}
if (!TeaUtils.Client.isUnset(tmpReq.reverseIncrTransferConfig)) {
request.reverseIncrTransferConfigShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.reverseIncrTransferConfig, "ReverseIncrTransferConfig", "json")
}
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.commonTransferConfigShrink)) {
body["CommonTransferConfig"] = request.commonTransferConfigShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.fullTransferConfigShrink)) {
body["FullTransferConfig"] = request.fullTransferConfigShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.id)) {
body["Id"] = request.id ?? "";
}
if (!TeaUtils.Client.isUnset(request.incrTransferConfigShrink)) {
body["IncrTransferConfig"] = request.incrTransferConfigShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.reverseIncrTransferConfigShrink)) {
body["ReverseIncrTransferConfig"] = request.reverseIncrTransferConfigShrink ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "UpdateProjectConfig",
"version": "2019-09-01",
"protocol": "HTTPS",
"pathname": "/",
"method": "POST",
"authType": "AK",
"style": "RPC",
"reqBodyType": "formData",
"bodyType": "json"
])
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(UpdateProjectConfigResponse(), tmp)
}
else {
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(UpdateProjectConfigResponse(), tmp)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateProjectConfig(_ request: UpdateProjectConfigRequest) async throws -> UpdateProjectConfigResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
return try await updateProjectConfigWithOptions(request as! UpdateProjectConfigRequest, runtime as! TeaUtils.RuntimeOptions)
}
}