Skip to content

Commit bd9547a

Browse files
committed
Support API ActivateConnection.
1 parent 7badacd commit bd9547a

File tree

5 files changed

+695
-5
lines changed

5 files changed

+695
-5
lines changed

AlibabacloudDevs20230714.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |spec|
22

33
spec.name = "AlibabacloudDevs20230714"
4-
spec.version = "2.2.0"
4+
spec.version = "2.3.0"
55
spec.license = "Apache 2.0"
66
spec.summary = "Alibaba Cloud Devs (20230714) SDK Library for Swift"
77
spec.homepage = "https://github.com/alibabacloud-sdk-swift/devs-20230714"

README-CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
要使用 [Carthage](https://github.com/Carthage/Carthage)`AlibabacloudDevs20230714` 集成到你的 Xcode 项目中,需要在 `Cartfile` 中定义以下内容:
1818

1919
```ogdl
20-
github "alibabacloud-sdk-swift/devs-20230714" "2.2.0"
20+
github "alibabacloud-sdk-swift/devs-20230714" "2.3.0"
2121
```
2222

2323
### Swift 包管理工具
@@ -26,7 +26,7 @@ github "alibabacloud-sdk-swift/devs-20230714" "2.2.0"
2626

2727
```swift
2828
dependencies: [
29-
.package(url: "https://github.com/alibabacloud-sdk-swift/devs-20230714.git", from: "2.2.0")
29+
.package(url: "https://github.com/alibabacloud-sdk-swift/devs-20230714.git", from: "2.3.0")
3030
]
3131
```
3232

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ English | [简体中文](README-CN.md)
1717
To integrate `AlibabacloudDevs20230714` into your Xcode project using [Carthage](https://github.com/Carthage/Carthage), specify it in your `Cartfile`:
1818

1919
```ogdl
20-
github "alibabacloud-sdk-swift/devs-20230714" "2.2.0"
20+
github "alibabacloud-sdk-swift/devs-20230714" "2.3.0"
2121
```
2222

2323
### Swift Package Manager
@@ -26,7 +26,7 @@ To integrate `AlibabacloudDevs20230714` into your Xcode project using [Swift Pac
2626

2727
```swift
2828
dependencies: [
29-
.package(url: "https://github.com/alibabacloud-sdk-swift/devs-20230714.git", from: "2.2.0")
29+
.package(url: "https://github.com/alibabacloud-sdk-swift/devs-20230714.git", from: "2.3.0")
3030
]
3131
```
3232

Sources/AlibabacloudDevs20230714/Client.swift

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,48 @@ open class Client : AlibabacloudOpenApi.Client {
2323
return try AlibabacloudEndpointUtil.Client.getEndpointRules(productId, regionId, endpointRule, network, suffix)
2424
}
2525

26+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
27+
public func activateConnectionWithOptions(_ name: String, _ request: ActivateConnectionRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ActivateConnectionResponse {
28+
try TeaUtils.Client.validateModel(request)
29+
var body: [String: Any] = [:]
30+
if (!TeaUtils.Client.isUnset(request.account)) {
31+
body["account"] = request.account!;
32+
}
33+
if (!TeaUtils.Client.isUnset(request.credential)) {
34+
body["credential"] = request.credential!;
35+
}
36+
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
37+
"headers": headers as! [String: String],
38+
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
39+
])
40+
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
41+
"action": "ActivateConnection",
42+
"version": "2023-07-14",
43+
"protocol": "HTTPS",
44+
"pathname": "/2023-07-14/connections/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(name)) + "/activate",
45+
"method": "PATCH",
46+
"authType": "AK",
47+
"style": "ROA",
48+
"reqBodyType": "json",
49+
"bodyType": "json"
50+
])
51+
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
52+
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
53+
return Tea.TeaConverter.fromMap(ActivateConnectionResponse(), tmp)
54+
}
55+
else {
56+
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
57+
return Tea.TeaConverter.fromMap(ActivateConnectionResponse(), tmp)
58+
}
59+
}
60+
61+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
62+
public func activateConnection(_ name: String, _ request: ActivateConnectionRequest) async throws -> ActivateConnectionResponse {
63+
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
64+
var headers: [String: String] = [:]
65+
return try await activateConnectionWithOptions(name as! String, request as! ActivateConnectionRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
66+
}
67+
2668
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
2769
public func cancelPipelineWithOptions(_ name: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> CancelPipelineResponse {
2870
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
@@ -297,6 +339,45 @@ open class Client : AlibabacloudOpenApi.Client {
297339
return try await deleteArtifactWithOptions(name as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
298340
}
299341

342+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
343+
public func deleteConnectionWithOptions(_ name: String, _ request: DeleteConnectionRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteConnectionResponse {
344+
try TeaUtils.Client.validateModel(request)
345+
var query: [String: Any] = [:]
346+
if (!TeaUtils.Client.isUnset(request.force)) {
347+
query["force"] = request.force!;
348+
}
349+
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
350+
"headers": headers as! [String: String],
351+
"query": AlibabaCloudOpenApiUtil.Client.query(query)
352+
])
353+
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
354+
"action": "DeleteConnection",
355+
"version": "2023-07-14",
356+
"protocol": "HTTPS",
357+
"pathname": "/2023-07-14/connections/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(name)),
358+
"method": "DELETE",
359+
"authType": "AK",
360+
"style": "ROA",
361+
"reqBodyType": "json",
362+
"bodyType": "json"
363+
])
364+
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
365+
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
366+
return Tea.TeaConverter.fromMap(DeleteConnectionResponse(), tmp)
367+
}
368+
else {
369+
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
370+
return Tea.TeaConverter.fromMap(DeleteConnectionResponse(), tmp)
371+
}
372+
}
373+
374+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
375+
public func deleteConnection(_ name: String, _ request: DeleteConnectionRequest) async throws -> DeleteConnectionResponse {
376+
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
377+
var headers: [String: String] = [:]
378+
return try await deleteConnectionWithOptions(name as! String, request as! DeleteConnectionRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
379+
}
380+
300381
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
301382
public func deleteEnvironmentWithOptions(_ projectName: String, _ name: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteEnvironmentResponse {
302383
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
@@ -470,6 +551,39 @@ open class Client : AlibabacloudOpenApi.Client {
470551
return try await fetchArtifactTempBucketTokenWithOptions(headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
471552
}
472553

554+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
555+
public func fetchConnectionCredentialWithOptions(_ name: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> FetchConnectionCredentialResponse {
556+
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
557+
"headers": headers as! [String: String]
558+
])
559+
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
560+
"action": "FetchConnectionCredential",
561+
"version": "2023-07-14",
562+
"protocol": "HTTPS",
563+
"pathname": "/2023-07-14/connections/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(name)) + "/fetchCredential",
564+
"method": "GET",
565+
"authType": "AK",
566+
"style": "ROA",
567+
"reqBodyType": "json",
568+
"bodyType": "json"
569+
])
570+
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
571+
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
572+
return Tea.TeaConverter.fromMap(FetchConnectionCredentialResponse(), tmp)
573+
}
574+
else {
575+
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
576+
return Tea.TeaConverter.fromMap(FetchConnectionCredentialResponse(), tmp)
577+
}
578+
}
579+
580+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
581+
public func fetchConnectionCredential(_ name: String) async throws -> FetchConnectionCredentialResponse {
582+
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
583+
var headers: [String: String] = [:]
584+
return try await fetchConnectionCredentialWithOptions(name as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
585+
}
586+
473587
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
474588
public func getArtifactWithOptions(_ name: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> GetArtifactResponse {
475589
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
@@ -734,6 +848,59 @@ open class Client : AlibabacloudOpenApi.Client {
734848
return try await getTaskWithOptions(name as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
735849
}
736850

851+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
852+
public func listConnectionsWithOptions(_ tmpReq: ListConnectionsRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ListConnectionsResponse {
853+
try TeaUtils.Client.validateModel(tmpReq)
854+
var request: ListConnectionsShrinkRequest = ListConnectionsShrinkRequest([:])
855+
AlibabaCloudOpenApiUtil.Client.convert(tmpReq, request)
856+
if (!TeaUtils.Client.isUnset(tmpReq.labelSelector)) {
857+
request.labelSelectorShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.labelSelector, "labelSelector", "simple")
858+
}
859+
var query: [String: Any] = [:]
860+
if (!TeaUtils.Client.isUnset(request.keyword)) {
861+
query["keyword"] = request.keyword ?? "";
862+
}
863+
if (!TeaUtils.Client.isUnset(request.labelSelectorShrink)) {
864+
query["labelSelector"] = request.labelSelectorShrink ?? "";
865+
}
866+
if (!TeaUtils.Client.isUnset(request.pageNumber)) {
867+
query["pageNumber"] = request.pageNumber!;
868+
}
869+
if (!TeaUtils.Client.isUnset(request.pageSize)) {
870+
query["pageSize"] = request.pageSize!;
871+
}
872+
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
873+
"headers": headers as! [String: String],
874+
"query": AlibabaCloudOpenApiUtil.Client.query(query)
875+
])
876+
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
877+
"action": "ListConnections",
878+
"version": "2023-07-14",
879+
"protocol": "HTTPS",
880+
"pathname": "/2023-07-14/connections",
881+
"method": "GET",
882+
"authType": "AK",
883+
"style": "ROA",
884+
"reqBodyType": "json",
885+
"bodyType": "json"
886+
])
887+
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
888+
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
889+
return Tea.TeaConverter.fromMap(ListConnectionsResponse(), tmp)
890+
}
891+
else {
892+
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
893+
return Tea.TeaConverter.fromMap(ListConnectionsResponse(), tmp)
894+
}
895+
}
896+
897+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
898+
public func listConnections(_ request: ListConnectionsRequest) async throws -> ListConnectionsResponse {
899+
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
900+
var headers: [String: String] = [:]
901+
return try await listConnectionsWithOptions(request as! ListConnectionsRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
902+
}
903+
737904
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
738905
public func listEnvironmentsWithOptions(_ projectName: String, _ tmpReq: ListEnvironmentsRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> ListEnvironmentsResponse {
739906
try TeaUtils.Client.validateModel(tmpReq)

0 commit comments

Comments
 (0)