Skip to content

Commit

Permalink
Merge pull request #129 from amzn/code_generate_2_44_105
Browse files Browse the repository at this point in the history
Code generate with Go SDK v1.44.105 models.
  • Loading branch information
tachyonics authored Sep 29, 2022
2 parents f1195ac + 8e656f8 commit 461b4cd
Show file tree
Hide file tree
Showing 82 changed files with 30,728 additions and 602 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-18.04]
swift: ["5.5.3"]
swift: ["5.7"]
runs-on: ${{ matrix.os }}
steps:
- uses: fwal/setup-swift@v1.15.0
- uses: swift-actions/setup-swift@v1.18.0
with:
swift-version: ${{ matrix.swift }}
- uses: actions/checkout@v2
Expand All @@ -28,10 +28,10 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
swift: ["5.4.3"]
swift: ["5.5.3"]
runs-on: ${{ matrix.os }}
steps:
- uses: fwal/setup-swift@v1.15.0
- uses: swift-actions/setup-swift@v1.18.0
with:
swift-version: ${{ matrix.swift }}
- uses: actions/checkout@v2
Expand Down
45 changes: 27 additions & 18 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,26 @@
"repositoryURL": "https://github.com/swift-server/async-http-client.git",
"state": {
"branch": null,
"revision": "794dc9d42720af97cedd395e8cd2add9173ffd9a",
"version": "1.11.1"
"revision": "fc510a39cff61b849bf5cdff17eb2bd6d0777b49",
"version": "1.11.5"
}
},
{
"package": "smoke-http",
"repositoryURL": "https://github.com/amzn/smoke-http.git",
"state": {
"branch": null,
"revision": "17aa17451ac386da27c8acb85c79323b79dc5304",
"version": "2.13.1"
"revision": "c14d4dee028a1aa0b316ec194ec15876f86fbcd9",
"version": "2.14.0"
}
},
{
"package": "swift-atomics",
"repositoryURL": "https://github.com/apple/swift-atomics.git",
"state": {
"branch": null,
"revision": "919eb1d83e02121cdb434c7bfc1f0c66ef17febe",
"version": "1.0.2"
}
},
{
Expand All @@ -33,62 +42,62 @@
"repositoryURL": "https://github.com/apple/swift-log",
"state": {
"branch": null,
"revision": "5d66f7ba25daf4f94100e7022febf3c75e37a6c7",
"version": "1.4.2"
"revision": "6fe203dc33195667ce1759bf0182975e4653ba1c",
"version": "1.4.4"
}
},
{
"package": "swift-metrics",
"repositoryURL": "https://github.com/apple/swift-metrics.git",
"state": {
"branch": null,
"revision": "1c1408bf8fc21be93713e897d2badf500ea38419",
"version": "2.3.1"
"revision": "53be78637ecd165d1ddedc4e20de69b8f43ec3b7",
"version": "2.3.2"
}
},
{
"package": "swift-nio",
"repositoryURL": "https://github.com/apple/swift-nio.git",
"state": {
"branch": null,
"revision": "124119f0bb12384cef35aa041d7c3a686108722d",
"version": "2.40.0"
"revision": "b4e0a274f7f34210e97e2f2c50ab02a10b549250",
"version": "2.41.1"
}
},
{
"package": "swift-nio-extras",
"repositoryURL": "https://github.com/apple/swift-nio-extras.git",
"state": {
"branch": null,
"revision": "a75e92bde3683241c15df3dd905b7a6dcac4d551",
"version": "1.12.1"
"revision": "6c84d247754ad77487a6f0694273b89b83efd056",
"version": "1.14.0"
}
},
{
"package": "swift-nio-http2",
"repositoryURL": "https://github.com/apple/swift-nio-http2.git",
"state": {
"branch": null,
"revision": "108ac15087ea9b79abb6f6742699cf31de0e8772",
"version": "1.22.0"
"revision": "f9ab1c94c80d568efd762d2a638f25162691d766",
"version": "1.22.1"
}
},
{
"package": "swift-nio-ssl",
"repositoryURL": "https://github.com/apple/swift-nio-ssl.git",
"state": {
"branch": null,
"revision": "c30c680c78c99afdabf84805a83c8745387c4ac7",
"version": "2.20.2"
"revision": "ba7c0d7f82affc518147ea61d240330bf7f7ea9b",
"version": "2.22.1"
}
},
{
"package": "swift-nio-transport-services",
"repositoryURL": "https://github.com/apple/swift-nio-transport-services.git",
"state": {
"branch": null,
"revision": "2cb54f91ddafc90832c5fa247faf5798d0a7c204",
"version": "1.13.0"
"revision": "4e02d9cf35cabfb538c96613272fb027dd0c8692",
"version": "1.13.1"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.2
// swift-tools-version:5.5
//
// Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<img src="https://github.com/amzn/smoke-aws/actions/workflows/swift.yml/badge.svg?branch=main" alt="Build - Main Branch">
</a>
<a href="http://swift.org">
<img src="https://img.shields.io/badge/swift-5.3|5.4|5.5-orange.svg?style=flat" alt="Swift 5.3, 5.4 and 5.5 Tested">
<img src="https://img.shields.io/badge/swift-5.5|5.7-orange.svg?style=flat" alt="Swift 5.5 and 5.7 Tested">
</a>
<img src="https://img.shields.io/badge/ubuntu-18.04|20.04-yellow.svg?style=flat" alt="Ubuntu 18.04 and 20.04 Tested">
<img src="https://img.shields.io/badge/CentOS-8-yellow.svg?style=flat" alt="CentOS 8 Tested">
Expand Down
156 changes: 156 additions & 0 deletions Sources/CloudWatchClient/AWSCloudWatchClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1793,6 +1793,84 @@ public struct AWSCloudWatchClient<InvocationReportingType: HTTPClientCoreInvocat
}
}

/**
Invokes the ListManagedInsightRules operation returning immediately and passing the response to a callback.
- Parameters:
- input: The validated ListManagedInsightRulesInput object being passed to this operation.
- completion: The ListManagedInsightRulesOutputForListManagedInsightRules object or an error will be passed to this
callback when the operation is complete. The ListManagedInsightRulesOutputForListManagedInsightRules
object will be validated before being returned to caller.
The possible errors are: invalidNextToken, invalidParameterValue, missingRequiredParameter.
*/
public func listManagedInsightRulesAsync(
input: CloudWatchModel.ListManagedInsightRulesInput,
completion: @escaping (Result<CloudWatchModel.ListManagedInsightRulesOutputForListManagedInsightRules, CloudWatchError>) -> ()) throws {
let handlerDelegate = AWSClientInvocationDelegate(
credentialsProvider: credentialsProvider,
awsRegion: awsRegion,
service: service,
target: target)

let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.listManagedInsightRules,
handlerDelegate: handlerDelegate)
let wrappedInput = ListManagedInsightRulesOperationHTTPRequestInput(encodable: input)

let requestInput = QueryWrapperHTTPRequestInput(
wrappedInput: wrappedInput,
action: CloudWatchModelOperations.listManagedInsightRules.rawValue,
version: apiVersion)

_ = try httpClient.executeOperationAsyncRetriableWithOutput(
endpointPath: "/",
httpMethod: .POST,
input: requestInput,
completion: completion,
invocationContext: invocationContext,
retryConfiguration: retryConfiguration,
retryOnError: retryOnErrorProvider)
}

/**
Invokes the ListManagedInsightRules operation waiting for the response before returning.
- Parameters:
- input: The validated ListManagedInsightRulesInput object being passed to this operation.
- Returns: The ListManagedInsightRulesOutputForListManagedInsightRules object to be passed back from the caller of this operation.
Will be validated before being returned to caller.
- Throws: invalidNextToken, invalidParameterValue, missingRequiredParameter.
*/
public func listManagedInsightRulesSync(
input: CloudWatchModel.ListManagedInsightRulesInput) throws -> CloudWatchModel.ListManagedInsightRulesOutputForListManagedInsightRules {
let handlerDelegate = AWSClientInvocationDelegate(
credentialsProvider: credentialsProvider,
awsRegion: awsRegion,
service: service,
target: target)

let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.listManagedInsightRules,
handlerDelegate: handlerDelegate)
let wrappedInput = ListManagedInsightRulesOperationHTTPRequestInput(encodable: input)

let requestInput = QueryWrapperHTTPRequestInput(
wrappedInput: wrappedInput,
action: CloudWatchModelOperations.listManagedInsightRules.rawValue,
version: apiVersion)

do {
return try httpClient.executeSyncRetriableWithOutput(
endpointPath: "/",
httpMethod: .POST,
input: requestInput,
invocationContext: invocationContext,
retryConfiguration: retryConfiguration,
retryOnError: retryOnErrorProvider)
} catch {
let typedError: CloudWatchError = error.asTypedError()
throw typedError
}
}

/**
Invokes the ListMetricStreams operation returning immediately and passing the response to a callback.
Expand Down Expand Up @@ -2336,6 +2414,84 @@ public struct AWSCloudWatchClient<InvocationReportingType: HTTPClientCoreInvocat
}
}

/**
Invokes the PutManagedInsightRules operation returning immediately and passing the response to a callback.
- Parameters:
- input: The validated PutManagedInsightRulesInput object being passed to this operation.
- completion: The PutManagedInsightRulesOutputForPutManagedInsightRules object or an error will be passed to this
callback when the operation is complete. The PutManagedInsightRulesOutputForPutManagedInsightRules
object will be validated before being returned to caller.
The possible errors are: invalidParameterValue, missingRequiredParameter.
*/
public func putManagedInsightRulesAsync(
input: CloudWatchModel.PutManagedInsightRulesInput,
completion: @escaping (Result<CloudWatchModel.PutManagedInsightRulesOutputForPutManagedInsightRules, CloudWatchError>) -> ()) throws {
let handlerDelegate = AWSClientInvocationDelegate(
credentialsProvider: credentialsProvider,
awsRegion: awsRegion,
service: service,
target: target)

let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.putManagedInsightRules,
handlerDelegate: handlerDelegate)
let wrappedInput = PutManagedInsightRulesOperationHTTPRequestInput(encodable: input)

let requestInput = QueryWrapperHTTPRequestInput(
wrappedInput: wrappedInput,
action: CloudWatchModelOperations.putManagedInsightRules.rawValue,
version: apiVersion)

_ = try httpClient.executeOperationAsyncRetriableWithOutput(
endpointPath: "/",
httpMethod: .POST,
input: requestInput,
completion: completion,
invocationContext: invocationContext,
retryConfiguration: retryConfiguration,
retryOnError: retryOnErrorProvider)
}

/**
Invokes the PutManagedInsightRules operation waiting for the response before returning.
- Parameters:
- input: The validated PutManagedInsightRulesInput object being passed to this operation.
- Returns: The PutManagedInsightRulesOutputForPutManagedInsightRules object to be passed back from the caller of this operation.
Will be validated before being returned to caller.
- Throws: invalidParameterValue, missingRequiredParameter.
*/
public func putManagedInsightRulesSync(
input: CloudWatchModel.PutManagedInsightRulesInput) throws -> CloudWatchModel.PutManagedInsightRulesOutputForPutManagedInsightRules {
let handlerDelegate = AWSClientInvocationDelegate(
credentialsProvider: credentialsProvider,
awsRegion: awsRegion,
service: service,
target: target)

let invocationContext = HTTPClientInvocationContext(reporting: self.invocationsReporting.putManagedInsightRules,
handlerDelegate: handlerDelegate)
let wrappedInput = PutManagedInsightRulesOperationHTTPRequestInput(encodable: input)

let requestInput = QueryWrapperHTTPRequestInput(
wrappedInput: wrappedInput,
action: CloudWatchModelOperations.putManagedInsightRules.rawValue,
version: apiVersion)

do {
return try httpClient.executeSyncRetriableWithOutput(
endpointPath: "/",
httpMethod: .POST,
input: requestInput,
invocationContext: invocationContext,
retryConfiguration: retryConfiguration,
retryOnError: retryOnErrorProvider)
} catch {
let typedError: CloudWatchError = error.asTypedError()
throw typedError
}
}

/**
Invokes the PutMetricAlarm operation returning immediately and passing the response to a callback.
Expand Down
54 changes: 54 additions & 0 deletions Sources/CloudWatchClient/CloudWatchClientProtocol+async.swift
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,33 @@ public extension CloudWatchClientProtocol {
}
}

/**
Invokes the ListManagedInsightRules operation and asynchronously returning the response.
- Parameters:
- input: The validated ListManagedInsightRulesInput object being passed to this operation.
- Returns: The ListManagedInsightRulesOutputForListManagedInsightRules object to be passed back from the caller of this operation.
Will be validated before being returned to caller.
- Throws: invalidNextToken, invalidParameterValue, missingRequiredParameter.
*/
func listManagedInsightRules(input: CloudWatchModel.ListManagedInsightRulesInput) async throws
-> CloudWatchModel.ListManagedInsightRulesOutputForListManagedInsightRules {
return try await withUnsafeThrowingContinuation { cont in
do {
try listManagedInsightRulesAsync(input: input) { result in
switch result {
case .failure(let error):
cont.resume(throwing: error)
case .success(let response):
cont.resume(returning: response)
}
}
} catch {
cont.resume(throwing: error)
}
}
}

/**
Invokes the ListMetricStreams operation and asynchronously returning the response.
Expand Down Expand Up @@ -766,6 +793,33 @@ public extension CloudWatchClientProtocol {
}
}

/**
Invokes the PutManagedInsightRules operation and asynchronously returning the response.
- Parameters:
- input: The validated PutManagedInsightRulesInput object being passed to this operation.
- Returns: The PutManagedInsightRulesOutputForPutManagedInsightRules object to be passed back from the caller of this operation.
Will be validated before being returned to caller.
- Throws: invalidParameterValue, missingRequiredParameter.
*/
func putManagedInsightRules(input: CloudWatchModel.PutManagedInsightRulesInput) async throws
-> CloudWatchModel.PutManagedInsightRulesOutputForPutManagedInsightRules {
return try await withUnsafeThrowingContinuation { cont in
do {
try putManagedInsightRulesAsync(input: input) { result in
switch result {
case .failure(let error):
cont.resume(throwing: error)
case .success(let response):
cont.resume(returning: response)
}
}
} catch {
cont.resume(throwing: error)
}
}
}

/**
Invokes the PutMetricAlarm operation and asynchronously returning the response.
Expand Down
Loading

0 comments on commit 461b4cd

Please sign in to comment.