iacservice-20210806/Sources/AlibabacloudIaCService20210806/Client.swift (3,294 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._signatureAlgorithm = "v2"
self._endpointRule = ""
try checkConfig(config as! AlibabacloudOpenApi.Config)
self._endpoint = try getEndpoint("iacservice", 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 associateGroupWithOptions(_ groupId: String, _ request: AssociateGroupRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> AssociateGroupResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.projectId)) {
body["projectId"] = request.projectId ?? "";
}
if (!TeaUtils.Client.isUnset(request.resourceIds)) {
body["resourceIds"] = request.resourceIds ?? [];
}
if (!TeaUtils.Client.isUnset(request.resourceType)) {
body["resourceType"] = request.resourceType ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "AssociateGroup",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/group/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(groupId)) + "/associate",
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(AssociateGroupResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func associateGroup(_ groupId: String, _ request: AssociateGroupRequest) async throws -> AssociateGroupResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await associateGroupWithOptions(groupId as! String, request as! AssociateGroupRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func associateParameterSetWithOptions(_ request: AssociateParameterSetRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> AssociateParameterSetResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.parameterSetIds)) {
body["parameterSetIds"] = request.parameterSetIds ?? [];
}
if (!TeaUtils.Client.isUnset(request.resourceId)) {
body["resourceId"] = request.resourceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.resourceType)) {
body["resourceType"] = request.resourceType ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "AssociateParameterSet",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/parameterSets/operations/associate",
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(AssociateParameterSetResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func associateParameterSet(_ request: AssociateParameterSetRequest) async throws -> AssociateParameterSetResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await associateParameterSetWithOptions(request as! AssociateParameterSetRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func attachRabbitmqPublisherWithOptions(_ publisherId: String, _ request: AttachRabbitmqPublisherRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> AttachRabbitmqPublisherResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.taskId)) {
body["taskId"] = request.taskId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "AttachRabbitmqPublisher",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/publishers/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(publisherId)) + "/attach",
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(AttachRabbitmqPublisherResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func attachRabbitmqPublisher(_ publisherId: String, _ request: AttachRabbitmqPublisherRequest) async throws -> AttachRabbitmqPublisherResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await attachRabbitmqPublisherWithOptions(publisherId as! String, request as! AttachRabbitmqPublisherRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func cancelProjectBuildWithOptions(_ projectId: String, _ projectBuildId: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> CancelProjectBuildResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CancelProjectBuild",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/project/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(projectId)) + "/build/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(projectBuildId)) + "/cancel",
"method": "PUT",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CancelProjectBuildResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func cancelProjectBuild(_ projectId: String, _ projectBuildId: String) async throws -> CancelProjectBuildResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await cancelProjectBuildWithOptions(projectId as! String, projectBuildId as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func cancelRamPolicyExportTaskWithOptions(_ ramPolicyExportTaskId: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> CancelRamPolicyExportTaskResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CancelRamPolicyExportTask",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/ramPolicyExportTasks/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(ramPolicyExportTaskId)) + "/cancel",
"method": "PUT",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CancelRamPolicyExportTaskResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func cancelRamPolicyExportTask(_ ramPolicyExportTaskId: String) async throws -> CancelRamPolicyExportTaskResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await cancelRamPolicyExportTaskWithOptions(ramPolicyExportTaskId as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func cancelResourceExportTaskWithOptions(_ exportTaskId: String, _ request: CancelResourceExportTaskRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> CancelResourceExportTaskResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.ramRole)) {
body["ramRole"] = request.ramRole ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CancelResourceExportTask",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/exportTasks/cancel/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(exportTaskId)),
"method": "PUT",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CancelResourceExportTaskResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func cancelResourceExportTask(_ exportTaskId: String, _ request: CancelResourceExportTaskRequest) async throws -> CancelResourceExportTaskResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await cancelResourceExportTaskWithOptions(exportTaskId as! String, request as! CancelResourceExportTaskRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func checkResourceNameWithOptions(_ request: CheckResourceNameRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> CheckResourceNameResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.id)) {
query["id"] = request.id ?? "";
}
if (!TeaUtils.Client.isUnset(request.name)) {
query["name"] = request.name ?? "";
}
if (!TeaUtils.Client.isUnset(request.parentId)) {
query["parentId"] = request.parentId ?? "";
}
if (!TeaUtils.Client.isUnset(request.resourceType)) {
query["resourceType"] = request.resourceType ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CheckResourceName",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/check/name",
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CheckResourceNameResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func checkResourceName(_ request: CheckResourceNameRequest) async throws -> CheckResourceNameResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await checkResourceNameWithOptions(request as! CheckResourceNameRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func cloneGroupWithOptions(_ groupId: String, _ request: CloneGroupRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> CloneGroupResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.description_)) {
body["description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["name"] = request.name ?? "";
}
if (!TeaUtils.Client.isUnset(request.projectId)) {
body["projectId"] = request.projectId ?? "";
}
if (!TeaUtils.Client.isUnset(request.resourceTypes)) {
body["resourceTypes"] = request.resourceTypes ?? [];
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CloneGroup",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/group/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(groupId)) + "/clone",
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CloneGroupResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func cloneGroup(_ groupId: String, _ request: CloneGroupRequest) async throws -> CloneGroupResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await cloneGroupWithOptions(groupId as! String, request as! CloneGroupRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func cloneModuleWithOptions(_ request: CloneModuleRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> CloneModuleResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.description_)) {
body["description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.moduleId)) {
body["moduleId"] = request.moduleId ?? "";
}
if (!TeaUtils.Client.isUnset(request.moduleSource)) {
body["moduleSource"] = request.moduleSource ?? "";
}
if (!TeaUtils.Client.isUnset(request.moduleVersion)) {
body["moduleVersion"] = request.moduleVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["name"] = request.name ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CloneModule",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/modules/operations/clone",
"method": "PUT",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CloneModuleResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func cloneModule(_ request: CloneModuleRequest) async throws -> CloneModuleResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await cloneModuleWithOptions(request as! CloneModuleRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createAuthorizationWithOptions(_ request: CreateAuthorizationRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateAuthorizationResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.dueTime)) {
body["dueTime"] = request.dueTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.moduleId)) {
body["moduleId"] = request.moduleId ?? "";
}
if (!TeaUtils.Client.isUnset(request.moduleVersion)) {
body["moduleVersion"] = request.moduleVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["name"] = request.name ?? "";
}
if (!TeaUtils.Client.isUnset(request.uid)) {
body["uid"] = request.uid!;
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateAuthorization",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/authorizations",
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateAuthorizationResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createAuthorization(_ request: CreateAuthorizationRequest) async throws -> CreateAuthorizationResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await createAuthorizationWithOptions(request as! CreateAuthorizationRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createExplorerTaskWithOptions(_ request: CreateExplorerTaskRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateExplorerTaskResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.initModuleState)) {
body["InitModuleState"] = request.initModuleState!;
}
if (!TeaUtils.Client.isUnset(request.terraformVersion)) {
body["TerraformVersion"] = request.terraformVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.autoApply)) {
body["autoApply"] = request.autoApply!;
}
if (!TeaUtils.Client.isUnset(request.autoDestroy)) {
body["autoDestroy"] = request.autoDestroy!;
}
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.description_)) {
body["description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.initModuleState)) {
body["initModuleState"] = request.initModuleState!;
}
if (!TeaUtils.Client.isUnset(request.moduleId)) {
body["moduleId"] = request.moduleId ?? "";
}
if (!TeaUtils.Client.isUnset(request.moduleVersion)) {
body["moduleVersion"] = request.moduleVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["name"] = request.name ?? "";
}
if (!TeaUtils.Client.isUnset(request.skipPropertyValidation)) {
body["skipPropertyValidation"] = request.skipPropertyValidation!;
}
if (!TeaUtils.Client.isUnset(request.terraformProviderVersion)) {
body["terraformProviderVersion"] = request.terraformProviderVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.triggerValue)) {
body["triggerValue"] = request.triggerValue ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateExplorerTask",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/explorerTask",
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateExplorerTaskResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createExplorerTask(_ request: CreateExplorerTaskRequest) async throws -> CreateExplorerTaskResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await createExplorerTaskWithOptions(request as! CreateExplorerTaskRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createGroupWithOptions(_ request: CreateGroupRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateGroupResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.autoDestroy)) {
body["autoDestroy"] = request.autoDestroy!;
}
if (!TeaUtils.Client.isUnset(request.autoTrigger)) {
body["autoTrigger"] = request.autoTrigger!;
}
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.description_)) {
body["description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.forcedSetting)) {
body["forcedSetting"] = request.forcedSetting!;
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["name"] = request.name ?? "";
}
if (!TeaUtils.Client.isUnset(request.notifyConfig)) {
body["notifyConfig"] = request.notifyConfig ?? [];
}
if (!TeaUtils.Client.isUnset(request.notifyOperationTypes)) {
body["notifyOperationTypes"] = request.notifyOperationTypes ?? [];
}
if (!TeaUtils.Client.isUnset(request.projectId)) {
body["projectId"] = request.projectId ?? "";
}
if (!TeaUtils.Client.isUnset(request.ramRole)) {
body["ramRole"] = request.ramRole ?? "";
}
if (!TeaUtils.Client.isUnset(request.reportExportField)) {
body["reportExportField"] = request.reportExportField ?? [];
}
if (!TeaUtils.Client.isUnset(request.reportExportPath)) {
body["reportExportPath"] = request.reportExportPath ?? "";
}
if (!TeaUtils.Client.isUnset(request.terraformProviderVersion)) {
body["terraformProviderVersion"] = request.terraformProviderVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.triggerConfig)) {
body["triggerConfig"] = request.triggerConfig ?? [];
}
if (!TeaUtils.Client.isUnset(request.triggerResourceType)) {
body["triggerResourceType"] = request.triggerResourceType ?? [];
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateGroup",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/group",
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateGroupResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createGroup(_ request: CreateGroupRequest) async throws -> CreateGroupResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await createGroupWithOptions(request as! CreateGroupRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createJobWithOptions(_ taskId: String, _ request: CreateJobRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateJobResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.description_)) {
body["description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.executeType)) {
body["executeType"] = request.executeType ?? "";
}
if (!TeaUtils.Client.isUnset(request.subCommand)) {
body["subCommand"] = request.subCommand ?? "";
}
if (!TeaUtils.Client.isUnset(request.taskType)) {
body["taskType"] = request.taskType ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateJob",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/tasks/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(taskId)) + "/jobs",
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateJobResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createJob(_ taskId: String, _ request: CreateJobRequest) async throws -> CreateJobResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await createJobWithOptions(taskId as! String, request as! CreateJobRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createModuleWithOptions(_ request: CreateModuleRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateModuleResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.description_)) {
body["description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.groupInfo)) {
body["groupInfo"] = request.groupInfo!;
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["name"] = request.name ?? "";
}
if (!TeaUtils.Client.isUnset(request.source)) {
body["source"] = request.source ?? "";
}
if (!TeaUtils.Client.isUnset(request.sourcePath)) {
body["sourcePath"] = request.sourcePath ?? "";
}
if (!TeaUtils.Client.isUnset(request.statePath)) {
body["statePath"] = request.statePath ?? "";
}
if (!TeaUtils.Client.isUnset(request.versionStrategy)) {
body["versionStrategy"] = request.versionStrategy ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateModule",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/modules",
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateModuleResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createModule(_ request: CreateModuleRequest) async throws -> CreateModuleResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await createModuleWithOptions(request as! CreateModuleRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createModuleVersionWithOptions(_ moduleId: String, _ request: CreateModuleVersionRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateModuleVersionResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.description_)) {
body["description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["name"] = request.name ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateModuleVersion",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/modules/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(moduleId)) + "/versions",
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateModuleVersionResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createModuleVersion(_ moduleId: String, _ request: CreateModuleVersionRequest) async throws -> CreateModuleVersionResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await createModuleVersionWithOptions(moduleId as! String, request as! CreateModuleVersionRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createParameterSetWithOptions(_ request: CreateParameterSetRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateParameterSetResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.description_)) {
body["description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["name"] = request.name ?? "";
}
if (!TeaUtils.Client.isUnset(request.parameters)) {
body["parameters"] = request.parameters ?? [];
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateParameterSet",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/parameterSets",
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateParameterSetResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createParameterSet(_ request: CreateParameterSetRequest) async throws -> CreateParameterSetResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await createParameterSetWithOptions(request as! CreateParameterSetRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createProjectWithOptions(_ request: CreateProjectRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateProjectResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.description_)) {
body["description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["name"] = request.name ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateProject",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/project",
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
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)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createProject(_ request: CreateProjectRequest) async throws -> CreateProjectResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await createProjectWithOptions(request as! CreateProjectRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createProjectBuildWithOptions(_ projectId: String, _ request: CreateProjectBuildRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateProjectBuildResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.groupId)) {
body["groupId"] = request.groupId ?? "";
}
if (!TeaUtils.Client.isUnset(request.projectBuildAction)) {
body["projectBuildAction"] = request.projectBuildAction ?? "";
}
if (!TeaUtils.Client.isUnset(request.taskIds)) {
body["taskIds"] = request.taskIds ?? [];
}
if (!TeaUtils.Client.isUnset(request.taskPolicies)) {
body["taskPolicies"] = request.taskPolicies ?? [];
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateProjectBuild",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/project/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(projectId)) + "/build",
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateProjectBuildResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createProjectBuild(_ projectId: String, _ request: CreateProjectBuildRequest) async throws -> CreateProjectBuildResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await createProjectBuildWithOptions(projectId as! String, request as! CreateProjectBuildRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createRabbitmqPublisherWithOptions(_ request: CreateRabbitmqPublisherRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateRabbitmqPublisherResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.description_)) {
body["description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.exchangeName)) {
body["exchangeName"] = request.exchangeName ?? "";
}
if (!TeaUtils.Client.isUnset(request.exchangeType)) {
body["exchangeType"] = request.exchangeType ?? "";
}
if (!TeaUtils.Client.isUnset(request.hostName)) {
body["hostName"] = request.hostName ?? "";
}
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.userName)) {
body["userName"] = request.userName ?? "";
}
if (!TeaUtils.Client.isUnset(request.virtualHost)) {
body["virtualHost"] = request.virtualHost ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateRabbitmqPublisher",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/publishers",
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateRabbitmqPublisherResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createRabbitmqPublisher(_ request: CreateRabbitmqPublisherRequest) async throws -> CreateRabbitmqPublisherResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await createRabbitmqPublisherWithOptions(request as! CreateRabbitmqPublisherRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createRamPolicyExportTaskWithOptions(_ request: CreateRamPolicyExportTaskRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateRamPolicyExportTaskResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.authorizationAccountIds)) {
body["authorizationAccountIds"] = request.authorizationAccountIds ?? [];
}
if (!TeaUtils.Client.isUnset(request.authorizationActions)) {
body["authorizationActions"] = request.authorizationActions ?? [];
}
if (!TeaUtils.Client.isUnset(request.authorizationRegionIds)) {
body["authorizationRegionIds"] = request.authorizationRegionIds ?? [];
}
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.moduleId)) {
body["moduleId"] = request.moduleId ?? "";
}
if (!TeaUtils.Client.isUnset(request.moduleVersion)) {
body["moduleVersion"] = request.moduleVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["name"] = request.name ?? "";
}
if (!TeaUtils.Client.isUnset(request.ramRole)) {
body["ramRole"] = request.ramRole ?? "";
}
if (!TeaUtils.Client.isUnset(request.terraformProviderVersion)) {
body["terraformProviderVersion"] = request.terraformProviderVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.triggerStrategy)) {
body["triggerStrategy"] = request.triggerStrategy ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateRamPolicyExportTask",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/ramPolicyExportTasks",
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateRamPolicyExportTaskResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createRamPolicyExportTask(_ request: CreateRamPolicyExportTaskRequest) async throws -> CreateRamPolicyExportTaskResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await createRamPolicyExportTaskWithOptions(request as! CreateRamPolicyExportTaskRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createResourceExportTaskWithOptions(_ request: CreateResourceExportTaskRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateResourceExportTaskResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.configPath)) {
body["configPath"] = request.configPath ?? "";
}
if (!TeaUtils.Client.isUnset(request.description_)) {
body["description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.excludeRules)) {
body["excludeRules"] = request.excludeRules ?? [];
}
if (!TeaUtils.Client.isUnset(request.exportToModule)) {
body["exportToModule"] = request.exportToModule!;
}
if (!TeaUtils.Client.isUnset(request.includeRules)) {
body["includeRules"] = request.includeRules ?? [];
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["name"] = request.name ?? "";
}
if (!TeaUtils.Client.isUnset(request.ramRole)) {
body["ramRole"] = request.ramRole ?? "";
}
if (!TeaUtils.Client.isUnset(request.terraformProviderVersion)) {
body["terraformProviderVersion"] = request.terraformProviderVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.terraformVersion)) {
body["terraformVersion"] = request.terraformVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.triggerStrategy)) {
body["triggerStrategy"] = request.triggerStrategy ?? "";
}
if (!TeaUtils.Client.isUnset(request.variables)) {
body["variables"] = request.variables ?? [];
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateResourceExportTask",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/exportTasks",
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateResourceExportTaskResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createResourceExportTask(_ request: CreateResourceExportTaskRequest) async throws -> CreateResourceExportTaskResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await createResourceExportTaskWithOptions(request as! CreateResourceExportTaskRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createTaskWithOptions(_ request: CreateTaskRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateTaskResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.autoApply)) {
body["autoApply"] = request.autoApply!;
}
if (!TeaUtils.Client.isUnset(request.autoDestroy)) {
body["autoDestroy"] = request.autoDestroy!;
}
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.description_)) {
body["description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.groupInfo)) {
body["groupInfo"] = request.groupInfo!;
}
if (!TeaUtils.Client.isUnset(request.initModuleState)) {
body["initModuleState"] = request.initModuleState!;
}
if (!TeaUtils.Client.isUnset(request.moduleId)) {
body["moduleId"] = request.moduleId ?? "";
}
if (!TeaUtils.Client.isUnset(request.moduleVersion)) {
body["moduleVersion"] = request.moduleVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["name"] = request.name ?? "";
}
if (!TeaUtils.Client.isUnset(request.parameters)) {
body["parameters"] = request.parameters ?? [:];
}
if (!TeaUtils.Client.isUnset(request.protectionStrategy)) {
body["protectionStrategy"] = request.protectionStrategy ?? [];
}
if (!TeaUtils.Client.isUnset(request.ramRole)) {
body["ramRole"] = request.ramRole ?? "";
}
if (!TeaUtils.Client.isUnset(request.skipPropertyValidation)) {
body["skipPropertyValidation"] = request.skipPropertyValidation!;
}
if (!TeaUtils.Client.isUnset(request.taskBackend)) {
body["taskBackend"] = request.taskBackend!;
}
if (!TeaUtils.Client.isUnset(request.terraformVersion)) {
body["terraformVersion"] = request.terraformVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.triggerStrategy)) {
body["triggerStrategy"] = request.triggerStrategy ?? "";
}
if (!TeaUtils.Client.isUnset(request.triggerValue)) {
body["triggerValue"] = request.triggerValue ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "CreateTask",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/tasks",
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(CreateTaskResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func createTask(_ request: CreateTaskRequest) async throws -> CreateTaskResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await createTaskWithOptions(request as! CreateTaskRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteAuthorizationWithOptions(_ authorizationId: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteAuthorizationResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DeleteAuthorization",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/authorizations/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(authorizationId)),
"method": "DELETE",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteAuthorizationResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteAuthorization(_ authorizationId: String) async throws -> DeleteAuthorizationResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await deleteAuthorizationWithOptions(authorizationId as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteGroupWithOptions(_ groupId: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteGroupResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DeleteGroup",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/group/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(groupId)),
"method": "DELETE",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteGroupResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteGroup(_ groupId: String) async throws -> DeleteGroupResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await deleteGroupWithOptions(groupId as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteModuleWithOptions(_ moduleId: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteModuleResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DeleteModule",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/modules/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(moduleId)),
"method": "DELETE",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteModuleResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteModule(_ moduleId: String) async throws -> DeleteModuleResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await deleteModuleWithOptions(moduleId as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteParameterSetWithOptions(_ parameterSetId: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteParameterSetResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DeleteParameterSet",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/parameterSets/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(parameterSetId)),
"method": "DELETE",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteParameterSetResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteParameterSet(_ parameterSetId: String) async throws -> DeleteParameterSetResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await deleteParameterSetWithOptions(parameterSetId as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteProjectWithOptions(_ projectId: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteProjectResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DeleteProject",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/project/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(projectId)),
"method": "DELETE",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
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)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteProject(_ projectId: String) async throws -> DeleteProjectResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await deleteProjectWithOptions(projectId as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteRabbitmqPublisherWithOptions(_ publisherId: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteRabbitmqPublisherResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DeleteRabbitmqPublisher",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/publishers/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(publisherId)),
"method": "DELETE",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteRabbitmqPublisherResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteRabbitmqPublisher(_ publisherId: String) async throws -> DeleteRabbitmqPublisherResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await deleteRabbitmqPublisherWithOptions(publisherId as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteRamPolicyExportTaskWithOptions(_ ramPolicyExportTaskId: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteRamPolicyExportTaskResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DeleteRamPolicyExportTask",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/ramPolicyExportTasks/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(ramPolicyExportTaskId)),
"method": "DELETE",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteRamPolicyExportTaskResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteRamPolicyExportTask(_ ramPolicyExportTaskId: String) async throws -> DeleteRamPolicyExportTaskResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await deleteRamPolicyExportTaskWithOptions(ramPolicyExportTaskId as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteRamPolicyExportTaskVersionWithOptions(_ ramPolicyExportTaskId: String, _ exportVersion: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteRamPolicyExportTaskVersionResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DeleteRamPolicyExportTaskVersion",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/ramPolicyExportTasks/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(ramPolicyExportTaskId)) + "/versions/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(exportVersion)),
"method": "DELETE",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteRamPolicyExportTaskVersionResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteRamPolicyExportTaskVersion(_ ramPolicyExportTaskId: String, _ exportVersion: String) async throws -> DeleteRamPolicyExportTaskVersionResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await deleteRamPolicyExportTaskVersionWithOptions(ramPolicyExportTaskId as! String, exportVersion as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteResourceExportTaskWithOptions(_ exportTaskId: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteResourceExportTaskResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DeleteResourceExportTask",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/exportTasks/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(exportTaskId)),
"method": "DELETE",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteResourceExportTaskResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteResourceExportTask(_ exportTaskId: String) async throws -> DeleteResourceExportTaskResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await deleteResourceExportTaskWithOptions(exportTaskId as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteSceneTestingTaskWithOptions(_ taskId: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteSceneTestingTaskResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DeleteSceneTestingTask",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/sceneTestingTask/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(taskId)),
"method": "DELETE",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteSceneTestingTaskResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteSceneTestingTask(_ taskId: String) async throws -> DeleteSceneTestingTaskResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await deleteSceneTestingTaskWithOptions(taskId as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteTaskWithOptions(_ taskId: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteTaskResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DeleteTask",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/tasks/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(taskId)),
"method": "DELETE",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DeleteTaskResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func deleteTask(_ taskId: String) async throws -> DeleteTaskResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await deleteTaskWithOptions(taskId as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func detachRabbitmqPublisherWithOptions(_ publisherId: String, _ request: DetachRabbitmqPublisherRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> DetachRabbitmqPublisherResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.taskId)) {
body["taskId"] = request.taskId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DetachRabbitmqPublisher",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/publishers/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(publisherId)) + "/detach",
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DetachRabbitmqPublisherResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func detachRabbitmqPublisher(_ publisherId: String, _ request: DetachRabbitmqPublisherRequest) async throws -> DetachRabbitmqPublisherResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await detachRabbitmqPublisherWithOptions(publisherId as! String, request as! DetachRabbitmqPublisherRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func dissociateGroupWithOptions(_ projectId: String, _ groupId: String, _ request: DissociateGroupRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> DissociateGroupResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.resourceIds)) {
body["resourceIds"] = request.resourceIds ?? [];
}
if (!TeaUtils.Client.isUnset(request.resourceType)) {
body["resourceType"] = request.resourceType ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DissociateGroup",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/group/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(groupId)) + "/dissociate",
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DissociateGroupResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func dissociateGroup(_ projectId: String, _ groupId: String, _ request: DissociateGroupRequest) async throws -> DissociateGroupResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await dissociateGroupWithOptions(projectId as! String, groupId as! String, request as! DissociateGroupRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func dissociateParameterSetWithOptions(_ request: DissociateParameterSetRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> DissociateParameterSetResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.parameterSetIds)) {
body["parameterSetIds"] = request.parameterSetIds ?? [];
}
if (!TeaUtils.Client.isUnset(request.resourceId)) {
body["resourceId"] = request.resourceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.resourceType)) {
body["resourceType"] = request.resourceType ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "DissociateParameterSet",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/parameterSets/operations/dissociate",
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(DissociateParameterSetResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func dissociateParameterSet(_ request: DissociateParameterSetRequest) async throws -> DissociateParameterSetResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await dissociateParameterSetWithOptions(request as! DissociateParameterSetRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func executeRamPolicyExportTaskWithOptions(_ ramPolicyExportTaskId: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ExecuteRamPolicyExportTaskResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ExecuteRamPolicyExportTask",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/ramPolicyExportTasks/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(ramPolicyExportTaskId)) + "/execute",
"method": "PUT",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ExecuteRamPolicyExportTaskResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func executeRamPolicyExportTask(_ ramPolicyExportTaskId: String) async throws -> ExecuteRamPolicyExportTaskResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await executeRamPolicyExportTaskWithOptions(ramPolicyExportTaskId as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func executeResourceExportTaskWithOptions(_ exportTaskId: String, _ request: ExecuteResourceExportTaskRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ExecuteResourceExportTaskResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.ramRole)) {
body["ramRole"] = request.ramRole ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ExecuteResourceExportTask",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/exportTasks/execute/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(exportTaskId)),
"method": "PUT",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ExecuteResourceExportTaskResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func executeResourceExportTask(_ exportTaskId: String, _ request: ExecuteResourceExportTaskRequest) async throws -> ExecuteResourceExportTaskResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await executeResourceExportTaskWithOptions(exportTaskId as! String, request as! ExecuteResourceExportTaskRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getExplorerTaskWithOptions(_ explorerTaskId: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> GetExplorerTaskResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "GetExplorerTask",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/explorerTask/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(explorerTaskId)),
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(GetExplorerTaskResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getExplorerTask(_ explorerTaskId: String) async throws -> GetExplorerTaskResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await getExplorerTaskWithOptions(explorerTaskId as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getGroupWithOptions(_ groupId: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> GetGroupResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "GetGroup",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/group/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(groupId)),
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(GetGroupResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getGroup(_ groupId: String) async throws -> GetGroupResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await getGroupWithOptions(groupId as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getJobWithOptions(_ taskId: String, _ jobId: String, _ request: GetJobRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> GetJobResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.taskType)) {
query["taskType"] = request.taskType ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "GetJob",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/tasks/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(taskId)) + "/jobs/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(jobId)),
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(GetJobResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getJob(_ taskId: String, _ jobId: String, _ request: GetJobRequest) async throws -> GetJobResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await getJobWithOptions(taskId as! String, jobId as! String, request as! GetJobRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getModuleWithOptions(_ moduleId: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> GetModuleResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "GetModule",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/modules/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(moduleId)),
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(GetModuleResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getModule(_ moduleId: String) async throws -> GetModuleResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await getModuleWithOptions(moduleId as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getModuleVersionWithOptions(_ moduleId: String, _ moduleVersion: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> GetModuleVersionResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "GetModuleVersion",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/modules/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(moduleId)) + "/versions/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(moduleVersion)),
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(GetModuleVersionResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getModuleVersion(_ moduleId: String, _ moduleVersion: String) async throws -> GetModuleVersionResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await getModuleVersionWithOptions(moduleId as! String, moduleVersion as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getParameterSetWithOptions(_ parameterSetId: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> GetParameterSetResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "GetParameterSet",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/parameterSets/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(parameterSetId)),
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(GetParameterSetResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getParameterSet(_ parameterSetId: String) async throws -> GetParameterSetResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await getParameterSetWithOptions(parameterSetId as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getProjectWithOptions(_ projectId: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> GetProjectResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "GetProject",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/project/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(projectId)),
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(GetProjectResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getProject(_ projectId: String) async throws -> GetProjectResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await getProjectWithOptions(projectId as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getProjectBuildContextWithOptions(_ projectId: String, _ projectBuildId: String, _ request: GetProjectBuildContextRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> GetProjectBuildContextResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.isPassAssertCheck)) {
query["isPassAssertCheck"] = request.isPassAssertCheck!;
}
if (!TeaUtils.Client.isUnset(request.status)) {
query["status"] = request.status ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "GetProjectBuildContext",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/project/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(projectId)) + "/build/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(projectBuildId)),
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(GetProjectBuildContextResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getProjectBuildContext(_ projectId: String, _ projectBuildId: String, _ request: GetProjectBuildContextRequest) async throws -> GetProjectBuildContextResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await getProjectBuildContextWithOptions(projectId as! String, projectBuildId as! String, request as! GetProjectBuildContextRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getRabbitmqPublisherWithOptions(_ publisherId: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> GetRabbitmqPublisherResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "GetRabbitmqPublisher",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/publishers/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(publisherId)),
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(GetRabbitmqPublisherResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getRabbitmqPublisher(_ publisherId: String) async throws -> GetRabbitmqPublisherResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await getRabbitmqPublisherWithOptions(publisherId as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getRamPolicyExportTaskWithOptions(_ ramPolicyExportTaskId: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> GetRamPolicyExportTaskResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "GetRamPolicyExportTask",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/ramPolicyExportTasks/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(ramPolicyExportTaskId)),
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(GetRamPolicyExportTaskResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getRamPolicyExportTask(_ ramPolicyExportTaskId: String) async throws -> GetRamPolicyExportTaskResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await getRamPolicyExportTaskWithOptions(ramPolicyExportTaskId as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getRamPolicyExportTaskVersionWithOptions(_ ramPolicyExportTaskId: String, _ exportVersion: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> GetRamPolicyExportTaskVersionResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "GetRamPolicyExportTaskVersion",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/ramPolicyExportTasks/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(ramPolicyExportTaskId)) + "/versions/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(exportVersion)),
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(GetRamPolicyExportTaskVersionResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getRamPolicyExportTaskVersion(_ ramPolicyExportTaskId: String, _ exportVersion: String) async throws -> GetRamPolicyExportTaskVersionResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await getRamPolicyExportTaskVersionWithOptions(ramPolicyExportTaskId as! String, exportVersion as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getResourceExportTaskWithOptions(_ exportTaskId: String, _ request: GetResourceExportTaskRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> GetResourceExportTaskResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.exportVersion)) {
query["exportVersion"] = request.exportVersion ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "GetResourceExportTask",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/exportTasks/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(exportTaskId)),
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(GetResourceExportTaskResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getResourceExportTask(_ exportTaskId: String, _ request: GetResourceExportTaskRequest) async throws -> GetResourceExportTaskResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await getResourceExportTaskWithOptions(exportTaskId as! String, request as! GetResourceExportTaskRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getTaskWithOptions(_ taskId: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> GetTaskResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "GetTask",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/tasks/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(taskId)),
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(GetTaskResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getTask(_ taskId: String) async throws -> GetTaskResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await getTaskWithOptions(taskId as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getTaskPolicyWithOptions(_ groupId: String, _ request: GetTaskPolicyRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> GetTaskPolicyResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.type)) {
query["type"] = request.type ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "GetTaskPolicy",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/group/task/policy/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(groupId)),
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(GetTaskPolicyResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func getTaskPolicy(_ groupId: String, _ request: GetTaskPolicyRequest) async throws -> GetTaskPolicyResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await getTaskPolicyWithOptions(groupId as! String, request as! GetTaskPolicyRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listAuthorizationsWithOptions(_ request: ListAuthorizationsRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ListAuthorizationsResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.authorizationId)) {
query["authorizationId"] = request.authorizationId ?? "";
}
if (!TeaUtils.Client.isUnset(request.authorizationType)) {
query["authorizationType"] = request.authorizationType ?? "";
}
if (!TeaUtils.Client.isUnset(request.keyword)) {
query["keyword"] = request.keyword ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
query["pageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
query["pageSize"] = request.pageSize!;
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListAuthorizations",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/authorizations",
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListAuthorizationsResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listAuthorizations(_ request: ListAuthorizationsRequest) async throws -> ListAuthorizationsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await listAuthorizationsWithOptions(request as! ListAuthorizationsRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listAvailableTerraformVersionsWithOptions(_ request: ListAvailableTerraformVersionsRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ListAvailableTerraformVersionsResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.keyWord)) {
query["keyWord"] = request.keyWord ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
query["pageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
query["pageSize"] = request.pageSize!;
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListAvailableTerraformVersions",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/version/terraform",
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListAvailableTerraformVersionsResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listAvailableTerraformVersions(_ request: ListAvailableTerraformVersionsRequest) async throws -> ListAvailableTerraformVersionsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await listAvailableTerraformVersionsWithOptions(request as! ListAvailableTerraformVersionsRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listExplorerTasksWithOptions(_ explorerTaskId: String, _ request: ListExplorerTasksRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ListExplorerTasksResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.keyword)) {
query["keyword"] = request.keyword ?? "";
}
if (!TeaUtils.Client.isUnset(request.maxResult)) {
query["maxResult"] = request.maxResult ?? "";
}
if (!TeaUtils.Client.isUnset(request.moduleId)) {
query["moduleId"] = request.moduleId ?? "";
}
if (!TeaUtils.Client.isUnset(request.nextToken)) {
query["nextToken"] = request.nextToken ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListExplorerTasks",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/explorerTask",
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListExplorerTasksResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listExplorerTasks(_ explorerTaskId: String, _ request: ListExplorerTasksRequest) async throws -> ListExplorerTasksResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await listExplorerTasksWithOptions(explorerTaskId as! String, request as! ListExplorerTasksRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listGroupWithOptions(_ tmpReq: ListGroupRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ListGroupResponse {
try TeaUtils.Client.validateModel(tmpReq)
var request: ListGroupShrinkRequest = ListGroupShrinkRequest([:])
AlibabaCloudOpenApiUtil.Client.convert(tmpReq, request)
if (!TeaUtils.Client.isUnset(tmpReq.tag)) {
request.tagShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.tag, "tag", "json")
}
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.keyword)) {
query["keyword"] = request.keyword ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
query["pageNumber"] = request.pageNumber ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
query["pageSize"] = request.pageSize ?? "";
}
if (!TeaUtils.Client.isUnset(request.projectId)) {
query["projectId"] = request.projectId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tagShrink)) {
query["tag"] = request.tagShrink ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListGroup",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/group",
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListGroupResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listGroup(_ request: ListGroupRequest) async throws -> ListGroupResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await listGroupWithOptions(request as! ListGroupRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listJobsWithOptions(_ taskId: String, _ request: ListJobsRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ListJobsResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
query["pageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
query["pageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.status)) {
query["status"] = request.status ?? "";
}
if (!TeaUtils.Client.isUnset(request.taskType)) {
query["taskType"] = request.taskType ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListJobs",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/tasks/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(taskId)) + "/jobs",
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListJobsResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listJobs(_ taskId: String, _ request: ListJobsRequest) async throws -> ListJobsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await listJobsWithOptions(taskId as! String, request as! ListJobsRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listModuleVersionWithOptions(_ moduleId: String, _ request: ListModuleVersionRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ListModuleVersionResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.keyword)) {
query["keyword"] = request.keyword ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
query["pageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
query["pageSize"] = request.pageSize!;
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListModuleVersion",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/modules/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(moduleId)) + "/versions",
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListModuleVersionResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listModuleVersion(_ moduleId: String, _ request: ListModuleVersionRequest) async throws -> ListModuleVersionResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await listModuleVersionWithOptions(moduleId as! String, request as! ListModuleVersionRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listModulesWithOptions(_ tmpReq: ListModulesRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ListModulesResponse {
try TeaUtils.Client.validateModel(tmpReq)
var request: ListModulesShrinkRequest = ListModulesShrinkRequest([:])
AlibabaCloudOpenApiUtil.Client.convert(tmpReq, request)
if (!TeaUtils.Client.isUnset(tmpReq.excludeModuleIds)) {
request.excludeModuleIdsShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.excludeModuleIds, "excludeModuleIds", "simple")
}
if (!TeaUtils.Client.isUnset(tmpReq.tag)) {
request.tagShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.tag, "tag", "json")
}
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.excludeModuleIdsShrink)) {
query["excludeModuleIds"] = request.excludeModuleIdsShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.groupId)) {
query["groupId"] = request.groupId ?? "";
}
if (!TeaUtils.Client.isUnset(request.keyword)) {
query["keyword"] = request.keyword ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
query["pageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
query["pageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.projectId)) {
query["projectId"] = request.projectId ?? "";
}
if (!TeaUtils.Client.isUnset(request.tagShrink)) {
query["tag"] = request.tagShrink ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListModules",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/modules",
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListModulesResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listModules(_ request: ListModulesRequest) async throws -> ListModulesResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await listModulesWithOptions(request as! ListModulesRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listParameterSetRelationWithOptions(_ request: ListParameterSetRelationRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ListParameterSetRelationResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.resourceId)) {
query["resourceId"] = request.resourceId ?? "";
}
if (!TeaUtils.Client.isUnset(request.resourceType)) {
query["resourceType"] = request.resourceType ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListParameterSetRelation",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/parameterSets/operations/relation",
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListParameterSetRelationResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listParameterSetRelation(_ request: ListParameterSetRelationRequest) async throws -> ListParameterSetRelationResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await listParameterSetRelationWithOptions(request as! ListParameterSetRelationRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listParameterSetsWithOptions(_ request: ListParameterSetsRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ListParameterSetsResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.keyword)) {
query["keyword"] = request.keyword ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
query["pageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
query["pageSize"] = request.pageSize!;
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListParameterSets",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/parameterSets",
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListParameterSetsResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listParameterSets(_ request: ListParameterSetsRequest) async throws -> ListParameterSetsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await listParameterSetsWithOptions(request as! ListParameterSetsRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listProjectWithOptions(_ tmpReq: ListProjectRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ListProjectResponse {
try TeaUtils.Client.validateModel(tmpReq)
var request: ListProjectShrinkRequest = ListProjectShrinkRequest([:])
AlibabaCloudOpenApiUtil.Client.convert(tmpReq, request)
if (!TeaUtils.Client.isUnset(tmpReq.tag)) {
request.tagShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.tag, "tag", "json")
}
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.keyword)) {
query["keyword"] = request.keyword ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
query["pageNumber"] = request.pageNumber ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
query["pageSize"] = request.pageSize ?? "";
}
if (!TeaUtils.Client.isUnset(request.tagShrink)) {
query["tag"] = request.tagShrink ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListProject",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/project",
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListProjectResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listProject(_ request: ListProjectRequest) async throws -> ListProjectResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await listProjectWithOptions(request as! ListProjectRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listProjectBuildsWithOptions(_ projectId: String, _ request: ListProjectBuildsRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ListProjectBuildsResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.groupId)) {
query["groupId"] = request.groupId ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
query["pageNumber"] = request.pageNumber ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
query["pageSize"] = request.pageSize ?? "";
}
if (!TeaUtils.Client.isUnset(request.projectBuildAction)) {
query["projectBuildAction"] = request.projectBuildAction ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListProjectBuilds",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/project/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(projectId)) + "/build",
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListProjectBuildsResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listProjectBuilds(_ projectId: String, _ request: ListProjectBuildsRequest) async throws -> ListProjectBuildsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await listProjectBuildsWithOptions(projectId as! String, request as! ListProjectBuildsRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listRabbitmqPublishersWithOptions(_ request: ListRabbitmqPublishersRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ListRabbitmqPublishersResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.keyword)) {
query["keyword"] = request.keyword ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
query["pageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
query["pageSize"] = request.pageSize!;
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListRabbitmqPublishers",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/publishers",
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListRabbitmqPublishersResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listRabbitmqPublishers(_ request: ListRabbitmqPublishersRequest) async throws -> ListRabbitmqPublishersResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await listRabbitmqPublishersWithOptions(request as! ListRabbitmqPublishersRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listRamPolicyExportTaskVersionsWithOptions(_ ramPolicyExportTaskId: String, _ request: ListRamPolicyExportTaskVersionsRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ListRamPolicyExportTaskVersionsResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
query["pageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
query["pageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.status)) {
query["status"] = request.status ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListRamPolicyExportTaskVersions",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/ramPolicyExportTasks/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(ramPolicyExportTaskId)) + "/versions",
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListRamPolicyExportTaskVersionsResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listRamPolicyExportTaskVersions(_ ramPolicyExportTaskId: String, _ request: ListRamPolicyExportTaskVersionsRequest) async throws -> ListRamPolicyExportTaskVersionsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await listRamPolicyExportTaskVersionsWithOptions(ramPolicyExportTaskId as! String, request as! ListRamPolicyExportTaskVersionsRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listRamPolicyExportTasksWithOptions(_ request: ListRamPolicyExportTasksRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ListRamPolicyExportTasksResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.keyword)) {
query["keyword"] = request.keyword ?? "";
}
if (!TeaUtils.Client.isUnset(request.moduleId)) {
query["moduleId"] = request.moduleId ?? "";
}
if (!TeaUtils.Client.isUnset(request.moduleVersion)) {
query["moduleVersion"] = request.moduleVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
query["pageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
query["pageSize"] = request.pageSize!;
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListRamPolicyExportTasks",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/ramPolicyExportTasks",
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListRamPolicyExportTasksResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listRamPolicyExportTasks(_ request: ListRamPolicyExportTasksRequest) async throws -> ListRamPolicyExportTasksResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await listRamPolicyExportTasksWithOptions(request as! ListRamPolicyExportTasksRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listResourceExportTaskVersionsWithOptions(_ exportTaskId: String, _ request: ListResourceExportTaskVersionsRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ListResourceExportTaskVersionsResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.exportVersion)) {
query["exportVersion"] = request.exportVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.keyword)) {
query["keyword"] = request.keyword ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
query["pageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
query["pageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.status)) {
query["status"] = request.status ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListResourceExportTaskVersions",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/exportTasks/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(exportTaskId)) + "/exportVersions",
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListResourceExportTaskVersionsResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listResourceExportTaskVersions(_ exportTaskId: String, _ request: ListResourceExportTaskVersionsRequest) async throws -> ListResourceExportTaskVersionsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await listResourceExportTaskVersionsWithOptions(exportTaskId as! String, request as! ListResourceExportTaskVersionsRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listResourceExportTasksWithOptions(_ request: ListResourceExportTasksRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ListResourceExportTasksResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.exportTaskId)) {
query["exportTaskId"] = request.exportTaskId ?? "";
}
if (!TeaUtils.Client.isUnset(request.keyword)) {
query["keyword"] = request.keyword ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
query["pageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
query["pageSize"] = request.pageSize!;
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListResourceExportTasks",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/exportTasks",
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListResourceExportTasksResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listResourceExportTasks(_ request: ListResourceExportTasksRequest) async throws -> ListResourceExportTasksResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await listResourceExportTasksWithOptions(request as! ListResourceExportTasksRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listResourcesWithOptions(_ request: ListResourcesRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ListResourcesResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
query["pageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
query["pageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.sourceType)) {
query["sourceType"] = request.sourceType ?? "";
}
if (!TeaUtils.Client.isUnset(request.sourceValue)) {
query["sourceValue"] = request.sourceValue ?? "";
}
if (!TeaUtils.Client.isUnset(request.specType)) {
query["specType"] = request.specType ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListResources",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/resources/stateparser",
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListResourcesResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listResources(_ request: ListResourcesRequest) async throws -> ListResourcesResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await listResourcesWithOptions(request as! ListResourcesRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listTasksWithOptions(_ tmpReq: ListTasksRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ListTasksResponse {
try TeaUtils.Client.validateModel(tmpReq)
var request: ListTasksShrinkRequest = ListTasksShrinkRequest([:])
AlibabaCloudOpenApiUtil.Client.convert(tmpReq, request)
if (!TeaUtils.Client.isUnset(tmpReq.excludeTaskIds)) {
request.excludeTaskIdsShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.excludeTaskIds, "excludeTaskIds", "simple")
}
if (!TeaUtils.Client.isUnset(tmpReq.tag)) {
request.tagShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.tag, "tag", "json")
}
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.excludeTaskIdsShrink)) {
query["excludeTaskIds"] = request.excludeTaskIdsShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.groupId)) {
query["groupId"] = request.groupId ?? "";
}
if (!TeaUtils.Client.isUnset(request.keyword)) {
query["keyword"] = request.keyword ?? "";
}
if (!TeaUtils.Client.isUnset(request.moduleId)) {
query["moduleId"] = request.moduleId ?? "";
}
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
query["pageNumber"] = request.pageNumber!;
}
if (!TeaUtils.Client.isUnset(request.pageSize)) {
query["pageSize"] = request.pageSize!;
}
if (!TeaUtils.Client.isUnset(request.projectId)) {
query["projectId"] = request.projectId ?? "";
}
if (!TeaUtils.Client.isUnset(request.status)) {
query["status"] = request.status ?? "";
}
if (!TeaUtils.Client.isUnset(request.tagShrink)) {
query["tag"] = request.tagShrink ?? "";
}
if (!TeaUtils.Client.isUnset(request.taskId)) {
query["taskId"] = request.taskId ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListTasks",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/tasks",
"method": "GET",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListTasksResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listTasks(_ request: ListTasksRequest) async throws -> ListTasksResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await listTasksWithOptions(request as! ListTasksRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listTerraformProviderVersionsWithOptions(_ request: ListTerraformProviderVersionsRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ListTerraformProviderVersionsResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.keyword)) {
query["keyword"] = request.keyword ?? "";
}
if (!TeaUtils.Client.isUnset(request.maxResults)) {
query["maxResults"] = request.maxResults!;
}
if (!TeaUtils.Client.isUnset(request.nextToken)) {
query["nextToken"] = request.nextToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.usage)) {
query["usage"] = request.usage ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "ListTerraformProviderVersions",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/version/terraform/provider",
"method": "GET",
"authType": "Anonymous",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(ListTerraformProviderVersionsResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func listTerraformProviderVersions(_ request: ListTerraformProviderVersionsRequest) async throws -> ListTerraformProviderVersionsResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await listTerraformProviderVersionsWithOptions(request as! ListTerraformProviderVersionsRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func operateJobWithOptions(_ taskId: String, _ jobId: String, _ operationType: String, _ request: OperateJobRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> OperateJobResponse {
try TeaUtils.Client.validateModel(request)
var query: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.comment)) {
query["comment"] = request.comment ?? "";
}
if (!TeaUtils.Client.isUnset(request.taskType)) {
query["taskType"] = request.taskType ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"query": AlibabaCloudOpenApiUtil.Client.query(query)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "OperateJob",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/tasks/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(taskId)) + "/jobs/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(jobId)) + "/operation/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(operationType)),
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(OperateJobResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func operateJob(_ taskId: String, _ jobId: String, _ operationType: String, _ request: OperateJobRequest) async throws -> OperateJobResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await operateJobWithOptions(taskId as! String, jobId as! String, operationType as! String, request as! OperateJobRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func removeResourceExportTaskVersionWithOptions(_ exportTaskId: String, _ exportVersion: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> RemoveResourceExportTaskVersionResponse {
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String]
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "RemoveResourceExportTaskVersion",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/exportTasks/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(exportTaskId)) + "/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(exportVersion)),
"method": "DELETE",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(RemoveResourceExportTaskVersionResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func removeResourceExportTaskVersion(_ exportTaskId: String, _ exportVersion: String) async throws -> RemoveResourceExportTaskVersionResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await removeResourceExportTaskVersionWithOptions(exportTaskId as! String, exportVersion as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func tagResourcesWithOptions(_ request: TagResourcesRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> TagResourcesResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.regionId)) {
body["regionId"] = request.regionId ?? "";
}
if (!TeaUtils.Client.isUnset(request.resourceIds)) {
body["resourceIds"] = request.resourceIds ?? [];
}
if (!TeaUtils.Client.isUnset(request.resourceType)) {
body["resourceType"] = request.resourceType ?? "";
}
if (!TeaUtils.Client.isUnset(request.tags)) {
body["tags"] = request.tags ?? [];
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "TagResources",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/tags",
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(TagResourcesResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func tagResources(_ request: TagResourcesRequest) async throws -> TagResourcesResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await tagResourcesWithOptions(request as! TagResourcesRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateAuthorizationAttributeWithOptions(_ authorizationId: String, _ request: UpdateAuthorizationAttributeRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> UpdateAuthorizationAttributeResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.dueTime)) {
body["dueTime"] = request.dueTime ?? "";
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["name"] = request.name ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "UpdateAuthorizationAttribute",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/authorizations/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(authorizationId)),
"method": "PUT",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(UpdateAuthorizationAttributeResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateAuthorizationAttribute(_ authorizationId: String, _ request: UpdateAuthorizationAttributeRequest) async throws -> UpdateAuthorizationAttributeResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await updateAuthorizationAttributeWithOptions(authorizationId as! String, request as! UpdateAuthorizationAttributeRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateExplorerTaskAttributeWithOptions(_ explorerTaskId: String, _ request: UpdateExplorerTaskAttributeRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> UpdateExplorerTaskAttributeResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.autoApply)) {
body["autoApply"] = request.autoApply!;
}
if (!TeaUtils.Client.isUnset(request.explorerTaskName)) {
body["explorerTaskName"] = request.explorerTaskName ?? "";
}
if (!TeaUtils.Client.isUnset(request.moduleId)) {
body["moduleId"] = request.moduleId ?? "";
}
if (!TeaUtils.Client.isUnset(request.moduleVersion)) {
body["moduleVersion"] = request.moduleVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.terraformProviderVersion)) {
body["terraformProviderVersion"] = request.terraformProviderVersion ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "UpdateExplorerTaskAttribute",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/explorerTask/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(explorerTaskId)),
"method": "PUT",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(UpdateExplorerTaskAttributeResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateExplorerTaskAttribute(_ explorerTaskId: String, _ request: UpdateExplorerTaskAttributeRequest) async throws -> UpdateExplorerTaskAttributeResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await updateExplorerTaskAttributeWithOptions(explorerTaskId as! String, request as! UpdateExplorerTaskAttributeRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateGroupWithOptions(_ groupId: String, _ request: UpdateGroupRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> UpdateGroupResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.autoDestroy)) {
body["autoDestroy"] = request.autoDestroy!;
}
if (!TeaUtils.Client.isUnset(request.autoTrigger)) {
body["autoTrigger"] = request.autoTrigger!;
}
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.description_)) {
body["description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.forcedSetting)) {
body["forcedSetting"] = request.forcedSetting!;
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["name"] = request.name ?? "";
}
if (!TeaUtils.Client.isUnset(request.notifyConfig)) {
body["notifyConfig"] = request.notifyConfig ?? [];
}
if (!TeaUtils.Client.isUnset(request.notifyOperationTypes)) {
body["notifyOperationTypes"] = request.notifyOperationTypes ?? [];
}
if (!TeaUtils.Client.isUnset(request.ramRole)) {
body["ramRole"] = request.ramRole ?? "";
}
if (!TeaUtils.Client.isUnset(request.reportExportField)) {
body["reportExportField"] = request.reportExportField ?? [];
}
if (!TeaUtils.Client.isUnset(request.reportExportPath)) {
body["reportExportPath"] = request.reportExportPath ?? "";
}
if (!TeaUtils.Client.isUnset(request.terraformProviderVersion)) {
body["terraformProviderVersion"] = request.terraformProviderVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.triggerConfig)) {
body["triggerConfig"] = request.triggerConfig ?? [];
}
if (!TeaUtils.Client.isUnset(request.triggerResourceType)) {
body["triggerResourceType"] = request.triggerResourceType ?? [];
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "UpdateGroup",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/group/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(groupId)),
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(UpdateGroupResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateGroup(_ groupId: String, _ request: UpdateGroupRequest) async throws -> UpdateGroupResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await updateGroupWithOptions(groupId as! String, request as! UpdateGroupRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateModuleAttributeWithOptions(_ moduleId: String, _ request: UpdateModuleAttributeRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> UpdateModuleAttributeResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.description_)) {
body["description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.groupInfo)) {
body["groupInfo"] = request.groupInfo!;
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["name"] = request.name ?? "";
}
if (!TeaUtils.Client.isUnset(request.source)) {
body["source"] = request.source ?? "";
}
if (!TeaUtils.Client.isUnset(request.sourcePath)) {
body["sourcePath"] = request.sourcePath ?? "";
}
if (!TeaUtils.Client.isUnset(request.statePath)) {
body["statePath"] = request.statePath ?? "";
}
if (!TeaUtils.Client.isUnset(request.versionStrategy)) {
body["versionStrategy"] = request.versionStrategy ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "UpdateModuleAttribute",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/modules/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(moduleId)),
"method": "PUT",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(UpdateModuleAttributeResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateModuleAttribute(_ moduleId: String, _ request: UpdateModuleAttributeRequest) async throws -> UpdateModuleAttributeResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await updateModuleAttributeWithOptions(moduleId as! String, request as! UpdateModuleAttributeRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateParameterSetAttributeWithOptions(_ parameterSetId: String, _ request: UpdateParameterSetAttributeRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> UpdateParameterSetAttributeResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.description_)) {
body["description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["name"] = request.name ?? "";
}
if (!TeaUtils.Client.isUnset(request.parameters)) {
body["parameters"] = request.parameters ?? [];
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "UpdateParameterSetAttribute",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/parameterSets/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(parameterSetId)),
"method": "PUT",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(UpdateParameterSetAttributeResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateParameterSetAttribute(_ parameterSetId: String, _ request: UpdateParameterSetAttributeRequest) async throws -> UpdateParameterSetAttributeResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await updateParameterSetAttributeWithOptions(parameterSetId as! String, request as! UpdateParameterSetAttributeRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateProjectWithOptions(_ projectId: String, _ request: UpdateProjectRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> UpdateProjectResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.description_)) {
body["description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["name"] = request.name ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "UpdateProject",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/project/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(projectId)),
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(UpdateProjectResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateProject(_ projectId: String, _ request: UpdateProjectRequest) async throws -> UpdateProjectResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await updateProjectWithOptions(projectId as! String, request as! UpdateProjectRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateRabbitmqPublisherAttributeWithOptions(_ publisherId: String, _ request: UpdateRabbitmqPublisherAttributeRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> UpdateRabbitmqPublisherAttributeResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.description_)) {
body["description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.exchangeName)) {
body["exchangeName"] = request.exchangeName ?? "";
}
if (!TeaUtils.Client.isUnset(request.exchangeType)) {
body["exchangeType"] = request.exchangeType ?? "";
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["name"] = request.name ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "UpdateRabbitmqPublisherAttribute",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/publishers/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(publisherId)),
"method": "PUT",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(UpdateRabbitmqPublisherAttributeResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateRabbitmqPublisherAttribute(_ publisherId: String, _ request: UpdateRabbitmqPublisherAttributeRequest) async throws -> UpdateRabbitmqPublisherAttributeResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await updateRabbitmqPublisherAttributeWithOptions(publisherId as! String, request as! UpdateRabbitmqPublisherAttributeRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateRamPolicyExportTaskAttributeWithOptions(_ ramPolicyExportTaskId: String, _ request: UpdateRamPolicyExportTaskAttributeRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> UpdateRamPolicyExportTaskAttributeResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.authorizationAccountIds)) {
body["authorizationAccountIds"] = request.authorizationAccountIds ?? [];
}
if (!TeaUtils.Client.isUnset(request.authorizationActions)) {
body["authorizationActions"] = request.authorizationActions ?? [];
}
if (!TeaUtils.Client.isUnset(request.authorizationRegionIds)) {
body["authorizationRegionIds"] = request.authorizationRegionIds ?? [];
}
if (!TeaUtils.Client.isUnset(request.moduleId)) {
body["moduleId"] = request.moduleId ?? "";
}
if (!TeaUtils.Client.isUnset(request.moduleVersion)) {
body["moduleVersion"] = request.moduleVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["name"] = request.name ?? "";
}
if (!TeaUtils.Client.isUnset(request.ramRole)) {
body["ramRole"] = request.ramRole ?? "";
}
if (!TeaUtils.Client.isUnset(request.triggerStrategy)) {
body["triggerStrategy"] = request.triggerStrategy ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "UpdateRamPolicyExportTaskAttribute",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/ramPolicyExportTasks/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(ramPolicyExportTaskId)),
"method": "PUT",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(UpdateRamPolicyExportTaskAttributeResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateRamPolicyExportTaskAttribute(_ ramPolicyExportTaskId: String, _ request: UpdateRamPolicyExportTaskAttributeRequest) async throws -> UpdateRamPolicyExportTaskAttributeResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await updateRamPolicyExportTaskAttributeWithOptions(ramPolicyExportTaskId as! String, request as! UpdateRamPolicyExportTaskAttributeRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateResourceExportTaskAttributeWithOptions(_ exportTaskId: String, _ request: UpdateResourceExportTaskAttributeRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> UpdateResourceExportTaskAttributeResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.configPath)) {
body["configPath"] = request.configPath ?? "";
}
if (!TeaUtils.Client.isUnset(request.description_)) {
body["description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.excludeRules)) {
body["excludeRules"] = request.excludeRules ?? [];
}
if (!TeaUtils.Client.isUnset(request.exportToModule)) {
body["exportToModule"] = request.exportToModule!;
}
if (!TeaUtils.Client.isUnset(request.includeRules)) {
body["includeRules"] = request.includeRules ?? [];
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["name"] = request.name ?? "";
}
if (!TeaUtils.Client.isUnset(request.ramRole)) {
body["ramRole"] = request.ramRole ?? "";
}
if (!TeaUtils.Client.isUnset(request.terraformProviderVersion)) {
body["terraformProviderVersion"] = request.terraformProviderVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.terraformVersion)) {
body["terraformVersion"] = request.terraformVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.triggerStrategy)) {
body["triggerStrategy"] = request.triggerStrategy ?? "";
}
if (!TeaUtils.Client.isUnset(request.variables)) {
body["variables"] = request.variables ?? [];
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "UpdateResourceExportTaskAttribute",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/exportTasks/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(exportTaskId)),
"method": "PUT",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(UpdateResourceExportTaskAttributeResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateResourceExportTaskAttribute(_ exportTaskId: String, _ request: UpdateResourceExportTaskAttributeRequest) async throws -> UpdateResourceExportTaskAttributeResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await updateResourceExportTaskAttributeWithOptions(exportTaskId as! String, request as! UpdateResourceExportTaskAttributeRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateTaskAttributeWithOptions(_ taskId: String, _ request: UpdateTaskAttributeRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> UpdateTaskAttributeResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.autoApply)) {
body["autoApply"] = request.autoApply!;
}
if (!TeaUtils.Client.isUnset(request.autoDestroy)) {
body["autoDestroy"] = request.autoDestroy!;
}
if (!TeaUtils.Client.isUnset(request.description_)) {
body["description"] = request.description_ ?? "";
}
if (!TeaUtils.Client.isUnset(request.groupInfo)) {
body["groupInfo"] = request.groupInfo!;
}
if (!TeaUtils.Client.isUnset(request.initModuleState)) {
body["initModuleState"] = request.initModuleState!;
}
if (!TeaUtils.Client.isUnset(request.moduleId)) {
body["moduleId"] = request.moduleId ?? "";
}
if (!TeaUtils.Client.isUnset(request.moduleVersion)) {
body["moduleVersion"] = request.moduleVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.name)) {
body["name"] = request.name ?? "";
}
if (!TeaUtils.Client.isUnset(request.parameters)) {
body["parameters"] = request.parameters ?? [:];
}
if (!TeaUtils.Client.isUnset(request.protectionStrategy)) {
body["protectionStrategy"] = request.protectionStrategy ?? [];
}
if (!TeaUtils.Client.isUnset(request.ramRole)) {
body["ramRole"] = request.ramRole ?? "";
}
if (!TeaUtils.Client.isUnset(request.skipPropertyValidation)) {
body["skipPropertyValidation"] = request.skipPropertyValidation!;
}
if (!TeaUtils.Client.isUnset(request.terraformVersion)) {
body["terraformVersion"] = request.terraformVersion ?? "";
}
if (!TeaUtils.Client.isUnset(request.triggerStrategy)) {
body["triggerStrategy"] = request.triggerStrategy ?? "";
}
if (!TeaUtils.Client.isUnset(request.triggerValue)) {
body["triggerValue"] = request.triggerValue ?? "";
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "UpdateTaskAttribute",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/tasks/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(taskId)),
"method": "PUT",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(UpdateTaskAttributeResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateTaskAttribute(_ taskId: String, _ request: UpdateTaskAttributeRequest) async throws -> UpdateTaskAttributeResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await updateTaskAttributeWithOptions(taskId as! String, request as! UpdateTaskAttributeRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateTaskPolicyWithOptions(_ groupId: String, _ request: UpdateTaskPolicyRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> UpdateTaskPolicyResponse {
try TeaUtils.Client.validateModel(request)
var body: [String: Any] = [:]
if (!TeaUtils.Client.isUnset(request.clientToken)) {
body["clientToken"] = request.clientToken ?? "";
}
if (!TeaUtils.Client.isUnset(request.taskPolicies)) {
body["taskPolicies"] = request.taskPolicies ?? [];
}
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
"headers": headers as! [String: String],
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
])
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
"action": "UpdateTaskPolicy",
"version": "2021-08-06",
"protocol": "HTTPS",
"pathname": "/group/task/policy/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(groupId)),
"method": "POST",
"authType": "AK",
"style": "ROA",
"reqBodyType": "json",
"bodyType": "json"
])
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
return Tea.TeaConverter.fromMap(UpdateTaskPolicyResponse(), tmp)
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func updateTaskPolicy(_ groupId: String, _ request: UpdateTaskPolicyRequest) async throws -> UpdateTaskPolicyResponse {
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
var headers: [String: String] = [:]
return try await updateTaskPolicyWithOptions(groupId as! String, request as! UpdateTaskPolicyRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
}
}