Skip to content

Commit a8f1223

Browse files
committed
Support API DeleteImage.
1 parent 1d7a9da commit a8f1223

File tree

5 files changed

+421
-5
lines changed

5 files changed

+421
-5
lines changed

appstream-center-20210901/AlibabacloudAppstreamCenter20210901.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 = "AlibabacloudAppstreamCenter20210901"
4-
spec.version = "4.4.0"
4+
spec.version = "4.5.0"
55
spec.license = "Apache 2.0"
66
spec.summary = "Alibaba Cloud appstream-center (20210901) SDK Library for Swift"
77
spec.homepage = "https://github.com/alibabacloud-sdk-swift/appstream-center-20210901"

appstream-center-20210901/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)`AlibabacloudAppstreamCenter20210901` 集成到你的 Xcode 项目中,需要在 `Cartfile` 中定义以下内容:
1818

1919
```ogdl
20-
github "alibabacloud-sdk-swift/appstream-center-20210901" "4.4.0"
20+
github "alibabacloud-sdk-swift/appstream-center-20210901" "4.5.0"
2121
```
2222

2323
### Swift 包管理工具
@@ -26,7 +26,7 @@ github "alibabacloud-sdk-swift/appstream-center-20210901" "4.4.0"
2626

2727
```swift
2828
dependencies: [
29-
.package(url: "https://github.com/alibabacloud-sdk-swift/appstream-center-20210901.git", from: "4.4.0")
29+
.package(url: "https://github.com/alibabacloud-sdk-swift/appstream-center-20210901.git", from: "4.5.0")
3030
]
3131
```
3232

appstream-center-20210901/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 `AlibabacloudAppstreamCenter20210901` into your Xcode project using [Carthage](https://github.com/Carthage/Carthage), specify it in your `Cartfile`:
1818

1919
```ogdl
20-
github "alibabacloud-sdk-swift/appstream-center-20210901" "4.4.0"
20+
github "alibabacloud-sdk-swift/appstream-center-20210901" "4.5.0"
2121
```
2222

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

2727
```swift
2828
dependencies: [
29-
.package(url: "https://github.com/alibabacloud-sdk-swift/appstream-center-20210901.git", from: "4.4.0")
29+
.package(url: "https://github.com/alibabacloud-sdk-swift/appstream-center-20210901.git", from: "4.5.0")
3030
]
3131
```
3232

appstream-center-20210901/Sources/AlibabacloudAppstreamCenter20210901/Client.swift

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,9 @@ open class Client : AlibabacloudOpenApi.Client {
410410
if (!TeaUtils.Client.isUnset(request.serverInstanceType)) {
411411
body["ServerInstanceType"] = request.serverInstanceType ?? "";
412412
}
413+
if (!TeaUtils.Client.isUnset(request.serverPortRange)) {
414+
body["ServerPortRange"] = request.serverPortRange ?? "";
415+
}
413416
if (!TeaUtils.Client.isUnset(request.systemDiskCategory)) {
414417
body["SystemDiskCategory"] = request.systemDiskCategory ?? "";
415418
}
@@ -524,6 +527,37 @@ open class Client : AlibabacloudOpenApi.Client {
524527
return try await deleteAppInstancesWithOptions(request as! DeleteAppInstancesRequest, runtime as! TeaUtils.RuntimeOptions)
525528
}
526529

530+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
531+
public func deleteImageWithOptions(_ request: DeleteImageRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteImageResponse {
532+
try TeaUtils.Client.validateModel(request)
533+
var body: [String: Any] = [:]
534+
if (!TeaUtils.Client.isUnset(request.imageId)) {
535+
body["ImageId"] = request.imageId ?? "";
536+
}
537+
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
538+
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
539+
])
540+
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
541+
"action": "DeleteImage",
542+
"version": "2021-09-01",
543+
"protocol": "HTTPS",
544+
"pathname": "/",
545+
"method": "POST",
546+
"authType": "AK",
547+
"style": "RPC",
548+
"reqBodyType": "formData",
549+
"bodyType": "json"
550+
])
551+
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
552+
return Tea.TeaConverter.fromMap(DeleteImageResponse(), tmp)
553+
}
554+
555+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
556+
public func deleteImage(_ request: DeleteImageRequest) async throws -> DeleteImageResponse {
557+
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
558+
return try await deleteImageWithOptions(request as! DeleteImageRequest, runtime as! TeaUtils.RuntimeOptions)
559+
}
560+
527561
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
528562
public func deleteWuyingServerWithOptions(_ request: DeleteWuyingServerRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteWuyingServerResponse {
529563
try TeaUtils.Client.validateModel(request)
@@ -1999,6 +2033,52 @@ open class Client : AlibabacloudOpenApi.Client {
19992033
return try await restartWuyingServerWithOptions(request as! RestartWuyingServerRequest, runtime as! TeaUtils.RuntimeOptions)
20002034
}
20012035

2036+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
2037+
public func startTaskForDistributeImageWithOptions(_ request: StartTaskForDistributeImageRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> StartTaskForDistributeImageResponse {
2038+
try TeaUtils.Client.validateModel(request)
2039+
var body: [String: Any] = [:]
2040+
if (!TeaUtils.Client.isUnset(request.destinationRegionList)) {
2041+
body["DestinationRegionList"] = request.destinationRegionList ?? [];
2042+
}
2043+
if (!TeaUtils.Client.isUnset(request.imageId)) {
2044+
body["ImageId"] = request.imageId ?? "";
2045+
}
2046+
if (!TeaUtils.Client.isUnset(request.productType)) {
2047+
body["ProductType"] = request.productType ?? "";
2048+
}
2049+
if (!TeaUtils.Client.isUnset(request.retryType)) {
2050+
body["RetryType"] = request.retryType ?? "";
2051+
}
2052+
if (!TeaUtils.Client.isUnset(request.sourceRegion)) {
2053+
body["SourceRegion"] = request.sourceRegion ?? "";
2054+
}
2055+
if (!TeaUtils.Client.isUnset(request.versionId)) {
2056+
body["VersionId"] = request.versionId ?? "";
2057+
}
2058+
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
2059+
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
2060+
])
2061+
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
2062+
"action": "StartTaskForDistributeImage",
2063+
"version": "2021-09-01",
2064+
"protocol": "HTTPS",
2065+
"pathname": "/",
2066+
"method": "POST",
2067+
"authType": "AK",
2068+
"style": "RPC",
2069+
"reqBodyType": "formData",
2070+
"bodyType": "json"
2071+
])
2072+
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
2073+
return Tea.TeaConverter.fromMap(StartTaskForDistributeImageResponse(), tmp)
2074+
}
2075+
2076+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
2077+
public func startTaskForDistributeImage(_ request: StartTaskForDistributeImageRequest) async throws -> StartTaskForDistributeImageResponse {
2078+
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
2079+
return try await startTaskForDistributeImageWithOptions(request as! StartTaskForDistributeImageRequest, runtime as! TeaUtils.RuntimeOptions)
2080+
}
2081+
20022082
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
20032083
public func startWuyingServerWithOptions(_ request: StartWuyingServerRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> StartWuyingServerResponse {
20042084
try TeaUtils.Client.validateModel(request)

0 commit comments

Comments
 (0)