diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/RequestInterceptor/IAMURLRequestInterceptor.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/RequestInterceptor/IAMURLRequestInterceptor.swift index d012985a63..fa90ff71f4 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/RequestInterceptor/IAMURLRequestInterceptor.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/RequestInterceptor/IAMURLRequestInterceptor.swift @@ -43,7 +43,7 @@ struct IAMURLRequestInterceptor: URLRequestInterceptor { .flatMap(HttpMethodType.init(rawValue:)) ?? .get let queryItems = URLComponents(url: url, resolvingAgainstBaseURL: false)?.queryItems? - .map { ClientRuntime.URLQueryItem(name: $0.name, value: $0.value)} ?? [] + .map { ClientRuntime.SDKURLQueryItem(name: $0.name, value: $0.value)} ?? [] let requestBuilder = SdkHttpRequestBuilder() .withHost(host) diff --git a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/AWSCognitoAuthPlugin+Configure.swift b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/AWSCognitoAuthPlugin+Configure.swift index 5869e8a229..12818addea 100644 --- a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/AWSCognitoAuthPlugin+Configure.swift +++ b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/AWSCognitoAuthPlugin+Configure.swift @@ -103,8 +103,7 @@ extension AWSCognitoAuthPlugin { } if let requestTimeout = networkPreferences?.timeoutIntervalForRequest { - let requestTimeOutMs = requestTimeout * 1_000 - configuration.connectTimeoutMs = UInt32(requestTimeOutMs) + configuration.httpClientConfiguration = HttpClientConfiguration(connectTimeout: requestTimeout) } if let maxRetryUnwrapped = networkPreferences?.maxRetryCount { @@ -126,8 +125,7 @@ extension AWSCognitoAuthPlugin { configuration.httpClientEngine = .userAgentEngine(for: configuration) if let requestTimeout = networkPreferences?.timeoutIntervalForRequest { - let requestTimeOutMs = requestTimeout * 1_000 - configuration.connectTimeoutMs = UInt32(requestTimeOutMs) + configuration.httpClientConfiguration = HttpClientConfiguration(connectTimeout: requestTimeout) } if let maxRetryUnwrapped = networkPreferences?.maxRetryCount { diff --git a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Support/Utils/HttpClientEngineProxy.swift b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Support/Utils/HttpClientEngineProxy.swift index 82a6b939de..2a8864e5a1 100644 --- a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Support/Utils/HttpClientEngineProxy.swift +++ b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Support/Utils/HttpClientEngineProxy.swift @@ -9,8 +9,8 @@ import ClientRuntime import Foundation -protocol HttpClientEngineProxy: HttpClientEngine { - var target: HttpClientEngine? { get set } +protocol HttpClientEngineProxy: HTTPClient { + var target: HTTPClient? { get set } } extension UserAgentSuffixAppender: HttpClientEngineProxy {} diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignIn/AWSAuthSignInPluginTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignIn/AWSAuthSignInPluginTests.swift index 47330f44ee..1b4a9c973d 100644 --- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignIn/AWSAuthSignInPluginTests.swift +++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignIn/AWSAuthSignInPluginTests.swift @@ -955,7 +955,7 @@ class AWSAuthSignInPluginTests: BasePluginTest { self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in throw try await AWSCognitoIdentityProvider.PasswordResetRequiredException( - httpResponse: .init(body: .none, statusCode: .badRequest), + httpResponse: .init(body: .empty, statusCode: .badRequest), decoder: nil, message: nil, requestID: nil @@ -1133,7 +1133,7 @@ class AWSAuthSignInPluginTests: BasePluginTest { self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in throw try await AWSCognitoIdentityProvider.UserNotConfirmedException( - httpResponse: .init(body: .none, statusCode: .badRequest) + httpResponse: .init(body: .empty, statusCode: .badRequest) ) }) diff --git a/AmplifyPlugins/Auth/Tests/AuthHostApp/AuthHostApp.xcodeproj/project.pbxproj b/AmplifyPlugins/Auth/Tests/AuthHostApp/AuthHostApp.xcodeproj/project.pbxproj index 5b11c93bf4..6b7a9aa264 100644 --- a/AmplifyPlugins/Auth/Tests/AuthHostApp/AuthHostApp.xcodeproj/project.pbxproj +++ b/AmplifyPlugins/Auth/Tests/AuthHostApp/AuthHostApp.xcodeproj/project.pbxproj @@ -1111,11 +1111,18 @@ 681B76C22A3CBBAE004B59D9 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 94KV3E626L; + DEVELOPMENT_TEAM = ""; GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_CFBundleDisplayName = IntegTests; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@loader_path/Frameworks", + "@executable_path/Frameworks", + ); MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.aws.amplify.auth.AuthIntegrationTests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1132,11 +1139,18 @@ 681B76C32A3CBBAE004B59D9 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 94KV3E626L; + DEVELOPMENT_TEAM = ""; GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_CFBundleDisplayName = IntegTests; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@loader_path/Frameworks", + "@executable_path/Frameworks", + ); MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.aws.amplify.auth.AuthIntegrationTests; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/AmplifyPlugins/Auth/Tests/AuthHostApp/AuthHostApp.xcodeproj/xcshareddata/xcschemes/AuthIntegrationTestsWatch.xcscheme b/AmplifyPlugins/Auth/Tests/AuthHostApp/AuthHostApp.xcodeproj/xcshareddata/xcschemes/AuthIntegrationTestsWatch.xcscheme index 429ffa9878..376068fbc4 100644 --- a/AmplifyPlugins/Auth/Tests/AuthHostApp/AuthHostApp.xcodeproj/xcshareddata/xcschemes/AuthIntegrationTestsWatch.xcscheme +++ b/AmplifyPlugins/Auth/Tests/AuthHostApp/AuthHostApp.xcodeproj/xcshareddata/xcschemes/AuthIntegrationTestsWatch.xcscheme @@ -10,9 +10,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES" - enableThreadSanitizer = "YES" - codeCoverageEnabled = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES"> diff --git a/AmplifyPlugins/Auth/Tests/AuthHostApp/AuthIntegrationTests/SignOutTests/AuthSignOutTests.swift b/AmplifyPlugins/Auth/Tests/AuthHostApp/AuthIntegrationTests/SignOutTests/AuthSignOutTests.swift index 22a376a54f..2c71d77056 100644 --- a/AmplifyPlugins/Auth/Tests/AuthHostApp/AuthIntegrationTests/SignOutTests/AuthSignOutTests.swift +++ b/AmplifyPlugins/Auth/Tests/AuthHostApp/AuthIntegrationTests/SignOutTests/AuthSignOutTests.swift @@ -18,7 +18,7 @@ class AuthSignOutTests: AWSAuthBaseTest { try await super.setUp() AuthSessionHelper.clearSession() if Self.setSDKLogLevelDebug { - SDKLoggingSystem.initialize(logLevel: .debug) + await SDKLoggingSystem.initialize(logLevel: .debug) Self.setSDKLogLevelDebug = false } } diff --git a/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/ClientRuntimeFoundationBridge.swift b/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/ClientRuntimeFoundationBridge.swift deleted file mode 100644 index 306165b134..0000000000 --- a/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/ClientRuntimeFoundationBridge.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright Amazon.com Inc. or its affiliates. -// All Rights Reserved. -// -// SPDX-License-Identifier: Apache-2.0 -// - -import Foundation -import ClientRuntime - -extension Foundation.URLRequest { - init(sdkRequest: ClientRuntime.SdkHttpRequest) async throws { - guard let url = sdkRequest.endpoint.url else { - throw FoundationClientEngineError.invalidRequestURL(sdkRequest: sdkRequest) - } - self.init(url: url) - httpMethod = sdkRequest.method.rawValue - - for header in sdkRequest.headers.headers { - for value in header.value { - addValue(value, forHTTPHeaderField: header.name) - } - } - - httpBody = try await sdkRequest.body.readData() - } -} - -extension ClientRuntime.HttpResponse { - private static func headers( - from allHeaderFields: [AnyHashable: Any] - ) -> ClientRuntime.Headers { - var headers = Headers() - for header in allHeaderFields { - switch (header.key, header.value) { - case let (key, value) as (String, String): - headers.add(name: key, value: value) - case let (key, values) as (String, [String]): - headers.add(name: key, values: values) - default: continue - } - } - return headers - } - - convenience init(httpURLResponse: HTTPURLResponse, data: Data) throws { - let headers = Self.headers(from: httpURLResponse.allHeaderFields) - let body = HttpBody.data(data) - - guard let statusCode = HttpStatusCode(rawValue: httpURLResponse.statusCode) else { - // This shouldn't happen, but `HttpStatusCode` only exposes a failable - // `init`. The alternative here is force unwrapping, but we can't - // make the decision to crash here on behalf on consuming applications. - throw FoundationClientEngineError.unexpectedStatusCode( - statusCode: httpURLResponse.statusCode - ) - } - self.init(headers: headers, body: body, statusCode: statusCode) - } -} diff --git a/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/FoundationClientEngine.swift b/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/FoundationClientEngine.swift deleted file mode 100644 index cbf7f36be7..0000000000 --- a/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/FoundationClientEngine.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// Copyright Amazon.com Inc. or its affiliates. -// All Rights Reserved. -// -// SPDX-License-Identifier: Apache-2.0 -// - -import Foundation -import ClientRuntime -import Amplify - -@_spi(FoundationClientEngine) -public struct FoundationClientEngine: HttpClientEngine { - public func execute(request: ClientRuntime.SdkHttpRequest) async throws -> ClientRuntime.HttpResponse { - let urlRequest = try await URLRequest(sdkRequest: request) - - let (data, response) = try await URLSession.shared.data(for: urlRequest) - guard let httpURLResponse = response as? HTTPURLResponse else { - // This shouldn't be necessary because we're only making HTTP requests. - // `URLResponse` should always be a `HTTPURLResponse`. - // But to refrain from crashing consuming applications, we're throwing here. - throw FoundationClientEngineError.invalidURLResponse(urlRequest: response) - } - - let httpResponse = try HttpResponse( - httpURLResponse: httpURLResponse, - data: data - ) - - return httpResponse - } - - public init() {} - - /// no-op - func close() async {} -} diff --git a/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/FoundationClientEngineError.swift b/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/FoundationClientEngineError.swift deleted file mode 100644 index 09e6df49ef..0000000000 --- a/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/FoundationClientEngineError.swift +++ /dev/null @@ -1,81 +0,0 @@ -// -// Copyright Amazon.com Inc. or its affiliates. -// All Rights Reserved. -// -// SPDX-License-Identifier: Apache-2.0 -// - -import Foundation -import Amplify -import ClientRuntime - -struct FoundationClientEngineError: AmplifyError { - let errorDescription: ErrorDescription - let recoverySuggestion: RecoverySuggestion - let underlyingError: Error? - - // protocol requirement - init( - errorDescription: ErrorDescription, - recoverySuggestion: RecoverySuggestion, - error: Error - ) { - self.errorDescription = errorDescription - self.recoverySuggestion = recoverySuggestion - self.underlyingError = error - } -} - -extension FoundationClientEngineError { - init( - errorDescription: ErrorDescription, - recoverySuggestion: RecoverySuggestion, - error: Error? - ) { - self.errorDescription = errorDescription - self.recoverySuggestion = recoverySuggestion - self.underlyingError = error - } - - static func invalidRequestURL(sdkRequest: ClientRuntime.SdkHttpRequest) -> Self { - .init( - errorDescription: """ - The SdkHttpRequest generated by ClientRuntime doesn't include a valid URL - - \(sdkRequest) - """, - recoverySuggestion: """ - Please open an issue at https://github.com/aws-amplify/amplify-swift - with the contents of this error message. - """, - error: nil - ) - } - - static func invalidURLResponse(urlRequest: URLResponse) -> Self { - .init( - errorDescription: """ - The URLResponse received is not an HTTPURLResponse - - \(urlRequest) - """, - recoverySuggestion: """ - Please open an issue at https://github.com/aws-amplify/amplify-swift - with the contents of this error message. - """, - error: nil - ) - } - - static func unexpectedStatusCode(statusCode: Int) -> Self { - .init( - errorDescription: """ - The status code received isn't a valid `HttpStatusCode` value. - - status code: \(statusCode) - """, - recoverySuggestion: """ - Please open an issue at https://github.com/aws-amplify/amplify-swift - with the contents of this error message. - """, - error: nil - ) - } -} diff --git a/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/PluginClientEngine.swift b/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/PluginClientEngine.swift index 6ba1ab83aa..cb25e6dc8e 100644 --- a/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/PluginClientEngine.swift +++ b/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/PluginClientEngine.swift @@ -12,14 +12,25 @@ import AWSClientRuntime @_spi(PluginHTTPClientEngine) public func baseClientEngine( for configuration: AWSClientConfiguration -) -> HttpClientEngine { - let baseClientEngine: HttpClientEngine - #if os(iOS) || os(macOS) - // networking goes through CRT - baseClientEngine = configuration.httpClientEngine - #else - // networking goes through Foundation - baseClientEngine = FoundationClientEngine() - #endif - return baseClientEngine +) -> HTTPClient { + + /// An example of how a client engine provided by aws-swift-sdk can be overridden + /// ``` + /// let baseClientEngine: HTTPClient + /// #if os(iOS) || os(macOS) + /// // networking goes through default aws sdk engine + /// baseClientEngine = configuration.httpClientEngine + /// #else + /// // The custom client engine from where we want to route requests + /// // FoundationClientEngine() was an example used in 2.26.x and before + /// baseClientEngine = + /// #endif + /// return baseClientEngine + /// ``` + /// + /// Starting aws-sdk-release 0.34.0, base HTTP client has been defaulted to foundation. + /// Hence, amplify doesn't need an override. So return the httpClientEngine present in the configuration. + return configuration.httpClientEngine + + } diff --git a/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/UserAgentSettingClientEngine.swift b/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/UserAgentSettingClientEngine.swift index aff15e315c..807403f21a 100644 --- a/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/UserAgentSettingClientEngine.swift +++ b/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/UserAgentSettingClientEngine.swift @@ -12,32 +12,33 @@ import AWSClientRuntime @_spi(PluginHTTPClientEngine) public struct UserAgentSettingClientEngine: AWSPluginExtension { @_spi(InternalHttpEngineProxy) - public let target: HttpClientEngine + public let target: HTTPClient private let userAgentKey = "User-Agent" - public init(target: HttpClientEngine) { + public init(target: HTTPClient) { self.target = target } } @_spi(PluginHTTPClientEngine) -extension UserAgentSettingClientEngine: HttpClientEngine { - // CI updates the `platformName` property in `AmplifyAWSServiceConfiguration`. +extension UserAgentSettingClientEngine: HTTPClient { + + // CI updates the `platformName` property in `AmplifyAWSServiceConfiguration`. // We can / probably should move this in the future // as it's no longer necessary there. var lib: String { AmplifyAWSServiceConfiguration.userAgentLib } - public func execute(request: SdkHttpRequest) async throws -> HttpResponse { + public func send(request: SdkHttpRequest) async throws -> HttpResponse { let existingUserAgent = request.headers.value(for: userAgentKey) ?? "" let userAgent = "\(existingUserAgent) \(lib)" let updatedRequest = request.updatingUserAgent(with: userAgent) - return try await target.execute(request: updatedRequest) + return try await target.send(request: updatedRequest) } } @_spi(PluginHTTPClientEngine) -extension HttpClientEngine where Self == UserAgentSettingClientEngine { +extension HTTPClient where Self == UserAgentSettingClientEngine { public static func userAgentEngine( for configuration: AWSClientConfiguration ) -> Self { diff --git a/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/UserAgentSuffixAppender.swift b/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/UserAgentSuffixAppender.swift index 49c3adf55b..bb82ae44f3 100644 --- a/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/UserAgentSuffixAppender.swift +++ b/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/UserAgentSuffixAppender.swift @@ -10,7 +10,7 @@ import ClientRuntime @_spi(InternalAmplifyPluginExtension) public class UserAgentSuffixAppender: AWSPluginExtension { @_spi(InternalHttpEngineProxy) - public var target: HttpClientEngine? + public var target: HTTPClient? public let suffix: String private let userAgentKey = "User-Agent" @@ -20,8 +20,8 @@ public class UserAgentSuffixAppender: AWSPluginExtension { } @_spi(InternalHttpEngineProxy) -extension UserAgentSuffixAppender: HttpClientEngine { - public func execute(request: SdkHttpRequest) async throws -> HttpResponse { +extension UserAgentSuffixAppender: HTTPClient { + public func send(request: SdkHttpRequest) async throws -> HttpResponse { guard let target = target else { throw ClientError.unknownError("HttpClientEngine is not set") } @@ -30,6 +30,6 @@ extension UserAgentSuffixAppender: HttpClientEngine { let userAgent = "\(existingUserAgent) \(suffix)" let request = request.updatingUserAgent(with: userAgent) - return try await target.execute(request: request) + return try await target.send(request: request) } } diff --git a/AmplifyPlugins/Core/AWSPluginsCoreTests/Utils/UserAgentSettingClientEngineTests.swift b/AmplifyPlugins/Core/AWSPluginsCoreTests/Utils/UserAgentSettingClientEngineTests.swift index 1e09f72d9d..f395f6ef18 100644 --- a/AmplifyPlugins/Core/AWSPluginsCoreTests/Utils/UserAgentSettingClientEngineTests.swift +++ b/AmplifyPlugins/Core/AWSPluginsCoreTests/Utils/UserAgentSettingClientEngineTests.swift @@ -25,7 +25,7 @@ class UserAgentSettingClientEngineTestCase: XCTestCase { let target = MockTargetEngine() let engine = UserAgentSettingClientEngine(target: target) - _ = try await engine.execute(request: request) + _ = try await engine.send(request: request) let userAgent = try XCTUnwrap(target.request?.headers.value(for: userAgentKey)) XCTAssertEqual( @@ -41,7 +41,7 @@ class UserAgentSettingClientEngineTestCase: XCTestCase { let request: SdkHttpRequest = .mock let target = MockTargetEngine() let engine = UserAgentSettingClientEngine(target: target) - _ = try await engine.execute(request: request) + _ = try await engine.send(request: request) let userAgent = try XCTUnwrap(target.request?.headers.value(for: userAgentKey)).trim() XCTAssertEqual(userAgent, AmplifyAWSServiceConfiguration.userAgentLib) @@ -61,7 +61,7 @@ class UserAgentSettingClientEngineTestCase: XCTestCase { suffixAppender.target = target let engine = UserAgentSettingClientEngine(target: suffixAppender) - _ = try await engine.execute(request: request) + _ = try await engine.send(request: request) let userAgent = try XCTUnwrap(target.request?.headers.value(for: userAgentKey)) XCTAssertEqual( userAgent, @@ -81,7 +81,7 @@ class UserAgentSettingClientEngineTestCase: XCTestCase { suffixAppender.target = target let engine = UserAgentSettingClientEngine(target: suffixAppender) - _ = try await engine.execute(request: request) + _ = try await engine.send(request: request) let userAgent = try XCTUnwrap(target.request?.headers.value(for: userAgentKey)).trim() XCTAssertEqual( userAgent, @@ -90,10 +90,10 @@ class UserAgentSettingClientEngineTestCase: XCTestCase { } } -class MockTargetEngine: HttpClientEngine { +class MockTargetEngine: HTTPClient { var request: SdkHttpRequest? - func execute( + func send( request: SdkHttpRequest ) async throws -> HttpResponse { self.request = request diff --git a/AmplifyPlugins/Core/AWSPluginsCoreTests/Utils/UserAgentSuffixAppenderTests.swift b/AmplifyPlugins/Core/AWSPluginsCoreTests/Utils/UserAgentSuffixAppenderTests.swift index 221ead103c..3b6b167a92 100644 --- a/AmplifyPlugins/Core/AWSPluginsCoreTests/Utils/UserAgentSuffixAppenderTests.swift +++ b/AmplifyPlugins/Core/AWSPluginsCoreTests/Utils/UserAgentSuffixAppenderTests.swift @@ -33,7 +33,7 @@ class UserAgentSuffixAppenderTests: XCTestCase { let request = createRequest() request.withHeader(name: userAgentKey, value: "existingUserAgent") - _ = try await appender.execute(request: request) + _ = try await appender.send(request: request) XCTAssertEqual(httpClientEngine.executeCount, 1) XCTAssertNotNil(httpClientEngine.executeRequest) let userAgent = try XCTUnwrap( @@ -48,7 +48,7 @@ class UserAgentSuffixAppenderTests: XCTestCase { func testExecute_withoutExistingUserAgentHeader_shouldCreateHeader() async throws { let request = createRequest() - _ = try await appender.execute(request: request) + _ = try await appender.send(request: request) XCTAssertEqual(httpClientEngine.executeCount, 1) XCTAssertNotNil(httpClientEngine.executeRequest) let userAgent = try XCTUnwrap( @@ -63,7 +63,7 @@ class UserAgentSuffixAppenderTests: XCTestCase { func testExecute_withoutHttpClientEngine_shouldThrowError() async { appender = UserAgentSuffixAppender(suffix: customSuffix) do { - _ = try await appender.execute(request: createRequest()) + _ = try await appender.send(request: createRequest()) XCTFail("Should not succeed") } catch { guard case ClientError.unknownError(_) = error else { @@ -81,10 +81,10 @@ class UserAgentSuffixAppenderTests: XCTestCase { } } -private class MockHttpClientEngine: HttpClientEngine { +private class MockHttpClientEngine: HTTPClient { var executeCount = 0 var executeRequest: SdkHttpRequest? - func execute(request: SdkHttpRequest) async throws -> HttpResponse { + func send(request: SdkHttpRequest) async throws -> HttpResponse { executeCount += 1 executeRequest = request return .init(body: .empty, statusCode: .accepted) diff --git a/AmplifyPlugins/Core/AWSPluginsTestCommon/MockHttpResponse.swift b/AmplifyPlugins/Core/AWSPluginsTestCommon/MockHttpResponse.swift index 25ee01de00..684704a03b 100644 --- a/AmplifyPlugins/Core/AWSPluginsTestCommon/MockHttpResponse.swift +++ b/AmplifyPlugins/Core/AWSPluginsTestCommon/MockHttpResponse.swift @@ -9,6 +9,6 @@ import ClientRuntime class MockHttpResponse { class var ok: HttpResponse { - HttpResponse(body: .none, statusCode: .ok) + HttpResponse(body: .empty, statusCode: .ok) } } diff --git a/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Service/PinpointClientProtocol.swift b/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Service/PinpointClientProtocol.swift new file mode 100644 index 0000000000..c68eb35350 --- /dev/null +++ b/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Service/PinpointClientProtocol.swift @@ -0,0 +1,2290 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +import Amplify +import AWSPinpoint +import Foundation + +// swiftlint:disable file_length +public protocol PinpointClientProtocol { + /// Performs the `CreateApp` operation on the `Pinpoint` service. + /// + /// Creates an application. + /// + /// - Parameter CreateAppInput : [no documentation found] + /// + /// - Returns: `CreateAppOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func createApp(input: CreateAppInput) async throws -> CreateAppOutput + /// Performs the `CreateCampaign` operation on the `Pinpoint` service. + /// + /// Creates a new campaign for an application or updates the settings of an existing campaign for an application. + /// + /// - Parameter CreateCampaignInput : [no documentation found] + /// + /// - Returns: `CreateCampaignOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func createCampaign(input: CreateCampaignInput) async throws -> CreateCampaignOutput + /// Performs the `CreateEmailTemplate` operation on the `Pinpoint` service. + /// + /// Creates a message template for messages that are sent through the email channel. + /// + /// - Parameter CreateEmailTemplateInput : [no documentation found] + /// + /// - Returns: `CreateEmailTemplateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func createEmailTemplate(input: CreateEmailTemplateInput) async throws -> CreateEmailTemplateOutput + /// Performs the `CreateExportJob` operation on the `Pinpoint` service. + /// + /// Creates an export job for an application. + /// + /// - Parameter CreateExportJobInput : [no documentation found] + /// + /// - Returns: `CreateExportJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func createExportJob(input: CreateExportJobInput) async throws -> CreateExportJobOutput + /// Performs the `CreateImportJob` operation on the `Pinpoint` service. + /// + /// Creates an import job for an application. + /// + /// - Parameter CreateImportJobInput : [no documentation found] + /// + /// - Returns: `CreateImportJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func createImportJob(input: CreateImportJobInput) async throws -> CreateImportJobOutput + /// Performs the `CreateInAppTemplate` operation on the `Pinpoint` service. + /// + /// Creates a new message template for messages using the in-app message channel. + /// + /// - Parameter CreateInAppTemplateInput : [no documentation found] + /// + /// - Returns: `CreateInAppTemplateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func createInAppTemplate(input: CreateInAppTemplateInput) async throws -> CreateInAppTemplateOutput + /// Performs the `CreateJourney` operation on the `Pinpoint` service. + /// + /// Creates a journey for an application. + /// + /// - Parameter CreateJourneyInput : [no documentation found] + /// + /// - Returns: `CreateJourneyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func createJourney(input: CreateJourneyInput) async throws -> CreateJourneyOutput + /// Performs the `CreatePushTemplate` operation on the `Pinpoint` service. + /// + /// Creates a message template for messages that are sent through a push notification channel. + /// + /// - Parameter CreatePushTemplateInput : [no documentation found] + /// + /// - Returns: `CreatePushTemplateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func createPushTemplate(input: CreatePushTemplateInput) async throws -> CreatePushTemplateOutput + /// Performs the `CreateRecommenderConfiguration` operation on the `Pinpoint` service. + /// + /// Creates an Amazon Pinpoint configuration for a recommender model. + /// + /// - Parameter CreateRecommenderConfigurationInput : [no documentation found] + /// + /// - Returns: `CreateRecommenderConfigurationOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func createRecommenderConfiguration(input: CreateRecommenderConfigurationInput) async throws -> CreateRecommenderConfigurationOutput + /// Performs the `CreateSegment` operation on the `Pinpoint` service. + /// + /// Creates a new segment for an application or updates the configuration, dimension, and other settings for an existing segment that's associated with an application. + /// + /// - Parameter CreateSegmentInput : [no documentation found] + /// + /// - Returns: `CreateSegmentOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func createSegment(input: CreateSegmentInput) async throws -> CreateSegmentOutput + /// Performs the `CreateSmsTemplate` operation on the `Pinpoint` service. + /// + /// Creates a message template for messages that are sent through the SMS channel. + /// + /// - Parameter CreateSmsTemplateInput : [no documentation found] + /// + /// - Returns: `CreateSmsTemplateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func createSmsTemplate(input: CreateSmsTemplateInput) async throws -> CreateSmsTemplateOutput + /// Performs the `CreateVoiceTemplate` operation on the `Pinpoint` service. + /// + /// Creates a message template for messages that are sent through the voice channel. + /// + /// - Parameter CreateVoiceTemplateInput : [no documentation found] + /// + /// - Returns: `CreateVoiceTemplateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func createVoiceTemplate(input: CreateVoiceTemplateInput) async throws -> CreateVoiceTemplateOutput + /// Performs the `DeleteAdmChannel` operation on the `Pinpoint` service. + /// + /// Disables the ADM channel for an application and deletes any existing settings for the channel. + /// + /// - Parameter DeleteAdmChannelInput : [no documentation found] + /// + /// - Returns: `DeleteAdmChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteAdmChannel(input: DeleteAdmChannelInput) async throws -> DeleteAdmChannelOutput + /// Performs the `DeleteApnsChannel` operation on the `Pinpoint` service. + /// + /// Disables the APNs channel for an application and deletes any existing settings for the channel. + /// + /// - Parameter DeleteApnsChannelInput : [no documentation found] + /// + /// - Returns: `DeleteApnsChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteApnsChannel(input: DeleteApnsChannelInput) async throws -> DeleteApnsChannelOutput + /// Performs the `DeleteApnsSandboxChannel` operation on the `Pinpoint` service. + /// + /// Disables the APNs sandbox channel for an application and deletes any existing settings for the channel. + /// + /// - Parameter DeleteApnsSandboxChannelInput : [no documentation found] + /// + /// - Returns: `DeleteApnsSandboxChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteApnsSandboxChannel(input: DeleteApnsSandboxChannelInput) async throws -> DeleteApnsSandboxChannelOutput + /// Performs the `DeleteApnsVoipChannel` operation on the `Pinpoint` service. + /// + /// Disables the APNs VoIP channel for an application and deletes any existing settings for the channel. + /// + /// - Parameter DeleteApnsVoipChannelInput : [no documentation found] + /// + /// - Returns: `DeleteApnsVoipChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteApnsVoipChannel(input: DeleteApnsVoipChannelInput) async throws -> DeleteApnsVoipChannelOutput + /// Performs the `DeleteApnsVoipSandboxChannel` operation on the `Pinpoint` service. + /// + /// Disables the APNs VoIP sandbox channel for an application and deletes any existing settings for the channel. + /// + /// - Parameter DeleteApnsVoipSandboxChannelInput : [no documentation found] + /// + /// - Returns: `DeleteApnsVoipSandboxChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteApnsVoipSandboxChannel(input: DeleteApnsVoipSandboxChannelInput) async throws -> DeleteApnsVoipSandboxChannelOutput + /// Performs the `DeleteApp` operation on the `Pinpoint` service. + /// + /// Deletes an application. + /// + /// - Parameter DeleteAppInput : [no documentation found] + /// + /// - Returns: `DeleteAppOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteApp(input: DeleteAppInput) async throws -> DeleteAppOutput + /// Performs the `DeleteBaiduChannel` operation on the `Pinpoint` service. + /// + /// Disables the Baidu channel for an application and deletes any existing settings for the channel. + /// + /// - Parameter DeleteBaiduChannelInput : [no documentation found] + /// + /// - Returns: `DeleteBaiduChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteBaiduChannel(input: DeleteBaiduChannelInput) async throws -> DeleteBaiduChannelOutput + /// Performs the `DeleteCampaign` operation on the `Pinpoint` service. + /// + /// Deletes a campaign from an application. + /// + /// - Parameter DeleteCampaignInput : [no documentation found] + /// + /// - Returns: `DeleteCampaignOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteCampaign(input: DeleteCampaignInput) async throws -> DeleteCampaignOutput + /// Performs the `DeleteEmailChannel` operation on the `Pinpoint` service. + /// + /// Disables the email channel for an application and deletes any existing settings for the channel. + /// + /// - Parameter DeleteEmailChannelInput : [no documentation found] + /// + /// - Returns: `DeleteEmailChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteEmailChannel(input: DeleteEmailChannelInput) async throws -> DeleteEmailChannelOutput + /// Performs the `DeleteEmailTemplate` operation on the `Pinpoint` service. + /// + /// Deletes a message template for messages that were sent through the email channel. + /// + /// - Parameter DeleteEmailTemplateInput : [no documentation found] + /// + /// - Returns: `DeleteEmailTemplateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteEmailTemplate(input: DeleteEmailTemplateInput) async throws -> DeleteEmailTemplateOutput + /// Performs the `DeleteEndpoint` operation on the `Pinpoint` service. + /// + /// Deletes an endpoint from an application. + /// + /// - Parameter DeleteEndpointInput : [no documentation found] + /// + /// - Returns: `DeleteEndpointOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteEndpoint(input: DeleteEndpointInput) async throws -> DeleteEndpointOutput + /// Performs the `DeleteEventStream` operation on the `Pinpoint` service. + /// + /// Deletes the event stream for an application. + /// + /// - Parameter DeleteEventStreamInput : [no documentation found] + /// + /// - Returns: `DeleteEventStreamOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteEventStream(input: DeleteEventStreamInput) async throws -> DeleteEventStreamOutput + /// Performs the `DeleteGcmChannel` operation on the `Pinpoint` service. + /// + /// Disables the GCM channel for an application and deletes any existing settings for the channel. + /// + /// - Parameter DeleteGcmChannelInput : [no documentation found] + /// + /// - Returns: `DeleteGcmChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteGcmChannel(input: DeleteGcmChannelInput) async throws -> DeleteGcmChannelOutput + /// Performs the `DeleteInAppTemplate` operation on the `Pinpoint` service. + /// + /// Deletes a message template for messages sent using the in-app message channel. + /// + /// - Parameter DeleteInAppTemplateInput : [no documentation found] + /// + /// - Returns: `DeleteInAppTemplateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteInAppTemplate(input: DeleteInAppTemplateInput) async throws -> DeleteInAppTemplateOutput + /// Performs the `DeleteJourney` operation on the `Pinpoint` service. + /// + /// Deletes a journey from an application. + /// + /// - Parameter DeleteJourneyInput : [no documentation found] + /// + /// - Returns: `DeleteJourneyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteJourney(input: DeleteJourneyInput) async throws -> DeleteJourneyOutput + /// Performs the `DeletePushTemplate` operation on the `Pinpoint` service. + /// + /// Deletes a message template for messages that were sent through a push notification channel. + /// + /// - Parameter DeletePushTemplateInput : [no documentation found] + /// + /// - Returns: `DeletePushTemplateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deletePushTemplate(input: DeletePushTemplateInput) async throws -> DeletePushTemplateOutput + /// Performs the `DeleteRecommenderConfiguration` operation on the `Pinpoint` service. + /// + /// Deletes an Amazon Pinpoint configuration for a recommender model. + /// + /// - Parameter DeleteRecommenderConfigurationInput : [no documentation found] + /// + /// - Returns: `DeleteRecommenderConfigurationOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteRecommenderConfiguration(input: DeleteRecommenderConfigurationInput) async throws -> DeleteRecommenderConfigurationOutput + /// Performs the `DeleteSegment` operation on the `Pinpoint` service. + /// + /// Deletes a segment from an application. + /// + /// - Parameter DeleteSegmentInput : [no documentation found] + /// + /// - Returns: `DeleteSegmentOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteSegment(input: DeleteSegmentInput) async throws -> DeleteSegmentOutput + /// Performs the `DeleteSmsChannel` operation on the `Pinpoint` service. + /// + /// Disables the SMS channel for an application and deletes any existing settings for the channel. + /// + /// - Parameter DeleteSmsChannelInput : [no documentation found] + /// + /// - Returns: `DeleteSmsChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteSmsChannel(input: DeleteSmsChannelInput) async throws -> DeleteSmsChannelOutput + /// Performs the `DeleteSmsTemplate` operation on the `Pinpoint` service. + /// + /// Deletes a message template for messages that were sent through the SMS channel. + /// + /// - Parameter DeleteSmsTemplateInput : [no documentation found] + /// + /// - Returns: `DeleteSmsTemplateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteSmsTemplate(input: DeleteSmsTemplateInput) async throws -> DeleteSmsTemplateOutput + /// Performs the `DeleteUserEndpoints` operation on the `Pinpoint` service. + /// + /// Deletes all the endpoints that are associated with a specific user ID. + /// + /// - Parameter DeleteUserEndpointsInput : [no documentation found] + /// + /// - Returns: `DeleteUserEndpointsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteUserEndpoints(input: DeleteUserEndpointsInput) async throws -> DeleteUserEndpointsOutput + /// Performs the `DeleteVoiceChannel` operation on the `Pinpoint` service. + /// + /// Disables the voice channel for an application and deletes any existing settings for the channel. + /// + /// - Parameter DeleteVoiceChannelInput : [no documentation found] + /// + /// - Returns: `DeleteVoiceChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteVoiceChannel(input: DeleteVoiceChannelInput) async throws -> DeleteVoiceChannelOutput + /// Performs the `DeleteVoiceTemplate` operation on the `Pinpoint` service. + /// + /// Deletes a message template for messages that were sent through the voice channel. + /// + /// - Parameter DeleteVoiceTemplateInput : [no documentation found] + /// + /// - Returns: `DeleteVoiceTemplateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func deleteVoiceTemplate(input: DeleteVoiceTemplateInput) async throws -> DeleteVoiceTemplateOutput + /// Performs the `GetAdmChannel` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status and settings of the ADM channel for an application. + /// + /// - Parameter GetAdmChannelInput : [no documentation found] + /// + /// - Returns: `GetAdmChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getAdmChannel(input: GetAdmChannelInput) async throws -> GetAdmChannelOutput + /// Performs the `GetApnsChannel` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status and settings of the APNs channel for an application. + /// + /// - Parameter GetApnsChannelInput : [no documentation found] + /// + /// - Returns: `GetApnsChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getApnsChannel(input: GetApnsChannelInput) async throws -> GetApnsChannelOutput + /// Performs the `GetApnsSandboxChannel` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status and settings of the APNs sandbox channel for an application. + /// + /// - Parameter GetApnsSandboxChannelInput : [no documentation found] + /// + /// - Returns: `GetApnsSandboxChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getApnsSandboxChannel(input: GetApnsSandboxChannelInput) async throws -> GetApnsSandboxChannelOutput + /// Performs the `GetApnsVoipChannel` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status and settings of the APNs VoIP channel for an application. + /// + /// - Parameter GetApnsVoipChannelInput : [no documentation found] + /// + /// - Returns: `GetApnsVoipChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getApnsVoipChannel(input: GetApnsVoipChannelInput) async throws -> GetApnsVoipChannelOutput + /// Performs the `GetApnsVoipSandboxChannel` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status and settings of the APNs VoIP sandbox channel for an application. + /// + /// - Parameter GetApnsVoipSandboxChannelInput : [no documentation found] + /// + /// - Returns: `GetApnsVoipSandboxChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getApnsVoipSandboxChannel(input: GetApnsVoipSandboxChannelInput) async throws -> GetApnsVoipSandboxChannelOutput + /// Performs the `GetApp` operation on the `Pinpoint` service. + /// + /// Retrieves information about an application. + /// + /// - Parameter GetAppInput : [no documentation found] + /// + /// - Returns: `GetAppOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getApp(input: GetAppInput) async throws -> GetAppOutput + /// Performs the `GetApplicationDateRangeKpi` operation on the `Pinpoint` service. + /// + /// Retrieves (queries) pre-aggregated data for a standard metric that applies to an application. + /// + /// - Parameter GetApplicationDateRangeKpiInput : [no documentation found] + /// + /// - Returns: `GetApplicationDateRangeKpiOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getApplicationDateRangeKpi(input: GetApplicationDateRangeKpiInput) async throws -> GetApplicationDateRangeKpiOutput + /// Performs the `GetApplicationSettings` operation on the `Pinpoint` service. + /// + /// Retrieves information about the settings for an application. + /// + /// - Parameter GetApplicationSettingsInput : [no documentation found] + /// + /// - Returns: `GetApplicationSettingsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getApplicationSettings(input: GetApplicationSettingsInput) async throws -> GetApplicationSettingsOutput + /// Performs the `GetApps` operation on the `Pinpoint` service. + /// + /// Retrieves information about all the applications that are associated with your Amazon Pinpoint account. + /// + /// - Parameter GetAppsInput : [no documentation found] + /// + /// - Returns: `GetAppsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getApps(input: GetAppsInput) async throws -> GetAppsOutput + /// Performs the `GetBaiduChannel` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status and settings of the Baidu channel for an application. + /// + /// - Parameter GetBaiduChannelInput : [no documentation found] + /// + /// - Returns: `GetBaiduChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getBaiduChannel(input: GetBaiduChannelInput) async throws -> GetBaiduChannelOutput + /// Performs the `GetCampaign` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status, configuration, and other settings for a campaign. + /// + /// - Parameter GetCampaignInput : [no documentation found] + /// + /// - Returns: `GetCampaignOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getCampaign(input: GetCampaignInput) async throws -> GetCampaignOutput + /// Performs the `GetCampaignActivities` operation on the `Pinpoint` service. + /// + /// Retrieves information about all the activities for a campaign. + /// + /// - Parameter GetCampaignActivitiesInput : [no documentation found] + /// + /// - Returns: `GetCampaignActivitiesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getCampaignActivities(input: GetCampaignActivitiesInput) async throws -> GetCampaignActivitiesOutput + /// Performs the `GetCampaignDateRangeKpi` operation on the `Pinpoint` service. + /// + /// Retrieves (queries) pre-aggregated data for a standard metric that applies to a campaign. + /// + /// - Parameter GetCampaignDateRangeKpiInput : [no documentation found] + /// + /// - Returns: `GetCampaignDateRangeKpiOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getCampaignDateRangeKpi(input: GetCampaignDateRangeKpiInput) async throws -> GetCampaignDateRangeKpiOutput + /// Performs the `GetCampaigns` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status, configuration, and other settings for all the campaigns that are associated with an application. + /// + /// - Parameter GetCampaignsInput : [no documentation found] + /// + /// - Returns: `GetCampaignsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getCampaigns(input: GetCampaignsInput) async throws -> GetCampaignsOutput + /// Performs the `GetCampaignVersion` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status, configuration, and other settings for a specific version of a campaign. + /// + /// - Parameter GetCampaignVersionInput : [no documentation found] + /// + /// - Returns: `GetCampaignVersionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getCampaignVersion(input: GetCampaignVersionInput) async throws -> GetCampaignVersionOutput + /// Performs the `GetCampaignVersions` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status, configuration, and other settings for all versions of a campaign. + /// + /// - Parameter GetCampaignVersionsInput : [no documentation found] + /// + /// - Returns: `GetCampaignVersionsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getCampaignVersions(input: GetCampaignVersionsInput) async throws -> GetCampaignVersionsOutput + /// Performs the `GetChannels` operation on the `Pinpoint` service. + /// + /// Retrieves information about the history and status of each channel for an application. + /// + /// - Parameter GetChannelsInput : [no documentation found] + /// + /// - Returns: `GetChannelsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getChannels(input: GetChannelsInput) async throws -> GetChannelsOutput + /// Performs the `GetEmailChannel` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status and settings of the email channel for an application. + /// + /// - Parameter GetEmailChannelInput : [no documentation found] + /// + /// - Returns: `GetEmailChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getEmailChannel(input: GetEmailChannelInput) async throws -> GetEmailChannelOutput + /// Performs the `GetEmailTemplate` operation on the `Pinpoint` service. + /// + /// Retrieves the content and settings of a message template for messages that are sent through the email channel. + /// + /// - Parameter GetEmailTemplateInput : [no documentation found] + /// + /// - Returns: `GetEmailTemplateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getEmailTemplate(input: GetEmailTemplateInput) async throws -> GetEmailTemplateOutput + /// Performs the `GetEndpoint` operation on the `Pinpoint` service. + /// + /// Retrieves information about the settings and attributes of a specific endpoint for an application. + /// + /// - Parameter GetEndpointInput : [no documentation found] + /// + /// - Returns: `GetEndpointOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getEndpoint(input: GetEndpointInput) async throws -> GetEndpointOutput + /// Performs the `GetEventStream` operation on the `Pinpoint` service. + /// + /// Retrieves information about the event stream settings for an application. + /// + /// - Parameter GetEventStreamInput : [no documentation found] + /// + /// - Returns: `GetEventStreamOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getEventStream(input: GetEventStreamInput) async throws -> GetEventStreamOutput + /// Performs the `GetExportJob` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status and settings of a specific export job for an application. + /// + /// - Parameter GetExportJobInput : [no documentation found] + /// + /// - Returns: `GetExportJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getExportJob(input: GetExportJobInput) async throws -> GetExportJobOutput + /// Performs the `GetExportJobs` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status and settings of all the export jobs for an application. + /// + /// - Parameter GetExportJobsInput : [no documentation found] + /// + /// - Returns: `GetExportJobsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getExportJobs(input: GetExportJobsInput) async throws -> GetExportJobsOutput + /// Performs the `GetGcmChannel` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status and settings of the GCM channel for an application. + /// + /// - Parameter GetGcmChannelInput : [no documentation found] + /// + /// - Returns: `GetGcmChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getGcmChannel(input: GetGcmChannelInput) async throws -> GetGcmChannelOutput + /// Performs the `GetImportJob` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status and settings of a specific import job for an application. + /// + /// - Parameter GetImportJobInput : [no documentation found] + /// + /// - Returns: `GetImportJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getImportJob(input: GetImportJobInput) async throws -> GetImportJobOutput + /// Performs the `GetImportJobs` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status and settings of all the import jobs for an application. + /// + /// - Parameter GetImportJobsInput : [no documentation found] + /// + /// - Returns: `GetImportJobsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getImportJobs(input: GetImportJobsInput) async throws -> GetImportJobsOutput + /// Performs the `GetInAppMessages` operation on the `Pinpoint` service. + /// + /// Retrieves the in-app messages targeted for the provided endpoint ID. + /// + /// - Parameter GetInAppMessagesInput : [no documentation found] + /// + /// - Returns: `GetInAppMessagesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getInAppMessages(input: GetInAppMessagesInput) async throws -> GetInAppMessagesOutput + /// Performs the `GetInAppTemplate` operation on the `Pinpoint` service. + /// + /// Retrieves the content and settings of a message template for messages sent through the in-app channel. + /// + /// - Parameter GetInAppTemplateInput : [no documentation found] + /// + /// - Returns: `GetInAppTemplateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getInAppTemplate(input: GetInAppTemplateInput) async throws -> GetInAppTemplateOutput + /// Performs the `GetJourney` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status, configuration, and other settings for a journey. + /// + /// - Parameter GetJourneyInput : [no documentation found] + /// + /// - Returns: `GetJourneyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getJourney(input: GetJourneyInput) async throws -> GetJourneyOutput + /// Performs the `GetJourneyDateRangeKpi` operation on the `Pinpoint` service. + /// + /// Retrieves (queries) pre-aggregated data for a standard engagement metric that applies to a journey. + /// + /// - Parameter GetJourneyDateRangeKpiInput : [no documentation found] + /// + /// - Returns: `GetJourneyDateRangeKpiOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getJourneyDateRangeKpi(input: GetJourneyDateRangeKpiInput) async throws -> GetJourneyDateRangeKpiOutput + /// Performs the `GetJourneyExecutionActivityMetrics` operation on the `Pinpoint` service. + /// + /// Retrieves (queries) pre-aggregated data for a standard execution metric that applies to a journey activity. + /// + /// - Parameter GetJourneyExecutionActivityMetricsInput : [no documentation found] + /// + /// - Returns: `GetJourneyExecutionActivityMetricsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getJourneyExecutionActivityMetrics(input: GetJourneyExecutionActivityMetricsInput) async throws -> GetJourneyExecutionActivityMetricsOutput + /// Performs the `GetJourneyExecutionMetrics` operation on the `Pinpoint` service. + /// + /// Retrieves (queries) pre-aggregated data for a standard execution metric that applies to a journey. + /// + /// - Parameter GetJourneyExecutionMetricsInput : [no documentation found] + /// + /// - Returns: `GetJourneyExecutionMetricsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getJourneyExecutionMetrics(input: GetJourneyExecutionMetricsInput) async throws -> GetJourneyExecutionMetricsOutput + /// Performs the `GetJourneyRunExecutionActivityMetrics` operation on the `Pinpoint` service. + /// + /// Retrieves (queries) pre-aggregated data for a standard run execution metric that applies to a journey activity. + /// + /// - Parameter GetJourneyRunExecutionActivityMetricsInput : [no documentation found] + /// + /// - Returns: `GetJourneyRunExecutionActivityMetricsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getJourneyRunExecutionActivityMetrics(input: GetJourneyRunExecutionActivityMetricsInput) async throws -> GetJourneyRunExecutionActivityMetricsOutput + /// Performs the `GetJourneyRunExecutionMetrics` operation on the `Pinpoint` service. + /// + /// Retrieves (queries) pre-aggregated data for a standard run execution metric that applies to a journey. + /// + /// - Parameter GetJourneyRunExecutionMetricsInput : [no documentation found] + /// + /// - Returns: `GetJourneyRunExecutionMetricsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getJourneyRunExecutionMetrics(input: GetJourneyRunExecutionMetricsInput) async throws -> GetJourneyRunExecutionMetricsOutput + /// Performs the `GetJourneyRuns` operation on the `Pinpoint` service. + /// + /// Provides information about the runs of a journey. + /// + /// - Parameter GetJourneyRunsInput : [no documentation found] + /// + /// - Returns: `GetJourneyRunsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getJourneyRuns(input: GetJourneyRunsInput) async throws -> GetJourneyRunsOutput + /// Performs the `GetPushTemplate` operation on the `Pinpoint` service. + /// + /// Retrieves the content and settings of a message template for messages that are sent through a push notification channel. + /// + /// - Parameter GetPushTemplateInput : [no documentation found] + /// + /// - Returns: `GetPushTemplateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getPushTemplate(input: GetPushTemplateInput) async throws -> GetPushTemplateOutput + /// Performs the `GetRecommenderConfiguration` operation on the `Pinpoint` service. + /// + /// Retrieves information about an Amazon Pinpoint configuration for a recommender model. + /// + /// - Parameter GetRecommenderConfigurationInput : [no documentation found] + /// + /// - Returns: `GetRecommenderConfigurationOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getRecommenderConfiguration(input: GetRecommenderConfigurationInput) async throws -> GetRecommenderConfigurationOutput + /// Performs the `GetRecommenderConfigurations` operation on the `Pinpoint` service. + /// + /// Retrieves information about all the recommender model configurations that are associated with your Amazon Pinpoint account. + /// + /// - Parameter GetRecommenderConfigurationsInput : [no documentation found] + /// + /// - Returns: `GetRecommenderConfigurationsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getRecommenderConfigurations(input: GetRecommenderConfigurationsInput) async throws -> GetRecommenderConfigurationsOutput + /// Performs the `GetSegment` operation on the `Pinpoint` service. + /// + /// Retrieves information about the configuration, dimension, and other settings for a specific segment that's associated with an application. + /// + /// - Parameter GetSegmentInput : [no documentation found] + /// + /// - Returns: `GetSegmentOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getSegment(input: GetSegmentInput) async throws -> GetSegmentOutput + /// Performs the `GetSegmentExportJobs` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status and settings of the export jobs for a segment. + /// + /// - Parameter GetSegmentExportJobsInput : [no documentation found] + /// + /// - Returns: `GetSegmentExportJobsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getSegmentExportJobs(input: GetSegmentExportJobsInput) async throws -> GetSegmentExportJobsOutput + /// Performs the `GetSegmentImportJobs` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status and settings of the import jobs for a segment. + /// + /// - Parameter GetSegmentImportJobsInput : [no documentation found] + /// + /// - Returns: `GetSegmentImportJobsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getSegmentImportJobs(input: GetSegmentImportJobsInput) async throws -> GetSegmentImportJobsOutput + /// Performs the `GetSegments` operation on the `Pinpoint` service. + /// + /// Retrieves information about the configuration, dimension, and other settings for all the segments that are associated with an application. + /// + /// - Parameter GetSegmentsInput : [no documentation found] + /// + /// - Returns: `GetSegmentsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getSegments(input: GetSegmentsInput) async throws -> GetSegmentsOutput + /// Performs the `GetSegmentVersion` operation on the `Pinpoint` service. + /// + /// Retrieves information about the configuration, dimension, and other settings for a specific version of a segment that's associated with an application. + /// + /// - Parameter GetSegmentVersionInput : [no documentation found] + /// + /// - Returns: `GetSegmentVersionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getSegmentVersion(input: GetSegmentVersionInput) async throws -> GetSegmentVersionOutput + /// Performs the `GetSegmentVersions` operation on the `Pinpoint` service. + /// + /// Retrieves information about the configuration, dimension, and other settings for all the versions of a specific segment that's associated with an application. + /// + /// - Parameter GetSegmentVersionsInput : [no documentation found] + /// + /// - Returns: `GetSegmentVersionsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getSegmentVersions(input: GetSegmentVersionsInput) async throws -> GetSegmentVersionsOutput + /// Performs the `GetSmsChannel` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status and settings of the SMS channel for an application. + /// + /// - Parameter GetSmsChannelInput : [no documentation found] + /// + /// - Returns: `GetSmsChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getSmsChannel(input: GetSmsChannelInput) async throws -> GetSmsChannelOutput + /// Performs the `GetSmsTemplate` operation on the `Pinpoint` service. + /// + /// Retrieves the content and settings of a message template for messages that are sent through the SMS channel. + /// + /// - Parameter GetSmsTemplateInput : [no documentation found] + /// + /// - Returns: `GetSmsTemplateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getSmsTemplate(input: GetSmsTemplateInput) async throws -> GetSmsTemplateOutput + /// Performs the `GetUserEndpoints` operation on the `Pinpoint` service. + /// + /// Retrieves information about all the endpoints that are associated with a specific user ID. + /// + /// - Parameter GetUserEndpointsInput : [no documentation found] + /// + /// - Returns: `GetUserEndpointsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getUserEndpoints(input: GetUserEndpointsInput) async throws -> GetUserEndpointsOutput + /// Performs the `GetVoiceChannel` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status and settings of the voice channel for an application. + /// + /// - Parameter GetVoiceChannelInput : [no documentation found] + /// + /// - Returns: `GetVoiceChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getVoiceChannel(input: GetVoiceChannelInput) async throws -> GetVoiceChannelOutput + /// Performs the `GetVoiceTemplate` operation on the `Pinpoint` service. + /// + /// Retrieves the content and settings of a message template for messages that are sent through the voice channel. + /// + /// - Parameter GetVoiceTemplateInput : [no documentation found] + /// + /// - Returns: `GetVoiceTemplateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func getVoiceTemplate(input: GetVoiceTemplateInput) async throws -> GetVoiceTemplateOutput + /// Performs the `ListJourneys` operation on the `Pinpoint` service. + /// + /// Retrieves information about the status, configuration, and other settings for all the journeys that are associated with an application. + /// + /// - Parameter ListJourneysInput : [no documentation found] + /// + /// - Returns: `ListJourneysOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func listJourneys(input: ListJourneysInput) async throws -> ListJourneysOutput + /// Performs the `ListTagsForResource` operation on the `Pinpoint` service. + /// + /// Retrieves all the tags (keys and values) that are associated with an application, campaign, message template, or segment. + /// + /// - Parameter ListTagsForResourceInput : [no documentation found] + /// + /// - Returns: `ListTagsForResourceOutput` : [no documentation found] + func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput + /// Performs the `ListTemplates` operation on the `Pinpoint` service. + /// + /// Retrieves information about all the message templates that are associated with your Amazon Pinpoint account. + /// + /// - Parameter ListTemplatesInput : [no documentation found] + /// + /// - Returns: `ListTemplatesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func listTemplates(input: ListTemplatesInput) async throws -> ListTemplatesOutput + /// Performs the `ListTemplateVersions` operation on the `Pinpoint` service. + /// + /// Retrieves information about all the versions of a specific message template. + /// + /// - Parameter ListTemplateVersionsInput : [no documentation found] + /// + /// - Returns: `ListTemplateVersionsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func listTemplateVersions(input: ListTemplateVersionsInput) async throws -> ListTemplateVersionsOutput + /// Performs the `PhoneNumberValidate` operation on the `Pinpoint` service. + /// + /// Retrieves information about a phone number. + /// + /// - Parameter PhoneNumberValidateInput : [no documentation found] + /// + /// - Returns: `PhoneNumberValidateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func phoneNumberValidate(input: PhoneNumberValidateInput) async throws -> PhoneNumberValidateOutput + /// Performs the `PutEvents` operation on the `Pinpoint` service. + /// + /// Creates a new event to record for endpoints, or creates or updates endpoint data that existing events are associated with. + /// + /// - Parameter PutEventsInput : [no documentation found] + /// + /// - Returns: `PutEventsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func putEvents(input: PutEventsInput) async throws -> PutEventsOutput + /// Performs the `PutEventStream` operation on the `Pinpoint` service. + /// + /// Creates a new event stream for an application or updates the settings of an existing event stream for an application. + /// + /// - Parameter PutEventStreamInput : [no documentation found] + /// + /// - Returns: `PutEventStreamOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func putEventStream(input: PutEventStreamInput) async throws -> PutEventStreamOutput + /// Performs the `RemoveAttributes` operation on the `Pinpoint` service. + /// + /// Removes one or more custom attributes, of the same attribute type, from the application. Existing endpoints still have the attributes but Amazon Pinpoint will stop capturing new or changed values for these attributes. + /// + /// - Parameter RemoveAttributesInput : [no documentation found] + /// + /// - Returns: `RemoveAttributesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func removeAttributes(input: RemoveAttributesInput) async throws -> RemoveAttributesOutput + /// Performs the `SendMessages` operation on the `Pinpoint` service. + /// + /// Creates and sends a direct message. + /// + /// - Parameter SendMessagesInput : [no documentation found] + /// + /// - Returns: `SendMessagesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func sendMessages(input: SendMessagesInput) async throws -> SendMessagesOutput + /// Performs the `SendOTPMessage` operation on the `Pinpoint` service. + /// + /// Send an OTP message + /// + /// - Parameter SendOTPMessageInput : [no documentation found] + /// + /// - Returns: `SendOTPMessageOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func sendOTPMessage(input: SendOTPMessageInput) async throws -> SendOTPMessageOutput + /// Performs the `SendUsersMessages` operation on the `Pinpoint` service. + /// + /// Creates and sends a message to a list of users. + /// + /// - Parameter SendUsersMessagesInput : [no documentation found] + /// + /// - Returns: `SendUsersMessagesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func sendUsersMessages(input: SendUsersMessagesInput) async throws -> SendUsersMessagesOutput + /// Performs the `TagResource` operation on the `Pinpoint` service. + /// + /// Adds one or more tags (keys and values) to an application, campaign, message template, or segment. + /// + /// - Parameter TagResourceInput : [no documentation found] + /// + /// - Returns: `TagResourceOutput` : [no documentation found] + func tagResource(input: TagResourceInput) async throws -> TagResourceOutput + /// Performs the `UntagResource` operation on the `Pinpoint` service. + /// + /// Removes one or more tags (keys and values) from an application, campaign, message template, or segment. + /// + /// - Parameter UntagResourceInput : [no documentation found] + /// + /// - Returns: `UntagResourceOutput` : [no documentation found] + func untagResource(input: UntagResourceInput) async throws -> UntagResourceOutput + /// Performs the `UpdateAdmChannel` operation on the `Pinpoint` service. + /// + /// Enables the ADM channel for an application or updates the status and settings of the ADM channel for an application. + /// + /// - Parameter UpdateAdmChannelInput : [no documentation found] + /// + /// - Returns: `UpdateAdmChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateAdmChannel(input: UpdateAdmChannelInput) async throws -> UpdateAdmChannelOutput + /// Performs the `UpdateApnsChannel` operation on the `Pinpoint` service. + /// + /// Enables the APNs channel for an application or updates the status and settings of the APNs channel for an application. + /// + /// - Parameter UpdateApnsChannelInput : [no documentation found] + /// + /// - Returns: `UpdateApnsChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateApnsChannel(input: UpdateApnsChannelInput) async throws -> UpdateApnsChannelOutput + /// Performs the `UpdateApnsSandboxChannel` operation on the `Pinpoint` service. + /// + /// Enables the APNs sandbox channel for an application or updates the status and settings of the APNs sandbox channel for an application. + /// + /// - Parameter UpdateApnsSandboxChannelInput : [no documentation found] + /// + /// - Returns: `UpdateApnsSandboxChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateApnsSandboxChannel(input: UpdateApnsSandboxChannelInput) async throws -> UpdateApnsSandboxChannelOutput + /// Performs the `UpdateApnsVoipChannel` operation on the `Pinpoint` service. + /// + /// Enables the APNs VoIP channel for an application or updates the status and settings of the APNs VoIP channel for an application. + /// + /// - Parameter UpdateApnsVoipChannelInput : [no documentation found] + /// + /// - Returns: `UpdateApnsVoipChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateApnsVoipChannel(input: UpdateApnsVoipChannelInput) async throws -> UpdateApnsVoipChannelOutput + /// Performs the `UpdateApnsVoipSandboxChannel` operation on the `Pinpoint` service. + /// + /// Enables the APNs VoIP sandbox channel for an application or updates the status and settings of the APNs VoIP sandbox channel for an application. + /// + /// - Parameter UpdateApnsVoipSandboxChannelInput : [no documentation found] + /// + /// - Returns: `UpdateApnsVoipSandboxChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateApnsVoipSandboxChannel(input: UpdateApnsVoipSandboxChannelInput) async throws -> UpdateApnsVoipSandboxChannelOutput + /// Performs the `UpdateApplicationSettings` operation on the `Pinpoint` service. + /// + /// Updates the settings for an application. + /// + /// - Parameter UpdateApplicationSettingsInput : [no documentation found] + /// + /// - Returns: `UpdateApplicationSettingsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateApplicationSettings(input: UpdateApplicationSettingsInput) async throws -> UpdateApplicationSettingsOutput + /// Performs the `UpdateBaiduChannel` operation on the `Pinpoint` service. + /// + /// Enables the Baidu channel for an application or updates the status and settings of the Baidu channel for an application. + /// + /// - Parameter UpdateBaiduChannelInput : [no documentation found] + /// + /// - Returns: `UpdateBaiduChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateBaiduChannel(input: UpdateBaiduChannelInput) async throws -> UpdateBaiduChannelOutput + /// Performs the `UpdateCampaign` operation on the `Pinpoint` service. + /// + /// Updates the configuration and other settings for a campaign. + /// + /// - Parameter UpdateCampaignInput : [no documentation found] + /// + /// - Returns: `UpdateCampaignOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateCampaign(input: UpdateCampaignInput) async throws -> UpdateCampaignOutput + /// Performs the `UpdateEmailChannel` operation on the `Pinpoint` service. + /// + /// Enables the email channel for an application or updates the status and settings of the email channel for an application. + /// + /// - Parameter UpdateEmailChannelInput : [no documentation found] + /// + /// - Returns: `UpdateEmailChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateEmailChannel(input: UpdateEmailChannelInput) async throws -> UpdateEmailChannelOutput + /// Performs the `UpdateEmailTemplate` operation on the `Pinpoint` service. + /// + /// Updates an existing message template for messages that are sent through the email channel. + /// + /// - Parameter UpdateEmailTemplateInput : [no documentation found] + /// + /// - Returns: `UpdateEmailTemplateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateEmailTemplate(input: UpdateEmailTemplateInput) async throws -> UpdateEmailTemplateOutput + /// Performs the `UpdateEndpoint` operation on the `Pinpoint` service. + /// + /// Creates a new endpoint for an application or updates the settings and attributes of an existing endpoint for an application. You can also use this operation to define custom attributes for an endpoint. If an update includes one or more values for a custom attribute, Amazon Pinpoint replaces (overwrites) any existing values with the new values. + /// + /// - Parameter UpdateEndpointInput : [no documentation found] + /// + /// - Returns: `UpdateEndpointOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateEndpoint(input: UpdateEndpointInput) async throws -> UpdateEndpointOutput + /// Performs the `UpdateEndpointsBatch` operation on the `Pinpoint` service. + /// + /// Creates a new batch of endpoints for an application or updates the settings and attributes of a batch of existing endpoints for an application. You can also use this operation to define custom attributes for a batch of endpoints. If an update includes one or more values for a custom attribute, Amazon Pinpoint replaces (overwrites) any existing values with the new values. + /// + /// - Parameter UpdateEndpointsBatchInput : [no documentation found] + /// + /// - Returns: `UpdateEndpointsBatchOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateEndpointsBatch(input: UpdateEndpointsBatchInput) async throws -> UpdateEndpointsBatchOutput + /// Performs the `UpdateGcmChannel` operation on the `Pinpoint` service. + /// + /// Enables the GCM channel for an application or updates the status and settings of the GCM channel for an application. + /// + /// - Parameter UpdateGcmChannelInput : [no documentation found] + /// + /// - Returns: `UpdateGcmChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateGcmChannel(input: UpdateGcmChannelInput) async throws -> UpdateGcmChannelOutput + /// Performs the `UpdateInAppTemplate` operation on the `Pinpoint` service. + /// + /// Updates an existing message template for messages sent through the in-app message channel. + /// + /// - Parameter UpdateInAppTemplateInput : [no documentation found] + /// + /// - Returns: `UpdateInAppTemplateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateInAppTemplate(input: UpdateInAppTemplateInput) async throws -> UpdateInAppTemplateOutput + /// Performs the `UpdateJourney` operation on the `Pinpoint` service. + /// + /// Updates the configuration and other settings for a journey. + /// + /// - Parameter UpdateJourneyInput : [no documentation found] + /// + /// - Returns: `UpdateJourneyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ConflictException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateJourney(input: UpdateJourneyInput) async throws -> UpdateJourneyOutput + /// Performs the `UpdateJourneyState` operation on the `Pinpoint` service. + /// + /// Cancels (stops) an active journey. + /// + /// - Parameter UpdateJourneyStateInput : [no documentation found] + /// + /// - Returns: `UpdateJourneyStateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateJourneyState(input: UpdateJourneyStateInput) async throws -> UpdateJourneyStateOutput + /// Performs the `UpdatePushTemplate` operation on the `Pinpoint` service. + /// + /// Updates an existing message template for messages that are sent through a push notification channel. + /// + /// - Parameter UpdatePushTemplateInput : [no documentation found] + /// + /// - Returns: `UpdatePushTemplateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updatePushTemplate(input: UpdatePushTemplateInput) async throws -> UpdatePushTemplateOutput + /// Performs the `UpdateRecommenderConfiguration` operation on the `Pinpoint` service. + /// + /// Updates an Amazon Pinpoint configuration for a recommender model. + /// + /// - Parameter UpdateRecommenderConfigurationInput : [no documentation found] + /// + /// - Returns: `UpdateRecommenderConfigurationOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateRecommenderConfiguration(input: UpdateRecommenderConfigurationInput) async throws -> UpdateRecommenderConfigurationOutput + /// Performs the `UpdateSegment` operation on the `Pinpoint` service. + /// + /// Creates a new segment for an application or updates the configuration, dimension, and other settings for an existing segment that's associated with an application. + /// + /// - Parameter UpdateSegmentInput : [no documentation found] + /// + /// - Returns: `UpdateSegmentOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateSegment(input: UpdateSegmentInput) async throws -> UpdateSegmentOutput + /// Performs the `UpdateSmsChannel` operation on the `Pinpoint` service. + /// + /// Enables the SMS channel for an application or updates the status and settings of the SMS channel for an application. + /// + /// - Parameter UpdateSmsChannelInput : [no documentation found] + /// + /// - Returns: `UpdateSmsChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateSmsChannel(input: UpdateSmsChannelInput) async throws -> UpdateSmsChannelOutput + /// Performs the `UpdateSmsTemplate` operation on the `Pinpoint` service. + /// + /// Updates an existing message template for messages that are sent through the SMS channel. + /// + /// - Parameter UpdateSmsTemplateInput : [no documentation found] + /// + /// - Returns: `UpdateSmsTemplateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateSmsTemplate(input: UpdateSmsTemplateInput) async throws -> UpdateSmsTemplateOutput + /// Performs the `UpdateTemplateActiveVersion` operation on the `Pinpoint` service. + /// + /// Changes the status of a specific version of a message template to active. + /// + /// - Parameter UpdateTemplateActiveVersionInput : [no documentation found] + /// + /// - Returns: `UpdateTemplateActiveVersionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateTemplateActiveVersion(input: UpdateTemplateActiveVersionInput) async throws -> UpdateTemplateActiveVersionOutput + /// Performs the `UpdateVoiceChannel` operation on the `Pinpoint` service. + /// + /// Enables the voice channel for an application or updates the status and settings of the voice channel for an application. + /// + /// - Parameter UpdateVoiceChannelInput : [no documentation found] + /// + /// - Returns: `UpdateVoiceChannelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateVoiceChannel(input: UpdateVoiceChannelInput) async throws -> UpdateVoiceChannelOutput + /// Performs the `UpdateVoiceTemplate` operation on the `Pinpoint` service. + /// + /// Updates an existing message template for messages that are sent through the voice channel. + /// + /// - Parameter UpdateVoiceTemplateInput : [no documentation found] + /// + /// - Returns: `UpdateVoiceTemplateOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func updateVoiceTemplate(input: UpdateVoiceTemplateInput) async throws -> UpdateVoiceTemplateOutput + /// Performs the `VerifyOTPMessage` operation on the `Pinpoint` service. + /// + /// Verify an OTP + /// + /// - Parameter VerifyOTPMessageInput : [no documentation found] + /// + /// - Returns: `VerifyOTPMessageOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BadRequestException` : Provides information about an API request or response. + /// - `ForbiddenException` : Provides information about an API request or response. + /// - `InternalServerErrorException` : Provides information about an API request or response. + /// - `MethodNotAllowedException` : Provides information about an API request or response. + /// - `NotFoundException` : Provides information about an API request or response. + /// - `PayloadTooLargeException` : Provides information about an API request or response. + /// - `TooManyRequestsException` : Provides information about an API request or response. + func verifyOTPMessage(input: VerifyOTPMessageInput) async throws -> VerifyOTPMessageOutput +} + +extension PinpointClient: PinpointClientProtocol { } diff --git a/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Support/Utils/PinpointRequestsRegistry.swift b/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Support/Utils/PinpointRequestsRegistry.swift index 55e42943ce..fd10c9a9fa 100644 --- a/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Support/Utils/PinpointRequestsRegistry.swift +++ b/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Support/Utils/PinpointRequestsRegistry.swift @@ -53,26 +53,26 @@ import AWSPluginsCore } } -private struct CustomPinpointHttpClientEngine: HttpClientEngine { +private struct CustomPinpointHttpClientEngine: HTTPClient { private let userAgentHeader = "User-Agent" - private let httpClientEngine: HttpClientEngine + private let httpClientEngine: HTTPClient - init(httpClientEngine: HttpClientEngine) { + init(httpClientEngine: HTTPClient) { self.httpClientEngine = httpClientEngine } - func execute(request: ClientRuntime.SdkHttpRequest) async throws -> ClientRuntime.HttpResponse { + func send(request: ClientRuntime.SdkHttpRequest) async throws -> ClientRuntime.HttpResponse { guard let url = request.endpoint.url, let pinpointApi = PinpointRequestsRegistry.API(from: url), let userAgentSuffix = await userAgent(for: pinpointApi) else { - return try await httpClientEngine.execute(request: request) + return try await httpClientEngine.send(request: request) } let currentUserAgent = request.headers.value(for: userAgentHeader) ?? "" let updatedRequest = request.updatingUserAgent(with: "\(currentUserAgent) \(userAgentSuffix)") await PinpointRequestsRegistry.shared.unregisterSources(for: pinpointApi) - return try await httpClientEngine.execute(request: updatedRequest) + return try await httpClientEngine.send(request: updatedRequest) } private func userAgent(for api: PinpointRequestsRegistry.API) async -> String? { diff --git a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/Mocks/MockPinpointClient.swift b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/Mocks/MockPinpointClient.swift index 4bc8c814d8..a31edd21a7 100644 --- a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/Mocks/MockPinpointClient.swift +++ b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/Mocks/MockPinpointClient.swift @@ -7,8 +7,10 @@ import AWSPinpoint import Foundation +import InternalAWSPinpoint class MockPinpointClient: PinpointClientProtocol { + func getJourneyRunExecutionActivityMetrics(input: GetJourneyRunExecutionActivityMetricsInput) async throws -> GetJourneyRunExecutionActivityMetricsOutput { fatalError("Not supported") } diff --git a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/PinpointRequestsRegistryTests.swift b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/PinpointRequestsRegistryTests.swift index d5ddb3974b..7b17dd5b74 100644 --- a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/PinpointRequestsRegistryTests.swift +++ b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/PinpointRequestsRegistryTests.swift @@ -34,7 +34,7 @@ class PinpointRequestsRegistryTests: XCTestCase { await PinpointRequestsRegistry.shared.registerSource(.analytics, for: .recordEvent) await PinpointRequestsRegistry.shared.registerSource(.pushNotifications, for: .recordEvent) let sdkRequest = try createSdkRequest(for: .recordEvent) - _ = try await httpClientEngine.execute(request: sdkRequest) + _ = try await httpClientEngine.send(request: sdkRequest) let executedRequest = mockedHttpSdkClient.request XCTAssertEqual(mockedHttpSdkClient.executeCount, 1) @@ -53,7 +53,7 @@ class PinpointRequestsRegistryTests: XCTestCase { let sdkRequest = try createSdkRequest(for: nil) let oldUserAgent = sdkRequest.headers.value(for: "User-Agent") - _ = try await httpClientEngine.execute(request: sdkRequest) + _ = try await httpClientEngine.send(request: sdkRequest) let executedRequest = mockedHttpSdkClient.request XCTAssertEqual(mockedHttpSdkClient.executeCount, 1) @@ -66,7 +66,7 @@ class PinpointRequestsRegistryTests: XCTestCase { XCTAssertFalse(newUserAgent.contains(AWSPinpointSource.pushNotifications.rawValue)) } - private var httpClientEngine: HttpClientEngine { + private var httpClientEngine: HTTPClient { pinpointConfiguration.httpClientEngine } @@ -83,20 +83,20 @@ class PinpointRequestsRegistryTests: XCTestCase { } } -private extension HttpClientEngine { +private extension HTTPClient { var typeString: String { String(describing: type(of: self)) } } -private class MockHttpClientEngine: HttpClientEngine { +private class MockHttpClientEngine: HTTPClient { var executeCount = 0 var request: SdkHttpRequest? - func execute(request: SdkHttpRequest) async throws -> HttpResponse { + func send(request: SdkHttpRequest) async throws -> HttpResponse { executeCount += 1 self.request = request - return .init(body: .none, statusCode: .accepted) + return .init(body: .empty, statusCode: .accepted) } func close() async {} diff --git a/AmplifyPlugins/Logging/Sources/AWSCloudWatchLoggingPlugin/CloudWatchLogsClientProtocol.swift b/AmplifyPlugins/Logging/Sources/AWSCloudWatchLoggingPlugin/CloudWatchLogsClientProtocol.swift new file mode 100644 index 0000000000..c2afaa4566 --- /dev/null +++ b/AmplifyPlugins/Logging/Sources/AWSCloudWatchLoggingPlugin/CloudWatchLogsClientProtocol.swift @@ -0,0 +1,1321 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +import AWSCloudWatchLogs + +// swiftlint:disable file_length +public protocol CloudWatchLogsClientProtocol { + /// Performs the `AssociateKmsKey` operation on the `Logs_20140328` service. + /// + /// Associates the specified KMS key with either one log group in the account, or with all stored CloudWatch Logs query insights results in the account. When you use AssociateKmsKey, you specify either the logGroupName parameter or the resourceIdentifier parameter. You can't specify both of those parameters in the same operation. + /// + /// * Specify the logGroupName parameter to cause all log events stored in the log group to be encrypted with that key. Only the log events ingested after the key is associated are encrypted with that key. Associating a KMS key with a log group overrides any existing associations between the log group and a KMS key. After a KMS key is associated with a log group, all newly ingested data for the log group is encrypted using the KMS key. This association is stored as long as the data encrypted with the KMS key is still within CloudWatch Logs. This enables CloudWatch Logs to decrypt this data whenever it is requested. Associating a key with a log group does not cause the results of queries of that log group to be encrypted with that key. To have query results encrypted with a KMS key, you must use an AssociateKmsKey operation with the resourceIdentifier parameter that specifies a query-result resource. + /// + /// * Specify the resourceIdentifier parameter with a query-result resource, to use that key to encrypt the stored results of all future [StartQuery](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html) operations in the account. The response from a [GetQueryResults](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetQueryResults.html) operation will still return the query results in plain text. Even if you have not associated a key with your query results, the query results are encrypted when stored, using the default CloudWatch Logs method. If you run a query from a monitoring account that queries logs in a source account, the query results key from the monitoring account, if any, is used. + /// + /// + /// If you delete the key that is used to encrypt log events or log group query results, then all the associated stored log events or query results that were encrypted with that key will be unencryptable and unusable. CloudWatch Logs supports only symmetric KMS keys. Do not use an associate an asymmetric KMS key with your log group or query results. For more information, see [Using Symmetric and Asymmetric Keys](https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html). It can take up to 5 minutes for this operation to take effect. If you attempt to associate a KMS key with a log group but the KMS key does not exist or the KMS key is disabled, you receive an InvalidParameterException error. + /// + /// - Parameter AssociateKmsKeyInput : [no documentation found] + /// + /// - Returns: `AssociateKmsKeyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func associateKmsKey(input: AssociateKmsKeyInput) async throws -> AssociateKmsKeyOutput + /// Performs the `CancelExportTask` operation on the `Logs_20140328` service. + /// + /// Cancels the specified export task. The task must be in the PENDING or RUNNING state. + /// + /// - Parameter CancelExportTaskInput : [no documentation found] + /// + /// - Returns: `CancelExportTaskOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidOperationException` : The operation is not valid on the specified resource. + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func cancelExportTask(input: CancelExportTaskInput) async throws -> CancelExportTaskOutput + /// Performs the `CreateDelivery` operation on the `Logs_20140328` service. + /// + /// Creates a delivery. A delivery is a connection between a logical delivery source and a logical delivery destination that you have already created. Only some Amazon Web Services services support being configured as a delivery source using this operation. These services are listed as Supported [V2 Permissions] in the table at [Enabling logging from Amazon Web Services services.](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html) A delivery destination can represent a log group in CloudWatch Logs, an Amazon S3 bucket, or a delivery stream in Kinesis Data Firehose. To configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following: + /// + /// * Create a delivery source, which is a logical object that represents the resource that is actually sending the logs. For more information, see [PutDeliverySource](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html). + /// + /// * Create a delivery destination, which is a logical object that represents the actual delivery destination. For more information, see [PutDeliveryDestination](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestination.html). + /// + /// * If you are delivering logs cross-account, you must use [PutDeliveryDestinationPolicy](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html) in the destination account to assign an IAM policy to the destination. This policy allows delivery to that destination. + /// + /// * Use CreateDelivery to create a delivery by pairing exactly one delivery source and one delivery destination. + /// + /// + /// You can configure a single delivery source to send logs to multiple destinations by creating multiple deliveries. You can also create multiple deliveries to configure multiple delivery sources to send logs to the same delivery destination. You can't update an existing delivery. You can only create and delete deliveries. + /// + /// - Parameter CreateDeliveryInput : [no documentation found] + /// + /// - Returns: `CreateDeliveryOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You don't have sufficient permissions to perform this action. + /// - `ConflictException` : This operation attempted to create a resource that already exists. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ServiceUnavailableException` : The service cannot complete the request. + /// - `ThrottlingException` : The request was throttled because of quota limits. + /// - `ValidationException` : One of the parameters for the request is not valid. + func createDelivery(input: CreateDeliveryInput) async throws -> CreateDeliveryOutput + /// Performs the `CreateExportTask` operation on the `Logs_20140328` service. + /// + /// Creates an export task so that you can efficiently export data from a log group to an Amazon S3 bucket. When you perform a CreateExportTask operation, you must use credentials that have permission to write to the S3 bucket that you specify as the destination. Exporting log data to S3 buckets that are encrypted by KMS is supported. Exporting log data to Amazon S3 buckets that have S3 Object Lock enabled with a retention period is also supported. Exporting to S3 buckets that are encrypted with AES-256 is supported. This is an asynchronous call. If all the required information is provided, this operation initiates an export task and responds with the ID of the task. After the task has started, you can use [DescribeExportTasks](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeExportTasks.html) to get the status of the export task. Each account can only have one active (RUNNING or PENDING) export task at a time. To cancel an export task, use [CancelExportTask](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CancelExportTask.html). You can export logs from multiple log groups or multiple time ranges to the same S3 bucket. To separate log data for each export task, specify a prefix to be used as the Amazon S3 key prefix for all exported objects. Time-based sorting on chunks of log data inside an exported file is not guaranteed. You can sort the exported log field data by using Linux utilities. + /// + /// - Parameter CreateExportTaskInput : [no documentation found] + /// + /// - Returns: `CreateExportTaskOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `LimitExceededException` : You have reached the maximum number of resources that can be created. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceAlreadyExistsException` : The specified resource already exists. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func createExportTask(input: CreateExportTaskInput) async throws -> CreateExportTaskOutput + /// Performs the `CreateLogAnomalyDetector` operation on the `Logs_20140328` service. + /// + /// Creates an anomaly detector that regularly scans one or more log groups and look for patterns and anomalies in the logs. An anomaly detector can help surface issues by automatically discovering anomalies in your log event traffic. An anomaly detector uses machine learning algorithms to scan log events and find patterns. A pattern is a shared text structure that recurs among your log fields. Patterns provide a useful tool for analyzing large sets of logs because a large number of log events can often be compressed into a few patterns. The anomaly detector uses pattern recognition to find anomalies, which are unusual log events. It uses the evaluationFrequency to compare current log events and patterns with trained baselines. Fields within a pattern are called tokens. Fields that vary within a pattern, such as a request ID or timestamp, are referred to as dynamic tokens and represented by <>. The following is an example of a pattern: [INFO] Request time: <> ms This pattern represents log events like [INFO] Request time: 327 ms and other similar log events that differ only by the number, in this csse 327. When the pattern is displayed, the different numbers are replaced by <*> Any parts of log events that are masked as sensitive data are not scanned for anomalies. For more information about masking sensitive data, see [Help protect sensitive log data with masking](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html). + /// + /// - Parameter CreateLogAnomalyDetectorInput : [no documentation found] + /// + /// - Returns: `CreateLogAnomalyDetectorOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `LimitExceededException` : You have reached the maximum number of resources that can be created. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func createLogAnomalyDetector(input: CreateLogAnomalyDetectorInput) async throws -> CreateLogAnomalyDetectorOutput + /// Performs the `CreateLogGroup` operation on the `Logs_20140328` service. + /// + /// Creates a log group with the specified name. You can create up to 1,000,000 log groups per Region per account. You must use the following guidelines when naming a log group: + /// + /// * Log group names must be unique within a Region for an Amazon Web Services account. + /// + /// * Log group names can be between 1 and 512 characters long. + /// + /// * Log group names consist of the following characters: a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), '/' (forward slash), '.' (period), and '#' (number sign) + /// + /// + /// When you create a log group, by default the log events in the log group do not expire. To set a retention policy so that events expire and are deleted after a specified time, use [PutRetentionPolicy](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutRetentionPolicy.html). If you associate an KMS key with the log group, ingested data is encrypted using the KMS key. This association is stored as long as the data encrypted with the KMS key is still within CloudWatch Logs. This enables CloudWatch Logs to decrypt this data whenever it is requested. If you attempt to associate a KMS key with the log group but the KMS key does not exist or the KMS key is disabled, you receive an InvalidParameterException error. CloudWatch Logs supports only symmetric KMS keys. Do not associate an asymmetric KMS key with your log group. For more information, see [Using Symmetric and Asymmetric Keys](https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html). + /// + /// - Parameter CreateLogGroupInput : [no documentation found] + /// + /// - Returns: `CreateLogGroupOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `LimitExceededException` : You have reached the maximum number of resources that can be created. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceAlreadyExistsException` : The specified resource already exists. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func createLogGroup(input: CreateLogGroupInput) async throws -> CreateLogGroupOutput + /// Performs the `CreateLogStream` operation on the `Logs_20140328` service. + /// + /// Creates a log stream for the specified log group. A log stream is a sequence of log events that originate from a single source, such as an application instance or a resource that is being monitored. There is no limit on the number of log streams that you can create for a log group. There is a limit of 50 TPS on CreateLogStream operations, after which transactions are throttled. You must use the following guidelines when naming a log stream: + /// + /// * Log stream names must be unique within the log group. + /// + /// * Log stream names can be between 1 and 512 characters long. + /// + /// * Don't use ':' (colon) or '*' (asterisk) characters. + /// + /// - Parameter CreateLogStreamInput : [no documentation found] + /// + /// - Returns: `CreateLogStreamOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ResourceAlreadyExistsException` : The specified resource already exists. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func createLogStream(input: CreateLogStreamInput) async throws -> CreateLogStreamOutput + /// Performs the `DeleteAccountPolicy` operation on the `Logs_20140328` service. + /// + /// Deletes a CloudWatch Logs account policy. This stops the policy from applying to all log groups or a subset of log groups in the account. Log-group level policies will still be in effect. To use this operation, you must be signed on with the correct permissions depending on the type of policy that you are deleting. + /// + /// * To delete a data protection policy, you must have the logs:DeleteDataProtectionPolicy and logs:DeleteAccountPolicy permissions. + /// + /// * To delete a subscription filter policy, you must have the logs:DeleteSubscriptionFilter and logs:DeleteAccountPolicy permissions. + /// + /// - Parameter DeleteAccountPolicyInput : [no documentation found] + /// + /// - Returns: `DeleteAccountPolicyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func deleteAccountPolicy(input: DeleteAccountPolicyInput) async throws -> DeleteAccountPolicyOutput + /// Performs the `DeleteDataProtectionPolicy` operation on the `Logs_20140328` service. + /// + /// Deletes the data protection policy from the specified log group. For more information about data protection policies, see [PutDataProtectionPolicy](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html). + /// + /// - Parameter DeleteDataProtectionPolicyInput : [no documentation found] + /// + /// - Returns: `DeleteDataProtectionPolicyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func deleteDataProtectionPolicy(input: DeleteDataProtectionPolicyInput) async throws -> DeleteDataProtectionPolicyOutput + /// Performs the `DeleteDelivery` operation on the `Logs_20140328` service. + /// + /// Deletes s delivery. A delivery is a connection between a logical delivery source and a logical delivery destination. Deleting a delivery only deletes the connection between the delivery source and delivery destination. It does not delete the delivery destination or the delivery source. + /// + /// - Parameter DeleteDeliveryInput : [no documentation found] + /// + /// - Returns: `DeleteDeliveryOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ConflictException` : This operation attempted to create a resource that already exists. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ServiceUnavailableException` : The service cannot complete the request. + /// - `ThrottlingException` : The request was throttled because of quota limits. + /// - `ValidationException` : One of the parameters for the request is not valid. + func deleteDelivery(input: DeleteDeliveryInput) async throws -> DeleteDeliveryOutput + /// Performs the `DeleteDeliveryDestination` operation on the `Logs_20140328` service. + /// + /// Deletes a delivery destination. A delivery is a connection between a logical delivery source and a logical delivery destination. You can't delete a delivery destination if any current deliveries are associated with it. To find whether any deliveries are associated with this delivery destination, use the [DescribeDeliveries](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeDeliveries.html) operation and check the deliveryDestinationArn field in the results. + /// + /// - Parameter DeleteDeliveryDestinationInput : [no documentation found] + /// + /// - Returns: `DeleteDeliveryDestinationOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ConflictException` : This operation attempted to create a resource that already exists. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ServiceUnavailableException` : The service cannot complete the request. + /// - `ThrottlingException` : The request was throttled because of quota limits. + /// - `ValidationException` : One of the parameters for the request is not valid. + func deleteDeliveryDestination(input: DeleteDeliveryDestinationInput) async throws -> DeleteDeliveryDestinationOutput + /// Performs the `DeleteDeliveryDestinationPolicy` operation on the `Logs_20140328` service. + /// + /// Deletes a delivery destination policy. For more information about these policies, see [PutDeliveryDestinationPolicy](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html). + /// + /// - Parameter DeleteDeliveryDestinationPolicyInput : [no documentation found] + /// + /// - Returns: `DeleteDeliveryDestinationPolicyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ConflictException` : This operation attempted to create a resource that already exists. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + /// - `ValidationException` : One of the parameters for the request is not valid. + func deleteDeliveryDestinationPolicy(input: DeleteDeliveryDestinationPolicyInput) async throws -> DeleteDeliveryDestinationPolicyOutput + /// Performs the `DeleteDeliverySource` operation on the `Logs_20140328` service. + /// + /// Deletes a delivery source. A delivery is a connection between a logical delivery source and a logical delivery destination. You can't delete a delivery source if any current deliveries are associated with it. To find whether any deliveries are associated with this delivery source, use the [DescribeDeliveries](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeDeliveries.html) operation and check the deliverySourceName field in the results. + /// + /// - Parameter DeleteDeliverySourceInput : [no documentation found] + /// + /// - Returns: `DeleteDeliverySourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ConflictException` : This operation attempted to create a resource that already exists. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ServiceUnavailableException` : The service cannot complete the request. + /// - `ThrottlingException` : The request was throttled because of quota limits. + /// - `ValidationException` : One of the parameters for the request is not valid. + func deleteDeliverySource(input: DeleteDeliverySourceInput) async throws -> DeleteDeliverySourceOutput + /// Performs the `DeleteDestination` operation on the `Logs_20140328` service. + /// + /// Deletes the specified destination, and eventually disables all the subscription filters that publish to it. This operation does not delete the physical resource encapsulated by the destination. + /// + /// - Parameter DeleteDestinationInput : [no documentation found] + /// + /// - Returns: `DeleteDestinationOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func deleteDestination(input: DeleteDestinationInput) async throws -> DeleteDestinationOutput + /// Performs the `DeleteLogAnomalyDetector` operation on the `Logs_20140328` service. + /// + /// Deletes the specified CloudWatch Logs anomaly detector. + /// + /// - Parameter DeleteLogAnomalyDetectorInput : [no documentation found] + /// + /// - Returns: `DeleteLogAnomalyDetectorOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func deleteLogAnomalyDetector(input: DeleteLogAnomalyDetectorInput) async throws -> DeleteLogAnomalyDetectorOutput + /// Performs the `DeleteLogGroup` operation on the `Logs_20140328` service. + /// + /// Deletes the specified log group and permanently deletes all the archived log events associated with the log group. + /// + /// - Parameter DeleteLogGroupInput : [no documentation found] + /// + /// - Returns: `DeleteLogGroupOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func deleteLogGroup(input: DeleteLogGroupInput) async throws -> DeleteLogGroupOutput + /// Performs the `DeleteLogStream` operation on the `Logs_20140328` service. + /// + /// Deletes the specified log stream and permanently deletes all the archived log events associated with the log stream. + /// + /// - Parameter DeleteLogStreamInput : [no documentation found] + /// + /// - Returns: `DeleteLogStreamOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func deleteLogStream(input: DeleteLogStreamInput) async throws -> DeleteLogStreamOutput + /// Performs the `DeleteMetricFilter` operation on the `Logs_20140328` service. + /// + /// Deletes the specified metric filter. + /// + /// - Parameter DeleteMetricFilterInput : [no documentation found] + /// + /// - Returns: `DeleteMetricFilterOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func deleteMetricFilter(input: DeleteMetricFilterInput) async throws -> DeleteMetricFilterOutput + /// Performs the `DeleteQueryDefinition` operation on the `Logs_20140328` service. + /// + /// Deletes a saved CloudWatch Logs Insights query definition. A query definition contains details about a saved CloudWatch Logs Insights query. Each DeleteQueryDefinition operation can delete one query definition. You must have the logs:DeleteQueryDefinition permission to be able to perform this operation. + /// + /// - Parameter DeleteQueryDefinitionInput : [no documentation found] + /// + /// - Returns: `DeleteQueryDefinitionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func deleteQueryDefinition(input: DeleteQueryDefinitionInput) async throws -> DeleteQueryDefinitionOutput + /// Performs the `DeleteResourcePolicy` operation on the `Logs_20140328` service. + /// + /// Deletes a resource policy from this account. This revokes the access of the identities in that policy to put log events to this account. + /// + /// - Parameter DeleteResourcePolicyInput : [no documentation found] + /// + /// - Returns: `DeleteResourcePolicyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func deleteResourcePolicy(input: DeleteResourcePolicyInput) async throws -> DeleteResourcePolicyOutput + /// Performs the `DeleteRetentionPolicy` operation on the `Logs_20140328` service. + /// + /// Deletes the specified retention policy. Log events do not expire if they belong to log groups without a retention policy. + /// + /// - Parameter DeleteRetentionPolicyInput : [no documentation found] + /// + /// - Returns: `DeleteRetentionPolicyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func deleteRetentionPolicy(input: DeleteRetentionPolicyInput) async throws -> DeleteRetentionPolicyOutput + /// Performs the `DeleteSubscriptionFilter` operation on the `Logs_20140328` service. + /// + /// Deletes the specified subscription filter. + /// + /// - Parameter DeleteSubscriptionFilterInput : [no documentation found] + /// + /// - Returns: `DeleteSubscriptionFilterOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func deleteSubscriptionFilter(input: DeleteSubscriptionFilterInput) async throws -> DeleteSubscriptionFilterOutput + /// Performs the `DescribeAccountPolicies` operation on the `Logs_20140328` service. + /// + /// Returns a list of all CloudWatch Logs account policies in the account. + /// + /// - Parameter DescribeAccountPoliciesInput : [no documentation found] + /// + /// - Returns: `DescribeAccountPoliciesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func describeAccountPolicies(input: DescribeAccountPoliciesInput) async throws -> DescribeAccountPoliciesOutput + /// Performs the `DescribeDeliveries` operation on the `Logs_20140328` service. + /// + /// Retrieves a list of the deliveries that have been created in the account. + /// + /// - Parameter DescribeDeliveriesInput : [no documentation found] + /// + /// - Returns: `DescribeDeliveriesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ServiceUnavailableException` : The service cannot complete the request. + /// - `ThrottlingException` : The request was throttled because of quota limits. + /// - `ValidationException` : One of the parameters for the request is not valid. + func describeDeliveries(input: DescribeDeliveriesInput) async throws -> DescribeDeliveriesOutput + /// Performs the `DescribeDeliveryDestinations` operation on the `Logs_20140328` service. + /// + /// Retrieves a list of the delivery destinations that have been created in the account. + /// + /// - Parameter DescribeDeliveryDestinationsInput : [no documentation found] + /// + /// - Returns: `DescribeDeliveryDestinationsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ServiceUnavailableException` : The service cannot complete the request. + /// - `ThrottlingException` : The request was throttled because of quota limits. + /// - `ValidationException` : One of the parameters for the request is not valid. + func describeDeliveryDestinations(input: DescribeDeliveryDestinationsInput) async throws -> DescribeDeliveryDestinationsOutput + /// Performs the `DescribeDeliverySources` operation on the `Logs_20140328` service. + /// + /// Retrieves a list of the delivery sources that have been created in the account. + /// + /// - Parameter DescribeDeliverySourcesInput : [no documentation found] + /// + /// - Returns: `DescribeDeliverySourcesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ServiceUnavailableException` : The service cannot complete the request. + /// - `ThrottlingException` : The request was throttled because of quota limits. + /// - `ValidationException` : One of the parameters for the request is not valid. + func describeDeliverySources(input: DescribeDeliverySourcesInput) async throws -> DescribeDeliverySourcesOutput + /// Performs the `DescribeDestinations` operation on the `Logs_20140328` service. + /// + /// Lists all your destinations. The results are ASCII-sorted by destination name. + /// + /// - Parameter DescribeDestinationsInput : [no documentation found] + /// + /// - Returns: `DescribeDestinationsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func describeDestinations(input: DescribeDestinationsInput) async throws -> DescribeDestinationsOutput + /// Performs the `DescribeExportTasks` operation on the `Logs_20140328` service. + /// + /// Lists the specified export tasks. You can list all your export tasks or filter the results based on task ID or task status. + /// + /// - Parameter DescribeExportTasksInput : [no documentation found] + /// + /// - Returns: `DescribeExportTasksOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func describeExportTasks(input: DescribeExportTasksInput) async throws -> DescribeExportTasksOutput + /// Performs the `DescribeLogGroups` operation on the `Logs_20140328` service. + /// + /// Lists the specified log groups. You can list all your log groups or filter the results by prefix. The results are ASCII-sorted by log group name. CloudWatch Logs doesn’t support IAM policies that control access to the DescribeLogGroups action by using the aws:ResourceTag/key-name condition key. Other CloudWatch Logs actions do support the use of the aws:ResourceTag/key-name condition key to control access. For more information about using tags to control access, see [Controlling access to Amazon Web Services resources using tags](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html). If you are using CloudWatch cross-account observability, you can use this operation in a monitoring account and view data from the linked source accounts. For more information, see [CloudWatch cross-account observability](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). + /// + /// - Parameter DescribeLogGroupsInput : [no documentation found] + /// + /// - Returns: `DescribeLogGroupsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func describeLogGroups(input: DescribeLogGroupsInput) async throws -> DescribeLogGroupsOutput + /// Performs the `DescribeLogStreams` operation on the `Logs_20140328` service. + /// + /// Lists the log streams for the specified log group. You can list all the log streams or filter the results by prefix. You can also control how the results are ordered. You can specify the log group to search by using either logGroupIdentifier or logGroupName. You must include one of these two parameters, but you can't include both. This operation has a limit of five transactions per second, after which transactions are throttled. If you are using CloudWatch cross-account observability, you can use this operation in a monitoring account and view data from the linked source accounts. For more information, see [CloudWatch cross-account observability](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). + /// + /// - Parameter DescribeLogStreamsInput : [no documentation found] + /// + /// - Returns: `DescribeLogStreamsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func describeLogStreams(input: DescribeLogStreamsInput) async throws -> DescribeLogStreamsOutput + /// Performs the `DescribeMetricFilters` operation on the `Logs_20140328` service. + /// + /// Lists the specified metric filters. You can list all of the metric filters or filter the results by log name, prefix, metric name, or metric namespace. The results are ASCII-sorted by filter name. + /// + /// - Parameter DescribeMetricFiltersInput : [no documentation found] + /// + /// - Returns: `DescribeMetricFiltersOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func describeMetricFilters(input: DescribeMetricFiltersInput) async throws -> DescribeMetricFiltersOutput + /// Performs the `DescribeQueries` operation on the `Logs_20140328` service. + /// + /// Returns a list of CloudWatch Logs Insights queries that are scheduled, running, or have been run recently in this account. You can request all queries or limit it to queries of a specific log group or queries with a certain status. + /// + /// - Parameter DescribeQueriesInput : [no documentation found] + /// + /// - Returns: `DescribeQueriesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func describeQueries(input: DescribeQueriesInput) async throws -> DescribeQueriesOutput + /// Performs the `DescribeQueryDefinitions` operation on the `Logs_20140328` service. + /// + /// This operation returns a paginated list of your saved CloudWatch Logs Insights query definitions. You can retrieve query definitions from the current account or from a source account that is linked to the current account. You can use the queryDefinitionNamePrefix parameter to limit the results to only the query definitions that have names that start with a certain string. + /// + /// - Parameter DescribeQueryDefinitionsInput : [no documentation found] + /// + /// - Returns: `DescribeQueryDefinitionsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func describeQueryDefinitions(input: DescribeQueryDefinitionsInput) async throws -> DescribeQueryDefinitionsOutput + /// Performs the `DescribeResourcePolicies` operation on the `Logs_20140328` service. + /// + /// Lists the resource policies in this account. + /// + /// - Parameter DescribeResourcePoliciesInput : [no documentation found] + /// + /// - Returns: `DescribeResourcePoliciesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func describeResourcePolicies(input: DescribeResourcePoliciesInput) async throws -> DescribeResourcePoliciesOutput + /// Performs the `DescribeSubscriptionFilters` operation on the `Logs_20140328` service. + /// + /// Lists the subscription filters for the specified log group. You can list all the subscription filters or filter the results by prefix. The results are ASCII-sorted by filter name. + /// + /// - Parameter DescribeSubscriptionFiltersInput : [no documentation found] + /// + /// - Returns: `DescribeSubscriptionFiltersOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func describeSubscriptionFilters(input: DescribeSubscriptionFiltersInput) async throws -> DescribeSubscriptionFiltersOutput + /// Performs the `DisassociateKmsKey` operation on the `Logs_20140328` service. + /// + /// Disassociates the specified KMS key from the specified log group or from all CloudWatch Logs Insights query results in the account. When you use DisassociateKmsKey, you specify either the logGroupName parameter or the resourceIdentifier parameter. You can't specify both of those parameters in the same operation. + /// + /// * Specify the logGroupName parameter to stop using the KMS key to encrypt future log events ingested and stored in the log group. Instead, they will be encrypted with the default CloudWatch Logs method. The log events that were ingested while the key was associated with the log group are still encrypted with that key. Therefore, CloudWatch Logs will need permissions for the key whenever that data is accessed. + /// + /// * Specify the resourceIdentifier parameter with the query-result resource to stop using the KMS key to encrypt the results of all future [StartQuery](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html) operations in the account. They will instead be encrypted with the default CloudWatch Logs method. The results from queries that ran while the key was associated with the account are still encrypted with that key. Therefore, CloudWatch Logs will need permissions for the key whenever that data is accessed. + /// + /// + /// It can take up to 5 minutes for this operation to take effect. + /// + /// - Parameter DisassociateKmsKeyInput : [no documentation found] + /// + /// - Returns: `DisassociateKmsKeyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func disassociateKmsKey(input: DisassociateKmsKeyInput) async throws -> DisassociateKmsKeyOutput + /// Performs the `FilterLogEvents` operation on the `Logs_20140328` service. + /// + /// Lists log events from the specified log group. You can list all the log events or filter the results using a filter pattern, a time range, and the name of the log stream. You must have the logs:FilterLogEvents permission to perform this operation. You can specify the log group to search by using either logGroupIdentifier or logGroupName. You must include one of these two parameters, but you can't include both. By default, this operation returns as many log events as can fit in 1 MB (up to 10,000 log events) or all the events found within the specified time range. If the results include a token, that means there are more log events available. You can get additional results by specifying the token in a subsequent call. This operation can return empty results while there are more log events available through the token. The returned log events are sorted by event timestamp, the timestamp when the event was ingested by CloudWatch Logs, and the ID of the PutLogEvents request. If you are using CloudWatch cross-account observability, you can use this operation in a monitoring account and view data from the linked source accounts. For more information, see [CloudWatch cross-account observability](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). + /// + /// - Parameter FilterLogEventsInput : [no documentation found] + /// + /// - Returns: `FilterLogEventsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func filterLogEvents(input: FilterLogEventsInput) async throws -> FilterLogEventsOutput + /// Performs the `GetDataProtectionPolicy` operation on the `Logs_20140328` service. + /// + /// Returns information about a log group data protection policy. + /// + /// - Parameter GetDataProtectionPolicyInput : [no documentation found] + /// + /// - Returns: `GetDataProtectionPolicyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func getDataProtectionPolicy(input: GetDataProtectionPolicyInput) async throws -> GetDataProtectionPolicyOutput + /// Performs the `GetDelivery` operation on the `Logs_20140328` service. + /// + /// Returns complete information about one delivery. A delivery is a connection between a logical delivery source and a logical delivery destination You need to specify the delivery id in this operation. You can find the IDs of the deliveries in your account with the [DescribeDeliveries](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeDeliveries.html) operation. + /// + /// - Parameter GetDeliveryInput : [no documentation found] + /// + /// - Returns: `GetDeliveryOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ServiceUnavailableException` : The service cannot complete the request. + /// - `ThrottlingException` : The request was throttled because of quota limits. + /// - `ValidationException` : One of the parameters for the request is not valid. + func getDelivery(input: GetDeliveryInput) async throws -> GetDeliveryOutput + /// Performs the `GetDeliveryDestination` operation on the `Logs_20140328` service. + /// + /// Retrieves complete information about one delivery destination. + /// + /// - Parameter GetDeliveryDestinationInput : [no documentation found] + /// + /// - Returns: `GetDeliveryDestinationOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ServiceUnavailableException` : The service cannot complete the request. + /// - `ThrottlingException` : The request was throttled because of quota limits. + /// - `ValidationException` : One of the parameters for the request is not valid. + func getDeliveryDestination(input: GetDeliveryDestinationInput) async throws -> GetDeliveryDestinationOutput + /// Performs the `GetDeliveryDestinationPolicy` operation on the `Logs_20140328` service. + /// + /// Retrieves the delivery destination policy assigned to the delivery destination that you specify. For more information about delivery destinations and their policies, see [PutDeliveryDestinationPolicy](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html). + /// + /// - Parameter GetDeliveryDestinationPolicyInput : [no documentation found] + /// + /// - Returns: `GetDeliveryDestinationPolicyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + /// - `ValidationException` : One of the parameters for the request is not valid. + func getDeliveryDestinationPolicy(input: GetDeliveryDestinationPolicyInput) async throws -> GetDeliveryDestinationPolicyOutput + /// Performs the `GetDeliverySource` operation on the `Logs_20140328` service. + /// + /// Retrieves complete information about one delivery source. + /// + /// - Parameter GetDeliverySourceInput : [no documentation found] + /// + /// - Returns: `GetDeliverySourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ServiceUnavailableException` : The service cannot complete the request. + /// - `ThrottlingException` : The request was throttled because of quota limits. + /// - `ValidationException` : One of the parameters for the request is not valid. + func getDeliverySource(input: GetDeliverySourceInput) async throws -> GetDeliverySourceOutput + /// Performs the `GetLogAnomalyDetector` operation on the `Logs_20140328` service. + /// + /// Retrieves information about the log anomaly detector that you specify. + /// + /// - Parameter GetLogAnomalyDetectorInput : [no documentation found] + /// + /// - Returns: `GetLogAnomalyDetectorOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func getLogAnomalyDetector(input: GetLogAnomalyDetectorInput) async throws -> GetLogAnomalyDetectorOutput + /// Performs the `GetLogEvents` operation on the `Logs_20140328` service. + /// + /// Lists log events from the specified log stream. You can list all of the log events or filter using a time range. By default, this operation returns as many log events as can fit in a response size of 1MB (up to 10,000 log events). You can get additional log events by specifying one of the tokens in a subsequent call. This operation can return empty results while there are more log events available through the token. If you are using CloudWatch cross-account observability, you can use this operation in a monitoring account and view data from the linked source accounts. For more information, see [CloudWatch cross-account observability](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). You can specify the log group to search by using either logGroupIdentifier or logGroupName. You must include one of these two parameters, but you can't include both. + /// + /// - Parameter GetLogEventsInput : [no documentation found] + /// + /// - Returns: `GetLogEventsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func getLogEvents(input: GetLogEventsInput) async throws -> GetLogEventsOutput + /// Performs the `GetLogGroupFields` operation on the `Logs_20140328` service. + /// + /// Returns a list of the fields that are included in log events in the specified log group. Includes the percentage of log events that contain each field. The search is limited to a time period that you specify. You can specify the log group to search by using either logGroupIdentifier or logGroupName. You must specify one of these parameters, but you can't specify both. In the results, fields that start with @ are fields generated by CloudWatch Logs. For example, @timestamp is the timestamp of each log event. For more information about the fields that are generated by CloudWatch logs, see [Supported Logs and Discovered Fields](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData-discoverable-fields.html). The response results are sorted by the frequency percentage, starting with the highest percentage. If you are using CloudWatch cross-account observability, you can use this operation in a monitoring account and view data from the linked source accounts. For more information, see [CloudWatch cross-account observability](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). + /// + /// - Parameter GetLogGroupFieldsInput : [no documentation found] + /// + /// - Returns: `GetLogGroupFieldsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `LimitExceededException` : You have reached the maximum number of resources that can be created. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func getLogGroupFields(input: GetLogGroupFieldsInput) async throws -> GetLogGroupFieldsOutput + /// Performs the `GetLogRecord` operation on the `Logs_20140328` service. + /// + /// Retrieves all of the fields and values of a single log event. All fields are retrieved, even if the original query that produced the logRecordPointer retrieved only a subset of fields. Fields are returned as field name/field value pairs. The full unparsed log event is returned within @message. + /// + /// - Parameter GetLogRecordInput : [no documentation found] + /// + /// - Returns: `GetLogRecordOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `LimitExceededException` : You have reached the maximum number of resources that can be created. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func getLogRecord(input: GetLogRecordInput) async throws -> GetLogRecordOutput + /// Performs the `GetQueryResults` operation on the `Logs_20140328` service. + /// + /// Returns the results from the specified query. Only the fields requested in the query are returned, along with a @ptr field, which is the identifier for the log record. You can use the value of @ptr in a [GetLogRecord](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogRecord.html) operation to get the full log record. GetQueryResults does not start running a query. To run a query, use [StartQuery](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html). For more information about how long results of previous queries are available, see [CloudWatch Logs quotas](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch_limits_cwl.html). If the value of the Status field in the output is Running, this operation returns only partial results. If you see a value of Scheduled or Running for the status, you can retry the operation later to see the final results. If you are using CloudWatch cross-account observability, you can use this operation in a monitoring account to start queries in linked source accounts. For more information, see [CloudWatch cross-account observability](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). + /// + /// - Parameter GetQueryResultsInput : [no documentation found] + /// + /// - Returns: `GetQueryResultsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func getQueryResults(input: GetQueryResultsInput) async throws -> GetQueryResultsOutput + /// Performs the `ListAnomalies` operation on the `Logs_20140328` service. + /// + /// Returns a list of anomalies that log anomaly detectors have found. For details about the structure format of each anomaly object that is returned, see the example in this section. + /// + /// - Parameter ListAnomaliesInput : [no documentation found] + /// + /// - Returns: `ListAnomaliesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func listAnomalies(input: ListAnomaliesInput) async throws -> ListAnomaliesOutput + /// Performs the `ListLogAnomalyDetectors` operation on the `Logs_20140328` service. + /// + /// Retrieves a list of the log anomaly detectors in the account. + /// + /// - Parameter ListLogAnomalyDetectorsInput : [no documentation found] + /// + /// - Returns: `ListLogAnomalyDetectorsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func listLogAnomalyDetectors(input: ListLogAnomalyDetectorsInput) async throws -> ListLogAnomalyDetectorsOutput + /// Performs the `ListTagsForResource` operation on the `Logs_20140328` service. + /// + /// Displays the tags associated with a CloudWatch Logs resource. Currently, log groups and destinations support tagging. + /// + /// - Parameter ListTagsForResourceInput : [no documentation found] + /// + /// - Returns: `ListTagsForResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput + /// Performs the `ListTagsLogGroup` operation on the `Logs_20140328` service. + /// + /// The ListTagsLogGroup operation is on the path to deprecation. We recommend that you use [ListTagsForResource](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsForResource.html) instead. Lists the tags for the specified log group. + @available(*, deprecated, message: "Please use the generic tagging API ListTagsForResource") + /// + /// - Parameter ListTagsLogGroupInput : [no documentation found] + /// + /// - Returns: `ListTagsLogGroupOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func listTagsLogGroup(input: ListTagsLogGroupInput) async throws -> ListTagsLogGroupOutput + /// Performs the `PutAccountPolicy` operation on the `Logs_20140328` service. + /// + /// Creates an account-level data protection policy or subscription filter policy that applies to all log groups or a subset of log groups in the account. Data protection policy A data protection policy can help safeguard sensitive data that's ingested by your log groups by auditing and masking the sensitive log data. Each account can have only one account-level data protection policy. Sensitive data is detected and masked when it is ingested into a log group. When you set a data protection policy, log events ingested into the log groups before that time are not masked. If you use PutAccountPolicy to create a data protection policy for your whole account, it applies to both existing log groups and all log groups that are created later in this account. The account-level policy is applied to existing log groups with eventual consistency. It might take up to 5 minutes before sensitive data in existing log groups begins to be masked. By default, when a user views a log event that includes masked data, the sensitive data is replaced by asterisks. A user who has the logs:Unmask permission can use a [GetLogEvents](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html) or [FilterLogEvents](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html) operation with the unmask parameter set to true to view the unmasked log events. Users with the logs:Unmask can also view unmasked data in the CloudWatch Logs console by running a CloudWatch Logs Insights query with the unmask query command. For more information, including a list of types of data that can be audited and masked, see [Protect sensitive log data with masking](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html). To use the PutAccountPolicy operation for a data protection policy, you must be signed on with the logs:PutDataProtectionPolicy and logs:PutAccountPolicy permissions. The PutAccountPolicy operation applies to all log groups in the account. You can use [PutDataProtectionPolicy](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html) to create a data protection policy that applies to just one log group. If a log group has its own data protection policy and the account also has an account-level data protection policy, then the two policies are cumulative. Any sensitive term specified in either policy is masked. Subscription filter policy A subscription filter policy sets up a real-time feed of log events from CloudWatch Logs to other Amazon Web Services services. Account-level subscription filter policies apply to both existing log groups and log groups that are created later in this account. Supported destinations are Kinesis Data Streams, Kinesis Data Firehose, and Lambda. When log events are sent to the receiving service, they are Base64 encoded and compressed with the GZIP format. The following destinations are supported for subscription filters: + /// + /// * An Kinesis Data Streams data stream in the same account as the subscription policy, for same-account delivery. + /// + /// * An Kinesis Data Firehose data stream in the same account as the subscription policy, for same-account delivery. + /// + /// * A Lambda function in the same account as the subscription policy, for same-account delivery. + /// + /// * A logical destination in a different account created with [PutDestination](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html), for cross-account delivery. Kinesis Data Streams and Kinesis Data Firehose are supported as logical destinations. + /// + /// + /// Each account can have one account-level subscription filter policy. If you are updating an existing filter, you must specify the correct name in PolicyName. To perform a PutAccountPolicy subscription filter operation for any destination except a Lambda function, you must also have the iam:PassRole permission. + /// + /// - Parameter PutAccountPolicyInput : [no documentation found] + /// + /// - Returns: `PutAccountPolicyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `LimitExceededException` : You have reached the maximum number of resources that can be created. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func putAccountPolicy(input: PutAccountPolicyInput) async throws -> PutAccountPolicyOutput + /// Performs the `PutDataProtectionPolicy` operation on the `Logs_20140328` service. + /// + /// Creates a data protection policy for the specified log group. A data protection policy can help safeguard sensitive data that's ingested by the log group by auditing and masking the sensitive log data. Sensitive data is detected and masked when it is ingested into the log group. When you set a data protection policy, log events ingested into the log group before that time are not masked. By default, when a user views a log event that includes masked data, the sensitive data is replaced by asterisks. A user who has the logs:Unmask permission can use a [GetLogEvents](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html) or [FilterLogEvents](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html) operation with the unmask parameter set to true to view the unmasked log events. Users with the logs:Unmask can also view unmasked data in the CloudWatch Logs console by running a CloudWatch Logs Insights query with the unmask query command. For more information, including a list of types of data that can be audited and masked, see [Protect sensitive log data with masking](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html). The PutDataProtectionPolicy operation applies to only the specified log group. You can also use [PutAccountPolicy](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutAccountPolicy.html) to create an account-level data protection policy that applies to all log groups in the account, including both existing log groups and log groups that are created level. If a log group has its own data protection policy and the account also has an account-level data protection policy, then the two policies are cumulative. Any sensitive term specified in either policy is masked. + /// + /// - Parameter PutDataProtectionPolicyInput : [no documentation found] + /// + /// - Returns: `PutDataProtectionPolicyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `LimitExceededException` : You have reached the maximum number of resources that can be created. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func putDataProtectionPolicy(input: PutDataProtectionPolicyInput) async throws -> PutDataProtectionPolicyOutput + /// Performs the `PutDeliveryDestination` operation on the `Logs_20140328` service. + /// + /// Creates or updates a logical delivery destination. A delivery destination is an Amazon Web Services resource that represents an Amazon Web Services service that logs can be sent to. CloudWatch Logs, Amazon S3, and Kinesis Data Firehose are supported as logs delivery destinations. To configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following: + /// + /// * Create a delivery source, which is a logical object that represents the resource that is actually sending the logs. For more information, see [PutDeliverySource](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html). + /// + /// * Use PutDeliveryDestination to create a delivery destination, which is a logical object that represents the actual delivery destination. + /// + /// * If you are delivering logs cross-account, you must use [PutDeliveryDestinationPolicy](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html) in the destination account to assign an IAM policy to the destination. This policy allows delivery to that destination. + /// + /// * Use CreateDelivery to create a delivery by pairing exactly one delivery source and one delivery destination. For more information, see [CreateDelivery](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html). + /// + /// + /// You can configure a single delivery source to send logs to multiple destinations by creating multiple deliveries. You can also create multiple deliveries to configure multiple delivery sources to send logs to the same delivery destination. Only some Amazon Web Services services support being configured as a delivery source. These services are listed as Supported [V2 Permissions] in the table at [Enabling logging from Amazon Web Services services.](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html) If you use this operation to update an existing delivery destination, all the current delivery destination parameters are overwritten with the new parameter values that you specify. + /// + /// - Parameter PutDeliveryDestinationInput : [no documentation found] + /// + /// - Returns: `PutDeliveryDestinationOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ConflictException` : This operation attempted to create a resource that already exists. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ServiceUnavailableException` : The service cannot complete the request. + /// - `ThrottlingException` : The request was throttled because of quota limits. + /// - `ValidationException` : One of the parameters for the request is not valid. + func putDeliveryDestination(input: PutDeliveryDestinationInput) async throws -> PutDeliveryDestinationOutput + /// Performs the `PutDeliveryDestinationPolicy` operation on the `Logs_20140328` service. + /// + /// Creates and assigns an IAM policy that grants permissions to CloudWatch Logs to deliver logs cross-account to a specified destination in this account. To configure the delivery of logs from an Amazon Web Services service in another account to a logs delivery destination in the current account, you must do the following: + /// + /// * Create a delivery source, which is a logical object that represents the resource that is actually sending the logs. For more information, see [PutDeliverySource](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html). + /// + /// * Create a delivery destination, which is a logical object that represents the actual delivery destination. For more information, see [PutDeliveryDestination](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestination.html). + /// + /// * Use this operation in the destination account to assign an IAM policy to the destination. This policy allows delivery to that destination. + /// + /// * Create a delivery by pairing exactly one delivery source and one delivery destination. For more information, see [CreateDelivery](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html). + /// + /// + /// Only some Amazon Web Services services support being configured as a delivery source. These services are listed as Supported [V2 Permissions] in the table at [Enabling logging from Amazon Web Services services.](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html) The contents of the policy must include two statements. One statement enables general logs delivery, and the other allows delivery to the chosen destination. See the examples for the needed policies. + /// + /// - Parameter PutDeliveryDestinationPolicyInput : [no documentation found] + /// + /// - Returns: `PutDeliveryDestinationPolicyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ConflictException` : This operation attempted to create a resource that already exists. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + /// - `ValidationException` : One of the parameters for the request is not valid. + func putDeliveryDestinationPolicy(input: PutDeliveryDestinationPolicyInput) async throws -> PutDeliveryDestinationPolicyOutput + /// Performs the `PutDeliverySource` operation on the `Logs_20140328` service. + /// + /// Creates or updates a logical delivery source. A delivery source represents an Amazon Web Services resource that sends logs to an logs delivery destination. The destination can be CloudWatch Logs, Amazon S3, or Kinesis Data Firehose. To configure logs delivery between a delivery destination and an Amazon Web Services service that is supported as a delivery source, you must do the following: + /// + /// * Use PutDeliverySource to create a delivery source, which is a logical object that represents the resource that is actually sending the logs. + /// + /// * Use PutDeliveryDestination to create a delivery destination, which is a logical object that represents the actual delivery destination. For more information, see [PutDeliveryDestination](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestination.html). + /// + /// * If you are delivering logs cross-account, you must use [PutDeliveryDestinationPolicy](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html) in the destination account to assign an IAM policy to the destination. This policy allows delivery to that destination. + /// + /// * Use CreateDelivery to create a delivery by pairing exactly one delivery source and one delivery destination. For more information, see [CreateDelivery](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html). + /// + /// + /// You can configure a single delivery source to send logs to multiple destinations by creating multiple deliveries. You can also create multiple deliveries to configure multiple delivery sources to send logs to the same delivery destination. Only some Amazon Web Services services support being configured as a delivery source. These services are listed as Supported [V2 Permissions] in the table at [Enabling logging from Amazon Web Services services.](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html) If you use this operation to update an existing delivery source, all the current delivery source parameters are overwritten with the new parameter values that you specify. + /// + /// - Parameter PutDeliverySourceInput : [no documentation found] + /// + /// - Returns: `PutDeliverySourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ConflictException` : This operation attempted to create a resource that already exists. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceQuotaExceededException` : This request exceeds a service quota. + /// - `ServiceUnavailableException` : The service cannot complete the request. + /// - `ThrottlingException` : The request was throttled because of quota limits. + /// - `ValidationException` : One of the parameters for the request is not valid. + func putDeliverySource(input: PutDeliverySourceInput) async throws -> PutDeliverySourceOutput + /// Performs the `PutDestination` operation on the `Logs_20140328` service. + /// + /// Creates or updates a destination. This operation is used only to create destinations for cross-account subscriptions. A destination encapsulates a physical resource (such as an Amazon Kinesis stream). With a destination, you can subscribe to a real-time stream of log events for a different account, ingested using [PutLogEvents](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html). Through an access policy, a destination controls what is written to it. By default, PutDestination does not set any access policy with the destination, which means a cross-account user cannot call [PutSubscriptionFilter](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutSubscriptionFilter.html) against this destination. To enable this, the destination owner must call [PutDestinationPolicy](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestinationPolicy.html) after PutDestination. To perform a PutDestination operation, you must also have the iam:PassRole permission. + /// + /// - Parameter PutDestinationInput : [no documentation found] + /// + /// - Returns: `PutDestinationOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func putDestination(input: PutDestinationInput) async throws -> PutDestinationOutput + /// Performs the `PutDestinationPolicy` operation on the `Logs_20140328` service. + /// + /// Creates or updates an access policy associated with an existing destination. An access policy is an [IAM policy document](https://docs.aws.amazon.com/IAM/latest/UserGuide/policies_overview.html) that is used to authorize claims to register a subscription filter against a given destination. + /// + /// - Parameter PutDestinationPolicyInput : [no documentation found] + /// + /// - Returns: `PutDestinationPolicyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func putDestinationPolicy(input: PutDestinationPolicyInput) async throws -> PutDestinationPolicyOutput + /// Performs the `PutLogEvents` operation on the `Logs_20140328` service. + /// + /// Uploads a batch of log events to the specified log stream. The sequence token is now ignored in PutLogEvents actions. PutLogEvents actions are always accepted and never return InvalidSequenceTokenException or DataAlreadyAcceptedException even if the sequence token is not valid. You can use parallel PutLogEvents actions on the same log stream. The batch of events must satisfy the following constraints: + /// + /// * The maximum batch size is 1,048,576 bytes. This size is calculated as the sum of all event messages in UTF-8, plus 26 bytes for each log event. + /// + /// * None of the log events in the batch can be more than 2 hours in the future. + /// + /// * None of the log events in the batch can be more than 14 days in the past. Also, none of the log events can be from earlier than the retention period of the log group. + /// + /// * The log events in the batch must be in chronological order by their timestamp. The timestamp is the time that the event occurred, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. (In Amazon Web Services Tools for PowerShell and the Amazon Web Services SDK for .NET, the timestamp is specified in .NET format: yyyy-mm-ddThh:mm:ss. For example, 2017-09-15T13:45:30.) + /// + /// * A batch of log events in a single request cannot span more than 24 hours. Otherwise, the operation fails. + /// + /// * Each log event can be no larger than 256 KB. + /// + /// * The maximum number of log events in a batch is 10,000. + /// + /// * The quota of five requests per second per log stream has been removed. Instead, PutLogEvents actions are throttled based on a per-second per-account quota. You can request an increase to the per-second throttling quota by using the Service Quotas service. + /// + /// + /// If a call to PutLogEvents returns "UnrecognizedClientException" the most likely cause is a non-valid Amazon Web Services access key ID or secret key. + /// + /// - Parameter PutLogEventsInput : [no documentation found] + /// + /// - Returns: `PutLogEventsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `DataAlreadyAcceptedException` : The event was already logged. PutLogEvents actions are now always accepted and never return DataAlreadyAcceptedException regardless of whether a given batch of log events has already been accepted. + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `InvalidSequenceTokenException` : The sequence token is not valid. You can get the correct sequence token in the expectedSequenceToken field in the InvalidSequenceTokenException message. PutLogEvents actions are now always accepted and never return InvalidSequenceTokenException regardless of receiving an invalid sequence token. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + /// - `UnrecognizedClientException` : The most likely cause is an Amazon Web Services access key ID or secret key that's not valid. + func putLogEvents(input: PutLogEventsInput) async throws -> PutLogEventsOutput + /// Performs the `PutMetricFilter` operation on the `Logs_20140328` service. + /// + /// Creates or updates a metric filter and associates it with the specified log group. With metric filters, you can configure rules to extract metric data from log events ingested through [PutLogEvents](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html). The maximum number of metric filters that can be associated with a log group is 100. When you create a metric filter, you can also optionally assign a unit and dimensions to the metric that is created. Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not specify high-cardinality fields such as IPAddress or requestID as dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges as a separate custom metric. CloudWatch Logs might disable a metric filter if it generates 1,000 different name/value pairs for your specified dimensions within one hour. You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see [ Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html). + /// + /// - Parameter PutMetricFilterInput : [no documentation found] + /// + /// - Returns: `PutMetricFilterOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `LimitExceededException` : You have reached the maximum number of resources that can be created. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func putMetricFilter(input: PutMetricFilterInput) async throws -> PutMetricFilterOutput + /// Performs the `PutQueryDefinition` operation on the `Logs_20140328` service. + /// + /// Creates or updates a query definition for CloudWatch Logs Insights. For more information, see [Analyzing Log Data with CloudWatch Logs Insights](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html). To update a query definition, specify its queryDefinitionId in your request. The values of name, queryString, and logGroupNames are changed to the values that you specify in your update operation. No current values are retained from the current query definition. For example, imagine updating a current query definition that includes log groups. If you don't specify the logGroupNames parameter in your update operation, the query definition changes to contain no log groups. You must have the logs:PutQueryDefinition permission to be able to perform this operation. + /// + /// - Parameter PutQueryDefinitionInput : [no documentation found] + /// + /// - Returns: `PutQueryDefinitionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `LimitExceededException` : You have reached the maximum number of resources that can be created. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func putQueryDefinition(input: PutQueryDefinitionInput) async throws -> PutQueryDefinitionOutput + /// Performs the `PutResourcePolicy` operation on the `Logs_20140328` service. + /// + /// Creates or updates a resource policy allowing other Amazon Web Services services to put log events to this account, such as Amazon Route 53. An account can have up to 10 resource policies per Amazon Web Services Region. + /// + /// - Parameter PutResourcePolicyInput : [no documentation found] + /// + /// - Returns: `PutResourcePolicyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `LimitExceededException` : You have reached the maximum number of resources that can be created. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func putResourcePolicy(input: PutResourcePolicyInput) async throws -> PutResourcePolicyOutput + /// Performs the `PutRetentionPolicy` operation on the `Logs_20140328` service. + /// + /// Sets the retention of the specified log group. With a retention policy, you can configure the number of days for which to retain log events in the specified log group. CloudWatch Logs doesn’t immediately delete log events when they reach their retention setting. It typically takes up to 72 hours after that before log events are deleted, but in rare situations might take longer. To illustrate, imagine that you change a log group to have a longer retention setting when it contains log events that are past the expiration date, but haven’t been deleted. Those log events will take up to 72 hours to be deleted after the new retention date is reached. To make sure that log data is deleted permanently, keep a log group at its lower retention setting until 72 hours after the previous retention period ends. Alternatively, wait to change the retention setting until you confirm that the earlier log events are deleted. When log events reach their retention setting they are marked for deletion. After they are marked for deletion, they do not add to your archival storage costs anymore, even if they are not actually deleted until later. These log events marked for deletion are also not included when you use an API to retrieve the storedBytes value to see how many bytes a log group is storing. + /// + /// - Parameter PutRetentionPolicyInput : [no documentation found] + /// + /// - Returns: `PutRetentionPolicyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func putRetentionPolicy(input: PutRetentionPolicyInput) async throws -> PutRetentionPolicyOutput + /// Performs the `PutSubscriptionFilter` operation on the `Logs_20140328` service. + /// + /// Creates or updates a subscription filter and associates it with the specified log group. With subscription filters, you can subscribe to a real-time stream of log events ingested through [PutLogEvents](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html) and have them delivered to a specific destination. When log events are sent to the receiving service, they are Base64 encoded and compressed with the GZIP format. The following destinations are supported for subscription filters: + /// + /// * An Amazon Kinesis data stream belonging to the same account as the subscription filter, for same-account delivery. + /// + /// * A logical destination created with [PutDestination](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html) that belongs to a different account, for cross-account delivery. We currently support Kinesis Data Streams and Kinesis Data Firehose as logical destinations. + /// + /// * An Amazon Kinesis Data Firehose delivery stream that belongs to the same account as the subscription filter, for same-account delivery. + /// + /// * An Lambda function that belongs to the same account as the subscription filter, for same-account delivery. + /// + /// + /// Each log group can have up to two subscription filters associated with it. If you are updating an existing filter, you must specify the correct name in filterName. To perform a PutSubscriptionFilter operation for any destination except a Lambda function, you must also have the iam:PassRole permission. + /// + /// - Parameter PutSubscriptionFilterInput : [no documentation found] + /// + /// - Returns: `PutSubscriptionFilterOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `LimitExceededException` : You have reached the maximum number of resources that can be created. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func putSubscriptionFilter(input: PutSubscriptionFilterInput) async throws -> PutSubscriptionFilterOutput + /// Performs the `StartLiveTail` operation on the `Logs_20140328` service. + /// + /// Starts a Live Tail streaming session for one or more log groups. A Live Tail session returns a stream of log events that have been recently ingested in the log groups. For more information, see [Use Live Tail to view logs in near real time](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogs_LiveTail.html). The response to this operation is a response stream, over which the server sends live log events and the client receives them. The following objects are sent over the stream: + /// + /// * A single [LiveTailSessionStart](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_LiveTailSessionStart.html) object is sent at the start of the session. + /// + /// * Every second, a [LiveTailSessionUpdate](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_LiveTailSessionUpdate.html) object is sent. Each of these objects contains an array of the actual log events. If no new log events were ingested in the past second, the LiveTailSessionUpdate object will contain an empty array. The array of log events contained in a LiveTailSessionUpdate can include as many as 500 log events. If the number of log events matching the request exceeds 500 per second, the log events are sampled down to 500 log events to be included in each LiveTailSessionUpdate object. If your client consumes the log events slower than the server produces them, CloudWatch Logs buffers up to 10 LiveTailSessionUpdate events or 5000 log events, after which it starts dropping the oldest events. + /// + /// * A [SessionStreamingException](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_SessionStreamingException.html) object is returned if an unknown error occurs on the server side. + /// + /// * A [SessionTimeoutException](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_SessionTimeoutException.html) object is returned when the session times out, after it has been kept open for three hours. + /// + /// + /// You can end a session before it times out by closing the session stream or by closing the client that is receiving the stream. The session also ends if the established connection between the client and the server breaks. For examples of using an SDK to start a Live Tail session, see [ Start a Live Tail session using an Amazon Web Services SDK](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/example_cloudwatch-logs_StartLiveTail_section.html). + /// + /// - Parameter StartLiveTailInput : [no documentation found] + /// + /// - Returns: `StartLiveTailOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You don't have sufficient permissions to perform this action. + /// - `InvalidOperationException` : The operation is not valid on the specified resource. + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `LimitExceededException` : You have reached the maximum number of resources that can be created. + /// - `ResourceNotFoundException` : The specified resource does not exist. + func startLiveTail(input: StartLiveTailInput) async throws -> StartLiveTailOutput + /// Performs the `StartQuery` operation on the `Logs_20140328` service. + /// + /// Schedules a query of a log group using CloudWatch Logs Insights. You specify the log group and time range to query and the query string to use. For more information, see [CloudWatch Logs Insights Query Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). After you run a query using StartQuery, the query results are stored by CloudWatch Logs. You can use [GetQueryResults](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetQueryResults.html) to retrieve the results of a query, using the queryId that StartQuery returns. If you have associated a KMS key with the query results in this account, then [StartQuery](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html) uses that key to encrypt the results when it stores them. If no key is associated with query results, the query results are encrypted with the default CloudWatch Logs encryption method. Queries time out after 60 minutes of runtime. If your queries are timing out, reduce the time range being searched or partition your query into a number of queries. If you are using CloudWatch cross-account observability, you can use this operation in a monitoring account to start a query in a linked source account. For more information, see [CloudWatch cross-account observability](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). For a cross-account StartQuery operation, the query definition must be defined in the monitoring account. You can have up to 30 concurrent CloudWatch Logs insights queries, including queries that have been added to dashboards. + /// + /// - Parameter StartQueryInput : [no documentation found] + /// + /// - Returns: `StartQueryOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `LimitExceededException` : You have reached the maximum number of resources that can be created. + /// - `MalformedQueryException` : The query string is not valid. Details about this error are displayed in a QueryCompileError object. For more information, see [QueryCompileError](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_QueryCompileError.html). For more information about valid query syntax, see [CloudWatch Logs Insights Query Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func startQuery(input: StartQueryInput) async throws -> StartQueryOutput + /// Performs the `StopQuery` operation on the `Logs_20140328` service. + /// + /// Stops a CloudWatch Logs Insights query that is in progress. If the query has already ended, the operation returns an error indicating that the specified query is not running. + /// + /// - Parameter StopQueryInput : [no documentation found] + /// + /// - Returns: `StopQueryOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func stopQuery(input: StopQueryInput) async throws -> StopQueryOutput + /// Performs the `TagLogGroup` operation on the `Logs_20140328` service. + /// + /// The TagLogGroup operation is on the path to deprecation. We recommend that you use [TagResource](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_TagResource.html) instead. Adds or updates the specified tags for the specified log group. To list the tags for a log group, use [ListTagsForResource](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsForResource.html). To remove tags, use [UntagResource](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UntagResource.html). For more information about tags, see [Tag Log Groups in Amazon CloudWatch Logs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html#log-group-tagging) in the Amazon CloudWatch Logs User Guide. CloudWatch Logs doesn’t support IAM policies that prevent users from assigning specified tags to log groups using the aws:Resource/key-name or aws:TagKeys condition keys. For more information about using tags to control access, see [Controlling access to Amazon Web Services resources using tags](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html). + @available(*, deprecated, message: "Please use the generic tagging API TagResource") + /// + /// - Parameter TagLogGroupInput : [no documentation found] + /// + /// - Returns: `TagLogGroupOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ResourceNotFoundException` : The specified resource does not exist. + func tagLogGroup(input: TagLogGroupInput) async throws -> TagLogGroupOutput + /// Performs the `TagResource` operation on the `Logs_20140328` service. + /// + /// Assigns one or more tags (key-value pairs) to the specified CloudWatch Logs resource. Currently, the only CloudWatch Logs resources that can be tagged are log groups and destinations. Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values. Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters. You can use the TagResource action with a resource that already has tags. If you specify a new tag key for the alarm, this tag is appended to the list of tags associated with the alarm. If you specify a tag key that is already associated with the alarm, the new tag value that you specify replaces the previous value for that tag. You can associate as many as 50 tags with a CloudWatch Logs resource. + /// + /// - Parameter TagResourceInput : [no documentation found] + /// + /// - Returns: `TagResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + /// - `TooManyTagsException` : A resource can have no more than 50 tags. + func tagResource(input: TagResourceInput) async throws -> TagResourceOutput + /// Performs the `TestMetricFilter` operation on the `Logs_20140328` service. + /// + /// Tests the filter pattern of a metric filter against a sample of log event messages. You can use this operation to validate the correctness of a metric filter pattern. + /// + /// - Parameter TestMetricFilterInput : [no documentation found] + /// + /// - Returns: `TestMetricFilterOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func testMetricFilter(input: TestMetricFilterInput) async throws -> TestMetricFilterOutput + /// Performs the `UntagLogGroup` operation on the `Logs_20140328` service. + /// + /// The UntagLogGroup operation is on the path to deprecation. We recommend that you use [UntagResource](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UntagResource.html) instead. Removes the specified tags from the specified log group. To list the tags for a log group, use [ListTagsForResource](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsForResource.html). To add tags, use [TagResource](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_TagResource.html). CloudWatch Logs doesn’t support IAM policies that prevent users from assigning specified tags to log groups using the aws:Resource/key-name or aws:TagKeys condition keys. + @available(*, deprecated, message: "Please use the generic tagging API UntagResource") + /// + /// - Parameter UntagLogGroupInput : [no documentation found] + /// + /// - Returns: `UntagLogGroupOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ResourceNotFoundException` : The specified resource does not exist. + func untagLogGroup(input: UntagLogGroupInput) async throws -> UntagLogGroupOutput + /// Performs the `UntagResource` operation on the `Logs_20140328` service. + /// + /// Removes one or more tags from the specified resource. + /// + /// - Parameter UntagResourceInput : [no documentation found] + /// + /// - Returns: `UntagResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func untagResource(input: UntagResourceInput) async throws -> UntagResourceOutput + /// Performs the `UpdateAnomaly` operation on the `Logs_20140328` service. + /// + /// Use this operation to suppress anomaly detection for a specified anomaly or pattern. If you suppress an anomaly, CloudWatch Logs won’t report new occurrences of that anomaly and won't update that anomaly with new data. If you suppress a pattern, CloudWatch Logs won’t report any anomalies related to that pattern. You must specify either anomalyId or patternId, but you can't specify both parameters in the same operation. If you have previously used this operation to suppress detection of a pattern or anomaly, you can use it again to cause CloudWatch Logs to end the suppression. To do this, use this operation and specify the anomaly or pattern to stop suppressing, and omit the suppressionType and suppressionPeriod parameters. + /// + /// - Parameter UpdateAnomalyInput : [no documentation found] + /// + /// - Returns: `UpdateAnomalyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func updateAnomaly(input: UpdateAnomalyInput) async throws -> UpdateAnomalyOutput + /// Performs the `UpdateLogAnomalyDetector` operation on the `Logs_20140328` service. + /// + /// Updates an existing log anomaly detector. + /// + /// - Parameter UpdateLogAnomalyDetectorInput : [no documentation found] + /// + /// - Returns: `UpdateLogAnomalyDetectorOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidParameterException` : A parameter is specified incorrectly. + /// - `OperationAbortedException` : Multiple concurrent requests to update the same resource were in conflict. + /// - `ResourceNotFoundException` : The specified resource does not exist. + /// - `ServiceUnavailableException` : The service cannot complete the request. + func updateLogAnomalyDetector(input: UpdateLogAnomalyDetectorInput) async throws -> UpdateLogAnomalyDetectorOutput +} +extension CloudWatchLogsClient: CloudWatchLogsClientProtocol { } diff --git a/AmplifyPlugins/Logging/Sources/AWSCloudWatchLoggingPlugin/Configuration/DefaultRemoteLoggingConstraintsProvider.swift b/AmplifyPlugins/Logging/Sources/AWSCloudWatchLoggingPlugin/Configuration/DefaultRemoteLoggingConstraintsProvider.swift index 3a6dac5bd0..90bebdf058 100644 --- a/AmplifyPlugins/Logging/Sources/AWSCloudWatchLoggingPlugin/Configuration/DefaultRemoteLoggingConstraintsProvider.swift +++ b/AmplifyPlugins/Logging/Sources/AWSCloudWatchLoggingPlugin/Configuration/DefaultRemoteLoggingConstraintsProvider.swift @@ -88,7 +88,7 @@ public class DefaultRemoteLoggingConstraintsProvider: RemoteLoggingConstraintsPr let queryItems = URLComponents(url: url, resolvingAgainstBaseURL: false)? .queryItems? - .map { ClientRuntime.URLQueryItem(name: $0.name, value: $0.value) } ?? [] + .map { ClientRuntime.SDKURLQueryItem(name: $0.name, value: $0.value) } ?? [] let requestBuilder = SdkHttpRequestBuilder() .withHost(host) diff --git a/AmplifyPlugins/Logging/Sources/AWSCloudWatchLoggingPlugin/Consumer/CloudWatchLoggingConsumer.swift b/AmplifyPlugins/Logging/Sources/AWSCloudWatchLoggingPlugin/Consumer/CloudWatchLoggingConsumer.swift index a0cfb45b7d..fd85601d92 100644 --- a/AmplifyPlugins/Logging/Sources/AWSCloudWatchLoggingPlugin/Consumer/CloudWatchLoggingConsumer.swift +++ b/AmplifyPlugins/Logging/Sources/AWSCloudWatchLoggingPlugin/Consumer/CloudWatchLoggingConsumer.swift @@ -75,7 +75,7 @@ extension CloudWatchLoggingConsumer: LogBatchConsumer { ensureLogStreamExistsComplete = true } - let stream = try? await self.client.describeLogStreams(input: .init( + let stream = try? await self.client.describeLogStreams(input: DescribeLogStreamsInput( logGroupName: self.logGroupName, logStreamNamePrefix: self.logStreamName )).logStreams?.first(where: { stream in @@ -85,7 +85,7 @@ extension CloudWatchLoggingConsumer: LogBatchConsumer { return } - _ = try? await self.client.createLogStream(input: .init( + _ = try? await self.client.createLogStream(input: CreateLogStreamInput( logGroupName: self.logGroupName, logStreamName: self.logStreamName )) diff --git a/AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginHostApp/AWSCloudWatchLoggingPluginIntegrationTests/AWSCloudWatchClientHelper.swift b/AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginHostApp/AWSCloudWatchLoggingPluginIntegrationTests/AWSCloudWatchClientHelper.swift index caf0f08be1..b8345288fc 100644 --- a/AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginHostApp/AWSCloudWatchLoggingPluginIntegrationTests/AWSCloudWatchClientHelper.swift +++ b/AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginHostApp/AWSCloudWatchLoggingPluginIntegrationTests/AWSCloudWatchClientHelper.swift @@ -6,6 +6,7 @@ // import Foundation +import AWSCloudWatchLoggingPlugin import AWSCloudWatchLogs class AWSCloudWatchClientHelper { diff --git a/AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginTests/MockCloudWatchLogsClient.swift b/AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginTests/MockCloudWatchLogsClient.swift index d14a204f24..5f0949eca9 100644 --- a/AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginTests/MockCloudWatchLogsClient.swift +++ b/AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginTests/MockCloudWatchLogsClient.swift @@ -5,18 +5,19 @@ // SPDX-License-Identifier: Apache-2.0 // +import AWSCloudWatchLoggingPlugin import AWSCloudWatchLogs import Foundation class MockCloudWatchLogsClient: CloudWatchLogsClientProtocol { - + enum MockError: Error { case unexpected case unimplemented } - + var interactions: [String] = [] - + var putLogEventsHandler: (PutLogEventsInput) async throws -> PutLogEventsOutput = { input in return PutLogEventsOutput() } @@ -25,80 +26,80 @@ class MockCloudWatchLogsClient: CloudWatchLogsClientProtocol { interactions.append(#function) return try await putLogEventsHandler(input) } - + func associateKmsKey(input: AWSCloudWatchLogs.AssociateKmsKeyInput) async throws -> AWSCloudWatchLogs.AssociateKmsKeyOutput { throw MockError.unimplemented } - + func cancelExportTask(input: AWSCloudWatchLogs.CancelExportTaskInput) async throws -> AWSCloudWatchLogs.CancelExportTaskOutput { throw MockError.unimplemented } - + func createExportTask(input: AWSCloudWatchLogs.CreateExportTaskInput) async throws -> AWSCloudWatchLogs.CreateExportTaskOutput { throw MockError.unimplemented } - + func createLogGroup(input: AWSCloudWatchLogs.CreateLogGroupInput) async throws -> AWSCloudWatchLogs.CreateLogGroupOutput { throw MockError.unimplemented } - + var createLogStreamHandler: (CreateLogStreamInput) async throws -> CreateLogStreamOutput = { _ in return CreateLogStreamOutput() } - + func createLogStream(input: CreateLogStreamInput) async throws -> CreateLogStreamOutput { interactions.append(#function) return try await createLogStreamHandler(input) } - + func deleteDestination(input: AWSCloudWatchLogs.DeleteDestinationInput) async throws -> AWSCloudWatchLogs.DeleteDestinationOutput { throw MockError.unimplemented } - + func deleteLogGroup(input: AWSCloudWatchLogs.DeleteLogGroupInput) async throws -> AWSCloudWatchLogs.DeleteLogGroupOutput { throw MockError.unimplemented } - + func deleteLogStream(input: AWSCloudWatchLogs.DeleteLogStreamInput) async throws -> AWSCloudWatchLogs.DeleteLogStreamOutput { throw MockError.unimplemented } - + func deleteMetricFilter(input: AWSCloudWatchLogs.DeleteMetricFilterInput) async throws -> AWSCloudWatchLogs.DeleteMetricFilterOutput { throw MockError.unimplemented } - + func deleteQueryDefinition(input: AWSCloudWatchLogs.DeleteQueryDefinitionInput) async throws -> AWSCloudWatchLogs.DeleteQueryDefinitionOutput { throw MockError.unimplemented } - + func deleteResourcePolicy(input: AWSCloudWatchLogs.DeleteResourcePolicyInput) async throws -> AWSCloudWatchLogs.DeleteResourcePolicyOutput { throw MockError.unimplemented } - + func deleteRetentionPolicy(input: AWSCloudWatchLogs.DeleteRetentionPolicyInput) async throws -> AWSCloudWatchLogs.DeleteRetentionPolicyOutput { throw MockError.unimplemented } - + func deleteSubscriptionFilter(input: AWSCloudWatchLogs.DeleteSubscriptionFilterInput) async throws -> AWSCloudWatchLogs.DeleteSubscriptionFilterOutput { throw MockError.unimplemented } - + func deleteDataProtectionPolicy(input: AWSCloudWatchLogs.DeleteDataProtectionPolicyInput) async throws -> AWSCloudWatchLogs.DeleteDataProtectionPolicyOutput { throw MockError.unexpected } - + func describeDestinations(input: AWSCloudWatchLogs.DescribeDestinationsInput) async throws -> AWSCloudWatchLogs.DescribeDestinationsOutput { throw MockError.unimplemented } - + func describeExportTasks(input: AWSCloudWatchLogs.DescribeExportTasksInput) async throws -> AWSCloudWatchLogs.DescribeExportTasksOutput { throw MockError.unimplemented } - + func describeLogGroups(input: AWSCloudWatchLogs.DescribeLogGroupsInput) async throws -> AWSCloudWatchLogs.DescribeLogGroupsOutput { throw MockError.unimplemented } - + var describeLogStreamsHandler: (DescribeLogStreamsInput) async throws -> DescribeLogStreamsOutput = { _ in return DescribeLogStreamsOutput() } @@ -107,63 +108,63 @@ class MockCloudWatchLogsClient: CloudWatchLogsClientProtocol { interactions.append(#function) return try await describeLogStreamsHandler(input) } - + func describeMetricFilters(input: AWSCloudWatchLogs.DescribeMetricFiltersInput) async throws -> AWSCloudWatchLogs.DescribeMetricFiltersOutput { throw MockError.unimplemented } - + func describeQueries(input: AWSCloudWatchLogs.DescribeQueriesInput) async throws -> AWSCloudWatchLogs.DescribeQueriesOutput { throw MockError.unimplemented } - + func describeQueryDefinitions(input: AWSCloudWatchLogs.DescribeQueryDefinitionsInput) async throws -> AWSCloudWatchLogs.DescribeQueryDefinitionsOutput { throw MockError.unimplemented } - + func describeResourcePolicies(input: AWSCloudWatchLogs.DescribeResourcePoliciesInput) async throws -> AWSCloudWatchLogs.DescribeResourcePoliciesOutput { throw MockError.unimplemented } - + func describeSubscriptionFilters(input: AWSCloudWatchLogs.DescribeSubscriptionFiltersInput) async throws -> AWSCloudWatchLogs.DescribeSubscriptionFiltersOutput { throw MockError.unimplemented } - + func disassociateKmsKey(input: AWSCloudWatchLogs.DisassociateKmsKeyInput) async throws -> AWSCloudWatchLogs.DisassociateKmsKeyOutput { throw MockError.unimplemented } - + func filterLogEvents(input: AWSCloudWatchLogs.FilterLogEventsInput) async throws -> AWSCloudWatchLogs.FilterLogEventsOutput { throw MockError.unimplemented } - + func getDataProtectionPolicy(input: AWSCloudWatchLogs.GetDataProtectionPolicyInput) async throws -> AWSCloudWatchLogs.GetDataProtectionPolicyOutput { throw MockError.unexpected } - + func getLogEvents(input: AWSCloudWatchLogs.GetLogEventsInput) async throws -> AWSCloudWatchLogs.GetLogEventsOutput { throw MockError.unimplemented } - + func getLogGroupFields(input: AWSCloudWatchLogs.GetLogGroupFieldsInput) async throws -> AWSCloudWatchLogs.GetLogGroupFieldsOutput { throw MockError.unimplemented } - + func getLogRecord(input: AWSCloudWatchLogs.GetLogRecordInput) async throws -> AWSCloudWatchLogs.GetLogRecordOutput { throw MockError.unimplemented } - + func getQueryResults(input: AWSCloudWatchLogs.GetQueryResultsInput) async throws -> AWSCloudWatchLogs.GetQueryResultsOutput { throw MockError.unimplemented } - + func listTagsForResource(input: AWSCloudWatchLogs.ListTagsForResourceInput) async throws -> AWSCloudWatchLogs.ListTagsForResourceOutput { throw MockError.unimplemented } - + func listTagsLogGroup(input: AWSCloudWatchLogs.ListTagsLogGroupInput) async throws -> AWSCloudWatchLogs.ListTagsLogGroupOutput { throw MockError.unimplemented } - + func putDataProtectionPolicy(input: AWSCloudWatchLogs.PutDataProtectionPolicyInput) async throws -> AWSCloudWatchLogs.PutDataProtectionPolicyOutput { throw MockError.unexpected } @@ -171,59 +172,59 @@ class MockCloudWatchLogsClient: CloudWatchLogsClientProtocol { func putDestination(input: AWSCloudWatchLogs.PutDestinationInput) async throws -> AWSCloudWatchLogs.PutDestinationOutput { throw MockError.unimplemented } - + func putDestinationPolicy(input: AWSCloudWatchLogs.PutDestinationPolicyInput) async throws -> AWSCloudWatchLogs.PutDestinationPolicyOutput { throw MockError.unimplemented } - + func putMetricFilter(input: AWSCloudWatchLogs.PutMetricFilterInput) async throws -> AWSCloudWatchLogs.PutMetricFilterOutput { throw MockError.unimplemented } - + func putQueryDefinition(input: AWSCloudWatchLogs.PutQueryDefinitionInput) async throws -> AWSCloudWatchLogs.PutQueryDefinitionOutput { throw MockError.unimplemented } - + func putResourcePolicy(input: AWSCloudWatchLogs.PutResourcePolicyInput) async throws -> AWSCloudWatchLogs.PutResourcePolicyOutput { throw MockError.unimplemented } - + func putRetentionPolicy(input: AWSCloudWatchLogs.PutRetentionPolicyInput) async throws -> AWSCloudWatchLogs.PutRetentionPolicyOutput { throw MockError.unimplemented } - + func putSubscriptionFilter(input: AWSCloudWatchLogs.PutSubscriptionFilterInput) async throws -> AWSCloudWatchLogs.PutSubscriptionFilterOutput { throw MockError.unimplemented } - + func startQuery(input: AWSCloudWatchLogs.StartQueryInput) async throws -> AWSCloudWatchLogs.StartQueryOutput { throw MockError.unimplemented } - + func stopQuery(input: AWSCloudWatchLogs.StopQueryInput) async throws -> AWSCloudWatchLogs.StopQueryOutput { throw MockError.unimplemented } - + func tagLogGroup(input: AWSCloudWatchLogs.TagLogGroupInput) async throws -> AWSCloudWatchLogs.TagLogGroupOutput { throw MockError.unimplemented } - + func tagResource(input: AWSCloudWatchLogs.TagResourceInput) async throws -> AWSCloudWatchLogs.TagResourceOutput { throw MockError.unimplemented } - + func testMetricFilter(input: AWSCloudWatchLogs.TestMetricFilterInput) async throws -> AWSCloudWatchLogs.TestMetricFilterOutput { throw MockError.unimplemented } - + func untagLogGroup(input: AWSCloudWatchLogs.UntagLogGroupInput) async throws -> AWSCloudWatchLogs.UntagLogGroupOutput { throw MockError.unimplemented } - + func untagResource(input: AWSCloudWatchLogs.UntagResourceInput) async throws -> AWSCloudWatchLogs.UntagResourceOutput { throw MockError.unimplemented } - + func deleteAccountPolicy(input: AWSCloudWatchLogs.DeleteAccountPolicyInput) async throws -> AWSCloudWatchLogs.DeleteAccountPolicyOutput { throw MockError.unimplemented } @@ -235,4 +236,96 @@ class MockCloudWatchLogsClient: CloudWatchLogsClientProtocol { func putAccountPolicy(input: AWSCloudWatchLogs.PutAccountPolicyInput) async throws -> AWSCloudWatchLogs.PutAccountPolicyOutput { throw MockError.unimplemented } + + func createDelivery(input: AWSCloudWatchLogs.CreateDeliveryInput) async throws -> AWSCloudWatchLogs.CreateDeliveryOutput { + throw MockError.unimplemented + } + + func createLogAnomalyDetector(input: AWSCloudWatchLogs.CreateLogAnomalyDetectorInput) async throws -> AWSCloudWatchLogs.CreateLogAnomalyDetectorOutput { + throw MockError.unimplemented + } + + func deleteDelivery(input: AWSCloudWatchLogs.DeleteDeliveryInput) async throws -> AWSCloudWatchLogs.DeleteDeliveryOutput { + throw MockError.unimplemented + } + + func deleteDeliveryDestination(input: AWSCloudWatchLogs.DeleteDeliveryDestinationInput) async throws -> AWSCloudWatchLogs.DeleteDeliveryDestinationOutput { + throw MockError.unimplemented + } + + func deleteDeliveryDestinationPolicy(input: AWSCloudWatchLogs.DeleteDeliveryDestinationPolicyInput) async throws -> AWSCloudWatchLogs.DeleteDeliveryDestinationPolicyOutput { + throw MockError.unimplemented + } + + func deleteDeliverySource(input: AWSCloudWatchLogs.DeleteDeliverySourceInput) async throws -> AWSCloudWatchLogs.DeleteDeliverySourceOutput { + throw MockError.unimplemented + } + + func deleteLogAnomalyDetector(input: AWSCloudWatchLogs.DeleteLogAnomalyDetectorInput) async throws -> AWSCloudWatchLogs.DeleteLogAnomalyDetectorOutput { + throw MockError.unimplemented + } + + func describeDeliveries(input: AWSCloudWatchLogs.DescribeDeliveriesInput) async throws -> AWSCloudWatchLogs.DescribeDeliveriesOutput { + throw MockError.unimplemented + } + + func describeDeliveryDestinations(input: AWSCloudWatchLogs.DescribeDeliveryDestinationsInput) async throws -> AWSCloudWatchLogs.DescribeDeliveryDestinationsOutput { + throw MockError.unimplemented + } + + func describeDeliverySources(input: AWSCloudWatchLogs.DescribeDeliverySourcesInput) async throws -> AWSCloudWatchLogs.DescribeDeliverySourcesOutput { + throw MockError.unimplemented + } + + func getDelivery(input: AWSCloudWatchLogs.GetDeliveryInput) async throws -> AWSCloudWatchLogs.GetDeliveryOutput { + throw MockError.unimplemented + } + + func getDeliveryDestination(input: AWSCloudWatchLogs.GetDeliveryDestinationInput) async throws -> AWSCloudWatchLogs.GetDeliveryDestinationOutput { + throw MockError.unimplemented + } + + func getDeliveryDestinationPolicy(input: AWSCloudWatchLogs.GetDeliveryDestinationPolicyInput) async throws -> AWSCloudWatchLogs.GetDeliveryDestinationPolicyOutput { + throw MockError.unimplemented + } + + func getDeliverySource(input: AWSCloudWatchLogs.GetDeliverySourceInput) async throws -> AWSCloudWatchLogs.GetDeliverySourceOutput { + throw MockError.unimplemented + } + + func getLogAnomalyDetector(input: AWSCloudWatchLogs.GetLogAnomalyDetectorInput) async throws -> AWSCloudWatchLogs.GetLogAnomalyDetectorOutput { + throw MockError.unimplemented + } + + func listAnomalies(input: AWSCloudWatchLogs.ListAnomaliesInput) async throws -> AWSCloudWatchLogs.ListAnomaliesOutput { + throw MockError.unimplemented + } + + func listLogAnomalyDetectors(input: AWSCloudWatchLogs.ListLogAnomalyDetectorsInput) async throws -> AWSCloudWatchLogs.ListLogAnomalyDetectorsOutput { + throw MockError.unimplemented + } + + func putDeliveryDestination(input: AWSCloudWatchLogs.PutDeliveryDestinationInput) async throws -> AWSCloudWatchLogs.PutDeliveryDestinationOutput { + throw MockError.unimplemented + } + + func putDeliveryDestinationPolicy(input: AWSCloudWatchLogs.PutDeliveryDestinationPolicyInput) async throws -> AWSCloudWatchLogs.PutDeliveryDestinationPolicyOutput { + throw MockError.unimplemented + } + + func putDeliverySource(input: AWSCloudWatchLogs.PutDeliverySourceInput) async throws -> AWSCloudWatchLogs.PutDeliverySourceOutput { + throw MockError.unimplemented + } + + func startLiveTail(input: AWSCloudWatchLogs.StartLiveTailInput) async throws -> AWSCloudWatchLogs.StartLiveTailOutput { + throw MockError.unimplemented + } + + func updateAnomaly(input: AWSCloudWatchLogs.UpdateAnomalyInput) async throws -> AWSCloudWatchLogs.UpdateAnomalyOutput { + throw MockError.unimplemented + } + + func updateLogAnomalyDetector(input: AWSCloudWatchLogs.UpdateLogAnomalyDetectorInput) async throws -> AWSCloudWatchLogs.UpdateLogAnomalyDetectorOutput { + throw MockError.unimplemented + } } diff --git a/AmplifyPlugins/Notifications/Push/Tests/AWSPinpointPushNotificationsPluginUnitTests/ErrorPushNotificationsTests.swift b/AmplifyPlugins/Notifications/Push/Tests/AWSPinpointPushNotificationsPluginUnitTests/ErrorPushNotificationsTests.swift index 14963a0cc1..fd5c80a93e 100644 --- a/AmplifyPlugins/Notifications/Push/Tests/AWSPinpointPushNotificationsPluginUnitTests/ErrorPushNotificationsTests.swift +++ b/AmplifyPlugins/Notifications/Push/Tests/AWSPinpointPushNotificationsPluginUnitTests/ErrorPushNotificationsTests.swift @@ -6,11 +6,8 @@ // @testable import Amplify -import AWSClientRuntime -import AwsCommonRuntimeKit import AWSPinpoint @testable import AWSPinpointPushNotificationsPlugin -import ClientRuntime import Foundation import XCTest @@ -72,12 +69,19 @@ class ErrorPushNotificationsTests: XCTestCase { } } } +} + +#if canImport(AWSClientRuntime) +import AWSClientRuntime + +extension ErrorPushNotificationsTests { /// Given: An UnknownAWSHTTPServiceError /// When: pushNotificationsError is invoked /// Then: A .unknown error is returned func testPushNotificationError_withUnknownAWSHTTPServiceError_shouldReturnUnknownError() { - let error = UnknownAWSHTTPServiceError(httpResponse: .init(body: .none, statusCode: .accepted), message: "UnknownAWSHTTPServiceError", requestID: nil, typeName: nil) + let error = UnknownAWSHTTPServiceError( + httpResponse: .init(body: .empty, statusCode: .accepted), message: "UnknownAWSHTTPServiceError", requestID: nil, typeName: nil) let pushNotificationsError = error.pushNotificationsError switch pushNotificationsError { case .unknown(let errorDescription, let underlyingError): @@ -87,6 +91,14 @@ class ErrorPushNotificationsTests: XCTestCase { XCTFail("Expected error of type .unknown, got \(pushNotificationsError)") } } +} + +#endif + +#if canImport(AwsCommonRuntimeKit) +import AwsCommonRuntimeKit + +extension ErrorPushNotificationsTests { /// Given: A CommonRunTimeError.crtError /// When: pushNotificationsError is invoked @@ -103,3 +115,5 @@ class ErrorPushNotificationsTests: XCTestCase { } } } + +#endif diff --git a/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/ComprehendClientProtocol.swift b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/ComprehendClientProtocol.swift new file mode 100644 index 0000000000..699a53fbc5 --- /dev/null +++ b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/ComprehendClientProtocol.swift @@ -0,0 +1,1435 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +import AWSComprehend + +// swiftlint:disable file_length +public protocol ComprehendClientProtocol { + /// Performs the `BatchDetectDominantLanguage` operation on the `Comprehend_20171127` service. + /// + /// Determines the dominant language of the input text for a batch of documents. For a list of languages that Amazon Comprehend can detect, see [Amazon Comprehend Supported Languages](https://docs.aws.amazon.com/comprehend/latest/dg/how-languages.html). + /// + /// - Parameter BatchDetectDominantLanguageInput : [no documentation found] + /// + /// - Returns: `BatchDetectDominantLanguageOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BatchSizeLimitExceededException` : The number of documents in the request exceeds the limit of 25. Try your request again with fewer documents. + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `TextSizeLimitExceededException` : The size of the input text exceeds the limit. Use a smaller document. + func batchDetectDominantLanguage(input: BatchDetectDominantLanguageInput) async throws -> BatchDetectDominantLanguageOutput + /// Performs the `BatchDetectEntities` operation on the `Comprehend_20171127` service. + /// + /// Inspects the text of a batch of documents for named entities and returns information about them. For more information about named entities, see [Entities](https://docs.aws.amazon.com/comprehend/latest/dg/how-entities.html) in the Comprehend Developer Guide. + /// + /// - Parameter BatchDetectEntitiesInput : [no documentation found] + /// + /// - Returns: `BatchDetectEntitiesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BatchSizeLimitExceededException` : The number of documents in the request exceeds the limit of 25. Try your request again with fewer documents. + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `TextSizeLimitExceededException` : The size of the input text exceeds the limit. Use a smaller document. + /// - `UnsupportedLanguageException` : Amazon Comprehend can't process the language of the input text. For a list of supported languages, [Supported languages](https://docs.aws.amazon.com/comprehend/latest/dg/supported-languages.html) in the Comprehend Developer Guide. + func batchDetectEntities(input: BatchDetectEntitiesInput) async throws -> BatchDetectEntitiesOutput + /// Performs the `BatchDetectKeyPhrases` operation on the `Comprehend_20171127` service. + /// + /// Detects the key noun phrases found in a batch of documents. + /// + /// - Parameter BatchDetectKeyPhrasesInput : [no documentation found] + /// + /// - Returns: `BatchDetectKeyPhrasesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BatchSizeLimitExceededException` : The number of documents in the request exceeds the limit of 25. Try your request again with fewer documents. + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `TextSizeLimitExceededException` : The size of the input text exceeds the limit. Use a smaller document. + /// - `UnsupportedLanguageException` : Amazon Comprehend can't process the language of the input text. For a list of supported languages, [Supported languages](https://docs.aws.amazon.com/comprehend/latest/dg/supported-languages.html) in the Comprehend Developer Guide. + func batchDetectKeyPhrases(input: BatchDetectKeyPhrasesInput) async throws -> BatchDetectKeyPhrasesOutput + /// Performs the `BatchDetectSentiment` operation on the `Comprehend_20171127` service. + /// + /// Inspects a batch of documents and returns an inference of the prevailing sentiment, POSITIVE, NEUTRAL, MIXED, or NEGATIVE, in each one. + /// + /// - Parameter BatchDetectSentimentInput : [no documentation found] + /// + /// - Returns: `BatchDetectSentimentOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BatchSizeLimitExceededException` : The number of documents in the request exceeds the limit of 25. Try your request again with fewer documents. + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `TextSizeLimitExceededException` : The size of the input text exceeds the limit. Use a smaller document. + /// - `UnsupportedLanguageException` : Amazon Comprehend can't process the language of the input text. For a list of supported languages, [Supported languages](https://docs.aws.amazon.com/comprehend/latest/dg/supported-languages.html) in the Comprehend Developer Guide. + func batchDetectSentiment(input: BatchDetectSentimentInput) async throws -> BatchDetectSentimentOutput + /// Performs the `BatchDetectSyntax` operation on the `Comprehend_20171127` service. + /// + /// Inspects the text of a batch of documents for the syntax and part of speech of the words in the document and returns information about them. For more information, see [Syntax](https://docs.aws.amazon.com/comprehend/latest/dg/how-syntax.html) in the Comprehend Developer Guide. + /// + /// - Parameter BatchDetectSyntaxInput : [no documentation found] + /// + /// - Returns: `BatchDetectSyntaxOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BatchSizeLimitExceededException` : The number of documents in the request exceeds the limit of 25. Try your request again with fewer documents. + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `TextSizeLimitExceededException` : The size of the input text exceeds the limit. Use a smaller document. + /// - `UnsupportedLanguageException` : Amazon Comprehend can't process the language of the input text. For a list of supported languages, [Supported languages](https://docs.aws.amazon.com/comprehend/latest/dg/supported-languages.html) in the Comprehend Developer Guide. + func batchDetectSyntax(input: BatchDetectSyntaxInput) async throws -> BatchDetectSyntaxOutput + /// Performs the `BatchDetectTargetedSentiment` operation on the `Comprehend_20171127` service. + /// + /// Inspects a batch of documents and returns a sentiment analysis for each entity identified in the documents. For more information about targeted sentiment, see [Targeted sentiment](https://docs.aws.amazon.com/comprehend/latest/dg/how-targeted-sentiment.html) in the Amazon Comprehend Developer Guide. + /// + /// - Parameter BatchDetectTargetedSentimentInput : [no documentation found] + /// + /// - Returns: `BatchDetectTargetedSentimentOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `BatchSizeLimitExceededException` : The number of documents in the request exceeds the limit of 25. Try your request again with fewer documents. + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `TextSizeLimitExceededException` : The size of the input text exceeds the limit. Use a smaller document. + /// - `UnsupportedLanguageException` : Amazon Comprehend can't process the language of the input text. For a list of supported languages, [Supported languages](https://docs.aws.amazon.com/comprehend/latest/dg/supported-languages.html) in the Comprehend Developer Guide. + func batchDetectTargetedSentiment(input: BatchDetectTargetedSentimentInput) async throws -> BatchDetectTargetedSentimentOutput + /// Performs the `ClassifyDocument` operation on the `Comprehend_20171127` service. + /// + /// Creates a classification request to analyze a single document in real-time. ClassifyDocument supports the following model types: + /// + /// * Custom classifier - a custom model that you have created and trained. For input, you can provide plain text, a single-page document (PDF, Word, or image), or Amazon Textract API output. For more information, see [Custom classification](https://docs.aws.amazon.com/comprehend/latest/dg/how-document-classification.html) in the Amazon Comprehend Developer Guide. + /// + /// * Prompt safety classifier - Amazon Comprehend provides a pre-trained model for classifying input prompts for generative AI applications. For input, you provide English plain text input. For prompt safety classification, the response includes only the Classes field. For more information about prompt safety classifiers, see [Prompt safety classification](https://docs.aws.amazon.com/comprehend/latest/dg/trust-safety.html#prompt-classification) in the Amazon Comprehend Developer Guide. + /// + /// + /// If the system detects errors while processing a page in the input document, the API response includes an Errors field that describes the errors. If the system detects a document-level error in your input document, the API returns an InvalidRequestException error response. For details about this exception, see [ Errors in semi-structured documents](https://docs.aws.amazon.com/comprehend/latest/dg/idp-inputs-sync-err.html) in the Comprehend Developer Guide. + /// + /// - Parameter ClassifyDocumentInput : [no documentation found] + /// + /// - Returns: `ClassifyDocumentOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceUnavailableException` : The specified resource is not available. Check the resource and try your request again. + /// - `TextSizeLimitExceededException` : The size of the input text exceeds the limit. Use a smaller document. + func classifyDocument(input: ClassifyDocumentInput) async throws -> ClassifyDocumentOutput + /// Performs the `ContainsPiiEntities` operation on the `Comprehend_20171127` service. + /// + /// Analyzes input text for the presence of personally identifiable information (PII) and returns the labels of identified PII entity types such as name, address, bank account number, or phone number. + /// + /// - Parameter ContainsPiiEntitiesInput : [no documentation found] + /// + /// - Returns: `ContainsPiiEntitiesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `TextSizeLimitExceededException` : The size of the input text exceeds the limit. Use a smaller document. + /// - `UnsupportedLanguageException` : Amazon Comprehend can't process the language of the input text. For a list of supported languages, [Supported languages](https://docs.aws.amazon.com/comprehend/latest/dg/supported-languages.html) in the Comprehend Developer Guide. + func containsPiiEntities(input: ContainsPiiEntitiesInput) async throws -> ContainsPiiEntitiesOutput + /// Performs the `CreateDataset` operation on the `Comprehend_20171127` service. + /// + /// Creates a dataset to upload training or test data for a model associated with a flywheel. For more information about datasets, see [ Flywheel overview](https://docs.aws.amazon.com/comprehend/latest/dg/flywheels-about.html) in the Amazon Comprehend Developer Guide. + /// + /// - Parameter CreateDatasetInput : [no documentation found] + /// + /// - Returns: `CreateDatasetOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceInUseException` : The specified resource name is already in use. Use a different name and try your request again. + /// - `ResourceLimitExceededException` : The maximum number of resources per account has been exceeded. Review the resources, and then try your request again. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + /// - `TooManyTagsException` : The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request. + func createDataset(input: CreateDatasetInput) async throws -> CreateDatasetOutput + /// Performs the `CreateDocumentClassifier` operation on the `Comprehend_20171127` service. + /// + /// Creates a new document classifier that you can use to categorize documents. To create a classifier, you provide a set of training documents that are labeled with the categories that you want to use. For more information, see [Training classifier models](https://docs.aws.amazon.com/comprehend/latest/dg/training-classifier-model.html) in the Comprehend Developer Guide. + /// + /// - Parameter CreateDocumentClassifierInput : [no documentation found] + /// + /// - Returns: `CreateDocumentClassifierOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `KmsKeyValidationException` : The KMS customer managed key (CMK) entered cannot be validated. Verify the key and re-enter it. + /// - `ResourceInUseException` : The specified resource name is already in use. Use a different name and try your request again. + /// - `ResourceLimitExceededException` : The maximum number of resources per account has been exceeded. Review the resources, and then try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + /// - `TooManyTagsException` : The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request. + /// - `UnsupportedLanguageException` : Amazon Comprehend can't process the language of the input text. For a list of supported languages, [Supported languages](https://docs.aws.amazon.com/comprehend/latest/dg/supported-languages.html) in the Comprehend Developer Guide. + func createDocumentClassifier(input: CreateDocumentClassifierInput) async throws -> CreateDocumentClassifierOutput + /// Performs the `CreateEndpoint` operation on the `Comprehend_20171127` service. + /// + /// Creates a model-specific endpoint for synchronous inference for a previously trained custom model For information about endpoints, see [Managing endpoints](https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html). + /// + /// - Parameter CreateEndpointInput : [no documentation found] + /// + /// - Returns: `CreateEndpointOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceInUseException` : The specified resource name is already in use. Use a different name and try your request again. + /// - `ResourceLimitExceededException` : The maximum number of resources per account has been exceeded. Review the resources, and then try your request again. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `ResourceUnavailableException` : The specified resource is not available. Check the resource and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + /// - `TooManyTagsException` : The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request. + func createEndpoint(input: CreateEndpointInput) async throws -> CreateEndpointOutput + /// Performs the `CreateEntityRecognizer` operation on the `Comprehend_20171127` service. + /// + /// Creates an entity recognizer using submitted files. After your CreateEntityRecognizer request is submitted, you can check job status using the DescribeEntityRecognizer API. + /// + /// - Parameter CreateEntityRecognizerInput : [no documentation found] + /// + /// - Returns: `CreateEntityRecognizerOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `KmsKeyValidationException` : The KMS customer managed key (CMK) entered cannot be validated. Verify the key and re-enter it. + /// - `ResourceInUseException` : The specified resource name is already in use. Use a different name and try your request again. + /// - `ResourceLimitExceededException` : The maximum number of resources per account has been exceeded. Review the resources, and then try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + /// - `TooManyTagsException` : The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request. + /// - `UnsupportedLanguageException` : Amazon Comprehend can't process the language of the input text. For a list of supported languages, [Supported languages](https://docs.aws.amazon.com/comprehend/latest/dg/supported-languages.html) in the Comprehend Developer Guide. + func createEntityRecognizer(input: CreateEntityRecognizerInput) async throws -> CreateEntityRecognizerOutput + /// Performs the `CreateFlywheel` operation on the `Comprehend_20171127` service. + /// + /// A flywheel is an Amazon Web Services resource that orchestrates the ongoing training of a model for custom classification or custom entity recognition. You can create a flywheel to start with an existing trained model, or Comprehend can create and train a new model. When you create the flywheel, Comprehend creates a data lake in your account. The data lake holds the training data and test data for all versions of the model. To use a flywheel with an existing trained model, you specify the active model version. Comprehend copies the model's training data and test data into the flywheel's data lake. To use the flywheel with a new model, you need to provide a dataset for training data (and optional test data) when you create the flywheel. For more information about flywheels, see [ Flywheel overview](https://docs.aws.amazon.com/comprehend/latest/dg/flywheels-about.html) in the Amazon Comprehend Developer Guide. + /// + /// - Parameter CreateFlywheelInput : [no documentation found] + /// + /// - Returns: `CreateFlywheelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `KmsKeyValidationException` : The KMS customer managed key (CMK) entered cannot be validated. Verify the key and re-enter it. + /// - `ResourceInUseException` : The specified resource name is already in use. Use a different name and try your request again. + /// - `ResourceLimitExceededException` : The maximum number of resources per account has been exceeded. Review the resources, and then try your request again. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `ResourceUnavailableException` : The specified resource is not available. Check the resource and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + /// - `TooManyTagsException` : The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request. + /// - `UnsupportedLanguageException` : Amazon Comprehend can't process the language of the input text. For a list of supported languages, [Supported languages](https://docs.aws.amazon.com/comprehend/latest/dg/supported-languages.html) in the Comprehend Developer Guide. + func createFlywheel(input: CreateFlywheelInput) async throws -> CreateFlywheelOutput + /// Performs the `DeleteDocumentClassifier` operation on the `Comprehend_20171127` service. + /// + /// Deletes a previously created document classifier Only those classifiers that are in terminated states (IN_ERROR, TRAINED) will be deleted. If an active inference job is using the model, a ResourceInUseException will be returned. This is an asynchronous action that puts the classifier into a DELETING state, and it is then removed by a background job. Once removed, the classifier disappears from your account and is no longer available for use. + /// + /// - Parameter DeleteDocumentClassifierInput : [no documentation found] + /// + /// - Returns: `DeleteDocumentClassifierOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceInUseException` : The specified resource name is already in use. Use a different name and try your request again. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `ResourceUnavailableException` : The specified resource is not available. Check the resource and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func deleteDocumentClassifier(input: DeleteDocumentClassifierInput) async throws -> DeleteDocumentClassifierOutput + /// Performs the `DeleteEndpoint` operation on the `Comprehend_20171127` service. + /// + /// Deletes a model-specific endpoint for a previously-trained custom model. All endpoints must be deleted in order for the model to be deleted. For information about endpoints, see [Managing endpoints](https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html). + /// + /// - Parameter DeleteEndpointInput : [no documentation found] + /// + /// - Returns: `DeleteEndpointOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceInUseException` : The specified resource name is already in use. Use a different name and try your request again. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func deleteEndpoint(input: DeleteEndpointInput) async throws -> DeleteEndpointOutput + /// Performs the `DeleteEntityRecognizer` operation on the `Comprehend_20171127` service. + /// + /// Deletes an entity recognizer. Only those recognizers that are in terminated states (IN_ERROR, TRAINED) will be deleted. If an active inference job is using the model, a ResourceInUseException will be returned. This is an asynchronous action that puts the recognizer into a DELETING state, and it is then removed by a background job. Once removed, the recognizer disappears from your account and is no longer available for use. + /// + /// - Parameter DeleteEntityRecognizerInput : [no documentation found] + /// + /// - Returns: `DeleteEntityRecognizerOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceInUseException` : The specified resource name is already in use. Use a different name and try your request again. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `ResourceUnavailableException` : The specified resource is not available. Check the resource and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func deleteEntityRecognizer(input: DeleteEntityRecognizerInput) async throws -> DeleteEntityRecognizerOutput + /// Performs the `DeleteFlywheel` operation on the `Comprehend_20171127` service. + /// + /// Deletes a flywheel. When you delete the flywheel, Amazon Comprehend does not delete the data lake or the model associated with the flywheel. For more information about flywheels, see [ Flywheel overview](https://docs.aws.amazon.com/comprehend/latest/dg/flywheels-about.html) in the Amazon Comprehend Developer Guide. + /// + /// - Parameter DeleteFlywheelInput : [no documentation found] + /// + /// - Returns: `DeleteFlywheelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceInUseException` : The specified resource name is already in use. Use a different name and try your request again. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `ResourceUnavailableException` : The specified resource is not available. Check the resource and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func deleteFlywheel(input: DeleteFlywheelInput) async throws -> DeleteFlywheelOutput + /// Performs the `DeleteResourcePolicy` operation on the `Comprehend_20171127` service. + /// + /// Deletes a resource-based policy that is attached to a custom model. + /// + /// - Parameter DeleteResourcePolicyInput : [no documentation found] + /// + /// - Returns: `DeleteResourcePolicyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + func deleteResourcePolicy(input: DeleteResourcePolicyInput) async throws -> DeleteResourcePolicyOutput + /// Performs the `DescribeDataset` operation on the `Comprehend_20171127` service. + /// + /// Returns information about the dataset that you specify. For more information about datasets, see [ Flywheel overview](https://docs.aws.amazon.com/comprehend/latest/dg/flywheels-about.html) in the Amazon Comprehend Developer Guide. + /// + /// - Parameter DescribeDatasetInput : [no documentation found] + /// + /// - Returns: `DescribeDatasetOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func describeDataset(input: DescribeDatasetInput) async throws -> DescribeDatasetOutput + /// Performs the `DescribeDocumentClassificationJob` operation on the `Comprehend_20171127` service. + /// + /// Gets the properties associated with a document classification job. Use this operation to get the status of a classification job. + /// + /// - Parameter DescribeDocumentClassificationJobInput : [no documentation found] + /// + /// - Returns: `DescribeDocumentClassificationJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `JobNotFoundException` : The specified job was not found. Check the job ID and try again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func describeDocumentClassificationJob(input: DescribeDocumentClassificationJobInput) async throws -> DescribeDocumentClassificationJobOutput + /// Performs the `DescribeDocumentClassifier` operation on the `Comprehend_20171127` service. + /// + /// Gets the properties associated with a document classifier. + /// + /// - Parameter DescribeDocumentClassifierInput : [no documentation found] + /// + /// - Returns: `DescribeDocumentClassifierOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func describeDocumentClassifier(input: DescribeDocumentClassifierInput) async throws -> DescribeDocumentClassifierOutput + /// Performs the `DescribeDominantLanguageDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Gets the properties associated with a dominant language detection job. Use this operation to get the status of a detection job. + /// + /// - Parameter DescribeDominantLanguageDetectionJobInput : [no documentation found] + /// + /// - Returns: `DescribeDominantLanguageDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `JobNotFoundException` : The specified job was not found. Check the job ID and try again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func describeDominantLanguageDetectionJob(input: DescribeDominantLanguageDetectionJobInput) async throws -> DescribeDominantLanguageDetectionJobOutput + /// Performs the `DescribeEndpoint` operation on the `Comprehend_20171127` service. + /// + /// Gets the properties associated with a specific endpoint. Use this operation to get the status of an endpoint. For information about endpoints, see [Managing endpoints](https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html). + /// + /// - Parameter DescribeEndpointInput : [no documentation found] + /// + /// - Returns: `DescribeEndpointOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func describeEndpoint(input: DescribeEndpointInput) async throws -> DescribeEndpointOutput + /// Performs the `DescribeEntitiesDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Gets the properties associated with an entities detection job. Use this operation to get the status of a detection job. + /// + /// - Parameter DescribeEntitiesDetectionJobInput : [no documentation found] + /// + /// - Returns: `DescribeEntitiesDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `JobNotFoundException` : The specified job was not found. Check the job ID and try again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func describeEntitiesDetectionJob(input: DescribeEntitiesDetectionJobInput) async throws -> DescribeEntitiesDetectionJobOutput + /// Performs the `DescribeEntityRecognizer` operation on the `Comprehend_20171127` service. + /// + /// Provides details about an entity recognizer including status, S3 buckets containing training data, recognizer metadata, metrics, and so on. + /// + /// - Parameter DescribeEntityRecognizerInput : [no documentation found] + /// + /// - Returns: `DescribeEntityRecognizerOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func describeEntityRecognizer(input: DescribeEntityRecognizerInput) async throws -> DescribeEntityRecognizerOutput + /// Performs the `DescribeEventsDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Gets the status and details of an events detection job. + /// + /// - Parameter DescribeEventsDetectionJobInput : [no documentation found] + /// + /// - Returns: `DescribeEventsDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `JobNotFoundException` : The specified job was not found. Check the job ID and try again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func describeEventsDetectionJob(input: DescribeEventsDetectionJobInput) async throws -> DescribeEventsDetectionJobOutput + /// Performs the `DescribeFlywheel` operation on the `Comprehend_20171127` service. + /// + /// Provides configuration information about the flywheel. For more information about flywheels, see [ Flywheel overview](https://docs.aws.amazon.com/comprehend/latest/dg/flywheels-about.html) in the Amazon Comprehend Developer Guide. + /// + /// - Parameter DescribeFlywheelInput : [no documentation found] + /// + /// - Returns: `DescribeFlywheelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func describeFlywheel(input: DescribeFlywheelInput) async throws -> DescribeFlywheelOutput + /// Performs the `DescribeFlywheelIteration` operation on the `Comprehend_20171127` service. + /// + /// Retrieve the configuration properties of a flywheel iteration. For more information about flywheels, see [ Flywheel overview](https://docs.aws.amazon.com/comprehend/latest/dg/flywheels-about.html) in the Amazon Comprehend Developer Guide. + /// + /// - Parameter DescribeFlywheelIterationInput : [no documentation found] + /// + /// - Returns: `DescribeFlywheelIterationOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func describeFlywheelIteration(input: DescribeFlywheelIterationInput) async throws -> DescribeFlywheelIterationOutput + /// Performs the `DescribeKeyPhrasesDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Gets the properties associated with a key phrases detection job. Use this operation to get the status of a detection job. + /// + /// - Parameter DescribeKeyPhrasesDetectionJobInput : [no documentation found] + /// + /// - Returns: `DescribeKeyPhrasesDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `JobNotFoundException` : The specified job was not found. Check the job ID and try again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func describeKeyPhrasesDetectionJob(input: DescribeKeyPhrasesDetectionJobInput) async throws -> DescribeKeyPhrasesDetectionJobOutput + /// Performs the `DescribePiiEntitiesDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Gets the properties associated with a PII entities detection job. For example, you can use this operation to get the job status. + /// + /// - Parameter DescribePiiEntitiesDetectionJobInput : [no documentation found] + /// + /// - Returns: `DescribePiiEntitiesDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `JobNotFoundException` : The specified job was not found. Check the job ID and try again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func describePiiEntitiesDetectionJob(input: DescribePiiEntitiesDetectionJobInput) async throws -> DescribePiiEntitiesDetectionJobOutput + /// Performs the `DescribeResourcePolicy` operation on the `Comprehend_20171127` service. + /// + /// Gets the details of a resource-based policy that is attached to a custom model, including the JSON body of the policy. + /// + /// - Parameter DescribeResourcePolicyInput : [no documentation found] + /// + /// - Returns: `DescribeResourcePolicyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + func describeResourcePolicy(input: DescribeResourcePolicyInput) async throws -> DescribeResourcePolicyOutput + /// Performs the `DescribeSentimentDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Gets the properties associated with a sentiment detection job. Use this operation to get the status of a detection job. + /// + /// - Parameter DescribeSentimentDetectionJobInput : [no documentation found] + /// + /// - Returns: `DescribeSentimentDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `JobNotFoundException` : The specified job was not found. Check the job ID and try again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func describeSentimentDetectionJob(input: DescribeSentimentDetectionJobInput) async throws -> DescribeSentimentDetectionJobOutput + /// Performs the `DescribeTargetedSentimentDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Gets the properties associated with a targeted sentiment detection job. Use this operation to get the status of the job. + /// + /// - Parameter DescribeTargetedSentimentDetectionJobInput : [no documentation found] + /// + /// - Returns: `DescribeTargetedSentimentDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `JobNotFoundException` : The specified job was not found. Check the job ID and try again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func describeTargetedSentimentDetectionJob(input: DescribeTargetedSentimentDetectionJobInput) async throws -> DescribeTargetedSentimentDetectionJobOutput + /// Performs the `DescribeTopicsDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Gets the properties associated with a topic detection job. Use this operation to get the status of a detection job. + /// + /// - Parameter DescribeTopicsDetectionJobInput : [no documentation found] + /// + /// - Returns: `DescribeTopicsDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `JobNotFoundException` : The specified job was not found. Check the job ID and try again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func describeTopicsDetectionJob(input: DescribeTopicsDetectionJobInput) async throws -> DescribeTopicsDetectionJobOutput + /// Performs the `DetectDominantLanguage` operation on the `Comprehend_20171127` service. + /// + /// Determines the dominant language of the input text. For a list of languages that Amazon Comprehend can detect, see [Amazon Comprehend Supported Languages](https://docs.aws.amazon.com/comprehend/latest/dg/how-languages.html). + /// + /// - Parameter DetectDominantLanguageInput : [no documentation found] + /// + /// - Returns: `DetectDominantLanguageOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `TextSizeLimitExceededException` : The size of the input text exceeds the limit. Use a smaller document. + func detectDominantLanguage(input: DetectDominantLanguageInput) async throws -> DetectDominantLanguageOutput + /// Performs the `DetectEntities` operation on the `Comprehend_20171127` service. + /// + /// Detects named entities in input text when you use the pre-trained model. Detects custom entities if you have a custom entity recognition model. When detecting named entities using the pre-trained model, use plain text as the input. For more information about named entities, see [Entities](https://docs.aws.amazon.com/comprehend/latest/dg/how-entities.html) in the Comprehend Developer Guide. When you use a custom entity recognition model, you can input plain text or you can upload a single-page input document (text, PDF, Word, or image). If the system detects errors while processing a page in the input document, the API response includes an entry in Errors for each error. If the system detects a document-level error in your input document, the API returns an InvalidRequestException error response. For details about this exception, see [ Errors in semi-structured documents](https://docs.aws.amazon.com/comprehend/latest/dg/idp-inputs-sync-err.html) in the Comprehend Developer Guide. + /// + /// - Parameter DetectEntitiesInput : [no documentation found] + /// + /// - Returns: `DetectEntitiesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceUnavailableException` : The specified resource is not available. Check the resource and try your request again. + /// - `TextSizeLimitExceededException` : The size of the input text exceeds the limit. Use a smaller document. + /// - `UnsupportedLanguageException` : Amazon Comprehend can't process the language of the input text. For a list of supported languages, [Supported languages](https://docs.aws.amazon.com/comprehend/latest/dg/supported-languages.html) in the Comprehend Developer Guide. + func detectEntities(input: DetectEntitiesInput) async throws -> DetectEntitiesOutput + /// Performs the `DetectKeyPhrases` operation on the `Comprehend_20171127` service. + /// + /// Detects the key noun phrases found in the text. + /// + /// - Parameter DetectKeyPhrasesInput : [no documentation found] + /// + /// - Returns: `DetectKeyPhrasesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `TextSizeLimitExceededException` : The size of the input text exceeds the limit. Use a smaller document. + /// - `UnsupportedLanguageException` : Amazon Comprehend can't process the language of the input text. For a list of supported languages, [Supported languages](https://docs.aws.amazon.com/comprehend/latest/dg/supported-languages.html) in the Comprehend Developer Guide. + func detectKeyPhrases(input: DetectKeyPhrasesInput) async throws -> DetectKeyPhrasesOutput + /// Performs the `DetectPiiEntities` operation on the `Comprehend_20171127` service. + /// + /// Inspects the input text for entities that contain personally identifiable information (PII) and returns information about them. + /// + /// - Parameter DetectPiiEntitiesInput : [no documentation found] + /// + /// - Returns: `DetectPiiEntitiesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `TextSizeLimitExceededException` : The size of the input text exceeds the limit. Use a smaller document. + /// - `UnsupportedLanguageException` : Amazon Comprehend can't process the language of the input text. For a list of supported languages, [Supported languages](https://docs.aws.amazon.com/comprehend/latest/dg/supported-languages.html) in the Comprehend Developer Guide. + func detectPiiEntities(input: DetectPiiEntitiesInput) async throws -> DetectPiiEntitiesOutput + /// Performs the `DetectSentiment` operation on the `Comprehend_20171127` service. + /// + /// Inspects text and returns an inference of the prevailing sentiment (POSITIVE, NEUTRAL, MIXED, or NEGATIVE). + /// + /// - Parameter DetectSentimentInput : [no documentation found] + /// + /// - Returns: `DetectSentimentOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `TextSizeLimitExceededException` : The size of the input text exceeds the limit. Use a smaller document. + /// - `UnsupportedLanguageException` : Amazon Comprehend can't process the language of the input text. For a list of supported languages, [Supported languages](https://docs.aws.amazon.com/comprehend/latest/dg/supported-languages.html) in the Comprehend Developer Guide. + func detectSentiment(input: DetectSentimentInput) async throws -> DetectSentimentOutput + /// Performs the `DetectSyntax` operation on the `Comprehend_20171127` service. + /// + /// Inspects text for syntax and the part of speech of words in the document. For more information, see [Syntax](https://docs.aws.amazon.com/comprehend/latest/dg/how-syntax.html) in the Comprehend Developer Guide. + /// + /// - Parameter DetectSyntaxInput : [no documentation found] + /// + /// - Returns: `DetectSyntaxOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `TextSizeLimitExceededException` : The size of the input text exceeds the limit. Use a smaller document. + /// - `UnsupportedLanguageException` : Amazon Comprehend can't process the language of the input text. For a list of supported languages, [Supported languages](https://docs.aws.amazon.com/comprehend/latest/dg/supported-languages.html) in the Comprehend Developer Guide. + func detectSyntax(input: DetectSyntaxInput) async throws -> DetectSyntaxOutput + /// Performs the `DetectTargetedSentiment` operation on the `Comprehend_20171127` service. + /// + /// Inspects the input text and returns a sentiment analysis for each entity identified in the text. For more information about targeted sentiment, see [Targeted sentiment](https://docs.aws.amazon.com/comprehend/latest/dg/how-targeted-sentiment.html) in the Amazon Comprehend Developer Guide. + /// + /// - Parameter DetectTargetedSentimentInput : [no documentation found] + /// + /// - Returns: `DetectTargetedSentimentOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `TextSizeLimitExceededException` : The size of the input text exceeds the limit. Use a smaller document. + /// - `UnsupportedLanguageException` : Amazon Comprehend can't process the language of the input text. For a list of supported languages, [Supported languages](https://docs.aws.amazon.com/comprehend/latest/dg/supported-languages.html) in the Comprehend Developer Guide. + func detectTargetedSentiment(input: DetectTargetedSentimentInput) async throws -> DetectTargetedSentimentOutput + /// Performs the `DetectToxicContent` operation on the `Comprehend_20171127` service. + /// + /// Performs toxicity analysis on the list of text strings that you provide as input. The API response contains a results list that matches the size of the input list. For more information about toxicity detection, see [Toxicity detection](https://docs.aws.amazon.com/comprehend/latest/dg/toxicity-detection.html) in the Amazon Comprehend Developer Guide. + /// + /// - Parameter DetectToxicContentInput : [no documentation found] + /// + /// - Returns: `DetectToxicContentOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `TextSizeLimitExceededException` : The size of the input text exceeds the limit. Use a smaller document. + /// - `UnsupportedLanguageException` : Amazon Comprehend can't process the language of the input text. For a list of supported languages, [Supported languages](https://docs.aws.amazon.com/comprehend/latest/dg/supported-languages.html) in the Comprehend Developer Guide. + func detectToxicContent(input: DetectToxicContentInput) async throws -> DetectToxicContentOutput + /// Performs the `ImportModel` operation on the `Comprehend_20171127` service. + /// + /// Creates a new custom model that replicates a source custom model that you import. The source model can be in your Amazon Web Services account or another one. If the source model is in another Amazon Web Services account, then it must have a resource-based policy that authorizes you to import it. The source model must be in the same Amazon Web Services Region that you're using when you import. You can't import a model that's in a different Region. + /// + /// - Parameter ImportModelInput : [no documentation found] + /// + /// - Returns: `ImportModelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `KmsKeyValidationException` : The KMS customer managed key (CMK) entered cannot be validated. Verify the key and re-enter it. + /// - `ResourceInUseException` : The specified resource name is already in use. Use a different name and try your request again. + /// - `ResourceLimitExceededException` : The maximum number of resources per account has been exceeded. Review the resources, and then try your request again. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `ResourceUnavailableException` : The specified resource is not available. Check the resource and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + /// - `TooManyTagsException` : The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request. + func importModel(input: ImportModelInput) async throws -> ImportModelOutput + /// Performs the `ListDatasets` operation on the `Comprehend_20171127` service. + /// + /// List the datasets that you have configured in this Region. For more information about datasets, see [ Flywheel overview](https://docs.aws.amazon.com/comprehend/latest/dg/flywheels-about.html) in the Amazon Comprehend Developer Guide. + /// + /// - Parameter ListDatasetsInput : [no documentation found] + /// + /// - Returns: `ListDatasetsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidFilterException` : The filter specified for the operation is invalid. Specify a different filter. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func listDatasets(input: ListDatasetsInput) async throws -> ListDatasetsOutput + /// Performs the `ListDocumentClassificationJobs` operation on the `Comprehend_20171127` service. + /// + /// Gets a list of the documentation classification jobs that you have submitted. + /// + /// - Parameter ListDocumentClassificationJobsInput : [no documentation found] + /// + /// - Returns: `ListDocumentClassificationJobsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidFilterException` : The filter specified for the operation is invalid. Specify a different filter. + /// - `InvalidRequestException` : The request is invalid. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func listDocumentClassificationJobs(input: ListDocumentClassificationJobsInput) async throws -> ListDocumentClassificationJobsOutput + /// Performs the `ListDocumentClassifiers` operation on the `Comprehend_20171127` service. + /// + /// Gets a list of the document classifiers that you have created. + /// + /// - Parameter ListDocumentClassifiersInput : [no documentation found] + /// + /// - Returns: `ListDocumentClassifiersOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidFilterException` : The filter specified for the operation is invalid. Specify a different filter. + /// - `InvalidRequestException` : The request is invalid. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func listDocumentClassifiers(input: ListDocumentClassifiersInput) async throws -> ListDocumentClassifiersOutput + /// Performs the `ListDocumentClassifierSummaries` operation on the `Comprehend_20171127` service. + /// + /// Gets a list of summaries of the document classifiers that you have created + /// + /// - Parameter ListDocumentClassifierSummariesInput : [no documentation found] + /// + /// - Returns: `ListDocumentClassifierSummariesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func listDocumentClassifierSummaries(input: ListDocumentClassifierSummariesInput) async throws -> ListDocumentClassifierSummariesOutput + /// Performs the `ListDominantLanguageDetectionJobs` operation on the `Comprehend_20171127` service. + /// + /// Gets a list of the dominant language detection jobs that you have submitted. + /// + /// - Parameter ListDominantLanguageDetectionJobsInput : [no documentation found] + /// + /// - Returns: `ListDominantLanguageDetectionJobsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidFilterException` : The filter specified for the operation is invalid. Specify a different filter. + /// - `InvalidRequestException` : The request is invalid. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func listDominantLanguageDetectionJobs(input: ListDominantLanguageDetectionJobsInput) async throws -> ListDominantLanguageDetectionJobsOutput + /// Performs the `ListEndpoints` operation on the `Comprehend_20171127` service. + /// + /// Gets a list of all existing endpoints that you've created. For information about endpoints, see [Managing endpoints](https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html). + /// + /// - Parameter ListEndpointsInput : [no documentation found] + /// + /// - Returns: `ListEndpointsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func listEndpoints(input: ListEndpointsInput) async throws -> ListEndpointsOutput + /// Performs the `ListEntitiesDetectionJobs` operation on the `Comprehend_20171127` service. + /// + /// Gets a list of the entity detection jobs that you have submitted. + /// + /// - Parameter ListEntitiesDetectionJobsInput : [no documentation found] + /// + /// - Returns: `ListEntitiesDetectionJobsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidFilterException` : The filter specified for the operation is invalid. Specify a different filter. + /// - `InvalidRequestException` : The request is invalid. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func listEntitiesDetectionJobs(input: ListEntitiesDetectionJobsInput) async throws -> ListEntitiesDetectionJobsOutput + /// Performs the `ListEntityRecognizers` operation on the `Comprehend_20171127` service. + /// + /// Gets a list of the properties of all entity recognizers that you created, including recognizers currently in training. Allows you to filter the list of recognizers based on criteria such as status and submission time. This call returns up to 500 entity recognizers in the list, with a default number of 100 recognizers in the list. The results of this list are not in any particular order. Please get the list and sort locally if needed. + /// + /// - Parameter ListEntityRecognizersInput : [no documentation found] + /// + /// - Returns: `ListEntityRecognizersOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidFilterException` : The filter specified for the operation is invalid. Specify a different filter. + /// - `InvalidRequestException` : The request is invalid. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func listEntityRecognizers(input: ListEntityRecognizersInput) async throws -> ListEntityRecognizersOutput + /// Performs the `ListEntityRecognizerSummaries` operation on the `Comprehend_20171127` service. + /// + /// Gets a list of summaries for the entity recognizers that you have created. + /// + /// - Parameter ListEntityRecognizerSummariesInput : [no documentation found] + /// + /// - Returns: `ListEntityRecognizerSummariesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func listEntityRecognizerSummaries(input: ListEntityRecognizerSummariesInput) async throws -> ListEntityRecognizerSummariesOutput + /// Performs the `ListEventsDetectionJobs` operation on the `Comprehend_20171127` service. + /// + /// Gets a list of the events detection jobs that you have submitted. + /// + /// - Parameter ListEventsDetectionJobsInput : [no documentation found] + /// + /// - Returns: `ListEventsDetectionJobsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidFilterException` : The filter specified for the operation is invalid. Specify a different filter. + /// - `InvalidRequestException` : The request is invalid. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func listEventsDetectionJobs(input: ListEventsDetectionJobsInput) async throws -> ListEventsDetectionJobsOutput + /// Performs the `ListFlywheelIterationHistory` operation on the `Comprehend_20171127` service. + /// + /// Information about the history of a flywheel iteration. For more information about flywheels, see [ Flywheel overview](https://docs.aws.amazon.com/comprehend/latest/dg/flywheels-about.html) in the Amazon Comprehend Developer Guide. + /// + /// - Parameter ListFlywheelIterationHistoryInput : [no documentation found] + /// + /// - Returns: `ListFlywheelIterationHistoryOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidFilterException` : The filter specified for the operation is invalid. Specify a different filter. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func listFlywheelIterationHistory(input: ListFlywheelIterationHistoryInput) async throws -> ListFlywheelIterationHistoryOutput + /// Performs the `ListFlywheels` operation on the `Comprehend_20171127` service. + /// + /// Gets a list of the flywheels that you have created. + /// + /// - Parameter ListFlywheelsInput : [no documentation found] + /// + /// - Returns: `ListFlywheelsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidFilterException` : The filter specified for the operation is invalid. Specify a different filter. + /// - `InvalidRequestException` : The request is invalid. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func listFlywheels(input: ListFlywheelsInput) async throws -> ListFlywheelsOutput + /// Performs the `ListKeyPhrasesDetectionJobs` operation on the `Comprehend_20171127` service. + /// + /// Get a list of key phrase detection jobs that you have submitted. + /// + /// - Parameter ListKeyPhrasesDetectionJobsInput : [no documentation found] + /// + /// - Returns: `ListKeyPhrasesDetectionJobsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidFilterException` : The filter specified for the operation is invalid. Specify a different filter. + /// - `InvalidRequestException` : The request is invalid. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func listKeyPhrasesDetectionJobs(input: ListKeyPhrasesDetectionJobsInput) async throws -> ListKeyPhrasesDetectionJobsOutput + /// Performs the `ListPiiEntitiesDetectionJobs` operation on the `Comprehend_20171127` service. + /// + /// Gets a list of the PII entity detection jobs that you have submitted. + /// + /// - Parameter ListPiiEntitiesDetectionJobsInput : [no documentation found] + /// + /// - Returns: `ListPiiEntitiesDetectionJobsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidFilterException` : The filter specified for the operation is invalid. Specify a different filter. + /// - `InvalidRequestException` : The request is invalid. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func listPiiEntitiesDetectionJobs(input: ListPiiEntitiesDetectionJobsInput) async throws -> ListPiiEntitiesDetectionJobsOutput + /// Performs the `ListSentimentDetectionJobs` operation on the `Comprehend_20171127` service. + /// + /// Gets a list of sentiment detection jobs that you have submitted. + /// + /// - Parameter ListSentimentDetectionJobsInput : [no documentation found] + /// + /// - Returns: `ListSentimentDetectionJobsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidFilterException` : The filter specified for the operation is invalid. Specify a different filter. + /// - `InvalidRequestException` : The request is invalid. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func listSentimentDetectionJobs(input: ListSentimentDetectionJobsInput) async throws -> ListSentimentDetectionJobsOutput + /// Performs the `ListTagsForResource` operation on the `Comprehend_20171127` service. + /// + /// Lists all tags associated with a given Amazon Comprehend resource. + /// + /// - Parameter ListTagsForResourceInput : [no documentation found] + /// + /// - Returns: `ListTagsForResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput + /// Performs the `ListTargetedSentimentDetectionJobs` operation on the `Comprehend_20171127` service. + /// + /// Gets a list of targeted sentiment detection jobs that you have submitted. + /// + /// - Parameter ListTargetedSentimentDetectionJobsInput : [no documentation found] + /// + /// - Returns: `ListTargetedSentimentDetectionJobsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidFilterException` : The filter specified for the operation is invalid. Specify a different filter. + /// - `InvalidRequestException` : The request is invalid. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func listTargetedSentimentDetectionJobs(input: ListTargetedSentimentDetectionJobsInput) async throws -> ListTargetedSentimentDetectionJobsOutput + /// Performs the `ListTopicsDetectionJobs` operation on the `Comprehend_20171127` service. + /// + /// Gets a list of the topic detection jobs that you have submitted. + /// + /// - Parameter ListTopicsDetectionJobsInput : [no documentation found] + /// + /// - Returns: `ListTopicsDetectionJobsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidFilterException` : The filter specified for the operation is invalid. Specify a different filter. + /// - `InvalidRequestException` : The request is invalid. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func listTopicsDetectionJobs(input: ListTopicsDetectionJobsInput) async throws -> ListTopicsDetectionJobsOutput + /// Performs the `PutResourcePolicy` operation on the `Comprehend_20171127` service. + /// + /// Attaches a resource-based policy to a custom model. You can use this policy to authorize an entity in another Amazon Web Services account to import the custom model, which replicates it in Amazon Comprehend in their account. + /// + /// - Parameter PutResourcePolicyInput : [no documentation found] + /// + /// - Returns: `PutResourcePolicyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + func putResourcePolicy(input: PutResourcePolicyInput) async throws -> PutResourcePolicyOutput + /// Performs the `StartDocumentClassificationJob` operation on the `Comprehend_20171127` service. + /// + /// Starts an asynchronous document classification job using a custom classification model. Use the DescribeDocumentClassificationJob operation to track the progress of the job. + /// + /// - Parameter StartDocumentClassificationJobInput : [no documentation found] + /// + /// - Returns: `StartDocumentClassificationJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `KmsKeyValidationException` : The KMS customer managed key (CMK) entered cannot be validated. Verify the key and re-enter it. + /// - `ResourceInUseException` : The specified resource name is already in use. Use a different name and try your request again. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `ResourceUnavailableException` : The specified resource is not available. Check the resource and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + /// - `TooManyTagsException` : The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request. + func startDocumentClassificationJob(input: StartDocumentClassificationJobInput) async throws -> StartDocumentClassificationJobOutput + /// Performs the `StartDominantLanguageDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Starts an asynchronous dominant language detection job for a collection of documents. Use the operation to track the status of a job. + /// + /// - Parameter StartDominantLanguageDetectionJobInput : [no documentation found] + /// + /// - Returns: `StartDominantLanguageDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `KmsKeyValidationException` : The KMS customer managed key (CMK) entered cannot be validated. Verify the key and re-enter it. + /// - `ResourceInUseException` : The specified resource name is already in use. Use a different name and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + /// - `TooManyTagsException` : The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request. + func startDominantLanguageDetectionJob(input: StartDominantLanguageDetectionJobInput) async throws -> StartDominantLanguageDetectionJobOutput + /// Performs the `StartEntitiesDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Starts an asynchronous entity detection job for a collection of documents. Use the operation to track the status of a job. This API can be used for either standard entity detection or custom entity recognition. In order to be used for custom entity recognition, the optional EntityRecognizerArn must be used in order to provide access to the recognizer being used to detect the custom entity. + /// + /// - Parameter StartEntitiesDetectionJobInput : [no documentation found] + /// + /// - Returns: `StartEntitiesDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `KmsKeyValidationException` : The KMS customer managed key (CMK) entered cannot be validated. Verify the key and re-enter it. + /// - `ResourceInUseException` : The specified resource name is already in use. Use a different name and try your request again. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `ResourceUnavailableException` : The specified resource is not available. Check the resource and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + /// - `TooManyTagsException` : The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request. + func startEntitiesDetectionJob(input: StartEntitiesDetectionJobInput) async throws -> StartEntitiesDetectionJobOutput + /// Performs the `StartEventsDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Starts an asynchronous event detection job for a collection of documents. + /// + /// - Parameter StartEventsDetectionJobInput : [no documentation found] + /// + /// - Returns: `StartEventsDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `KmsKeyValidationException` : The KMS customer managed key (CMK) entered cannot be validated. Verify the key and re-enter it. + /// - `ResourceInUseException` : The specified resource name is already in use. Use a different name and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + /// - `TooManyTagsException` : The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request. + func startEventsDetectionJob(input: StartEventsDetectionJobInput) async throws -> StartEventsDetectionJobOutput + /// Performs the `StartFlywheelIteration` operation on the `Comprehend_20171127` service. + /// + /// Start the flywheel iteration.This operation uses any new datasets to train a new model version. For more information about flywheels, see [ Flywheel overview](https://docs.aws.amazon.com/comprehend/latest/dg/flywheels-about.html) in the Amazon Comprehend Developer Guide. + /// + /// - Parameter StartFlywheelIterationInput : [no documentation found] + /// + /// - Returns: `StartFlywheelIterationOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceInUseException` : The specified resource name is already in use. Use a different name and try your request again. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func startFlywheelIteration(input: StartFlywheelIterationInput) async throws -> StartFlywheelIterationOutput + /// Performs the `StartKeyPhrasesDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Starts an asynchronous key phrase detection job for a collection of documents. Use the operation to track the status of a job. + /// + /// - Parameter StartKeyPhrasesDetectionJobInput : [no documentation found] + /// + /// - Returns: `StartKeyPhrasesDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `KmsKeyValidationException` : The KMS customer managed key (CMK) entered cannot be validated. Verify the key and re-enter it. + /// - `ResourceInUseException` : The specified resource name is already in use. Use a different name and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + /// - `TooManyTagsException` : The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request. + func startKeyPhrasesDetectionJob(input: StartKeyPhrasesDetectionJobInput) async throws -> StartKeyPhrasesDetectionJobOutput + /// Performs the `StartPiiEntitiesDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Starts an asynchronous PII entity detection job for a collection of documents. + /// + /// - Parameter StartPiiEntitiesDetectionJobInput : [no documentation found] + /// + /// - Returns: `StartPiiEntitiesDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `KmsKeyValidationException` : The KMS customer managed key (CMK) entered cannot be validated. Verify the key and re-enter it. + /// - `ResourceInUseException` : The specified resource name is already in use. Use a different name and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + /// - `TooManyTagsException` : The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request. + func startPiiEntitiesDetectionJob(input: StartPiiEntitiesDetectionJobInput) async throws -> StartPiiEntitiesDetectionJobOutput + /// Performs the `StartSentimentDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Starts an asynchronous sentiment detection job for a collection of documents. Use the operation to track the status of a job. + /// + /// - Parameter StartSentimentDetectionJobInput : [no documentation found] + /// + /// - Returns: `StartSentimentDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `KmsKeyValidationException` : The KMS customer managed key (CMK) entered cannot be validated. Verify the key and re-enter it. + /// - `ResourceInUseException` : The specified resource name is already in use. Use a different name and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + /// - `TooManyTagsException` : The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request. + func startSentimentDetectionJob(input: StartSentimentDetectionJobInput) async throws -> StartSentimentDetectionJobOutput + /// Performs the `StartTargetedSentimentDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Starts an asynchronous targeted sentiment detection job for a collection of documents. Use the DescribeTargetedSentimentDetectionJob operation to track the status of a job. + /// + /// - Parameter StartTargetedSentimentDetectionJobInput : [no documentation found] + /// + /// - Returns: `StartTargetedSentimentDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `KmsKeyValidationException` : The KMS customer managed key (CMK) entered cannot be validated. Verify the key and re-enter it. + /// - `ResourceInUseException` : The specified resource name is already in use. Use a different name and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + /// - `TooManyTagsException` : The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request. + func startTargetedSentimentDetectionJob(input: StartTargetedSentimentDetectionJobInput) async throws -> StartTargetedSentimentDetectionJobOutput + /// Performs the `StartTopicsDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Starts an asynchronous topic detection job. Use the DescribeTopicDetectionJob operation to track the status of a job. + /// + /// - Parameter StartTopicsDetectionJobInput : [no documentation found] + /// + /// - Returns: `StartTopicsDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `KmsKeyValidationException` : The KMS customer managed key (CMK) entered cannot be validated. Verify the key and re-enter it. + /// - `ResourceInUseException` : The specified resource name is already in use. Use a different name and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + /// - `TooManyTagsException` : The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request. + func startTopicsDetectionJob(input: StartTopicsDetectionJobInput) async throws -> StartTopicsDetectionJobOutput + /// Performs the `StopDominantLanguageDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Stops a dominant language detection job in progress. If the job state is IN_PROGRESS the job is marked for termination and put into the STOP_REQUESTED state. If the job completes before it can be stopped, it is put into the COMPLETED state; otherwise the job is stopped and put into the STOPPED state. If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob operation, the operation returns a 400 Internal Request Exception. When a job is stopped, any documents already processed are written to the output location. + /// + /// - Parameter StopDominantLanguageDetectionJobInput : [no documentation found] + /// + /// - Returns: `StopDominantLanguageDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `JobNotFoundException` : The specified job was not found. Check the job ID and try again. + func stopDominantLanguageDetectionJob(input: StopDominantLanguageDetectionJobInput) async throws -> StopDominantLanguageDetectionJobOutput + /// Performs the `StopEntitiesDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Stops an entities detection job in progress. If the job state is IN_PROGRESS the job is marked for termination and put into the STOP_REQUESTED state. If the job completes before it can be stopped, it is put into the COMPLETED state; otherwise the job is stopped and put into the STOPPED state. If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob operation, the operation returns a 400 Internal Request Exception. When a job is stopped, any documents already processed are written to the output location. + /// + /// - Parameter StopEntitiesDetectionJobInput : [no documentation found] + /// + /// - Returns: `StopEntitiesDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `JobNotFoundException` : The specified job was not found. Check the job ID and try again. + func stopEntitiesDetectionJob(input: StopEntitiesDetectionJobInput) async throws -> StopEntitiesDetectionJobOutput + /// Performs the `StopEventsDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Stops an events detection job in progress. + /// + /// - Parameter StopEventsDetectionJobInput : [no documentation found] + /// + /// - Returns: `StopEventsDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `JobNotFoundException` : The specified job was not found. Check the job ID and try again. + func stopEventsDetectionJob(input: StopEventsDetectionJobInput) async throws -> StopEventsDetectionJobOutput + /// Performs the `StopKeyPhrasesDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Stops a key phrases detection job in progress. If the job state is IN_PROGRESS the job is marked for termination and put into the STOP_REQUESTED state. If the job completes before it can be stopped, it is put into the COMPLETED state; otherwise the job is stopped and put into the STOPPED state. If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob operation, the operation returns a 400 Internal Request Exception. When a job is stopped, any documents already processed are written to the output location. + /// + /// - Parameter StopKeyPhrasesDetectionJobInput : [no documentation found] + /// + /// - Returns: `StopKeyPhrasesDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `JobNotFoundException` : The specified job was not found. Check the job ID and try again. + func stopKeyPhrasesDetectionJob(input: StopKeyPhrasesDetectionJobInput) async throws -> StopKeyPhrasesDetectionJobOutput + /// Performs the `StopPiiEntitiesDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Stops a PII entities detection job in progress. + /// + /// - Parameter StopPiiEntitiesDetectionJobInput : [no documentation found] + /// + /// - Returns: `StopPiiEntitiesDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `JobNotFoundException` : The specified job was not found. Check the job ID and try again. + func stopPiiEntitiesDetectionJob(input: StopPiiEntitiesDetectionJobInput) async throws -> StopPiiEntitiesDetectionJobOutput + /// Performs the `StopSentimentDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Stops a sentiment detection job in progress. If the job state is IN_PROGRESS, the job is marked for termination and put into the STOP_REQUESTED state. If the job completes before it can be stopped, it is put into the COMPLETED state; otherwise the job is be stopped and put into the STOPPED state. If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob operation, the operation returns a 400 Internal Request Exception. When a job is stopped, any documents already processed are written to the output location. + /// + /// - Parameter StopSentimentDetectionJobInput : [no documentation found] + /// + /// - Returns: `StopSentimentDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `JobNotFoundException` : The specified job was not found. Check the job ID and try again. + func stopSentimentDetectionJob(input: StopSentimentDetectionJobInput) async throws -> StopSentimentDetectionJobOutput + /// Performs the `StopTargetedSentimentDetectionJob` operation on the `Comprehend_20171127` service. + /// + /// Stops a targeted sentiment detection job in progress. If the job state is IN_PROGRESS, the job is marked for termination and put into the STOP_REQUESTED state. If the job completes before it can be stopped, it is put into the COMPLETED state; otherwise the job is be stopped and put into the STOPPED state. If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob operation, the operation returns a 400 Internal Request Exception. When a job is stopped, any documents already processed are written to the output location. + /// + /// - Parameter StopTargetedSentimentDetectionJobInput : [no documentation found] + /// + /// - Returns: `StopTargetedSentimentDetectionJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `JobNotFoundException` : The specified job was not found. Check the job ID and try again. + func stopTargetedSentimentDetectionJob(input: StopTargetedSentimentDetectionJobInput) async throws -> StopTargetedSentimentDetectionJobOutput + /// Performs the `StopTrainingDocumentClassifier` operation on the `Comprehend_20171127` service. + /// + /// Stops a document classifier training job while in progress. If the training job state is TRAINING, the job is marked for termination and put into the STOP_REQUESTED state. If the training job completes before it can be stopped, it is put into the TRAINED; otherwise the training job is stopped and put into the STOPPED state and the service sends back an HTTP 200 response with an empty HTTP body. + /// + /// - Parameter StopTrainingDocumentClassifierInput : [no documentation found] + /// + /// - Returns: `StopTrainingDocumentClassifierOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func stopTrainingDocumentClassifier(input: StopTrainingDocumentClassifierInput) async throws -> StopTrainingDocumentClassifierOutput + /// Performs the `StopTrainingEntityRecognizer` operation on the `Comprehend_20171127` service. + /// + /// Stops an entity recognizer training job while in progress. If the training job state is TRAINING, the job is marked for termination and put into the STOP_REQUESTED state. If the training job completes before it can be stopped, it is put into the TRAINED; otherwise the training job is stopped and putted into the STOPPED state and the service sends back an HTTP 200 response with an empty HTTP body. + /// + /// - Parameter StopTrainingEntityRecognizerInput : [no documentation found] + /// + /// - Returns: `StopTrainingEntityRecognizerOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func stopTrainingEntityRecognizer(input: StopTrainingEntityRecognizerInput) async throws -> StopTrainingEntityRecognizerOutput + /// Performs the `TagResource` operation on the `Comprehend_20171127` service. + /// + /// Associates a specific tag with an Amazon Comprehend resource. A tag is a key-value pair that adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department. + /// + /// - Parameter TagResourceInput : [no documentation found] + /// + /// - Returns: `TagResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ConcurrentModificationException` : Concurrent modification of the tags associated with an Amazon Comprehend resource is not supported. + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `TooManyTagsException` : The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request. + func tagResource(input: TagResourceInput) async throws -> TagResourceOutput + /// Performs the `UntagResource` operation on the `Comprehend_20171127` service. + /// + /// Removes a specific tag associated with an Amazon Comprehend resource. + /// + /// - Parameter UntagResourceInput : [no documentation found] + /// + /// - Returns: `UntagResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ConcurrentModificationException` : Concurrent modification of the tags associated with an Amazon Comprehend resource is not supported. + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `TooManyTagKeysException` : The request contains more tag keys than can be associated with a resource (50 tag keys per resource). + func untagResource(input: UntagResourceInput) async throws -> UntagResourceOutput + /// Performs the `UpdateEndpoint` operation on the `Comprehend_20171127` service. + /// + /// Updates information about the specified endpoint. For information about endpoints, see [Managing endpoints](https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html). + /// + /// - Parameter UpdateEndpointInput : [no documentation found] + /// + /// - Returns: `UpdateEndpointOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `ResourceInUseException` : The specified resource name is already in use. Use a different name and try your request again. + /// - `ResourceLimitExceededException` : The maximum number of resources per account has been exceeded. Review the resources, and then try your request again. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `ResourceUnavailableException` : The specified resource is not available. Check the resource and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func updateEndpoint(input: UpdateEndpointInput) async throws -> UpdateEndpointOutput + /// Performs the `UpdateFlywheel` operation on the `Comprehend_20171127` service. + /// + /// Update the configuration information for an existing flywheel. + /// + /// - Parameter UpdateFlywheelInput : [no documentation found] + /// + /// - Returns: `UpdateFlywheelOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request is invalid. + /// - `KmsKeyValidationException` : The KMS customer managed key (CMK) entered cannot be validated. Verify the key and re-enter it. + /// - `ResourceNotFoundException` : The specified resource ARN was not found. Check the ARN and try your request again. + /// - `TooManyRequestsException` : The number of requests exceeds the limit. Resubmit your request later. + func updateFlywheel(input: UpdateFlywheelInput) async throws -> UpdateFlywheelOutput +} +extension ComprehendClient: ComprehendClientProtocol { } diff --git a/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/PollyClientProtocol.swift b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/PollyClientProtocol.swift new file mode 100644 index 0000000000..d8bd5ffca2 --- /dev/null +++ b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/PollyClientProtocol.swift @@ -0,0 +1,162 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +import AWSPolly + +// swiftlint:disable file_length +public protocol PollyClientProtocol { + /// Performs the `DeleteLexicon` operation on the `Parrot_v1` service. + /// + /// Deletes the specified pronunciation lexicon stored in an Amazon Web Services Region. A lexicon which has been deleted is not available for speech synthesis, nor is it possible to retrieve it using either the GetLexicon or ListLexicon APIs. For more information, see [Managing Lexicons](https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html). + /// + /// - Parameter DeleteLexiconInput : [no documentation found] + /// + /// - Returns: `DeleteLexiconOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `LexiconNotFoundException` : Amazon Polly can't find the specified lexicon. This could be caused by a lexicon that is missing, its name is misspelled or specifying a lexicon that is in a different region. Verify that the lexicon exists, is in the region (see [ListLexicons]) and that you spelled its name is spelled correctly. Then try again. + /// - `ServiceFailureException` : An unknown condition has caused a service failure. + func deleteLexicon(input: DeleteLexiconInput) async throws -> DeleteLexiconOutput + /// Performs the `DescribeVoices` operation on the `Parrot_v1` service. + /// + /// Returns the list of voices that are available for use when requesting speech synthesis. Each voice speaks a specified language, is either male or female, and is identified by an ID, which is the ASCII version of the voice name. When synthesizing speech ( SynthesizeSpeech ), you provide the voice ID for the voice you want from the list of voices returned by DescribeVoices. For example, you want your news reader application to read news in a specific language, but giving a user the option to choose the voice. Using the DescribeVoices operation you can provide the user with a list of available voices to select from. You can optionally specify a language code to filter the available voices. For example, if you specify en-US, the operation returns a list of all available US English voices. This operation requires permissions to perform the polly:DescribeVoices action. + /// + /// - Parameter DescribeVoicesInput : [no documentation found] + /// + /// - Returns: `DescribeVoicesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidNextTokenException` : The NextToken is invalid. Verify that it's spelled correctly, and then try again. + /// - `ServiceFailureException` : An unknown condition has caused a service failure. + func describeVoices(input: DescribeVoicesInput) async throws -> DescribeVoicesOutput + /// Performs the `GetLexicon` operation on the `Parrot_v1` service. + /// + /// Returns the content of the specified pronunciation lexicon stored in an Amazon Web Services Region. For more information, see [Managing Lexicons](https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html). + /// + /// - Parameter GetLexiconInput : [no documentation found] + /// + /// - Returns: `GetLexiconOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `LexiconNotFoundException` : Amazon Polly can't find the specified lexicon. This could be caused by a lexicon that is missing, its name is misspelled or specifying a lexicon that is in a different region. Verify that the lexicon exists, is in the region (see [ListLexicons]) and that you spelled its name is spelled correctly. Then try again. + /// - `ServiceFailureException` : An unknown condition has caused a service failure. + func getLexicon(input: GetLexiconInput) async throws -> GetLexiconOutput + /// Performs the `GetSpeechSynthesisTask` operation on the `Parrot_v1` service. + /// + /// Retrieves a specific SpeechSynthesisTask object based on its TaskID. This object contains information about the given speech synthesis task, including the status of the task, and a link to the S3 bucket containing the output of the task. + /// + /// - Parameter GetSpeechSynthesisTaskInput : [no documentation found] + /// + /// - Returns: `GetSpeechSynthesisTaskOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidTaskIdException` : The provided Task ID is not valid. Please provide a valid Task ID and try again. + /// - `ServiceFailureException` : An unknown condition has caused a service failure. + /// - `SynthesisTaskNotFoundException` : The Speech Synthesis task with requested Task ID cannot be found. + func getSpeechSynthesisTask(input: GetSpeechSynthesisTaskInput) async throws -> GetSpeechSynthesisTaskOutput + /// Performs the `ListLexicons` operation on the `Parrot_v1` service. + /// + /// Returns a list of pronunciation lexicons stored in an Amazon Web Services Region. For more information, see [Managing Lexicons](https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html). + /// + /// - Parameter ListLexiconsInput : [no documentation found] + /// + /// - Returns: `ListLexiconsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidNextTokenException` : The NextToken is invalid. Verify that it's spelled correctly, and then try again. + /// - `ServiceFailureException` : An unknown condition has caused a service failure. + func listLexicons(input: ListLexiconsInput) async throws -> ListLexiconsOutput + /// Performs the `ListSpeechSynthesisTasks` operation on the `Parrot_v1` service. + /// + /// Returns a list of SpeechSynthesisTask objects ordered by their creation date. This operation can filter the tasks by their status, for example, allowing users to list only tasks that are completed. + /// + /// - Parameter ListSpeechSynthesisTasksInput : [no documentation found] + /// + /// - Returns: `ListSpeechSynthesisTasksOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidNextTokenException` : The NextToken is invalid. Verify that it's spelled correctly, and then try again. + /// - `ServiceFailureException` : An unknown condition has caused a service failure. + func listSpeechSynthesisTasks(input: ListSpeechSynthesisTasksInput) async throws -> ListSpeechSynthesisTasksOutput + /// Performs the `PutLexicon` operation on the `Parrot_v1` service. + /// + /// Stores a pronunciation lexicon in an Amazon Web Services Region. If a lexicon with the same name already exists in the region, it is overwritten by the new lexicon. Lexicon operations have eventual consistency, therefore, it might take some time before the lexicon is available to the SynthesizeSpeech operation. For more information, see [Managing Lexicons](https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html). + /// + /// - Parameter PutLexiconInput : [no documentation found] + /// + /// - Returns: `PutLexiconOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidLexiconException` : Amazon Polly can't find the specified lexicon. Verify that the lexicon's name is spelled correctly, and then try again. + /// - `LexiconSizeExceededException` : The maximum size of the specified lexicon would be exceeded by this operation. + /// - `MaxLexemeLengthExceededException` : The maximum size of the lexeme would be exceeded by this operation. + /// - `MaxLexiconsNumberExceededException` : The maximum number of lexicons would be exceeded by this operation. + /// - `ServiceFailureException` : An unknown condition has caused a service failure. + /// - `UnsupportedPlsAlphabetException` : The alphabet specified by the lexicon is not a supported alphabet. Valid values are x-sampa and ipa. + /// - `UnsupportedPlsLanguageException` : The language specified in the lexicon is unsupported. For a list of supported languages, see [Lexicon Attributes](https://docs.aws.amazon.com/polly/latest/dg/API_LexiconAttributes.html). + func putLexicon(input: PutLexiconInput) async throws -> PutLexiconOutput + /// Performs the `StartSpeechSynthesisTask` operation on the `Parrot_v1` service. + /// + /// Allows the creation of an asynchronous synthesis task, by starting a new SpeechSynthesisTask. This operation requires all the standard information needed for speech synthesis, plus the name of an Amazon S3 bucket for the service to store the output of the synthesis task and two optional parameters (OutputS3KeyPrefix and SnsTopicArn). Once the synthesis task is created, this operation will return a SpeechSynthesisTask object, which will include an identifier of this task as well as the current status. The SpeechSynthesisTask object is available for 72 hours after starting the asynchronous synthesis task. + /// + /// - Parameter StartSpeechSynthesisTaskInput : [no documentation found] + /// + /// - Returns: `StartSpeechSynthesisTaskOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `EngineNotSupportedException` : This engine is not compatible with the voice that you have designated. Choose a new voice that is compatible with the engine or change the engine and restart the operation. + /// - `InvalidS3BucketException` : The provided Amazon S3 bucket name is invalid. Please check your input with S3 bucket naming requirements and try again. + /// - `InvalidS3KeyException` : The provided Amazon S3 key prefix is invalid. Please provide a valid S3 object key name. + /// - `InvalidSampleRateException` : The specified sample rate is not valid. + /// - `InvalidSnsTopicArnException` : The provided SNS topic ARN is invalid. Please provide a valid SNS topic ARN and try again. + /// - `InvalidSsmlException` : The SSML you provided is invalid. Verify the SSML syntax, spelling of tags and values, and then try again. + /// - `LanguageNotSupportedException` : The language specified is not currently supported by Amazon Polly in this capacity. + /// - `LexiconNotFoundException` : Amazon Polly can't find the specified lexicon. This could be caused by a lexicon that is missing, its name is misspelled or specifying a lexicon that is in a different region. Verify that the lexicon exists, is in the region (see [ListLexicons]) and that you spelled its name is spelled correctly. Then try again. + /// - `MarksNotSupportedForFormatException` : Speech marks are not supported for the OutputFormat selected. Speech marks are only available for content in json format. + /// - `ServiceFailureException` : An unknown condition has caused a service failure. + /// - `SsmlMarksNotSupportedForTextTypeException` : SSML speech marks are not supported for plain text-type input. + /// - `TextLengthExceededException` : The value of the "Text" parameter is longer than the accepted limits. For the SynthesizeSpeech API, the limit for input text is a maximum of 6000 characters total, of which no more than 3000 can be billed characters. For the StartSpeechSynthesisTask API, the maximum is 200,000 characters, of which no more than 100,000 can be billed characters. SSML tags are not counted as billed characters. + func startSpeechSynthesisTask(input: StartSpeechSynthesisTaskInput) async throws -> StartSpeechSynthesisTaskOutput + /// Performs the `SynthesizeSpeech` operation on the `Parrot_v1` service. + /// + /// Synthesizes UTF-8 input, plain text or SSML, to a stream of bytes. SSML input must be valid, well-formed SSML. Some alphabets might not be available with all the voices (for example, Cyrillic might not be read at all by English voices) unless phoneme mapping is used. For more information, see [How it Works](https://docs.aws.amazon.com/polly/latest/dg/how-text-to-speech-works.html). + /// + /// - Parameter SynthesizeSpeechInput : [no documentation found] + /// + /// - Returns: `SynthesizeSpeechOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `EngineNotSupportedException` : This engine is not compatible with the voice that you have designated. Choose a new voice that is compatible with the engine or change the engine and restart the operation. + /// - `InvalidSampleRateException` : The specified sample rate is not valid. + /// - `InvalidSsmlException` : The SSML you provided is invalid. Verify the SSML syntax, spelling of tags and values, and then try again. + /// - `LanguageNotSupportedException` : The language specified is not currently supported by Amazon Polly in this capacity. + /// - `LexiconNotFoundException` : Amazon Polly can't find the specified lexicon. This could be caused by a lexicon that is missing, its name is misspelled or specifying a lexicon that is in a different region. Verify that the lexicon exists, is in the region (see [ListLexicons]) and that you spelled its name is spelled correctly. Then try again. + /// - `MarksNotSupportedForFormatException` : Speech marks are not supported for the OutputFormat selected. Speech marks are only available for content in json format. + /// - `ServiceFailureException` : An unknown condition has caused a service failure. + /// - `SsmlMarksNotSupportedForTextTypeException` : SSML speech marks are not supported for plain text-type input. + /// - `TextLengthExceededException` : The value of the "Text" parameter is longer than the accepted limits. For the SynthesizeSpeech API, the limit for input text is a maximum of 6000 characters total, of which no more than 3000 can be billed characters. For the StartSpeechSynthesisTask API, the maximum is 200,000 characters, of which no more than 100,000 can be billed characters. SSML tags are not counted as billed characters. + func synthesizeSpeech(input: SynthesizeSpeechInput) async throws -> SynthesizeSpeechOutput +} +extension PollyClient: PollyClientProtocol { } diff --git a/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/RekognitionClientProtocol.swift b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/RekognitionClientProtocol.swift new file mode 100644 index 0000000000..3a7e3fd323 --- /dev/null +++ b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/RekognitionClientProtocol.swift @@ -0,0 +1,1612 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +import AWSRekognition + +// swiftlint:disable file_length +public protocol RekognitionClientProtocol { + /// Performs the `AssociateFaces` operation on the `RekognitionService` service. + /// + /// Associates one or more faces with an existing UserID. Takes an array of FaceIds. Each FaceId that are present in the FaceIds list is associated with the provided UserID. The maximum number of total FaceIds per UserID is 100. The UserMatchThreshold parameter specifies the minimum user match confidence required for the face to be associated with a UserID that has at least one FaceID already associated. This ensures that the FaceIds are associated with the right UserID. The value ranges from 0-100 and default value is 75. If successful, an array of AssociatedFace objects containing the associated FaceIds is returned. If a given face is already associated with the given UserID, it will be ignored and will not be returned in the response. If a given face is already associated to a different UserID, isn't found in the collection, doesn’t meet the UserMatchThreshold, or there are already 100 faces associated with the UserID, it will be returned as part of an array of UnsuccessfulFaceAssociations. The UserStatus reflects the status of an operation which updates a UserID representation with a list of given faces. The UserStatus can be: + /// + /// * ACTIVE - All associations or disassociations of FaceID(s) for a UserID are complete. + /// + /// * CREATED - A UserID has been created, but has no FaceID(s) associated with it. + /// + /// * UPDATING - A UserID is being updated and there are current associations or disassociations of FaceID(s) taking place. + /// + /// - Parameter AssociateFacesInput : [no documentation found] + /// + /// - Returns: `AssociateFacesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `ConflictException` : A User with the same Id already exists within the collection, or the update or deletion of the User caused an inconsistent state. ** + /// - `IdempotentParameterMismatchException` : A ClientRequestToken input parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ServiceQuotaExceededException` : The size of the collection exceeds the allowed limit. For more information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func associateFaces(input: AssociateFacesInput) async throws -> AssociateFacesOutput + /// Performs the `CompareFaces` operation on the `RekognitionService` service. + /// + /// Compares a face in the source input image with each of the 100 largest faces detected in the target input image. If the source image contains multiple faces, the service detects the largest face and compares it with each face detected in the target image. CompareFaces uses machine learning algorithms, which are probabilistic. A false negative is an incorrect prediction that a face in the target image has a low similarity confidence score when compared to the face in the source image. To reduce the probability of false negatives, we recommend that you compare the target image against multiple source images. If you plan to use CompareFaces to make a decision that impacts an individual's rights, privacy, or access to services, we recommend that you pass the result to a human for review and further validation before taking action. You pass the input and target images either as base64-encoded image bytes or as references to images in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes isn't supported. The image must be formatted as a PNG or JPEG file. In response, the operation returns an array of face matches ordered by similarity score in descending order. For each face match, the response provides a bounding box of the face, facial landmarks, pose details (pitch, roll, and yaw), quality (brightness and sharpness), and confidence value (indicating the level of confidence that the bounding box contains a face). The response also provides a similarity score, which indicates how closely the faces match. By default, only faces with a similarity score of greater than or equal to 80% are returned in the response. You can change this value by specifying the SimilarityThreshold parameter. CompareFaces also returns an array of faces that don't match the source image. For each face, it returns a bounding box, confidence value, landmarks, pose details, and quality. The response also returns information about the face in the source image, including the bounding box of the face and confidence value. The QualityFilter input parameter allows you to filter out detected faces that don’t meet a required quality bar. The quality bar is based on a variety of common use cases. Use QualityFilter to set the quality bar by specifying LOW, MEDIUM, or HIGH. If you do not want to filter detected faces, specify NONE. The default value is NONE. If the image doesn't contain Exif metadata, CompareFaces returns orientation information for the source and target images. Use these values to display the images with the correct image orientation. If no faces are detected in the source or target images, CompareFaces returns an InvalidParameterException error. This is a stateless API operation. That is, data returned by this operation doesn't persist. For an example, see Comparing Faces in Images in the Amazon Rekognition Developer Guide. This operation requires permissions to perform the rekognition:CompareFaces action. + /// + /// - Parameter CompareFacesInput : [no documentation found] + /// + /// - Returns: `CompareFacesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `ImageTooLargeException` : The input image size exceeds the allowed limit. If you are calling DetectProtectiveEquipment, the image size or resolution exceeds the allowed limit. For more information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidImageFormatException` : The provided image format is not supported. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Rekognition is unable to access the S3 object specified in the request. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func compareFaces(input: CompareFacesInput) async throws -> CompareFacesOutput + /// Performs the `CopyProjectVersion` operation on the `RekognitionService` service. + /// + /// This operation applies only to Amazon Rekognition Custom Labels. Copies a version of an Amazon Rekognition Custom Labels model from a source project to a destination project. The source and destination projects can be in different AWS accounts but must be in the same AWS Region. You can't copy a model to another AWS service. To copy a model version to a different AWS account, you need to create a resource-based policy known as a project policy. You attach the project policy to the source project by calling [PutProjectPolicy]. The project policy gives permission to copy the model version from a trusting AWS account to a trusted account. For more information creating and attaching a project policy, see Attaching a project policy (SDK) in the Amazon Rekognition Custom Labels Developer Guide. If you are copying a model version to a project in the same AWS account, you don't need to create a project policy. Copying project versions is supported only for Custom Labels models. To copy a model, the destination project, source project, and source model version must already exist. Copying a model version takes a while to complete. To get the current status, call [DescribeProjectVersions] and check the value of Status in the [ProjectVersionDescription] object. The copy operation has finished when the value of Status is COPYING_COMPLETED. This operation requires permissions to perform the rekognition:CopyProjectVersion action. + /// + /// - Parameter CopyProjectVersionInput : [no documentation found] + /// + /// - Returns: `CopyProjectVersionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `LimitExceededException` : An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent calls to start operations (ex: StartLabelDetection) will raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceInUseException` : The specified resource is already being used. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ServiceQuotaExceededException` : The size of the collection exceeds the allowed limit. For more information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func copyProjectVersion(input: CopyProjectVersionInput) async throws -> CopyProjectVersionOutput + /// Performs the `CreateCollection` operation on the `RekognitionService` service. + /// + /// Creates a collection in an AWS Region. You can add faces to the collection using the [IndexFaces] operation. For example, you might create collections, one for each of your application users. A user can then index faces using the IndexFaces operation and persist results in a specific collection. Then, a user can search the collection for faces in the user-specific container. When you create a collection, it is associated with the latest version of the face model version. Collection names are case-sensitive. This operation requires permissions to perform the rekognition:CreateCollection action. If you want to tag your collection, you also require permission to perform the rekognition:TagResource operation. + /// + /// - Parameter CreateCollectionInput : [no documentation found] + /// + /// - Returns: `CreateCollectionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceAlreadyExistsException` : A resource with the specified ID already exists. + /// - `ServiceQuotaExceededException` : The size of the collection exceeds the allowed limit. For more information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func createCollection(input: CreateCollectionInput) async throws -> CreateCollectionOutput + /// Performs the `CreateDataset` operation on the `RekognitionService` service. + /// + /// This operation applies only to Amazon Rekognition Custom Labels. Creates a new Amazon Rekognition Custom Labels dataset. You can create a dataset by using an Amazon Sagemaker format manifest file or by copying an existing Amazon Rekognition Custom Labels dataset. To create a training dataset for a project, specify TRAIN for the value of DatasetType. To create the test dataset for a project, specify TEST for the value of DatasetType. The response from CreateDataset is the Amazon Resource Name (ARN) for the dataset. Creating a dataset takes a while to complete. Use [DescribeDataset] to check the current status. The dataset created successfully if the value of Status is CREATE_COMPLETE. To check if any non-terminal errors occurred, call [ListDatasetEntries] and check for the presence of errors lists in the JSON Lines. Dataset creation fails if a terminal error occurs (Status = CREATE_FAILED). Currently, you can't access the terminal error information. For more information, see Creating dataset in the Amazon Rekognition Custom Labels Developer Guide. This operation requires permissions to perform the rekognition:CreateDataset action. If you want to copy an existing dataset, you also require permission to perform the rekognition:ListDatasetEntries action. + /// + /// - Parameter CreateDatasetInput : [no documentation found] + /// + /// - Returns: `CreateDatasetOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Rekognition is unable to access the S3 object specified in the request. + /// - `LimitExceededException` : An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent calls to start operations (ex: StartLabelDetection) will raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceAlreadyExistsException` : A resource with the specified ID already exists. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func createDataset(input: CreateDatasetInput) async throws -> CreateDatasetOutput + /// Performs the `CreateFaceLivenessSession` operation on the `RekognitionService` service. + /// + /// This API operation initiates a Face Liveness session. It returns a SessionId, which you can use to start streaming Face Liveness video and get the results for a Face Liveness session. You can use the OutputConfig option in the Settings parameter to provide an Amazon S3 bucket location. The Amazon S3 bucket stores reference images and audit images. If no Amazon S3 bucket is defined, raw bytes are sent instead. You can use AuditImagesLimit to limit the number of audit images returned when GetFaceLivenessSessionResults is called. This number is between 0 and 4. By default, it is set to 0. The limit is best effort and based on the duration of the selfie-video. + /// + /// - Parameter CreateFaceLivenessSessionInput : [no documentation found] + /// + /// - Returns: `CreateFaceLivenessSessionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func createFaceLivenessSession(input: CreateFaceLivenessSessionInput) async throws -> CreateFaceLivenessSessionOutput + /// Performs the `CreateProject` operation on the `RekognitionService` service. + /// + /// Creates a new Amazon Rekognition project. A project is a group of resources (datasets, model versions) that you use to create and manage a Amazon Rekognition Custom Labels Model or custom adapter. You can specify a feature to create the project with, if no feature is specified then Custom Labels is used by default. For adapters, you can also choose whether or not to have the project auto update by using the AutoUpdate argument. This operation requires permissions to perform the rekognition:CreateProject action. + /// + /// - Parameter CreateProjectInput : [no documentation found] + /// + /// - Returns: `CreateProjectOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `LimitExceededException` : An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent calls to start operations (ex: StartLabelDetection) will raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceInUseException` : The specified resource is already being used. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func createProject(input: CreateProjectInput) async throws -> CreateProjectOutput + /// Performs the `CreateProjectVersion` operation on the `RekognitionService` service. + /// + /// Creates a new version of Amazon Rekognition project (like a Custom Labels model or a custom adapter) and begins training. Models and adapters are managed as part of a Rekognition project. The response from CreateProjectVersion is an Amazon Resource Name (ARN) for the project version. The FeatureConfig operation argument allows you to configure specific model or adapter settings. You can provide a description to the project version by using the VersionDescription argment. Training can take a while to complete. You can get the current status by calling [DescribeProjectVersions]. Training completed successfully if the value of the Status field is TRAINING_COMPLETED. Once training has successfully completed, call [DescribeProjectVersions] to get the training results and evaluate the model. This operation requires permissions to perform the rekognition:CreateProjectVersion action. The following applies only to projects with Amazon Rekognition Custom Labels as the chosen feature: You can train a model in a project that doesn't have associated datasets by specifying manifest files in the TrainingData and TestingData fields. If you open the console after training a model with manifest files, Amazon Rekognition Custom Labels creates the datasets for you using the most recent manifest files. You can no longer train a model version for the project by specifying manifest files. Instead of training with a project without associated datasets, we recommend that you use the manifest files to create training and test datasets for the project. + /// + /// - Parameter CreateProjectVersionInput : [no documentation found] + /// + /// - Returns: `CreateProjectVersionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `LimitExceededException` : An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent calls to start operations (ex: StartLabelDetection) will raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceInUseException` : The specified resource is already being used. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ServiceQuotaExceededException` : The size of the collection exceeds the allowed limit. For more information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func createProjectVersion(input: CreateProjectVersionInput) async throws -> CreateProjectVersionOutput + /// Performs the `CreateStreamProcessor` operation on the `RekognitionService` service. + /// + /// Creates an Amazon Rekognition stream processor that you can use to detect and recognize faces or to detect labels in a streaming video. Amazon Rekognition Video is a consumer of live video from Amazon Kinesis Video Streams. There are two different settings for stream processors in Amazon Rekognition: detecting faces and detecting labels. + /// + /// * If you are creating a stream processor for detecting faces, you provide as input a Kinesis video stream (Input) and a Kinesis data stream (Output) stream for receiving the output. You must use the FaceSearch option in Settings, specifying the collection that contains the faces you want to recognize. After you have finished analyzing a streaming video, use [StopStreamProcessor] to stop processing. + /// + /// * If you are creating a stream processor to detect labels, you provide as input a Kinesis video stream (Input), Amazon S3 bucket information (Output), and an Amazon SNS topic ARN (NotificationChannel). You can also provide a KMS key ID to encrypt the data sent to your Amazon S3 bucket. You specify what you want to detect by using the ConnectedHome option in settings, and selecting one of the following: PERSON, PET, PACKAGE, ALL You can also specify where in the frame you want Amazon Rekognition to monitor with RegionsOfInterest. When you run the [StartStreamProcessor] operation on a label detection stream processor, you input start and stop information to determine the length of the processing time. + /// + /// + /// Use Name to assign an identifier for the stream processor. You use Name to manage the stream processor. For example, you can start processing the source video by calling [StartStreamProcessor] with the Name field. This operation requires permissions to perform the rekognition:CreateStreamProcessor action. If you want to tag your stream processor, you also require permission to perform the rekognition:TagResource operation. + /// + /// - Parameter CreateStreamProcessorInput : [no documentation found] + /// + /// - Returns: `CreateStreamProcessorOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `LimitExceededException` : An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent calls to start operations (ex: StartLabelDetection) will raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceInUseException` : The specified resource is already being used. + /// - `ServiceQuotaExceededException` : The size of the collection exceeds the allowed limit. For more information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func createStreamProcessor(input: CreateStreamProcessorInput) async throws -> CreateStreamProcessorOutput + /// Performs the `CreateUser` operation on the `RekognitionService` service. + /// + /// Creates a new User within a collection specified by CollectionId. Takes UserId as a parameter, which is a user provided ID which should be unique within the collection. The provided UserId will alias the system generated UUID to make the UserId more user friendly. Uses a ClientToken, an idempotency token that ensures a call to CreateUser completes only once. If the value is not supplied, the AWS SDK generates an idempotency token for the requests. This prevents retries after a network error results from making multiple CreateUser calls. + /// + /// - Parameter CreateUserInput : [no documentation found] + /// + /// - Returns: `CreateUserOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `ConflictException` : A User with the same Id already exists within the collection, or the update or deletion of the User caused an inconsistent state. ** + /// - `IdempotentParameterMismatchException` : A ClientRequestToken input parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ServiceQuotaExceededException` : The size of the collection exceeds the allowed limit. For more information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func createUser(input: CreateUserInput) async throws -> CreateUserOutput + /// Performs the `DeleteCollection` operation on the `RekognitionService` service. + /// + /// Deletes the specified collection. Note that this operation removes all faces in the collection. For an example, see [Deleting a collection](https://docs.aws.amazon.com/rekognition/latest/dg/delete-collection-procedure.html). This operation requires permissions to perform the rekognition:DeleteCollection action. + /// + /// - Parameter DeleteCollectionInput : [no documentation found] + /// + /// - Returns: `DeleteCollectionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func deleteCollection(input: DeleteCollectionInput) async throws -> DeleteCollectionOutput + /// Performs the `DeleteDataset` operation on the `RekognitionService` service. + /// + /// This operation applies only to Amazon Rekognition Custom Labels. Deletes an existing Amazon Rekognition Custom Labels dataset. Deleting a dataset might take while. Use [DescribeDataset] to check the current status. The dataset is still deleting if the value of Status is DELETE_IN_PROGRESS. If you try to access the dataset after it is deleted, you get a ResourceNotFoundException exception. You can't delete a dataset while it is creating (Status = CREATE_IN_PROGRESS) or if the dataset is updating (Status = UPDATE_IN_PROGRESS). This operation requires permissions to perform the rekognition:DeleteDataset action. + /// + /// - Parameter DeleteDatasetInput : [no documentation found] + /// + /// - Returns: `DeleteDatasetOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `LimitExceededException` : An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent calls to start operations (ex: StartLabelDetection) will raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceInUseException` : The specified resource is already being used. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func deleteDataset(input: DeleteDatasetInput) async throws -> DeleteDatasetOutput + /// Performs the `DeleteFaces` operation on the `RekognitionService` service. + /// + /// Deletes faces from a collection. You specify a collection ID and an array of face IDs to remove from the collection. This operation requires permissions to perform the rekognition:DeleteFaces action. + /// + /// - Parameter DeleteFacesInput : [no documentation found] + /// + /// - Returns: `DeleteFacesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func deleteFaces(input: DeleteFacesInput) async throws -> DeleteFacesOutput + /// Performs the `DeleteProject` operation on the `RekognitionService` service. + /// + /// Deletes a Amazon Rekognition project. To delete a project you must first delete all models or adapters associated with the project. To delete a model or adapter, see [DeleteProjectVersion]. DeleteProject is an asynchronous operation. To check if the project is deleted, call [DescribeProjects]. The project is deleted when the project no longer appears in the response. Be aware that deleting a given project will also delete any ProjectPolicies associated with that project. This operation requires permissions to perform the rekognition:DeleteProject action. + /// + /// - Parameter DeleteProjectInput : [no documentation found] + /// + /// - Returns: `DeleteProjectOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceInUseException` : The specified resource is already being used. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func deleteProject(input: DeleteProjectInput) async throws -> DeleteProjectOutput + /// Performs the `DeleteProjectPolicy` operation on the `RekognitionService` service. + /// + /// This operation applies only to Amazon Rekognition Custom Labels. Deletes an existing project policy. To get a list of project policies attached to a project, call [ListProjectPolicies]. To attach a project policy to a project, call [PutProjectPolicy]. This operation requires permissions to perform the rekognition:DeleteProjectPolicy action. + /// + /// - Parameter DeleteProjectPolicyInput : [no documentation found] + /// + /// - Returns: `DeleteProjectPolicyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidPolicyRevisionIdException` : The supplied revision id for the project policy is invalid. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func deleteProjectPolicy(input: DeleteProjectPolicyInput) async throws -> DeleteProjectPolicyOutput + /// Performs the `DeleteProjectVersion` operation on the `RekognitionService` service. + /// + /// Deletes a Rekognition project model or project version, like a Amazon Rekognition Custom Labels model or a custom adapter. You can't delete a project version if it is running or if it is training. To check the status of a project version, use the Status field returned from [DescribeProjectVersions]. To stop a project version call [StopProjectVersion]. If the project version is training, wait until it finishes. This operation requires permissions to perform the rekognition:DeleteProjectVersion action. + /// + /// - Parameter DeleteProjectVersionInput : [no documentation found] + /// + /// - Returns: `DeleteProjectVersionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceInUseException` : The specified resource is already being used. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func deleteProjectVersion(input: DeleteProjectVersionInput) async throws -> DeleteProjectVersionOutput + /// Performs the `DeleteStreamProcessor` operation on the `RekognitionService` service. + /// + /// Deletes the stream processor identified by Name. You assign the value for Name when you create the stream processor with [CreateStreamProcessor]. You might not be able to use the same name for a stream processor for a few seconds after calling DeleteStreamProcessor. + /// + /// - Parameter DeleteStreamProcessorInput : [no documentation found] + /// + /// - Returns: `DeleteStreamProcessorOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceInUseException` : The specified resource is already being used. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func deleteStreamProcessor(input: DeleteStreamProcessorInput) async throws -> DeleteStreamProcessorOutput + /// Performs the `DeleteUser` operation on the `RekognitionService` service. + /// + /// Deletes the specified UserID within the collection. Faces that are associated with the UserID are disassociated from the UserID before deleting the specified UserID. If the specified Collection or UserID is already deleted or not found, a ResourceNotFoundException will be thrown. If the action is successful with a 200 response, an empty HTTP body is returned. + /// + /// - Parameter DeleteUserInput : [no documentation found] + /// + /// - Returns: `DeleteUserOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `ConflictException` : A User with the same Id already exists within the collection, or the update or deletion of the User caused an inconsistent state. ** + /// - `IdempotentParameterMismatchException` : A ClientRequestToken input parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func deleteUser(input: DeleteUserInput) async throws -> DeleteUserOutput + /// Performs the `DescribeCollection` operation on the `RekognitionService` service. + /// + /// Describes the specified collection. You can use DescribeCollection to get information, such as the number of faces indexed into a collection and the version of the model used by the collection for face detection. For more information, see Describing a Collection in the Amazon Rekognition Developer Guide. + /// + /// - Parameter DescribeCollectionInput : [no documentation found] + /// + /// - Returns: `DescribeCollectionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func describeCollection(input: DescribeCollectionInput) async throws -> DescribeCollectionOutput + /// Performs the `DescribeDataset` operation on the `RekognitionService` service. + /// + /// This operation applies only to Amazon Rekognition Custom Labels. Describes an Amazon Rekognition Custom Labels dataset. You can get information such as the current status of a dataset and statistics about the images and labels in a dataset. This operation requires permissions to perform the rekognition:DescribeDataset action. + /// + /// - Parameter DescribeDatasetInput : [no documentation found] + /// + /// - Returns: `DescribeDatasetOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func describeDataset(input: DescribeDatasetInput) async throws -> DescribeDatasetOutput + /// Performs the `DescribeProjects` operation on the `RekognitionService` service. + /// + /// Gets information about your Rekognition projects. This operation requires permissions to perform the rekognition:DescribeProjects action. + /// + /// - Parameter DescribeProjectsInput : [no documentation found] + /// + /// - Returns: `DescribeProjectsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidPaginationTokenException` : Pagination token in the request is not valid. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func describeProjects(input: DescribeProjectsInput) async throws -> DescribeProjectsOutput + /// Performs the `DescribeProjectVersions` operation on the `RekognitionService` service. + /// + /// Lists and describes the versions of an Amazon Rekognition project. You can specify up to 10 model or adapter versions in ProjectVersionArns. If you don't specify a value, descriptions for all model/adapter versions in the project are returned. This operation requires permissions to perform the rekognition:DescribeProjectVersions action. + /// + /// - Parameter DescribeProjectVersionsInput : [no documentation found] + /// + /// - Returns: `DescribeProjectVersionsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidPaginationTokenException` : Pagination token in the request is not valid. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func describeProjectVersions(input: DescribeProjectVersionsInput) async throws -> DescribeProjectVersionsOutput + /// Performs the `DescribeStreamProcessor` operation on the `RekognitionService` service. + /// + /// Provides information about a stream processor created by [CreateStreamProcessor]. You can get information about the input and output streams, the input parameters for the face recognition being performed, and the current status of the stream processor. + /// + /// - Parameter DescribeStreamProcessorInput : [no documentation found] + /// + /// - Returns: `DescribeStreamProcessorOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func describeStreamProcessor(input: DescribeStreamProcessorInput) async throws -> DescribeStreamProcessorOutput + /// Performs the `DetectCustomLabels` operation on the `RekognitionService` service. + /// + /// This operation applies only to Amazon Rekognition Custom Labels. Detects custom labels in a supplied image by using an Amazon Rekognition Custom Labels model. You specify which version of a model version to use by using the ProjectVersionArn input parameter. You pass the input image as base64-encoded image bytes or as a reference to an image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes is not supported. The image must be either a PNG or JPEG formatted file. For each object that the model version detects on an image, the API returns a (CustomLabel) object in an array (CustomLabels). Each CustomLabel object provides the label name (Name), the level of confidence that the image contains the object (Confidence), and object location information, if it exists, for the label on the image (Geometry). Note that for the DetectCustomLabelsLabels operation, Polygons are not returned in the Geometry section of the response. To filter labels that are returned, specify a value for MinConfidence. DetectCustomLabelsLabels only returns labels with a confidence that's higher than the specified value. The value of MinConfidence maps to the assumed threshold values created during training. For more information, see Assumed threshold in the Amazon Rekognition Custom Labels Developer Guide. Amazon Rekognition Custom Labels metrics expresses an assumed threshold as a floating point value between 0-1. The range of MinConfidence normalizes the threshold value to a percentage value (0-100). Confidence responses from DetectCustomLabels are also returned as a percentage. You can use MinConfidence to change the precision and recall or your model. For more information, see Analyzing an image in the Amazon Rekognition Custom Labels Developer Guide. If you don't specify a value for MinConfidence, DetectCustomLabels returns labels based on the assumed threshold of each label. This is a stateless API operation. That is, the operation does not persist any data. This operation requires permissions to perform the rekognition:DetectCustomLabels action. For more information, see Analyzing an image in the Amazon Rekognition Custom Labels Developer Guide. + /// + /// - Parameter DetectCustomLabelsInput : [no documentation found] + /// + /// - Returns: `DetectCustomLabelsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `ImageTooLargeException` : The input image size exceeds the allowed limit. If you are calling DetectProtectiveEquipment, the image size or resolution exceeds the allowed limit. For more information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidImageFormatException` : The provided image format is not supported. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Rekognition is unable to access the S3 object specified in the request. + /// - `LimitExceededException` : An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent calls to start operations (ex: StartLabelDetection) will raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ResourceNotReadyException` : The requested resource isn't ready. For example, + /// + /// + /// this exception occurs when you call DetectCustomLabels with a model version that isn't deployed. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func detectCustomLabels(input: DetectCustomLabelsInput) async throws -> DetectCustomLabelsOutput + /// Performs the `DetectFaces` operation on the `RekognitionService` service. + /// + /// Detects faces within an image that is provided as input. DetectFaces detects the 100 largest faces in the image. For each face detected, the operation returns face details. These details include a bounding box of the face, a confidence value (that the bounding box contains a face), and a fixed set of attributes such as facial landmarks (for example, coordinates of eye and mouth), pose, presence of facial occlusion, and so on. The face-detection algorithm is most effective on frontal faces. For non-frontal or obscured faces, the algorithm might not detect the faces or might detect faces with lower confidence. You pass the input image either as base64-encoded image bytes or as a reference to an image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes is not supported. The image must be either a PNG or JPEG formatted file. This is a stateless API operation. That is, the operation does not persist any data. This operation requires permissions to perform the rekognition:DetectFaces action. + /// + /// - Parameter DetectFacesInput : [no documentation found] + /// + /// - Returns: `DetectFacesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `ImageTooLargeException` : The input image size exceeds the allowed limit. If you are calling DetectProtectiveEquipment, the image size or resolution exceeds the allowed limit. For more information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidImageFormatException` : The provided image format is not supported. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Rekognition is unable to access the S3 object specified in the request. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func detectFaces(input: DetectFacesInput) async throws -> DetectFacesOutput + /// Performs the `DetectLabels` operation on the `RekognitionService` service. + /// + /// Detects instances of real-world entities within an image (JPEG or PNG) provided as input. This includes objects like flower, tree, and table; events like wedding, graduation, and birthday party; and concepts like landscape, evening, and nature. For an example, see Analyzing images stored in an Amazon S3 bucket in the Amazon Rekognition Developer Guide. You pass the input image as base64-encoded image bytes or as a reference to an image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes is not supported. The image must be either a PNG or JPEG formatted file. Optional Parameters You can specify one or both of the GENERAL_LABELS and IMAGE_PROPERTIES feature types when calling the DetectLabels API. Including GENERAL_LABELS will ensure the response includes the labels detected in the input image, while including IMAGE_PROPERTIES will ensure the response includes information about the image quality and color. When using GENERAL_LABELS and/or IMAGE_PROPERTIES you can provide filtering criteria to the Settings parameter. You can filter with sets of individual labels or with label categories. You can specify inclusive filters, exclusive filters, or a combination of inclusive and exclusive filters. For more information on filtering see [Detecting Labels in an Image](https://docs.aws.amazon.com/rekognition/latest/dg/labels-detect-labels-image.html). When getting labels, you can specify MinConfidence to control the confidence threshold for the labels returned. The default is 55%. You can also add the MaxLabels parameter to limit the number of labels returned. The default and upper limit is 1000 labels. These arguments are only valid when supplying GENERAL_LABELS as a feature type. Response Elements For each object, scene, and concept the API returns one or more labels. The API returns the following types of information about labels: + /// + /// * Name - The name of the detected label. + /// + /// * Confidence - The level of confidence in the label assigned to a detected object. + /// + /// * Parents - The ancestor labels for a detected label. DetectLabels returns a hierarchical taxonomy of detected labels. For example, a detected car might be assigned the label car. The label car has two parent labels: Vehicle (its parent) and Transportation (its grandparent). The response includes the all ancestors for a label, where every ancestor is a unique label. In the previous example, Car, Vehicle, and Transportation are returned as unique labels in the response. + /// + /// * Aliases - Possible Aliases for the label. + /// + /// * Categories - The label categories that the detected label belongs to. + /// + /// * BoundingBox — Bounding boxes are described for all instances of detected common object labels, returned in an array of Instance objects. An Instance object contains a BoundingBox object, describing the location of the label on the input image. It also includes the confidence for the accuracy of the detected bounding box. + /// + /// + /// The API returns the following information regarding the image, as part of the ImageProperties structure: + /// + /// * Quality - Information about the Sharpness, Brightness, and Contrast of the input image, scored between 0 to 100. Image quality is returned for the entire image, as well as the background and the foreground. + /// + /// * Dominant Color - An array of the dominant colors in the image. + /// + /// * Foreground - Information about the sharpness, brightness, and dominant colors of the input image’s foreground. + /// + /// * Background - Information about the sharpness, brightness, and dominant colors of the input image’s background. + /// + /// + /// The list of returned labels will include at least one label for every detected object, along with information about that label. In the following example, suppose the input image has a lighthouse, the sea, and a rock. The response includes all three labels, one for each object, as well as the confidence in the label: {Name: lighthouse, Confidence: 98.4629} + /// {Name: rock,Confidence: 79.2097} + /// + /// {Name: sea,Confidence: 75.061} The list of labels can include multiple labels for the same object. For example, if the input image shows a flower (for example, a tulip), the operation might return the following three labels. {Name: flower,Confidence: 99.0562} + /// {Name: plant,Confidence: 99.0562} + /// + /// {Name: tulip,Confidence: 99.0562} In this example, the detection algorithm more precisely identifies the flower as a tulip. If the object detected is a person, the operation doesn't provide the same facial details that the [DetectFaces] operation provides. This is a stateless API operation that doesn't return any data. This operation requires permissions to perform the rekognition:DetectLabels action. + /// + /// - Parameter DetectLabelsInput : [no documentation found] + /// + /// - Returns: `DetectLabelsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `ImageTooLargeException` : The input image size exceeds the allowed limit. If you are calling DetectProtectiveEquipment, the image size or resolution exceeds the allowed limit. For more information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidImageFormatException` : The provided image format is not supported. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Rekognition is unable to access the S3 object specified in the request. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func detectLabels(input: DetectLabelsInput) async throws -> DetectLabelsOutput + /// Performs the `DetectModerationLabels` operation on the `RekognitionService` service. + /// + /// Detects unsafe content in a specified JPEG or PNG format image. Use DetectModerationLabels to moderate images depending on your requirements. For example, you might want to filter images that contain nudity, but not images containing suggestive content. To filter images, use the labels returned by DetectModerationLabels to determine which types of content are appropriate. For information about moderation labels, see Detecting Unsafe Content in the Amazon Rekognition Developer Guide. You pass the input image either as base64-encoded image bytes or as a reference to an image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes is not supported. The image must be either a PNG or JPEG formatted file. You can specify an adapter to use when retrieving label predictions by providing a ProjectVersionArn to the ProjectVersion argument. + /// + /// - Parameter DetectModerationLabelsInput : [no documentation found] + /// + /// - Returns: `DetectModerationLabelsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `HumanLoopQuotaExceededException` : The number of in-progress human reviews you have has exceeded the number allowed. + /// - `ImageTooLargeException` : The input image size exceeds the allowed limit. If you are calling DetectProtectiveEquipment, the image size or resolution exceeds the allowed limit. For more information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidImageFormatException` : The provided image format is not supported. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Rekognition is unable to access the S3 object specified in the request. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ResourceNotReadyException` : The requested resource isn't ready. For example, + /// + /// + /// this exception occurs when you call DetectCustomLabels with a model version that isn't deployed. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func detectModerationLabels(input: DetectModerationLabelsInput) async throws -> DetectModerationLabelsOutput + /// Performs the `DetectProtectiveEquipment` operation on the `RekognitionService` service. + /// + /// Detects Personal Protective Equipment (PPE) worn by people detected in an image. Amazon Rekognition can detect the following types of PPE. + /// + /// * Face cover + /// + /// * Hand cover + /// + /// * Head cover + /// + /// + /// You pass the input image as base64-encoded image bytes or as a reference to an image in an Amazon S3 bucket. The image must be either a PNG or JPG formatted file. DetectProtectiveEquipment detects PPE worn by up to 15 persons detected in an image. For each person detected in the image the API returns an array of body parts (face, head, left-hand, right-hand). For each body part, an array of detected items of PPE is returned, including an indicator of whether or not the PPE covers the body part. The API returns the confidence it has in each detection (person, PPE, body part and body part coverage). It also returns a bounding box ([BoundingBox]) for each detected person and each detected item of PPE. You can optionally request a summary of detected PPE items with the SummarizationAttributes input parameter. The summary provides the following information. + /// + /// * The persons detected as wearing all of the types of PPE that you specify. + /// + /// * The persons detected as not wearing all of the types PPE that you specify. + /// + /// * The persons detected where PPE adornment could not be determined. + /// + /// + /// This is a stateless API operation. That is, the operation does not persist any data. This operation requires permissions to perform the rekognition:DetectProtectiveEquipment action. + /// + /// - Parameter DetectProtectiveEquipmentInput : [no documentation found] + /// + /// - Returns: `DetectProtectiveEquipmentOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `ImageTooLargeException` : The input image size exceeds the allowed limit. If you are calling DetectProtectiveEquipment, the image size or resolution exceeds the allowed limit. For more information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidImageFormatException` : The provided image format is not supported. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Rekognition is unable to access the S3 object specified in the request. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func detectProtectiveEquipment(input: DetectProtectiveEquipmentInput) async throws -> DetectProtectiveEquipmentOutput + /// Performs the `DetectText` operation on the `RekognitionService` service. + /// + /// Detects text in the input image and converts it into machine-readable text. Pass the input image as base64-encoded image bytes or as a reference to an image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, you must pass it as a reference to an image in an Amazon S3 bucket. For the AWS CLI, passing image bytes is not supported. The image must be either a .png or .jpeg formatted file. The DetectText operation returns text in an array of [TextDetection] elements, TextDetections. Each TextDetection element provides information about a single word or line of text that was detected in the image. A word is one or more script characters that are not separated by spaces. DetectText can detect up to 100 words in an image. A line is a string of equally spaced words. A line isn't necessarily a complete sentence. For example, a driver's license number is detected as a line. A line ends when there is no aligned text after it. Also, a line ends when there is a large gap between words, relative to the length of the words. This means, depending on the gap between words, Amazon Rekognition may detect multiple lines in text aligned in the same direction. Periods don't represent the end of a line. If a sentence spans multiple lines, the DetectText operation returns multiple lines. To determine whether a TextDetection element is a line of text or a word, use the TextDetection object Type field. To be detected, text must be within +/- 90 degrees orientation of the horizontal axis. For more information, see Detecting text in the Amazon Rekognition Developer Guide. + /// + /// - Parameter DetectTextInput : [no documentation found] + /// + /// - Returns: `DetectTextOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `ImageTooLargeException` : The input image size exceeds the allowed limit. If you are calling DetectProtectiveEquipment, the image size or resolution exceeds the allowed limit. For more information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidImageFormatException` : The provided image format is not supported. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Rekognition is unable to access the S3 object specified in the request. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func detectText(input: DetectTextInput) async throws -> DetectTextOutput + /// Performs the `DisassociateFaces` operation on the `RekognitionService` service. + /// + /// Removes the association between a Face supplied in an array of FaceIds and the User. If the User is not present already, then a ResourceNotFound exception is thrown. If successful, an array of faces that are disassociated from the User is returned. If a given face is already disassociated from the given UserID, it will be ignored and not be returned in the response. If a given face is already associated with a different User or not found in the collection it will be returned as part of UnsuccessfulDisassociations. You can remove 1 - 100 face IDs from a user at one time. + /// + /// - Parameter DisassociateFacesInput : [no documentation found] + /// + /// - Returns: `DisassociateFacesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `ConflictException` : A User with the same Id already exists within the collection, or the update or deletion of the User caused an inconsistent state. ** + /// - `IdempotentParameterMismatchException` : A ClientRequestToken input parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func disassociateFaces(input: DisassociateFacesInput) async throws -> DisassociateFacesOutput + /// Performs the `DistributeDatasetEntries` operation on the `RekognitionService` service. + /// + /// This operation applies only to Amazon Rekognition Custom Labels. Distributes the entries (images) in a training dataset across the training dataset and the test dataset for a project. DistributeDatasetEntries moves 20% of the training dataset images to the test dataset. An entry is a JSON Line that describes an image. You supply the Amazon Resource Names (ARN) of a project's training dataset and test dataset. The training dataset must contain the images that you want to split. The test dataset must be empty. The datasets must belong to the same project. To create training and test datasets for a project, call [CreateDataset]. Distributing a dataset takes a while to complete. To check the status call DescribeDataset. The operation is complete when the Status field for the training dataset and the test dataset is UPDATE_COMPLETE. If the dataset split fails, the value of Status is UPDATE_FAILED. This operation requires permissions to perform the rekognition:DistributeDatasetEntries action. + /// + /// - Parameter DistributeDatasetEntriesInput : [no documentation found] + /// + /// - Returns: `DistributeDatasetEntriesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ResourceNotReadyException` : The requested resource isn't ready. For example, + /// + /// + /// this exception occurs when you call DetectCustomLabels with a model version that isn't deployed. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func distributeDatasetEntries(input: DistributeDatasetEntriesInput) async throws -> DistributeDatasetEntriesOutput + /// Performs the `GetCelebrityInfo` operation on the `RekognitionService` service. + /// + /// Gets the name and additional information about a celebrity based on their Amazon Rekognition ID. The additional information is returned as an array of URLs. If there is no additional information about the celebrity, this list is empty. For more information, see Getting information about a celebrity in the Amazon Rekognition Developer Guide. This operation requires permissions to perform the rekognition:GetCelebrityInfo action. + /// + /// - Parameter GetCelebrityInfoInput : [no documentation found] + /// + /// - Returns: `GetCelebrityInfoOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func getCelebrityInfo(input: GetCelebrityInfoInput) async throws -> GetCelebrityInfoOutput + /// Performs the `GetCelebrityRecognition` operation on the `RekognitionService` service. + /// + /// Gets the celebrity recognition results for a Amazon Rekognition Video analysis started by [StartCelebrityRecognition]. Celebrity recognition in a video is an asynchronous operation. Analysis is started by a call to [StartCelebrityRecognition] which returns a job identifier (JobId). When the celebrity recognition operation finishes, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic registered in the initial call to StartCelebrityRecognition. To get the results of the celebrity recognition analysis, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetCelebrityDetection and pass the job identifier (JobId) from the initial call to StartCelebrityDetection. For more information, see Working With Stored Videos in the Amazon Rekognition Developer Guide. GetCelebrityRecognition returns detected celebrities and the time(s) they are detected in an array (Celebrities) of [CelebrityRecognition] objects. Each CelebrityRecognition contains information about the celebrity in a [CelebrityDetail] object and the time, Timestamp, the celebrity was detected. This [CelebrityDetail] object stores information about the detected celebrity's face attributes, a face bounding box, known gender, the celebrity's name, and a confidence estimate. GetCelebrityRecognition only returns the default facial attributes (BoundingBox, Confidence, Landmarks, Pose, and Quality). The BoundingBox field only applies to the detected face instance. The other facial attributes listed in the Face object of the following response syntax are not returned. For more information, see FaceDetail in the Amazon Rekognition Developer Guide. By default, the Celebrities array is sorted by time (milliseconds from the start of the video). You can also sort the array by celebrity by specifying the value ID in the SortBy input parameter. The CelebrityDetail object includes the celebrity identifer and additional information urls. If you don't store the additional information urls, you can get them later by calling [GetCelebrityInfo] with the celebrity identifer. No information is returned for faces not recognized as celebrities. Use MaxResults parameter to limit the number of labels returned. If there are more results than specified in MaxResults, the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetCelebrityDetection and populate the NextToken request parameter with the token value returned from the previous call to GetCelebrityRecognition. + /// + /// - Parameter GetCelebrityRecognitionInput : [no documentation found] + /// + /// - Returns: `GetCelebrityRecognitionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidPaginationTokenException` : Pagination token in the request is not valid. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func getCelebrityRecognition(input: GetCelebrityRecognitionInput) async throws -> GetCelebrityRecognitionOutput + /// Performs the `GetContentModeration` operation on the `RekognitionService` service. + /// + /// Gets the inappropriate, unwanted, or offensive content analysis results for a Amazon Rekognition Video analysis started by [StartContentModeration]. For a list of moderation labels in Amazon Rekognition, see [Using the image and video moderation APIs](https://docs.aws.amazon.com/rekognition/latest/dg/moderation.html#moderation-api). Amazon Rekognition Video inappropriate or offensive content detection in a stored video is an asynchronous operation. You start analysis by calling [StartContentModeration] which returns a job identifier (JobId). When analysis finishes, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic registered in the initial call to StartContentModeration. To get the results of the content analysis, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetContentModeration and pass the job identifier (JobId) from the initial call to StartContentModeration. For more information, see Working with Stored Videos in the Amazon Rekognition Devlopers Guide. GetContentModeration returns detected inappropriate, unwanted, or offensive content moderation labels, and the time they are detected, in an array, ModerationLabels, of [ContentModerationDetection] objects. By default, the moderated labels are returned sorted by time, in milliseconds from the start of the video. You can also sort them by moderated label by specifying NAME for the SortBy input parameter. Since video analysis can return a large number of results, use the MaxResults parameter to limit the number of labels returned in a single call to GetContentModeration. If there are more results than specified in MaxResults, the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetContentModeration and populate the NextToken request parameter with the value of NextToken returned from the previous call to GetContentModeration. For more information, see moderating content in the Amazon Rekognition Developer Guide. + /// + /// - Parameter GetContentModerationInput : [no documentation found] + /// + /// - Returns: `GetContentModerationOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidPaginationTokenException` : Pagination token in the request is not valid. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func getContentModeration(input: GetContentModerationInput) async throws -> GetContentModerationOutput + /// Performs the `GetFaceDetection` operation on the `RekognitionService` service. + /// + /// Gets face detection results for a Amazon Rekognition Video analysis started by [StartFaceDetection]. Face detection with Amazon Rekognition Video is an asynchronous operation. You start face detection by calling [StartFaceDetection] which returns a job identifier (JobId). When the face detection operation finishes, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic registered in the initial call to StartFaceDetection. To get the results of the face detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call [GetFaceDetection] and pass the job identifier (JobId) from the initial call to StartFaceDetection. GetFaceDetection returns an array of detected faces (Faces) sorted by the time the faces were detected. Use MaxResults parameter to limit the number of labels returned. If there are more results than specified in MaxResults, the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetFaceDetection and populate the NextToken request parameter with the token value returned from the previous call to GetFaceDetection. Note that for the GetFaceDetection operation, the returned values for FaceOccluded and EyeDirection will always be "null". + /// + /// - Parameter GetFaceDetectionInput : [no documentation found] + /// + /// - Returns: `GetFaceDetectionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidPaginationTokenException` : Pagination token in the request is not valid. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func getFaceDetection(input: GetFaceDetectionInput) async throws -> GetFaceDetectionOutput + /// Performs the `GetFaceLivenessSessionResults` operation on the `RekognitionService` service. + /// + /// Retrieves the results of a specific Face Liveness session. It requires the sessionId as input, which was created using CreateFaceLivenessSession. Returns the corresponding Face Liveness confidence score, a reference image that includes a face bounding box, and audit images that also contain face bounding boxes. The Face Liveness confidence score ranges from 0 to 100. The number of audit images returned by GetFaceLivenessSessionResults is defined by the AuditImagesLimit paramater when calling CreateFaceLivenessSession. Reference images are always returned when possible. + /// + /// - Parameter GetFaceLivenessSessionResultsInput : [no documentation found] + /// + /// - Returns: `GetFaceLivenessSessionResultsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `SessionNotFoundException` : Occurs when a given sessionId is not found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func getFaceLivenessSessionResults(input: GetFaceLivenessSessionResultsInput) async throws -> GetFaceLivenessSessionResultsOutput + /// Performs the `GetFaceSearch` operation on the `RekognitionService` service. + /// + /// Gets the face search results for Amazon Rekognition Video face search started by [StartFaceSearch]. The search returns faces in a collection that match the faces of persons detected in a video. It also includes the time(s) that faces are matched in the video. Face search in a video is an asynchronous operation. You start face search by calling to [StartFaceSearch] which returns a job identifier (JobId). When the search operation finishes, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic registered in the initial call to StartFaceSearch. To get the search results, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetFaceSearch and pass the job identifier (JobId) from the initial call to StartFaceSearch. For more information, see Searching Faces in a Collection in the Amazon Rekognition Developer Guide. The search results are retured in an array, Persons, of [PersonMatch] objects. EachPersonMatch element contains details about the matching faces in the input collection, person information (facial attributes, bounding boxes, and person identifer) for the matched person, and the time the person was matched in the video. GetFaceSearch only returns the default facial attributes (BoundingBox, Confidence, Landmarks, Pose, and Quality). The other facial attributes listed in the Face object of the following response syntax are not returned. For more information, see FaceDetail in the Amazon Rekognition Developer Guide. By default, the Persons array is sorted by the time, in milliseconds from the start of the video, persons are matched. You can also sort by persons by specifying INDEX for the SORTBY input parameter. + /// + /// - Parameter GetFaceSearchInput : [no documentation found] + /// + /// - Returns: `GetFaceSearchOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidPaginationTokenException` : Pagination token in the request is not valid. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func getFaceSearch(input: GetFaceSearchInput) async throws -> GetFaceSearchOutput + /// Performs the `GetLabelDetection` operation on the `RekognitionService` service. + /// + /// Gets the label detection results of a Amazon Rekognition Video analysis started by [StartLabelDetection]. The label detection operation is started by a call to [StartLabelDetection] which returns a job identifier (JobId). When the label detection operation finishes, Amazon Rekognition publishes a completion status to the Amazon Simple Notification Service topic registered in the initial call to StartlabelDetection. To get the results of the label detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call [GetLabelDetection] and pass the job identifier (JobId) from the initial call to StartLabelDetection. GetLabelDetection returns an array of detected labels (Labels) sorted by the time the labels were detected. You can also sort by the label name by specifying NAME for the SortBy input parameter. If there is no NAME specified, the default sort is by timestamp. You can select how results are aggregated by using the AggregateBy input parameter. The default aggregation method is TIMESTAMPS. You can also aggregate by SEGMENTS, which aggregates all instances of labels detected in a given segment. The returned Labels array may include the following attributes: + /// + /// * Name - The name of the detected label. + /// + /// * Confidence - The level of confidence in the label assigned to a detected object. + /// + /// * Parents - The ancestor labels for a detected label. GetLabelDetection returns a hierarchical taxonomy of detected labels. For example, a detected car might be assigned the label car. The label car has two parent labels: Vehicle (its parent) and Transportation (its grandparent). The response includes the all ancestors for a label, where every ancestor is a unique label. In the previous example, Car, Vehicle, and Transportation are returned as unique labels in the response. + /// + /// * Aliases - Possible Aliases for the label. + /// + /// * Categories - The label categories that the detected label belongs to. + /// + /// * BoundingBox — Bounding boxes are described for all instances of detected common object labels, returned in an array of Instance objects. An Instance object contains a BoundingBox object, describing the location of the label on the input image. It also includes the confidence for the accuracy of the detected bounding box. + /// + /// * Timestamp - Time, in milliseconds from the start of the video, that the label was detected. For aggregation by SEGMENTS, the StartTimestampMillis, EndTimestampMillis, and DurationMillis structures are what define a segment. Although the “Timestamp” structure is still returned with each label, its value is set to be the same as StartTimestampMillis. + /// + /// + /// Timestamp and Bounding box information are returned for detected Instances, only if aggregation is done by TIMESTAMPS. If aggregating by SEGMENTS, information about detected instances isn’t returned. The version of the label model used for the detection is also returned. Note DominantColors isn't returned for Instances, although it is shown as part of the response in the sample seen below. Use MaxResults parameter to limit the number of labels returned. If there are more results than specified in MaxResults, the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetlabelDetection and populate the NextToken request parameter with the token value returned from the previous call to GetLabelDetection. + /// + /// - Parameter GetLabelDetectionInput : [no documentation found] + /// + /// - Returns: `GetLabelDetectionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidPaginationTokenException` : Pagination token in the request is not valid. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func getLabelDetection(input: GetLabelDetectionInput) async throws -> GetLabelDetectionOutput + /// Performs the `GetMediaAnalysisJob` operation on the `RekognitionService` service. + /// + /// Retrieves the results for a given media analysis job. Takes a JobId returned by StartMediaAnalysisJob. + /// + /// - Parameter GetMediaAnalysisJobInput : [no documentation found] + /// + /// - Returns: `GetMediaAnalysisJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func getMediaAnalysisJob(input: GetMediaAnalysisJobInput) async throws -> GetMediaAnalysisJobOutput + /// Performs the `GetPersonTracking` operation on the `RekognitionService` service. + /// + /// Gets the path tracking results of a Amazon Rekognition Video analysis started by [StartPersonTracking]. The person path tracking operation is started by a call to StartPersonTracking which returns a job identifier (JobId). When the operation finishes, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic registered in the initial call to StartPersonTracking. To get the results of the person path tracking operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call [GetPersonTracking] and pass the job identifier (JobId) from the initial call to StartPersonTracking. GetPersonTracking returns an array, Persons, of tracked persons and the time(s) their paths were tracked in the video. GetPersonTracking only returns the default facial attributes (BoundingBox, Confidence, Landmarks, Pose, and Quality). The other facial attributes listed in the Face object of the following response syntax are not returned. For more information, see FaceDetail in the Amazon Rekognition Developer Guide. By default, the array is sorted by the time(s) a person's path is tracked in the video. You can sort by tracked persons by specifying INDEX for the SortBy input parameter. Use the MaxResults parameter to limit the number of items returned. If there are more results than specified in MaxResults, the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetPersonTracking and populate the NextToken request parameter with the token value returned from the previous call to GetPersonTracking. + /// + /// - Parameter GetPersonTrackingInput : [no documentation found] + /// + /// - Returns: `GetPersonTrackingOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidPaginationTokenException` : Pagination token in the request is not valid. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func getPersonTracking(input: GetPersonTrackingInput) async throws -> GetPersonTrackingOutput + /// Performs the `GetSegmentDetection` operation on the `RekognitionService` service. + /// + /// Gets the segment detection results of a Amazon Rekognition Video analysis started by [StartSegmentDetection]. Segment detection with Amazon Rekognition Video is an asynchronous operation. You start segment detection by calling [StartSegmentDetection] which returns a job identifier (JobId). When the segment detection operation finishes, Amazon Rekognition publishes a completion status to the Amazon Simple Notification Service topic registered in the initial call to StartSegmentDetection. To get the results of the segment detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. if so, call GetSegmentDetection and pass the job identifier (JobId) from the initial call of StartSegmentDetection. GetSegmentDetection returns detected segments in an array (Segments) of [SegmentDetection] objects. Segments is sorted by the segment types specified in the SegmentTypes input parameter of StartSegmentDetection. Each element of the array includes the detected segment, the precentage confidence in the acuracy of the detected segment, the type of the segment, and the frame in which the segment was detected. Use SelectedSegmentTypes to find out the type of segment detection requested in the call to StartSegmentDetection. Use the MaxResults parameter to limit the number of segment detections returned. If there are more results than specified in MaxResults, the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetSegmentDetection and populate the NextToken request parameter with the token value returned from the previous call to GetSegmentDetection. For more information, see Detecting video segments in stored video in the Amazon Rekognition Developer Guide. + /// + /// - Parameter GetSegmentDetectionInput : [no documentation found] + /// + /// - Returns: `GetSegmentDetectionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidPaginationTokenException` : Pagination token in the request is not valid. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func getSegmentDetection(input: GetSegmentDetectionInput) async throws -> GetSegmentDetectionOutput + /// Performs the `GetTextDetection` operation on the `RekognitionService` service. + /// + /// Gets the text detection results of a Amazon Rekognition Video analysis started by [StartTextDetection]. Text detection with Amazon Rekognition Video is an asynchronous operation. You start text detection by calling [StartTextDetection] which returns a job identifier (JobId) When the text detection operation finishes, Amazon Rekognition publishes a completion status to the Amazon Simple Notification Service topic registered in the initial call to StartTextDetection. To get the results of the text detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. if so, call GetTextDetection and pass the job identifier (JobId) from the initial call of StartLabelDetection. GetTextDetection returns an array of detected text (TextDetections) sorted by the time the text was detected, up to 100 words per frame of video. Each element of the array includes the detected text, the precentage confidence in the acuracy of the detected text, the time the text was detected, bounding box information for where the text was located, and unique identifiers for words and their lines. Use MaxResults parameter to limit the number of text detections returned. If there are more results than specified in MaxResults, the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetTextDetection and populate the NextToken request parameter with the token value returned from the previous call to GetTextDetection. + /// + /// - Parameter GetTextDetectionInput : [no documentation found] + /// + /// - Returns: `GetTextDetectionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidPaginationTokenException` : Pagination token in the request is not valid. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func getTextDetection(input: GetTextDetectionInput) async throws -> GetTextDetectionOutput + /// Performs the `IndexFaces` operation on the `RekognitionService` service. + /// + /// Detects faces in the input image and adds them to the specified collection. Amazon Rekognition doesn't save the actual faces that are detected. Instead, the underlying detection algorithm first detects the faces in the input image. For each face, the algorithm extracts facial features into a feature vector, and stores it in the backend database. Amazon Rekognition uses feature vectors when it performs face match and search operations using the [SearchFaces] and [SearchFacesByImage] operations. For more information, see Adding faces to a collection in the Amazon Rekognition Developer Guide. To get the number of faces in a collection, call [DescribeCollection]. If you're using version 1.0 of the face detection model, IndexFaces indexes the 15 largest faces in the input image. Later versions of the face detection model index the 100 largest faces in the input image. If you're using version 4 or later of the face model, image orientation information is not returned in the OrientationCorrection field. To determine which version of the model you're using, call [DescribeCollection] and supply the collection ID. You can also get the model version from the value of FaceModelVersion in the response from IndexFaces For more information, see Model Versioning in the Amazon Rekognition Developer Guide. If you provide the optional ExternalImageId for the input image you provided, Amazon Rekognition associates this ID with all faces that it detects. When you call the [ListFaces] operation, the response returns the external ID. You can use this external image ID to create a client-side index to associate the faces with each image. You can then use the index to find all faces in an image. You can specify the maximum number of faces to index with the MaxFaces input parameter. This is useful when you want to index the largest faces in an image and don't want to index smaller faces, such as those belonging to people standing in the background. The QualityFilter input parameter allows you to filter out detected faces that don’t meet a required quality bar. The quality bar is based on a variety of common use cases. By default, IndexFaces chooses the quality bar that's used to filter faces. You can also explicitly choose the quality bar. Use QualityFilter, to set the quality bar by specifying LOW, MEDIUM, or HIGH. If you do not want to filter detected faces, specify NONE. To use quality filtering, you need a collection associated with version 3 of the face model or higher. To get the version of the face model associated with a collection, call [DescribeCollection]. Information about faces detected in an image, but not indexed, is returned in an array of [UnindexedFace] objects, UnindexedFaces. Faces aren't indexed for reasons such as: + /// + /// * The number of faces detected exceeds the value of the MaxFaces request parameter. + /// + /// * The face is too small compared to the image dimensions. + /// + /// * The face is too blurry. + /// + /// * The image is too dark. + /// + /// * The face has an extreme pose. + /// + /// * The face doesn’t have enough detail to be suitable for face search. + /// + /// + /// In response, the IndexFaces operation returns an array of metadata for all detected faces, FaceRecords. This includes: + /// + /// * The bounding box, BoundingBox, of the detected face. + /// + /// * A confidence value, Confidence, which indicates the confidence that the bounding box contains a face. + /// + /// * A face ID, FaceId, assigned by the service for each face that's detected and stored. + /// + /// * An image ID, ImageId, assigned by the service for the input image. + /// + /// + /// If you request ALL or specific facial attributes (e.g., FACE_OCCLUDED) by using the detectionAttributes parameter, Amazon Rekognition returns detailed facial attributes, such as facial landmarks (for example, location of eye and mouth), facial occlusion, and other facial attributes. If you provide the same image, specify the same collection, and use the same external ID in the IndexFaces operation, Amazon Rekognition doesn't save duplicate face metadata. The input image is passed either as base64-encoded image bytes, or as a reference to an image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes isn't supported. The image must be formatted as a PNG or JPEG file. This operation requires permissions to perform the rekognition:IndexFaces action. + /// + /// - Parameter IndexFacesInput : [no documentation found] + /// + /// - Returns: `IndexFacesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `ImageTooLargeException` : The input image size exceeds the allowed limit. If you are calling DetectProtectiveEquipment, the image size or resolution exceeds the allowed limit. For more information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidImageFormatException` : The provided image format is not supported. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Rekognition is unable to access the S3 object specified in the request. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ServiceQuotaExceededException` : The size of the collection exceeds the allowed limit. For more information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func indexFaces(input: IndexFacesInput) async throws -> IndexFacesOutput + /// Performs the `ListCollections` operation on the `RekognitionService` service. + /// + /// Returns list of collection IDs in your account. If the result is truncated, the response also provides a NextToken that you can use in the subsequent request to fetch the next set of collection IDs. For an example, see Listing collections in the Amazon Rekognition Developer Guide. This operation requires permissions to perform the rekognition:ListCollections action. + /// + /// - Parameter ListCollectionsInput : [no documentation found] + /// + /// - Returns: `ListCollectionsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidPaginationTokenException` : Pagination token in the request is not valid. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func listCollections(input: ListCollectionsInput) async throws -> ListCollectionsOutput + /// Performs the `ListDatasetEntries` operation on the `RekognitionService` service. + /// + /// This operation applies only to Amazon Rekognition Custom Labels. Lists the entries (images) within a dataset. An entry is a JSON Line that contains the information for a single image, including the image location, assigned labels, and object location bounding boxes. For more information, see [Creating a manifest file](https://docs.aws.amazon.com/rekognition/latest/customlabels-dg/md-manifest-files.html). JSON Lines in the response include information about non-terminal errors found in the dataset. Non terminal errors are reported in errors lists within each JSON Line. The same information is reported in the training and testing validation result manifests that Amazon Rekognition Custom Labels creates during model training. You can filter the response in variety of ways, such as choosing which labels to return and returning JSON Lines created after a specific date. This operation requires permissions to perform the rekognition:ListDatasetEntries action. + /// + /// - Parameter ListDatasetEntriesInput : [no documentation found] + /// + /// - Returns: `ListDatasetEntriesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidPaginationTokenException` : Pagination token in the request is not valid. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceInUseException` : The specified resource is already being used. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ResourceNotReadyException` : The requested resource isn't ready. For example, + /// + /// + /// this exception occurs when you call DetectCustomLabels with a model version that isn't deployed. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func listDatasetEntries(input: ListDatasetEntriesInput) async throws -> ListDatasetEntriesOutput + /// Performs the `ListDatasetLabels` operation on the `RekognitionService` service. + /// + /// This operation applies only to Amazon Rekognition Custom Labels. Lists the labels in a dataset. Amazon Rekognition Custom Labels uses labels to describe images. For more information, see [Labeling images](https://docs.aws.amazon.com/rekognition/latest/customlabels-dg/md-labeling-images.html). Lists the labels in a dataset. Amazon Rekognition Custom Labels uses labels to describe images. For more information, see Labeling images in the Amazon Rekognition Custom Labels Developer Guide. + /// + /// - Parameter ListDatasetLabelsInput : [no documentation found] + /// + /// - Returns: `ListDatasetLabelsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidPaginationTokenException` : Pagination token in the request is not valid. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceInUseException` : The specified resource is already being used. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ResourceNotReadyException` : The requested resource isn't ready. For example, + /// + /// + /// this exception occurs when you call DetectCustomLabels with a model version that isn't deployed. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func listDatasetLabels(input: ListDatasetLabelsInput) async throws -> ListDatasetLabelsOutput + /// Performs the `ListFaces` operation on the `RekognitionService` service. + /// + /// Returns metadata for faces in the specified collection. This metadata includes information such as the bounding box coordinates, the confidence (that the bounding box contains a face), and face ID. For an example, see Listing Faces in a Collection in the Amazon Rekognition Developer Guide. This operation requires permissions to perform the rekognition:ListFaces action. + /// + /// - Parameter ListFacesInput : [no documentation found] + /// + /// - Returns: `ListFacesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidPaginationTokenException` : Pagination token in the request is not valid. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func listFaces(input: ListFacesInput) async throws -> ListFacesOutput + /// Performs the `ListMediaAnalysisJobs` operation on the `RekognitionService` service. + /// + /// Returns a list of media analysis jobs. Results are sorted by CreationTimestamp in descending order. + /// + /// - Parameter ListMediaAnalysisJobsInput : [no documentation found] + /// + /// - Returns: `ListMediaAnalysisJobsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidPaginationTokenException` : Pagination token in the request is not valid. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func listMediaAnalysisJobs(input: ListMediaAnalysisJobsInput) async throws -> ListMediaAnalysisJobsOutput + /// Performs the `ListProjectPolicies` operation on the `RekognitionService` service. + /// + /// This operation applies only to Amazon Rekognition Custom Labels. Gets a list of the project policies attached to a project. To attach a project policy to a project, call [PutProjectPolicy]. To remove a project policy from a project, call [DeleteProjectPolicy]. This operation requires permissions to perform the rekognition:ListProjectPolicies action. + /// + /// - Parameter ListProjectPoliciesInput : [no documentation found] + /// + /// - Returns: `ListProjectPoliciesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidPaginationTokenException` : Pagination token in the request is not valid. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func listProjectPolicies(input: ListProjectPoliciesInput) async throws -> ListProjectPoliciesOutput + /// Performs the `ListStreamProcessors` operation on the `RekognitionService` service. + /// + /// Gets a list of stream processors that you have created with [CreateStreamProcessor]. + /// + /// - Parameter ListStreamProcessorsInput : [no documentation found] + /// + /// - Returns: `ListStreamProcessorsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidPaginationTokenException` : Pagination token in the request is not valid. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func listStreamProcessors(input: ListStreamProcessorsInput) async throws -> ListStreamProcessorsOutput + /// Performs the `ListTagsForResource` operation on the `RekognitionService` service. + /// + /// Returns a list of tags in an Amazon Rekognition collection, stream processor, or Custom Labels model. This operation requires permissions to perform the rekognition:ListTagsForResource action. + /// + /// - Parameter ListTagsForResourceInput : [no documentation found] + /// + /// - Returns: `ListTagsForResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput + /// Performs the `ListUsers` operation on the `RekognitionService` service. + /// + /// Returns metadata of the User such as UserID in the specified collection. Anonymous User (to reserve faces without any identity) is not returned as part of this request. The results are sorted by system generated primary key ID. If the response is truncated, NextToken is returned in the response that can be used in the subsequent request to retrieve the next set of identities. + /// + /// - Parameter ListUsersInput : [no documentation found] + /// + /// - Returns: `ListUsersOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidPaginationTokenException` : Pagination token in the request is not valid. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func listUsers(input: ListUsersInput) async throws -> ListUsersOutput + /// Performs the `PutProjectPolicy` operation on the `RekognitionService` service. + /// + /// This operation applies only to Amazon Rekognition Custom Labels. Attaches a project policy to a Amazon Rekognition Custom Labels project in a trusting AWS account. A project policy specifies that a trusted AWS account can copy a model version from a trusting AWS account to a project in the trusted AWS account. To copy a model version you use the [CopyProjectVersion] operation. Only applies to Custom Labels projects. For more information about the format of a project policy document, see Attaching a project policy (SDK) in the Amazon Rekognition Custom Labels Developer Guide. The response from PutProjectPolicy is a revision ID for the project policy. You can attach multiple project policies to a project. You can also update an existing project policy by specifying the policy revision ID of the existing policy. To remove a project policy from a project, call [DeleteProjectPolicy]. To get a list of project policies attached to a project, call [ListProjectPolicies]. You copy a model version by calling [CopyProjectVersion]. This operation requires permissions to perform the rekognition:PutProjectPolicy action. + /// + /// - Parameter PutProjectPolicyInput : [no documentation found] + /// + /// - Returns: `PutProjectPolicyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidPolicyRevisionIdException` : The supplied revision id for the project policy is invalid. + /// - `LimitExceededException` : An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent calls to start operations (ex: StartLabelDetection) will raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit. + /// - `MalformedPolicyDocumentException` : The format of the project policy document that you supplied to PutProjectPolicy is incorrect. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceAlreadyExistsException` : A resource with the specified ID already exists. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ServiceQuotaExceededException` : The size of the collection exceeds the allowed limit. For more information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func putProjectPolicy(input: PutProjectPolicyInput) async throws -> PutProjectPolicyOutput + /// Performs the `RecognizeCelebrities` operation on the `RekognitionService` service. + /// + /// Returns an array of celebrities recognized in the input image. For more information, see Recognizing celebrities in the Amazon Rekognition Developer Guide. RecognizeCelebrities returns the 64 largest faces in the image. It lists the recognized celebrities in the CelebrityFaces array and any unrecognized faces in the UnrecognizedFaces array. RecognizeCelebrities doesn't return celebrities whose faces aren't among the largest 64 faces in the image. For each celebrity recognized, RecognizeCelebrities returns a Celebrity object. The Celebrity object contains the celebrity name, ID, URL links to additional information, match confidence, and a ComparedFace object that you can use to locate the celebrity's face on the image. Amazon Rekognition doesn't retain information about which images a celebrity has been recognized in. Your application must store this information and use the Celebrity ID property as a unique identifier for the celebrity. If you don't store the celebrity name or additional information URLs returned by RecognizeCelebrities, you will need the ID to identify the celebrity in a call to the [GetCelebrityInfo] operation. You pass the input image either as base64-encoded image bytes or as a reference to an image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes is not supported. The image must be either a PNG or JPEG formatted file. For an example, see Recognizing celebrities in an image in the Amazon Rekognition Developer Guide. This operation requires permissions to perform the rekognition:RecognizeCelebrities operation. + /// + /// - Parameter RecognizeCelebritiesInput : [no documentation found] + /// + /// - Returns: `RecognizeCelebritiesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `ImageTooLargeException` : The input image size exceeds the allowed limit. If you are calling DetectProtectiveEquipment, the image size or resolution exceeds the allowed limit. For more information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidImageFormatException` : The provided image format is not supported. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Rekognition is unable to access the S3 object specified in the request. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func recognizeCelebrities(input: RecognizeCelebritiesInput) async throws -> RecognizeCelebritiesOutput + /// Performs the `SearchFaces` operation on the `RekognitionService` service. + /// + /// For a given input face ID, searches for matching faces in the collection the face belongs to. You get a face ID when you add a face to the collection using the [IndexFaces] operation. The operation compares the features of the input face with faces in the specified collection. You can also search faces without indexing faces by using the SearchFacesByImage operation. The operation response returns an array of faces that match, ordered by similarity score with the highest similarity first. More specifically, it is an array of metadata for each face match that is found. Along with the metadata, the response also includes a confidence value for each face match, indicating the confidence that the specific face matches the input face. For an example, see Searching for a face using its face ID in the Amazon Rekognition Developer Guide. This operation requires permissions to perform the rekognition:SearchFaces action. + /// + /// - Parameter SearchFacesInput : [no documentation found] + /// + /// - Returns: `SearchFacesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func searchFaces(input: SearchFacesInput) async throws -> SearchFacesOutput + /// Performs the `SearchFacesByImage` operation on the `RekognitionService` service. + /// + /// For a given input image, first detects the largest face in the image, and then searches the specified collection for matching faces. The operation compares the features of the input face with faces in the specified collection. To search for all faces in an input image, you might first call the [IndexFaces] operation, and then use the face IDs returned in subsequent calls to the [SearchFaces] operation. You can also call the DetectFaces operation and use the bounding boxes in the response to make face crops, which then you can pass in to the SearchFacesByImage operation. You pass the input image either as base64-encoded image bytes or as a reference to an image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes is not supported. The image must be either a PNG or JPEG formatted file. The response returns an array of faces that match, ordered by similarity score with the highest similarity first. More specifically, it is an array of metadata for each face match found. Along with the metadata, the response also includes a similarity indicating how similar the face is to the input face. In the response, the operation also returns the bounding box (and a confidence level that the bounding box contains a face) of the face that Amazon Rekognition used for the input image. If no faces are detected in the input image, SearchFacesByImage returns an InvalidParameterException error. For an example, Searching for a Face Using an Image in the Amazon Rekognition Developer Guide. The QualityFilter input parameter allows you to filter out detected faces that don’t meet a required quality bar. The quality bar is based on a variety of common use cases. Use QualityFilter to set the quality bar for filtering by specifying LOW, MEDIUM, or HIGH. If you do not want to filter detected faces, specify NONE. The default value is NONE. To use quality filtering, you need a collection associated with version 3 of the face model or higher. To get the version of the face model associated with a collection, call [DescribeCollection]. This operation requires permissions to perform the rekognition:SearchFacesByImage action. + /// + /// - Parameter SearchFacesByImageInput : [no documentation found] + /// + /// - Returns: `SearchFacesByImageOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `ImageTooLargeException` : The input image size exceeds the allowed limit. If you are calling DetectProtectiveEquipment, the image size or resolution exceeds the allowed limit. For more information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidImageFormatException` : The provided image format is not supported. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Rekognition is unable to access the S3 object specified in the request. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func searchFacesByImage(input: SearchFacesByImageInput) async throws -> SearchFacesByImageOutput + /// Performs the `SearchUsers` operation on the `RekognitionService` service. + /// + /// Searches for UserIDs within a collection based on a FaceId or UserId. This API can be used to find the closest UserID (with a highest similarity) to associate a face. The request must be provided with either FaceId or UserId. The operation returns an array of UserID that match the FaceId or UserId, ordered by similarity score with the highest similarity first. + /// + /// - Parameter SearchUsersInput : [no documentation found] + /// + /// - Returns: `SearchUsersOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func searchUsers(input: SearchUsersInput) async throws -> SearchUsersOutput + /// Performs the `SearchUsersByImage` operation on the `RekognitionService` service. + /// + /// Searches for UserIDs using a supplied image. It first detects the largest face in the image, and then searches a specified collection for matching UserIDs. The operation returns an array of UserIDs that match the face in the supplied image, ordered by similarity score with the highest similarity first. It also returns a bounding box for the face found in the input image. Information about faces detected in the supplied image, but not used for the search, is returned in an array of UnsearchedFace objects. If no valid face is detected in the image, the response will contain an empty UserMatches list and no SearchedFace object. + /// + /// - Parameter SearchUsersByImageInput : [no documentation found] + /// + /// - Returns: `SearchUsersByImageOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `ImageTooLargeException` : The input image size exceeds the allowed limit. If you are calling DetectProtectiveEquipment, the image size or resolution exceeds the allowed limit. For more information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidImageFormatException` : The provided image format is not supported. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Rekognition is unable to access the S3 object specified in the request. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func searchUsersByImage(input: SearchUsersByImageInput) async throws -> SearchUsersByImageOutput + /// Performs the `StartCelebrityRecognition` operation on the `RekognitionService` service. + /// + /// Starts asynchronous recognition of celebrities in a stored video. Amazon Rekognition Video can detect celebrities in a video must be stored in an Amazon S3 bucket. Use [Video] to specify the bucket name and the filename of the video. StartCelebrityRecognition returns a job identifier (JobId) which you use to get the results of the analysis. When celebrity recognition analysis is finished, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic that you specify in NotificationChannel. To get the results of the celebrity recognition analysis, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call [GetCelebrityRecognition] and pass the job identifier (JobId) from the initial call to StartCelebrityRecognition. For more information, see Recognizing celebrities in the Amazon Rekognition Developer Guide. + /// + /// - Parameter StartCelebrityRecognitionInput : [no documentation found] + /// + /// - Returns: `StartCelebrityRecognitionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `IdempotentParameterMismatchException` : A ClientRequestToken input parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Rekognition is unable to access the S3 object specified in the request. + /// - `LimitExceededException` : An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent calls to start operations (ex: StartLabelDetection) will raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + /// - `VideoTooLargeException` : The file size or duration of the supplied media is too large. The maximum file size is 10GB. The maximum duration is 6 hours. + func startCelebrityRecognition(input: StartCelebrityRecognitionInput) async throws -> StartCelebrityRecognitionOutput + /// Performs the `StartContentModeration` operation on the `RekognitionService` service. + /// + /// Starts asynchronous detection of inappropriate, unwanted, or offensive content in a stored video. For a list of moderation labels in Amazon Rekognition, see [Using the image and video moderation APIs](https://docs.aws.amazon.com/rekognition/latest/dg/moderation.html#moderation-api). Amazon Rekognition Video can moderate content in a video stored in an Amazon S3 bucket. Use [Video] to specify the bucket name and the filename of the video. StartContentModeration returns a job identifier (JobId) which you use to get the results of the analysis. When content analysis is finished, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic that you specify in NotificationChannel. To get the results of the content analysis, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call [GetContentModeration] and pass the job identifier (JobId) from the initial call to StartContentModeration. For more information, see Moderating content in the Amazon Rekognition Developer Guide. + /// + /// - Parameter StartContentModerationInput : [no documentation found] + /// + /// - Returns: `StartContentModerationOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `IdempotentParameterMismatchException` : A ClientRequestToken input parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Rekognition is unable to access the S3 object specified in the request. + /// - `LimitExceededException` : An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent calls to start operations (ex: StartLabelDetection) will raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + /// - `VideoTooLargeException` : The file size or duration of the supplied media is too large. The maximum file size is 10GB. The maximum duration is 6 hours. + func startContentModeration(input: StartContentModerationInput) async throws -> StartContentModerationOutput + /// Performs the `StartFaceDetection` operation on the `RekognitionService` service. + /// + /// Starts asynchronous detection of faces in a stored video. Amazon Rekognition Video can detect faces in a video stored in an Amazon S3 bucket. Use [Video] to specify the bucket name and the filename of the video. StartFaceDetection returns a job identifier (JobId) that you use to get the results of the operation. When face detection is finished, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic that you specify in NotificationChannel. To get the results of the face detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call [GetFaceDetection] and pass the job identifier (JobId) from the initial call to StartFaceDetection. For more information, see Detecting faces in a stored video in the Amazon Rekognition Developer Guide. + /// + /// - Parameter StartFaceDetectionInput : [no documentation found] + /// + /// - Returns: `StartFaceDetectionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `IdempotentParameterMismatchException` : A ClientRequestToken input parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Rekognition is unable to access the S3 object specified in the request. + /// - `LimitExceededException` : An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent calls to start operations (ex: StartLabelDetection) will raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + /// - `VideoTooLargeException` : The file size or duration of the supplied media is too large. The maximum file size is 10GB. The maximum duration is 6 hours. + func startFaceDetection(input: StartFaceDetectionInput) async throws -> StartFaceDetectionOutput + /// Performs the `StartFaceSearch` operation on the `RekognitionService` service. + /// + /// Starts the asynchronous search for faces in a collection that match the faces of persons detected in a stored video. The video must be stored in an Amazon S3 bucket. Use [Video] to specify the bucket name and the filename of the video. StartFaceSearch returns a job identifier (JobId) which you use to get the search results once the search has completed. When searching is finished, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic that you specify in NotificationChannel. To get the search results, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call [GetFaceSearch] and pass the job identifier (JobId) from the initial call to StartFaceSearch. For more information, see [Searching stored videos for faces](https://docs.aws.amazon.com/rekognition/latest/dg/procedure-person-search-videos.html). + /// + /// - Parameter StartFaceSearchInput : [no documentation found] + /// + /// - Returns: `StartFaceSearchOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `IdempotentParameterMismatchException` : A ClientRequestToken input parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Rekognition is unable to access the S3 object specified in the request. + /// - `LimitExceededException` : An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent calls to start operations (ex: StartLabelDetection) will raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + /// - `VideoTooLargeException` : The file size or duration of the supplied media is too large. The maximum file size is 10GB. The maximum duration is 6 hours. + func startFaceSearch(input: StartFaceSearchInput) async throws -> StartFaceSearchOutput + /// Performs the `StartLabelDetection` operation on the `RekognitionService` service. + /// + /// Starts asynchronous detection of labels in a stored video. Amazon Rekognition Video can detect labels in a video. Labels are instances of real-world entities. This includes objects like flower, tree, and table; events like wedding, graduation, and birthday party; concepts like landscape, evening, and nature; and activities like a person getting out of a car or a person skiing. The video must be stored in an Amazon S3 bucket. Use [Video] to specify the bucket name and the filename of the video. StartLabelDetection returns a job identifier (JobId) which you use to get the results of the operation. When label detection is finished, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic that you specify in NotificationChannel. To get the results of the label detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call [GetLabelDetection] and pass the job identifier (JobId) from the initial call to StartLabelDetection. Optional Parameters StartLabelDetection has the GENERAL_LABELS Feature applied by default. This feature allows you to provide filtering criteria to the Settings parameter. You can filter with sets of individual labels or with label categories. You can specify inclusive filters, exclusive filters, or a combination of inclusive and exclusive filters. For more information on filtering, see [Detecting labels in a video](https://docs.aws.amazon.com/rekognition/latest/dg/labels-detecting-labels-video.html). You can specify MinConfidence to control the confidence threshold for the labels returned. The default is 50. + /// + /// - Parameter StartLabelDetectionInput : [no documentation found] + /// + /// - Returns: `StartLabelDetectionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `IdempotentParameterMismatchException` : A ClientRequestToken input parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Rekognition is unable to access the S3 object specified in the request. + /// - `LimitExceededException` : An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent calls to start operations (ex: StartLabelDetection) will raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + /// - `VideoTooLargeException` : The file size or duration of the supplied media is too large. The maximum file size is 10GB. The maximum duration is 6 hours. + func startLabelDetection(input: StartLabelDetectionInput) async throws -> StartLabelDetectionOutput + /// Performs the `StartMediaAnalysisJob` operation on the `RekognitionService` service. + /// + /// Initiates a new media analysis job. Accepts a manifest file in an Amazon S3 bucket. The output is a manifest file and a summary of the manifest stored in the Amazon S3 bucket. + /// + /// - Parameter StartMediaAnalysisJobInput : [no documentation found] + /// + /// - Returns: `StartMediaAnalysisJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `IdempotentParameterMismatchException` : A ClientRequestToken input parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidManifestException` : Indicates that a provided manifest file is empty or larger than the allowed limit. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Rekognition is unable to access the S3 object specified in the request. + /// - `LimitExceededException` : An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent calls to start operations (ex: StartLabelDetection) will raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ResourceNotReadyException` : The requested resource isn't ready. For example, + /// + /// + /// this exception occurs when you call DetectCustomLabels with a model version that isn't deployed. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func startMediaAnalysisJob(input: StartMediaAnalysisJobInput) async throws -> StartMediaAnalysisJobOutput + /// Performs the `StartPersonTracking` operation on the `RekognitionService` service. + /// + /// Starts the asynchronous tracking of a person's path in a stored video. Amazon Rekognition Video can track the path of people in a video stored in an Amazon S3 bucket. Use [Video] to specify the bucket name and the filename of the video. StartPersonTracking returns a job identifier (JobId) which you use to get the results of the operation. When label detection is finished, Amazon Rekognition publishes a completion status to the Amazon Simple Notification Service topic that you specify in NotificationChannel. To get the results of the person detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call [GetPersonTracking] and pass the job identifier (JobId) from the initial call to StartPersonTracking. + /// + /// - Parameter StartPersonTrackingInput : [no documentation found] + /// + /// - Returns: `StartPersonTrackingOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `IdempotentParameterMismatchException` : A ClientRequestToken input parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Rekognition is unable to access the S3 object specified in the request. + /// - `LimitExceededException` : An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent calls to start operations (ex: StartLabelDetection) will raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + /// - `VideoTooLargeException` : The file size or duration of the supplied media is too large. The maximum file size is 10GB. The maximum duration is 6 hours. + func startPersonTracking(input: StartPersonTrackingInput) async throws -> StartPersonTrackingOutput + /// Performs the `StartProjectVersion` operation on the `RekognitionService` service. + /// + /// This operation applies only to Amazon Rekognition Custom Labels. Starts the running of the version of a model. Starting a model takes a while to complete. To check the current state of the model, use [DescribeProjectVersions]. Once the model is running, you can detect custom labels in new images by calling [DetectCustomLabels]. You are charged for the amount of time that the model is running. To stop a running model, call [StopProjectVersion]. This operation requires permissions to perform the rekognition:StartProjectVersion action. + /// + /// - Parameter StartProjectVersionInput : [no documentation found] + /// + /// - Returns: `StartProjectVersionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `LimitExceededException` : An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent calls to start operations (ex: StartLabelDetection) will raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceInUseException` : The specified resource is already being used. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func startProjectVersion(input: StartProjectVersionInput) async throws -> StartProjectVersionOutput + /// Performs the `StartSegmentDetection` operation on the `RekognitionService` service. + /// + /// Starts asynchronous detection of segment detection in a stored video. Amazon Rekognition Video can detect segments in a video stored in an Amazon S3 bucket. Use [Video] to specify the bucket name and the filename of the video. StartSegmentDetection returns a job identifier (JobId) which you use to get the results of the operation. When segment detection is finished, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic that you specify in NotificationChannel. You can use the Filters ([StartSegmentDetectionFilters]) input parameter to specify the minimum detection confidence returned in the response. Within Filters, use ShotFilter ([StartShotDetectionFilter]) to filter detected shots. Use TechnicalCueFilter ([StartTechnicalCueDetectionFilter]) to filter technical cues. To get the results of the segment detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. if so, call [GetSegmentDetection] and pass the job identifier (JobId) from the initial call to StartSegmentDetection. For more information, see Detecting video segments in stored video in the Amazon Rekognition Developer Guide. + /// + /// - Parameter StartSegmentDetectionInput : [no documentation found] + /// + /// - Returns: `StartSegmentDetectionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `IdempotentParameterMismatchException` : A ClientRequestToken input parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Rekognition is unable to access the S3 object specified in the request. + /// - `LimitExceededException` : An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent calls to start operations (ex: StartLabelDetection) will raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + /// - `VideoTooLargeException` : The file size or duration of the supplied media is too large. The maximum file size is 10GB. The maximum duration is 6 hours. + func startSegmentDetection(input: StartSegmentDetectionInput) async throws -> StartSegmentDetectionOutput + /// Performs the `StartStreamProcessor` operation on the `RekognitionService` service. + /// + /// Starts processing a stream processor. You create a stream processor by calling [CreateStreamProcessor]. To tell StartStreamProcessor which stream processor to start, use the value of the Name field specified in the call to CreateStreamProcessor. If you are using a label detection stream processor to detect labels, you need to provide a Start selector and a Stop selector to determine the length of the stream processing time. + /// + /// - Parameter StartStreamProcessorInput : [no documentation found] + /// + /// - Returns: `StartStreamProcessorOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceInUseException` : The specified resource is already being used. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func startStreamProcessor(input: StartStreamProcessorInput) async throws -> StartStreamProcessorOutput + /// Performs the `StartTextDetection` operation on the `RekognitionService` service. + /// + /// Starts asynchronous detection of text in a stored video. Amazon Rekognition Video can detect text in a video stored in an Amazon S3 bucket. Use [Video] to specify the bucket name and the filename of the video. StartTextDetection returns a job identifier (JobId) which you use to get the results of the operation. When text detection is finished, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic that you specify in NotificationChannel. To get the results of the text detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. if so, call [GetTextDetection] and pass the job identifier (JobId) from the initial call to StartTextDetection. + /// + /// - Parameter StartTextDetectionInput : [no documentation found] + /// + /// - Returns: `StartTextDetectionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `IdempotentParameterMismatchException` : A ClientRequestToken input parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Rekognition is unable to access the S3 object specified in the request. + /// - `LimitExceededException` : An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent calls to start operations (ex: StartLabelDetection) will raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + /// - `VideoTooLargeException` : The file size or duration of the supplied media is too large. The maximum file size is 10GB. The maximum duration is 6 hours. + func startTextDetection(input: StartTextDetectionInput) async throws -> StartTextDetectionOutput + /// Performs the `StopProjectVersion` operation on the `RekognitionService` service. + /// + /// This operation applies only to Amazon Rekognition Custom Labels. Stops a running model. The operation might take a while to complete. To check the current status, call [DescribeProjectVersions]. Only applies to Custom Labels projects. This operation requires permissions to perform the rekognition:StopProjectVersion action. + /// + /// - Parameter StopProjectVersionInput : [no documentation found] + /// + /// - Returns: `StopProjectVersionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceInUseException` : The specified resource is already being used. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func stopProjectVersion(input: StopProjectVersionInput) async throws -> StopProjectVersionOutput + /// Performs the `StopStreamProcessor` operation on the `RekognitionService` service. + /// + /// Stops a running stream processor that was created by [CreateStreamProcessor]. + /// + /// - Parameter StopStreamProcessorInput : [no documentation found] + /// + /// - Returns: `StopStreamProcessorOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceInUseException` : The specified resource is already being used. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func stopStreamProcessor(input: StopStreamProcessorInput) async throws -> StopStreamProcessorOutput + /// Performs the `TagResource` operation on the `RekognitionService` service. + /// + /// Adds one or more key-value tags to an Amazon Rekognition collection, stream processor, or Custom Labels model. For more information, see [Tagging AWS Resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html). This operation requires permissions to perform the rekognition:TagResource action. + /// + /// - Parameter TagResourceInput : [no documentation found] + /// + /// - Returns: `TagResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ServiceQuotaExceededException` : The size of the collection exceeds the allowed limit. For more information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func tagResource(input: TagResourceInput) async throws -> TagResourceOutput + /// Performs the `UntagResource` operation on the `RekognitionService` service. + /// + /// Removes one or more tags from an Amazon Rekognition collection, stream processor, or Custom Labels model. This operation requires permissions to perform the rekognition:UntagResource action. + /// + /// - Parameter UntagResourceInput : [no documentation found] + /// + /// - Returns: `UntagResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func untagResource(input: UntagResourceInput) async throws -> UntagResourceOutput + /// Performs the `UpdateDatasetEntries` operation on the `RekognitionService` service. + /// + /// This operation applies only to Amazon Rekognition Custom Labels. Adds or updates one or more entries (images) in a dataset. An entry is a JSON Line which contains the information for a single image, including the image location, assigned labels, and object location bounding boxes. For more information, see Image-Level labels in manifest files and Object localization in manifest files in the Amazon Rekognition Custom Labels Developer Guide. If the source-ref field in the JSON line references an existing image, the existing image in the dataset is updated. If source-ref field doesn't reference an existing image, the image is added as a new image to the dataset. You specify the changes that you want to make in the Changes input parameter. There isn't a limit to the number JSON Lines that you can change, but the size of Changes must be less than 5MB. UpdateDatasetEntries returns immediatly, but the dataset update might take a while to complete. Use [DescribeDataset] to check the current status. The dataset updated successfully if the value of Status is UPDATE_COMPLETE. To check if any non-terminal errors occured, call [ListDatasetEntries] and check for the presence of errors lists in the JSON Lines. Dataset update fails if a terminal error occurs (Status = UPDATE_FAILED). Currently, you can't access the terminal error information from the Amazon Rekognition Custom Labels SDK. This operation requires permissions to perform the rekognition:UpdateDatasetEntries action. + /// + /// - Parameter UpdateDatasetEntriesInput : [no documentation found] + /// + /// - Returns: `UpdateDatasetEntriesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `LimitExceededException` : An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent calls to start operations (ex: StartLabelDetection) will raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceInUseException` : The specified resource is already being used. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func updateDatasetEntries(input: UpdateDatasetEntriesInput) async throws -> UpdateDatasetEntriesOutput + /// Performs the `UpdateStreamProcessor` operation on the `RekognitionService` service. + /// + /// Allows you to update a stream processor. You can change some settings and regions of interest and delete certain parameters. + /// + /// - Parameter UpdateStreamProcessorInput : [no documentation found] + /// + /// - Returns: `UpdateStreamProcessorOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You are not authorized to perform the action. + /// - `InternalServerError` : Amazon Rekognition experienced a service issue. Try your call again. + /// - `InvalidParameterException` : Input parameter violated a constraint. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. + /// - `ResourceInUseException` : The specified resource is already being used. + /// - `ResourceNotFoundException` : The resource specified in the request cannot be found. + /// - `ThrottlingException` : Amazon Rekognition is temporarily unable to process the request. Try your call again. + func updateStreamProcessor(input: UpdateStreamProcessorInput) async throws -> UpdateStreamProcessorOutput +} + +extension RekognitionClient: RekognitionClientProtocol { } diff --git a/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/TextractClientProtocol.swift b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/TextractClientProtocol.swift new file mode 100644 index 0000000000..02dc05392e --- /dev/null +++ b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/TextractClientProtocol.swift @@ -0,0 +1,572 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +import AWSTextract + +// swiftlint:disable file_length +public protocol TextractClientProtocol { + /// Performs the `AnalyzeDocument` operation on the `Textract` service. + /// + /// Analyzes an input document for relationships between detected items. The types of information returned are as follows: + /// + /// * Form data (key-value pairs). The related information is returned in two [Block] objects, each of type KEY_VALUE_SET: a KEY Block object and a VALUE Block object. For example, Name: Ana Silva Carolina contains a key and value. Name: is the key. Ana Silva Carolina is the value. + /// + /// * Table and table cell data. A TABLE Block object contains information about a detected table. A CELL Block object is returned for each cell in a table. + /// + /// * Lines and words of text. A LINE Block object contains one or more WORD Block objects. All lines and words that are detected in the document are returned (including text that doesn't have a relationship with the value of FeatureTypes). + /// + /// * Signatures. A SIGNATURE Block object contains the location information of a signature in a document. If used in conjunction with forms or tables, a signature can be given a Key-Value pairing or be detected in the cell of a table. + /// + /// * Query. A QUERY Block object contains the query text, alias and link to the associated Query results block object. + /// + /// * Query Result. A QUERY_RESULT Block object contains the answer to the query and an ID that connects it to the query asked. This Block also contains a confidence score. + /// + /// + /// Selection elements such as check boxes and option buttons (radio buttons) can be detected in form data and in tables. A SELECTION_ELEMENT Block object contains information about a selection element, including the selection status. You can choose which type of analysis to perform by specifying the FeatureTypes list. The output is returned in a list of Block objects. AnalyzeDocument is a synchronous operation. To analyze documents asynchronously, use [StartDocumentAnalysis]. For more information, see [Document Text Analysis](https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html). + /// + /// - Parameter AnalyzeDocumentInput : [no documentation found] + /// + /// - Returns: `AnalyzeDocumentOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `BadDocumentException` : Amazon Textract isn't able to read the document. For more information on the document limits in Amazon Textract, see [limits]. + /// - `DocumentTooLargeException` : The document can't be processed because it's too large. The maximum document size for synchronous operations 10 MB. The maximum document size for asynchronous operations is 500 MB for PDF files. + /// - `HumanLoopQuotaExceededException` : Indicates you have exceeded the maximum number of active human in the loop workflows available + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Textract is unable to access the S3 object that's specified in the request. for more information, [Configure Access to Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) For troubleshooting information, see [Troubleshooting Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + /// - `UnsupportedDocumentException` : The format of the input document isn't supported. Documents for operations can be in PNG, JPEG, PDF, or TIFF format. + func analyzeDocument(input: AnalyzeDocumentInput) async throws -> AnalyzeDocumentOutput + /// Performs the `AnalyzeExpense` operation on the `Textract` service. + /// + /// AnalyzeExpense synchronously analyzes an input document for financially related relationships between text. Information is returned as ExpenseDocuments and seperated as follows: + /// + /// * LineItemGroups- A data set containing LineItems which store information about the lines of text, such as an item purchased and its price on a receipt. + /// + /// * SummaryFields- Contains all other information a receipt, such as header information or the vendors name. + /// + /// - Parameter AnalyzeExpenseInput : [no documentation found] + /// + /// - Returns: `AnalyzeExpenseOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `BadDocumentException` : Amazon Textract isn't able to read the document. For more information on the document limits in Amazon Textract, see [limits]. + /// - `DocumentTooLargeException` : The document can't be processed because it's too large. The maximum document size for synchronous operations 10 MB. The maximum document size for asynchronous operations is 500 MB for PDF files. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Textract is unable to access the S3 object that's specified in the request. for more information, [Configure Access to Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) For troubleshooting information, see [Troubleshooting Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + /// - `UnsupportedDocumentException` : The format of the input document isn't supported. Documents for operations can be in PNG, JPEG, PDF, or TIFF format. + func analyzeExpense(input: AnalyzeExpenseInput) async throws -> AnalyzeExpenseOutput + /// Performs the `AnalyzeID` operation on the `Textract` service. + /// + /// Analyzes identity documents for relevant information. This information is extracted and returned as IdentityDocumentFields, which records both the normalized field and value of the extracted text. Unlike other Amazon Textract operations, AnalyzeID doesn't return any Geometry data. + /// + /// - Parameter AnalyzeIDInput : [no documentation found] + /// + /// - Returns: `AnalyzeIDOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `BadDocumentException` : Amazon Textract isn't able to read the document. For more information on the document limits in Amazon Textract, see [limits]. + /// - `DocumentTooLargeException` : The document can't be processed because it's too large. The maximum document size for synchronous operations 10 MB. The maximum document size for asynchronous operations is 500 MB for PDF files. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Textract is unable to access the S3 object that's specified in the request. for more information, [Configure Access to Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) For troubleshooting information, see [Troubleshooting Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + /// - `UnsupportedDocumentException` : The format of the input document isn't supported. Documents for operations can be in PNG, JPEG, PDF, or TIFF format. + func analyzeID(input: AnalyzeIDInput) async throws -> AnalyzeIDOutput + /// Performs the `CreateAdapter` operation on the `Textract` service. + /// + /// Creates an adapter, which can be fine-tuned for enhanced performance on user provided documents. Takes an AdapterName and FeatureType. Currently the only supported feature type is QUERIES. You can also provide a Description, Tags, and a ClientRequestToken. You can choose whether or not the adapter should be AutoUpdated with the AutoUpdate argument. By default, AutoUpdate is set to DISABLED. + /// + /// - Parameter CreateAdapterInput : [no documentation found] + /// + /// - Returns: `CreateAdapterOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `ConflictException` : Updating or deleting a resource can cause an inconsistent state. + /// - `IdempotentParameterMismatchException` : A ClientRequestToken input parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `LimitExceededException` : An Amazon Textract service limit was exceeded. For example, if you start too many asynchronous jobs concurrently, calls to start operations (StartDocumentTextDetection, for example) raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Textract service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ServiceQuotaExceededException` : Returned when a request cannot be completed as it would exceed a maximum service quota. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + /// - `ValidationException` : Indicates that a request was not valid. Check request for proper formatting. + func createAdapter(input: CreateAdapterInput) async throws -> CreateAdapterOutput + /// Performs the `CreateAdapterVersion` operation on the `Textract` service. + /// + /// Creates a new version of an adapter. Operates on a provided AdapterId and a specified dataset provided via the DatasetConfig argument. Requires that you specify an Amazon S3 bucket with the OutputConfig argument. You can provide an optional KMSKeyId, an optional ClientRequestToken, and optional tags. + /// + /// - Parameter CreateAdapterVersionInput : [no documentation found] + /// + /// - Returns: `CreateAdapterVersionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `ConflictException` : Updating or deleting a resource can cause an inconsistent state. + /// - `IdempotentParameterMismatchException` : A ClientRequestToken input parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidKMSKeyException` : Indicates you do not have decrypt permissions with the KMS key entered, or the KMS key was entered incorrectly. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Textract is unable to access the S3 object that's specified in the request. for more information, [Configure Access to Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) For troubleshooting information, see [Troubleshooting Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) + /// - `LimitExceededException` : An Amazon Textract service limit was exceeded. For example, if you start too many asynchronous jobs concurrently, calls to start operations (StartDocumentTextDetection, for example) raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Textract service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ResourceNotFoundException` : Returned when an operation tried to access a nonexistent resource. + /// - `ServiceQuotaExceededException` : Returned when a request cannot be completed as it would exceed a maximum service quota. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + /// - `ValidationException` : Indicates that a request was not valid. Check request for proper formatting. + func createAdapterVersion(input: CreateAdapterVersionInput) async throws -> CreateAdapterVersionOutput + /// Performs the `DeleteAdapter` operation on the `Textract` service. + /// + /// Deletes an Amazon Textract adapter. Takes an AdapterId and deletes the adapter specified by the ID. + /// + /// - Parameter DeleteAdapterInput : [no documentation found] + /// + /// - Returns: `DeleteAdapterOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `ConflictException` : Updating or deleting a resource can cause an inconsistent state. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ResourceNotFoundException` : Returned when an operation tried to access a nonexistent resource. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + /// - `ValidationException` : Indicates that a request was not valid. Check request for proper formatting. + func deleteAdapter(input: DeleteAdapterInput) async throws -> DeleteAdapterOutput + /// Performs the `DeleteAdapterVersion` operation on the `Textract` service. + /// + /// Deletes an Amazon Textract adapter version. Requires that you specify both an AdapterId and a AdapterVersion. Deletes the adapter version specified by the AdapterId and the AdapterVersion. + /// + /// - Parameter DeleteAdapterVersionInput : [no documentation found] + /// + /// - Returns: `DeleteAdapterVersionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `ConflictException` : Updating or deleting a resource can cause an inconsistent state. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ResourceNotFoundException` : Returned when an operation tried to access a nonexistent resource. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + /// - `ValidationException` : Indicates that a request was not valid. Check request for proper formatting. + func deleteAdapterVersion(input: DeleteAdapterVersionInput) async throws -> DeleteAdapterVersionOutput + /// Performs the `DetectDocumentText` operation on the `Textract` service. + /// + /// Detects text in the input document. Amazon Textract can detect lines of text and the words that make up a line of text. The input document must be in one of the following image formats: JPEG, PNG, PDF, or TIFF. DetectDocumentText returns the detected text in an array of [Block] objects. Each document page has as an associated Block of type PAGE. Each PAGE Block object is the parent of LINE Block objects that represent the lines of detected text on a page. A LINE Block object is a parent for each word that makes up the line. Words are represented by Block objects of type WORD. DetectDocumentText is a synchronous operation. To analyze documents asynchronously, use [StartDocumentTextDetection]. For more information, see [Document Text Detection](https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html). + /// + /// - Parameter DetectDocumentTextInput : [no documentation found] + /// + /// - Returns: `DetectDocumentTextOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `BadDocumentException` : Amazon Textract isn't able to read the document. For more information on the document limits in Amazon Textract, see [limits]. + /// - `DocumentTooLargeException` : The document can't be processed because it's too large. The maximum document size for synchronous operations 10 MB. The maximum document size for asynchronous operations is 500 MB for PDF files. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Textract is unable to access the S3 object that's specified in the request. for more information, [Configure Access to Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) For troubleshooting information, see [Troubleshooting Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + /// - `UnsupportedDocumentException` : The format of the input document isn't supported. Documents for operations can be in PNG, JPEG, PDF, or TIFF format. + func detectDocumentText(input: DetectDocumentTextInput) async throws -> DetectDocumentTextOutput + /// Performs the `GetAdapter` operation on the `Textract` service. + /// + /// Gets configuration information for an adapter specified by an AdapterId, returning information on AdapterName, Description, CreationTime, AutoUpdate status, and FeatureTypes. + /// + /// - Parameter GetAdapterInput : [no documentation found] + /// + /// - Returns: `GetAdapterOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ResourceNotFoundException` : Returned when an operation tried to access a nonexistent resource. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + /// - `ValidationException` : Indicates that a request was not valid. Check request for proper formatting. + func getAdapter(input: GetAdapterInput) async throws -> GetAdapterOutput + /// Performs the `GetAdapterVersion` operation on the `Textract` service. + /// + /// Gets configuration information for the specified adapter version, including: AdapterId, AdapterVersion, FeatureTypes, Status, StatusMessage, DatasetConfig, KMSKeyId, OutputConfig, Tags and EvaluationMetrics. + /// + /// - Parameter GetAdapterVersionInput : [no documentation found] + /// + /// - Returns: `GetAdapterVersionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ResourceNotFoundException` : Returned when an operation tried to access a nonexistent resource. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + /// - `ValidationException` : Indicates that a request was not valid. Check request for proper formatting. + func getAdapterVersion(input: GetAdapterVersionInput) async throws -> GetAdapterVersionOutput + /// Performs the `GetDocumentAnalysis` operation on the `Textract` service. + /// + /// Gets the results for an Amazon Textract asynchronous operation that analyzes text in a document. You start asynchronous text analysis by calling [StartDocumentAnalysis], which returns a job identifier (JobId). When the text analysis operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to StartDocumentAnalysis. To get the results of the text-detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentAnalysis, and pass the job identifier (JobId) from the initial call to StartDocumentAnalysis. GetDocumentAnalysis returns an array of [Block] objects. The following types of information are returned: + /// + /// * Form data (key-value pairs). The related information is returned in two [Block] objects, each of type KEY_VALUE_SET: a KEY Block object and a VALUE Block object. For example, Name: Ana Silva Carolina contains a key and value. Name: is the key. Ana Silva Carolina is the value. + /// + /// * Table and table cell data. A TABLE Block object contains information about a detected table. A CELL Block object is returned for each cell in a table. + /// + /// * Lines and words of text. A LINE Block object contains one or more WORD Block objects. All lines and words that are detected in the document are returned (including text that doesn't have a relationship with the value of the StartDocumentAnalysisFeatureTypes input parameter). + /// + /// * Query. A QUERY Block object contains the query text, alias and link to the associated Query results block object. + /// + /// * Query Results. A QUERY_RESULT Block object contains the answer to the query and an ID that connects it to the query asked. This Block also contains a confidence score. + /// + /// + /// While processing a document with queries, look out for INVALID_REQUEST_PARAMETERS output. This indicates that either the per page query limit has been exceeded or that the operation is trying to query a page in the document which doesn’t exist. Selection elements such as check boxes and option buttons (radio buttons) can be detected in form data and in tables. A SELECTION_ELEMENT Block object contains information about a selection element, including the selection status. Use the MaxResults parameter to limit the number of blocks that are returned. If there are more results than specified in MaxResults, the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetDocumentAnalysis, and populate the NextToken request parameter with the token value that's returned from the previous call to GetDocumentAnalysis. For more information, see [Document Text Analysis](https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html). + /// + /// - Parameter GetDocumentAnalysisInput : [no documentation found] + /// + /// - Returns: `GetDocumentAnalysisOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidJobIdException` : An invalid job identifier was passed to an asynchronous analysis operation. + /// - `InvalidKMSKeyException` : Indicates you do not have decrypt permissions with the KMS key entered, or the KMS key was entered incorrectly. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Textract is unable to access the S3 object that's specified in the request. for more information, [Configure Access to Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) For troubleshooting information, see [Troubleshooting Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + func getDocumentAnalysis(input: GetDocumentAnalysisInput) async throws -> GetDocumentAnalysisOutput + /// Performs the `GetDocumentTextDetection` operation on the `Textract` service. + /// + /// Gets the results for an Amazon Textract asynchronous operation that detects text in a document. Amazon Textract can detect lines of text and the words that make up a line of text. You start asynchronous text detection by calling [StartDocumentTextDetection], which returns a job identifier (JobId). When the text detection operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to StartDocumentTextDetection. To get the results of the text-detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentTextDetection, and pass the job identifier (JobId) from the initial call to StartDocumentTextDetection. GetDocumentTextDetection returns an array of [Block] objects. Each document page has as an associated Block of type PAGE. Each PAGE Block object is the parent of LINE Block objects that represent the lines of detected text on a page. A LINE Block object is a parent for each word that makes up the line. Words are represented by Block objects of type WORD. Use the MaxResults parameter to limit the number of blocks that are returned. If there are more results than specified in MaxResults, the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetDocumentTextDetection, and populate the NextToken request parameter with the token value that's returned from the previous call to GetDocumentTextDetection. For more information, see [Document Text Detection](https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html). + /// + /// - Parameter GetDocumentTextDetectionInput : [no documentation found] + /// + /// - Returns: `GetDocumentTextDetectionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidJobIdException` : An invalid job identifier was passed to an asynchronous analysis operation. + /// - `InvalidKMSKeyException` : Indicates you do not have decrypt permissions with the KMS key entered, or the KMS key was entered incorrectly. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Textract is unable to access the S3 object that's specified in the request. for more information, [Configure Access to Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) For troubleshooting information, see [Troubleshooting Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + func getDocumentTextDetection(input: GetDocumentTextDetectionInput) async throws -> GetDocumentTextDetectionOutput + /// Performs the `GetExpenseAnalysis` operation on the `Textract` service. + /// + /// Gets the results for an Amazon Textract asynchronous operation that analyzes invoices and receipts. Amazon Textract finds contact information, items purchased, and vendor name, from input invoices and receipts. You start asynchronous invoice/receipt analysis by calling [StartExpenseAnalysis], which returns a job identifier (JobId). Upon completion of the invoice/receipt analysis, Amazon Textract publishes the completion status to the Amazon Simple Notification Service (Amazon SNS) topic. This topic must be registered in the initial call to StartExpenseAnalysis. To get the results of the invoice/receipt analysis operation, first ensure that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetExpenseAnalysis, and pass the job identifier (JobId) from the initial call to StartExpenseAnalysis. Use the MaxResults parameter to limit the number of blocks that are returned. If there are more results than specified in MaxResults, the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetExpenseAnalysis, and populate the NextToken request parameter with the token value that's returned from the previous call to GetExpenseAnalysis. For more information, see [Analyzing Invoices and Receipts](https://docs.aws.amazon.com/textract/latest/dg/invoices-receipts.html). + /// + /// - Parameter GetExpenseAnalysisInput : [no documentation found] + /// + /// - Returns: `GetExpenseAnalysisOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidJobIdException` : An invalid job identifier was passed to an asynchronous analysis operation. + /// - `InvalidKMSKeyException` : Indicates you do not have decrypt permissions with the KMS key entered, or the KMS key was entered incorrectly. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Textract is unable to access the S3 object that's specified in the request. for more information, [Configure Access to Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) For troubleshooting information, see [Troubleshooting Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + func getExpenseAnalysis(input: GetExpenseAnalysisInput) async throws -> GetExpenseAnalysisOutput + /// Performs the `GetLendingAnalysis` operation on the `Textract` service. + /// + /// Gets the results for an Amazon Textract asynchronous operation that analyzes text in a lending document. You start asynchronous text analysis by calling StartLendingAnalysis, which returns a job identifier (JobId). When the text analysis operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to StartLendingAnalysis. To get the results of the text analysis operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetLendingAnalysis, and pass the job identifier (JobId) from the initial call to StartLendingAnalysis. + /// + /// - Parameter GetLendingAnalysisInput : [no documentation found] + /// + /// - Returns: `GetLendingAnalysisOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidJobIdException` : An invalid job identifier was passed to an asynchronous analysis operation. + /// - `InvalidKMSKeyException` : Indicates you do not have decrypt permissions with the KMS key entered, or the KMS key was entered incorrectly. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Textract is unable to access the S3 object that's specified in the request. for more information, [Configure Access to Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) For troubleshooting information, see [Troubleshooting Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + func getLendingAnalysis(input: GetLendingAnalysisInput) async throws -> GetLendingAnalysisOutput + /// Performs the `GetLendingAnalysisSummary` operation on the `Textract` service. + /// + /// Gets summarized results for the StartLendingAnalysis operation, which analyzes text in a lending document. The returned summary consists of information about documents grouped together by a common document type. Information like detected signatures, page numbers, and split documents is returned with respect to the type of grouped document. You start asynchronous text analysis by calling StartLendingAnalysis, which returns a job identifier (JobId). When the text analysis operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to StartLendingAnalysis. To get the results of the text analysis operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetLendingAnalysisSummary, and pass the job identifier (JobId) from the initial call to StartLendingAnalysis. + /// + /// - Parameter GetLendingAnalysisSummaryInput : [no documentation found] + /// + /// - Returns: `GetLendingAnalysisSummaryOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidJobIdException` : An invalid job identifier was passed to an asynchronous analysis operation. + /// - `InvalidKMSKeyException` : Indicates you do not have decrypt permissions with the KMS key entered, or the KMS key was entered incorrectly. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Textract is unable to access the S3 object that's specified in the request. for more information, [Configure Access to Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) For troubleshooting information, see [Troubleshooting Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + func getLendingAnalysisSummary(input: GetLendingAnalysisSummaryInput) async throws -> GetLendingAnalysisSummaryOutput + /// Performs the `ListAdapters` operation on the `Textract` service. + /// + /// Lists all adapters that match the specified filtration criteria. + /// + /// - Parameter ListAdaptersInput : [no documentation found] + /// + /// - Returns: `ListAdaptersOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + /// - `ValidationException` : Indicates that a request was not valid. Check request for proper formatting. + func listAdapters(input: ListAdaptersInput) async throws -> ListAdaptersOutput + /// Performs the `ListAdapterVersions` operation on the `Textract` service. + /// + /// List all version of an adapter that meet the specified filtration criteria. + /// + /// - Parameter ListAdapterVersionsInput : [no documentation found] + /// + /// - Returns: `ListAdapterVersionsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ResourceNotFoundException` : Returned when an operation tried to access a nonexistent resource. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + /// - `ValidationException` : Indicates that a request was not valid. Check request for proper formatting. + func listAdapterVersions(input: ListAdapterVersionsInput) async throws -> ListAdapterVersionsOutput + /// Performs the `ListTagsForResource` operation on the `Textract` service. + /// + /// Lists all tags for an Amazon Textract resource. + /// + /// - Parameter ListTagsForResourceInput : [no documentation found] + /// + /// - Returns: `ListTagsForResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ResourceNotFoundException` : Returned when an operation tried to access a nonexistent resource. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + /// - `ValidationException` : Indicates that a request was not valid. Check request for proper formatting. + func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput + /// Performs the `StartDocumentAnalysis` operation on the `Textract` service. + /// + /// Starts the asynchronous analysis of an input document for relationships between detected items such as key-value pairs, tables, and selection elements. StartDocumentAnalysis can analyze text in documents that are in JPEG, PNG, TIFF, and PDF format. The documents are stored in an Amazon S3 bucket. Use [DocumentLocation] to specify the bucket name and file name of the document. StartDocumentAnalysis returns a job identifier (JobId) that you use to get the results of the operation. When text analysis is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that you specify in NotificationChannel. To get the results of the text analysis operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call [GetDocumentAnalysis], and pass the job identifier (JobId) from the initial call to StartDocumentAnalysis. For more information, see [Document Text Analysis](https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html). + /// + /// - Parameter StartDocumentAnalysisInput : [no documentation found] + /// + /// - Returns: `StartDocumentAnalysisOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `BadDocumentException` : Amazon Textract isn't able to read the document. For more information on the document limits in Amazon Textract, see [limits]. + /// - `DocumentTooLargeException` : The document can't be processed because it's too large. The maximum document size for synchronous operations 10 MB. The maximum document size for asynchronous operations is 500 MB for PDF files. + /// - `IdempotentParameterMismatchException` : A ClientRequestToken input parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidKMSKeyException` : Indicates you do not have decrypt permissions with the KMS key entered, or the KMS key was entered incorrectly. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Textract is unable to access the S3 object that's specified in the request. for more information, [Configure Access to Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) For troubleshooting information, see [Troubleshooting Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) + /// - `LimitExceededException` : An Amazon Textract service limit was exceeded. For example, if you start too many asynchronous jobs concurrently, calls to start operations (StartDocumentTextDetection, for example) raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Textract service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + /// - `UnsupportedDocumentException` : The format of the input document isn't supported. Documents for operations can be in PNG, JPEG, PDF, or TIFF format. + func startDocumentAnalysis(input: StartDocumentAnalysisInput) async throws -> StartDocumentAnalysisOutput + /// Performs the `StartDocumentTextDetection` operation on the `Textract` service. + /// + /// Starts the asynchronous detection of text in a document. Amazon Textract can detect lines of text and the words that make up a line of text. StartDocumentTextDetection can analyze text in documents that are in JPEG, PNG, TIFF, and PDF format. The documents are stored in an Amazon S3 bucket. Use [DocumentLocation] to specify the bucket name and file name of the document. StartTextDetection returns a job identifier (JobId) that you use to get the results of the operation. When text detection is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that you specify in NotificationChannel. To get the results of the text detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call [GetDocumentTextDetection], and pass the job identifier (JobId) from the initial call to StartDocumentTextDetection. For more information, see [Document Text Detection](https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html). + /// + /// - Parameter StartDocumentTextDetectionInput : [no documentation found] + /// + /// - Returns: `StartDocumentTextDetectionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `BadDocumentException` : Amazon Textract isn't able to read the document. For more information on the document limits in Amazon Textract, see [limits]. + /// - `DocumentTooLargeException` : The document can't be processed because it's too large. The maximum document size for synchronous operations 10 MB. The maximum document size for asynchronous operations is 500 MB for PDF files. + /// - `IdempotentParameterMismatchException` : A ClientRequestToken input parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidKMSKeyException` : Indicates you do not have decrypt permissions with the KMS key entered, or the KMS key was entered incorrectly. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Textract is unable to access the S3 object that's specified in the request. for more information, [Configure Access to Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) For troubleshooting information, see [Troubleshooting Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) + /// - `LimitExceededException` : An Amazon Textract service limit was exceeded. For example, if you start too many asynchronous jobs concurrently, calls to start operations (StartDocumentTextDetection, for example) raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Textract service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + /// - `UnsupportedDocumentException` : The format of the input document isn't supported. Documents for operations can be in PNG, JPEG, PDF, or TIFF format. + func startDocumentTextDetection(input: StartDocumentTextDetectionInput) async throws -> StartDocumentTextDetectionOutput + /// Performs the `StartExpenseAnalysis` operation on the `Textract` service. + /// + /// Starts the asynchronous analysis of invoices or receipts for data like contact information, items purchased, and vendor names. StartExpenseAnalysis can analyze text in documents that are in JPEG, PNG, and PDF format. The documents must be stored in an Amazon S3 bucket. Use the [DocumentLocation] parameter to specify the name of your S3 bucket and the name of the document in that bucket. StartExpenseAnalysis returns a job identifier (JobId) that you will provide to GetExpenseAnalysis to retrieve the results of the operation. When the analysis of the input invoices/receipts is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that you provide to the NotificationChannel. To obtain the results of the invoice and receipt analysis operation, ensure that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call [GetExpenseAnalysis], and pass the job identifier (JobId) that was returned by your call to StartExpenseAnalysis. For more information, see [Analyzing Invoices and Receipts](https://docs.aws.amazon.com/textract/latest/dg/invoice-receipts.html). + /// + /// - Parameter StartExpenseAnalysisInput : [no documentation found] + /// + /// - Returns: `StartExpenseAnalysisOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `BadDocumentException` : Amazon Textract isn't able to read the document. For more information on the document limits in Amazon Textract, see [limits]. + /// - `DocumentTooLargeException` : The document can't be processed because it's too large. The maximum document size for synchronous operations 10 MB. The maximum document size for asynchronous operations is 500 MB for PDF files. + /// - `IdempotentParameterMismatchException` : A ClientRequestToken input parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidKMSKeyException` : Indicates you do not have decrypt permissions with the KMS key entered, or the KMS key was entered incorrectly. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Textract is unable to access the S3 object that's specified in the request. for more information, [Configure Access to Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) For troubleshooting information, see [Troubleshooting Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) + /// - `LimitExceededException` : An Amazon Textract service limit was exceeded. For example, if you start too many asynchronous jobs concurrently, calls to start operations (StartDocumentTextDetection, for example) raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Textract service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + /// - `UnsupportedDocumentException` : The format of the input document isn't supported. Documents for operations can be in PNG, JPEG, PDF, or TIFF format. + func startExpenseAnalysis(input: StartExpenseAnalysisInput) async throws -> StartExpenseAnalysisOutput + /// Performs the `StartLendingAnalysis` operation on the `Textract` service. + /// + /// Starts the classification and analysis of an input document. StartLendingAnalysis initiates the classification and analysis of a packet of lending documents. StartLendingAnalysis operates on a document file located in an Amazon S3 bucket. StartLendingAnalysis can analyze text in documents that are in one of the following formats: JPEG, PNG, TIFF, PDF. Use DocumentLocation to specify the bucket name and the file name of the document. StartLendingAnalysis returns a job identifier (JobId) that you use to get the results of the operation. When the text analysis is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that you specify in NotificationChannel. To get the results of the text analysis operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If the status is SUCCEEDED you can call either GetLendingAnalysis or GetLendingAnalysisSummary and provide the JobId to obtain the results of the analysis. If using OutputConfig to specify an Amazon S3 bucket, the output will be contained within the specified prefix in a directory labeled with the job-id. In the directory there are 3 sub-directories: + /// + /// * detailedResponse (contains the GetLendingAnalysis response) + /// + /// * summaryResponse (for the GetLendingAnalysisSummary response) + /// + /// * splitDocuments (documents split across logical boundaries) + /// + /// - Parameter StartLendingAnalysisInput : [no documentation found] + /// + /// - Returns: `StartLendingAnalysisOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `BadDocumentException` : Amazon Textract isn't able to read the document. For more information on the document limits in Amazon Textract, see [limits]. + /// - `DocumentTooLargeException` : The document can't be processed because it's too large. The maximum document size for synchronous operations 10 MB. The maximum document size for asynchronous operations is 500 MB for PDF files. + /// - `IdempotentParameterMismatchException` : A ClientRequestToken input parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidKMSKeyException` : Indicates you do not have decrypt permissions with the KMS key entered, or the KMS key was entered incorrectly. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `InvalidS3ObjectException` : Amazon Textract is unable to access the S3 object that's specified in the request. for more information, [Configure Access to Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) For troubleshooting information, see [Troubleshooting Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) + /// - `LimitExceededException` : An Amazon Textract service limit was exceeded. For example, if you start too many asynchronous jobs concurrently, calls to start operations (StartDocumentTextDetection, for example) raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Textract service limit. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + /// - `UnsupportedDocumentException` : The format of the input document isn't supported. Documents for operations can be in PNG, JPEG, PDF, or TIFF format. + func startLendingAnalysis(input: StartLendingAnalysisInput) async throws -> StartLendingAnalysisOutput + /// Performs the `TagResource` operation on the `Textract` service. + /// + /// Adds one or more tags to the specified resource. + /// + /// - Parameter TagResourceInput : [no documentation found] + /// + /// - Returns: `TagResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ResourceNotFoundException` : Returned when an operation tried to access a nonexistent resource. + /// - `ServiceQuotaExceededException` : Returned when a request cannot be completed as it would exceed a maximum service quota. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + /// - `ValidationException` : Indicates that a request was not valid. Check request for proper formatting. + func tagResource(input: TagResourceInput) async throws -> TagResourceOutput + /// Performs the `UntagResource` operation on the `Textract` service. + /// + /// Removes any tags with the specified keys from the specified resource. + /// + /// - Parameter UntagResourceInput : [no documentation found] + /// + /// - Returns: `UntagResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ResourceNotFoundException` : Returned when an operation tried to access a nonexistent resource. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + /// - `ValidationException` : Indicates that a request was not valid. Check request for proper formatting. + func untagResource(input: UntagResourceInput) async throws -> UntagResourceOutput + /// Performs the `UpdateAdapter` operation on the `Textract` service. + /// + /// Update the configuration for an adapter. FeatureTypes configurations cannot be updated. At least one new parameter must be specified as an argument. + /// + /// - Parameter UpdateAdapterInput : [no documentation found] + /// + /// - Returns: `UpdateAdapterOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation. + /// - `ConflictException` : Updating or deleting a resource can cause an inconsistent state. + /// - `InternalServerError` : Amazon Textract experienced a service issue. Try your call again. + /// - `InvalidParameterException` : An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again. + /// - `ProvisionedThroughputExceededException` : The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract. + /// - `ResourceNotFoundException` : Returned when an operation tried to access a nonexistent resource. + /// - `ThrottlingException` : Amazon Textract is temporarily unable to process the request. Try your call again. + /// - `ValidationException` : Indicates that a request was not valid. Check request for proper formatting. + func updateAdapter(input: UpdateAdapterInput) async throws -> UpdateAdapterOutput +} +extension TextractClient: TextractClientProtocol { } diff --git a/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/TranslateClientProtocol.swift b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/TranslateClientProtocol.swift new file mode 100644 index 0000000000..260e9c1301 --- /dev/null +++ b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/TranslateClientProtocol.swift @@ -0,0 +1,332 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +import AWSTranslate + +// swiftlint:disable file_length +public protocol TranslateClientProtocol { + /// Performs the `CreateParallelData` operation on the `AWSShineFrontendService_20170701` service. + /// + /// Creates a parallel data resource in Amazon Translate by importing an input file from Amazon S3. Parallel data files contain examples that show how you want segments of text to be translated. By adding parallel data, you can influence the style, tone, and word choice in your translation output. + /// + /// - Parameter CreateParallelDataInput : [no documentation found] + /// + /// - Returns: `CreateParallelDataOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ConcurrentModificationException` : Another modification is being made. That modification must complete before you can make your change. + /// - `ConflictException` : There was a conflict processing the request. Try your request again. + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidParameterValueException` : The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. + /// - `InvalidRequestException` : The request that you made is not valid. Check your request to determine why it's not valid and then retry the request. + /// - `LimitExceededException` : The specified limit has been exceeded. Review your request and retry it with a quantity below the stated limit. + /// - `TooManyRequestsException` : You have made too many requests within a short period of time. Wait for a short time and then try your request again. + /// - `TooManyTagsException` : You have added too many tags to this resource. The maximum is 50 tags. + func createParallelData(input: CreateParallelDataInput) async throws -> CreateParallelDataOutput + /// Performs the `DeleteParallelData` operation on the `AWSShineFrontendService_20170701` service. + /// + /// Deletes a parallel data resource in Amazon Translate. + /// + /// - Parameter DeleteParallelDataInput : [no documentation found] + /// + /// - Returns: `DeleteParallelDataOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ConcurrentModificationException` : Another modification is being made. That modification must complete before you can make your change. + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `ResourceNotFoundException` : The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. + /// - `TooManyRequestsException` : You have made too many requests within a short period of time. Wait for a short time and then try your request again. + func deleteParallelData(input: DeleteParallelDataInput) async throws -> DeleteParallelDataOutput + /// Performs the `DeleteTerminology` operation on the `AWSShineFrontendService_20170701` service. + /// + /// A synchronous action that deletes a custom terminology. + /// + /// - Parameter DeleteTerminologyInput : [no documentation found] + /// + /// - Returns: `DeleteTerminologyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidParameterValueException` : The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. + /// - `ResourceNotFoundException` : The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. + /// - `TooManyRequestsException` : You have made too many requests within a short period of time. Wait for a short time and then try your request again. + func deleteTerminology(input: DeleteTerminologyInput) async throws -> DeleteTerminologyOutput + /// Performs the `DescribeTextTranslationJob` operation on the `AWSShineFrontendService_20170701` service. + /// + /// Gets the properties associated with an asynchronous batch translation job including name, ID, status, source and target languages, input/output S3 buckets, and so on. + /// + /// - Parameter DescribeTextTranslationJobInput : [no documentation found] + /// + /// - Returns: `DescribeTextTranslationJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `ResourceNotFoundException` : The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. + /// - `TooManyRequestsException` : You have made too many requests within a short period of time. Wait for a short time and then try your request again. + func describeTextTranslationJob(input: DescribeTextTranslationJobInput) async throws -> DescribeTextTranslationJobOutput + /// Performs the `GetParallelData` operation on the `AWSShineFrontendService_20170701` service. + /// + /// Provides information about a parallel data resource. + /// + /// - Parameter GetParallelDataInput : [no documentation found] + /// + /// - Returns: `GetParallelDataOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidParameterValueException` : The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. + /// - `ResourceNotFoundException` : The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. + /// - `TooManyRequestsException` : You have made too many requests within a short period of time. Wait for a short time and then try your request again. + func getParallelData(input: GetParallelDataInput) async throws -> GetParallelDataOutput + /// Performs the `GetTerminology` operation on the `AWSShineFrontendService_20170701` service. + /// + /// Retrieves a custom terminology. + /// + /// - Parameter GetTerminologyInput : [no documentation found] + /// + /// - Returns: `GetTerminologyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidParameterValueException` : The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. + /// - `ResourceNotFoundException` : The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. + /// - `TooManyRequestsException` : You have made too many requests within a short period of time. Wait for a short time and then try your request again. + func getTerminology(input: GetTerminologyInput) async throws -> GetTerminologyOutput + /// Performs the `ImportTerminology` operation on the `AWSShineFrontendService_20170701` service. + /// + /// Creates or updates a custom terminology, depending on whether one already exists for the given terminology name. Importing a terminology with the same name as an existing one will merge the terminologies based on the chosen merge strategy. The only supported merge strategy is OVERWRITE, where the imported terminology overwrites the existing terminology of the same name. If you import a terminology that overwrites an existing one, the new terminology takes up to 10 minutes to fully propagate. After that, translations have access to the new terminology. + /// + /// - Parameter ImportTerminologyInput : [no documentation found] + /// + /// - Returns: `ImportTerminologyOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ConcurrentModificationException` : Another modification is being made. That modification must complete before you can make your change. + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidParameterValueException` : The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. + /// - `LimitExceededException` : The specified limit has been exceeded. Review your request and retry it with a quantity below the stated limit. + /// - `TooManyRequestsException` : You have made too many requests within a short period of time. Wait for a short time and then try your request again. + /// - `TooManyTagsException` : You have added too many tags to this resource. The maximum is 50 tags. + func importTerminology(input: ImportTerminologyInput) async throws -> ImportTerminologyOutput + /// Performs the `ListLanguages` operation on the `AWSShineFrontendService_20170701` service. + /// + /// Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports. + /// + /// - Parameter ListLanguagesInput : [no documentation found] + /// + /// - Returns: `ListLanguagesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidParameterValueException` : The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. + /// - `TooManyRequestsException` : You have made too many requests within a short period of time. Wait for a short time and then try your request again. + /// - `UnsupportedDisplayLanguageCodeException` : Requested display language code is not supported. + func listLanguages(input: ListLanguagesInput) async throws -> ListLanguagesOutput + /// Performs the `ListParallelData` operation on the `AWSShineFrontendService_20170701` service. + /// + /// Provides a list of your parallel data resources in Amazon Translate. + /// + /// - Parameter ListParallelDataInput : [no documentation found] + /// + /// - Returns: `ListParallelDataOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidParameterValueException` : The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. + /// - `TooManyRequestsException` : You have made too many requests within a short period of time. Wait for a short time and then try your request again. + func listParallelData(input: ListParallelDataInput) async throws -> ListParallelDataOutput + /// Performs the `ListTagsForResource` operation on the `AWSShineFrontendService_20170701` service. + /// + /// Lists all tags associated with a given Amazon Translate resource. For more information, see [ Tagging your resources](https://docs.aws.amazon.com/translate/latest/dg/tagging.html). + /// + /// - Parameter ListTagsForResourceInput : [no documentation found] + /// + /// - Returns: `ListTagsForResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidParameterValueException` : The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. + /// - `ResourceNotFoundException` : The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. + func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput + /// Performs the `ListTerminologies` operation on the `AWSShineFrontendService_20170701` service. + /// + /// Provides a list of custom terminologies associated with your account. + /// + /// - Parameter ListTerminologiesInput : [no documentation found] + /// + /// - Returns: `ListTerminologiesOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidParameterValueException` : The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. + /// - `TooManyRequestsException` : You have made too many requests within a short period of time. Wait for a short time and then try your request again. + func listTerminologies(input: ListTerminologiesInput) async throws -> ListTerminologiesOutput + /// Performs the `ListTextTranslationJobs` operation on the `AWSShineFrontendService_20170701` service. + /// + /// Gets a list of the batch translation jobs that you have submitted. + /// + /// - Parameter ListTextTranslationJobsInput : [no documentation found] + /// + /// - Returns: `ListTextTranslationJobsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidFilterException` : The filter specified for the operation is not valid. Specify a different filter. + /// - `InvalidRequestException` : The request that you made is not valid. Check your request to determine why it's not valid and then retry the request. + /// - `TooManyRequestsException` : You have made too many requests within a short period of time. Wait for a short time and then try your request again. + func listTextTranslationJobs(input: ListTextTranslationJobsInput) async throws -> ListTextTranslationJobsOutput + /// Performs the `StartTextTranslationJob` operation on the `AWSShineFrontendService_20170701` service. + /// + /// Starts an asynchronous batch translation job. Use batch translation jobs to translate large volumes of text across multiple documents at once. For batch translation, you can input documents with different source languages (specify auto as the source language). You can specify one or more target languages. Batch translation translates each input document into each of the target languages. For more information, see [Asynchronous batch processing](https://docs.aws.amazon.com/translate/latest/dg/async.html). Batch translation jobs can be described with the [DescribeTextTranslationJob] operation, listed with the [ListTextTranslationJobs] operation, and stopped with the [StopTextTranslationJob] operation. + /// + /// - Parameter StartTextTranslationJobInput : [no documentation found] + /// + /// - Returns: `StartTextTranslationJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidParameterValueException` : The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. + /// - `InvalidRequestException` : The request that you made is not valid. Check your request to determine why it's not valid and then retry the request. + /// - `ResourceNotFoundException` : The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. + /// - `TooManyRequestsException` : You have made too many requests within a short period of time. Wait for a short time and then try your request again. + /// - `UnsupportedLanguagePairException` : Amazon Translate does not support translation from the language of the source text into the requested target language. For more information, see [Supported languages](https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html). + func startTextTranslationJob(input: StartTextTranslationJobInput) async throws -> StartTextTranslationJobOutput + /// Performs the `StopTextTranslationJob` operation on the `AWSShineFrontendService_20170701` service. + /// + /// Stops an asynchronous batch translation job that is in progress. If the job's state is IN_PROGRESS, the job will be marked for termination and put into the STOP_REQUESTED state. If the job completes before it can be stopped, it is put into the COMPLETED state. Otherwise, the job is put into the STOPPED state. Asynchronous batch translation jobs are started with the [StartTextTranslationJob] operation. You can use the [DescribeTextTranslationJob] or [ListTextTranslationJobs] operations to get a batch translation job's JobId. + /// + /// - Parameter StopTextTranslationJobInput : [no documentation found] + /// + /// - Returns: `StopTextTranslationJobOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `ResourceNotFoundException` : The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. + /// - `TooManyRequestsException` : You have made too many requests within a short period of time. Wait for a short time and then try your request again. + func stopTextTranslationJob(input: StopTextTranslationJobInput) async throws -> StopTextTranslationJobOutput + /// Performs the `TagResource` operation on the `AWSShineFrontendService_20170701` service. + /// + /// Associates a specific tag with a resource. A tag is a key-value pair that adds as a metadata to a resource. For more information, see [ Tagging your resources](https://docs.aws.amazon.com/translate/latest/dg/tagging.html). + /// + /// - Parameter TagResourceInput : [no documentation found] + /// + /// - Returns: `TagResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ConcurrentModificationException` : Another modification is being made. That modification must complete before you can make your change. + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidParameterValueException` : The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. + /// - `ResourceNotFoundException` : The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. + /// - `TooManyTagsException` : You have added too many tags to this resource. The maximum is 50 tags. + func tagResource(input: TagResourceInput) async throws -> TagResourceOutput + /// Performs the `TranslateDocument` operation on the `AWSShineFrontendService_20170701` service. + /// + /// Translates the input document from the source language to the target language. This synchronous operation supports text, HTML, or Word documents as the input document. TranslateDocument supports translations from English to any supported language, and from any supported language to English. Therefore, specify either the source language code or the target language code as “en” (English). If you set the Formality parameter, the request will fail if the target language does not support formality. For a list of target languages that support formality, see [Setting formality](https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-formality.html). + /// + /// - Parameter TranslateDocumentInput : [no documentation found] + /// + /// - Returns: `TranslateDocumentOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request that you made is not valid. Check your request to determine why it's not valid and then retry the request. + /// - `LimitExceededException` : The specified limit has been exceeded. Review your request and retry it with a quantity below the stated limit. + /// - `ResourceNotFoundException` : The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. + /// - `ServiceUnavailableException` : The Amazon Translate service is temporarily unavailable. Wait a bit and then retry your request. + /// - `TooManyRequestsException` : You have made too many requests within a short period of time. Wait for a short time and then try your request again. + /// - `UnsupportedLanguagePairException` : Amazon Translate does not support translation from the language of the source text into the requested target language. For more information, see [Supported languages](https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html). + func translateDocument(input: TranslateDocumentInput) async throws -> TranslateDocumentOutput + /// Performs the `TranslateText` operation on the `AWSShineFrontendService_20170701` service. + /// + /// Translates input text from the source language to the target language. For a list of available languages and language codes, see [Supported languages](https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html). + /// + /// - Parameter TranslateTextInput : [no documentation found] + /// + /// - Returns: `TranslateTextOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `DetectedLanguageLowConfidenceException` : The confidence that Amazon Comprehend accurately detected the source language is low. If a low confidence level is acceptable for your application, you can use the language in the exception to call Amazon Translate again. For more information, see the [DetectDominantLanguage](https://docs.aws.amazon.com/comprehend/latest/dg/API_DetectDominantLanguage.html) operation in the Amazon Comprehend Developer Guide. + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidRequestException` : The request that you made is not valid. Check your request to determine why it's not valid and then retry the request. + /// - `ResourceNotFoundException` : The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. + /// - `ServiceUnavailableException` : The Amazon Translate service is temporarily unavailable. Wait a bit and then retry your request. + /// - `TextSizeLimitExceededException` : The size of the text you submitted exceeds the size limit. Reduce the size of the text or use a smaller document and then retry your request. + /// - `TooManyRequestsException` : You have made too many requests within a short period of time. Wait for a short time and then try your request again. + /// - `UnsupportedLanguagePairException` : Amazon Translate does not support translation from the language of the source text into the requested target language. For more information, see [Supported languages](https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html). + func translateText(input: TranslateTextInput) async throws -> TranslateTextOutput + /// Performs the `UntagResource` operation on the `AWSShineFrontendService_20170701` service. + /// + /// Removes a specific tag associated with an Amazon Translate resource. For more information, see [ Tagging your resources](https://docs.aws.amazon.com/translate/latest/dg/tagging.html). + /// + /// - Parameter UntagResourceInput : [no documentation found] + /// + /// - Returns: `UntagResourceOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ConcurrentModificationException` : Another modification is being made. That modification must complete before you can make your change. + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidParameterValueException` : The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. + /// - `ResourceNotFoundException` : The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. + func untagResource(input: UntagResourceInput) async throws -> UntagResourceOutput + /// Performs the `UpdateParallelData` operation on the `AWSShineFrontendService_20170701` service. + /// + /// Updates a previously created parallel data resource by importing a new input file from Amazon S3. + /// + /// - Parameter UpdateParallelDataInput : [no documentation found] + /// + /// - Returns: `UpdateParallelDataOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ConcurrentModificationException` : Another modification is being made. That modification must complete before you can make your change. + /// - `ConflictException` : There was a conflict processing the request. Try your request again. + /// - `InternalServerException` : An internal server error occurred. Retry your request. + /// - `InvalidParameterValueException` : The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation. + /// - `InvalidRequestException` : The request that you made is not valid. Check your request to determine why it's not valid and then retry the request. + /// - `LimitExceededException` : The specified limit has been exceeded. Review your request and retry it with a quantity below the stated limit. + /// - `ResourceNotFoundException` : The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. + /// - `TooManyRequestsException` : You have made too many requests within a short period of time. Wait for a short time and then try your request again. + func updateParallelData(input: UpdateParallelDataInput) async throws -> UpdateParallelDataOutput +} +extension TranslateClient: TranslateClientProtocol { } diff --git a/AmplifyPlugins/Predictions/Tests/AWSPredictionsPluginUnitTests/Mocks/Service/MockComprehendBehavior.swift b/AmplifyPlugins/Predictions/Tests/AWSPredictionsPluginUnitTests/Mocks/Service/MockComprehendBehavior.swift index 3ab6f5026d..2af849766c 100644 --- a/AmplifyPlugins/Predictions/Tests/AWSPredictionsPluginUnitTests/Mocks/Service/MockComprehendBehavior.swift +++ b/AmplifyPlugins/Predictions/Tests/AWSPredictionsPluginUnitTests/Mocks/Service/MockComprehendBehavior.swift @@ -126,4 +126,5 @@ extension MockComprehendBehavior { func listFlywheels(input: AWSComprehend.ListFlywheelsInput) async throws -> AWSComprehend.ListFlywheelsOutput { fatalError() } func startFlywheelIteration(input: AWSComprehend.StartFlywheelIterationInput) async throws -> AWSComprehend.StartFlywheelIterationOutput { fatalError() } func updateFlywheel(input: AWSComprehend.UpdateFlywheelInput) async throws -> AWSComprehend.UpdateFlywheelOutput { fatalError() } + func detectToxicContent(input: AWSComprehend.DetectToxicContentInput) async throws -> AWSComprehend.DetectToxicContentOutput { fatalError() } } diff --git a/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Dependency/AWSS3ListObjectsV2Request.swift b/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Dependency/AWSS3ListObjectsV2Request.swift index f9065353c4..83cc5fdc6d 100644 --- a/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Dependency/AWSS3ListObjectsV2Request.swift +++ b/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Dependency/AWSS3ListObjectsV2Request.swift @@ -42,7 +42,7 @@ struct AWSS3ListObjectsV2Request { protocol S3Object { var key: String? { get } var eTag: String? { get } - var size: Int { get } + var size: Int? { get } var lastModified: Date? { get } } diff --git a/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Dependency/AWSS3MultipartUploadRequestCompletedPart.swift b/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Dependency/AWSS3MultipartUploadRequestCompletedPart.swift index e6b5ca4145..cf260ba53a 100644 --- a/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Dependency/AWSS3MultipartUploadRequestCompletedPart.swift +++ b/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Dependency/AWSS3MultipartUploadRequestCompletedPart.swift @@ -28,10 +28,11 @@ extension AWSS3MultipartUploadRequestCompletedParts { init(parts: [S3ClientTypes.Part]) { self = parts.compactMap { - guard let eTag = $0.eTag else { + guard let eTag = $0.eTag, + let partNumber = $0.partNumber else { return nil } - return AWSS3MultipartUploadRequestCompletedPart(partNumber: $0.partNumber, eTag: eTag) + return AWSS3MultipartUploadRequestCompletedPart(partNumber: partNumber, eTag: eTag) } } diff --git a/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Dependency/S3ClientConfiguration+withAccelerate.swift b/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Dependency/S3ClientConfiguration+withAccelerate.swift index bd3cac4d8b..526b90b1fe 100644 --- a/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Dependency/S3ClientConfiguration+withAccelerate.swift +++ b/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Dependency/S3ClientConfiguration+withAccelerate.swift @@ -44,8 +44,7 @@ extension S3Client.S3ClientConfiguration { useDualStack: useDualStack, useFIPS: useFIPS, retryMode: awsRetryMode, - appID: appID, - connectTimeoutMs: connectTimeoutMs + appID: appID ) return copy diff --git a/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Dependency/UploadPartInput+presignURL.swift b/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Dependency/UploadPartInput+presignURL.swift index 29bc2ace4e..6584e766f0 100644 --- a/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Dependency/UploadPartInput+presignURL.swift +++ b/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Dependency/UploadPartInput+presignURL.swift @@ -9,83 +9,85 @@ import AWSS3 import ClientRuntime import AWSClientRuntime -enum UploadPartOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError( - httpResponse: httpResponse, - message: restXMLError.message, - requestID: restXMLError.requestId, - requestID2: httpResponse.requestId2, - typeName: restXMLError.errorCode - ) - } - } -} - extension UploadPartInput { func customPresignURL(config: S3Client.S3ClientConfiguration, expiration: TimeInterval) async throws -> ClientRuntime.URL? { - let serviceName = "S3" - let input = self - let encoder = ClientRuntime.XMLEncoder() - encoder.dateEncodingStrategy = .secondsSince1970 - let decoder = ClientRuntime.XMLDecoder() - decoder.dateDecodingStrategy = .secondsSince1970 - decoder.trimValueWhitespaces = false - decoder.removeWhitespaceElements = true - let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) - .withMethod(value: .put) - .withServiceName(value: serviceName) - .withOperation(value: "uploadPart") - .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) - .withLogger(value: config.logger) - .withCredentialsProvider(value: config.credentialsProvider) - .withRegion(value: config.region) - .withSigningName(value: "s3") - .withSigningRegion(value: config.signingRegion) - var operation = ClientRuntime.OperationStack(id: "uploadPart") - operation.initializeStep.intercept( - position: .after, - middleware: ClientRuntime.URLPathMiddleware() - ) - operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) - operation.buildStep.intercept( + let serviceName = "S3" + let input = self + let context = ClientRuntime.HttpContextBuilder() + .withMethod(value: .put) + .withServiceName(value: serviceName) + .withOperation(value: "uploadPart") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withCredentialsProvider(value: config.credentialsProvider) + .withRegion(value: config.region) + .withSigningName(value: "s3") + .withSigningRegion(value: config.signingRegion) + .build() + var operation = ClientRuntime.OperationStack(id: "uploadPart") + operation.initializeStep.intercept( + position: .after, middleware: ClientRuntime.URLPathMiddleware(UploadPartInput.urlPathProvider(_:))) + operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) + operation.buildStep.intercept( position: .before, - middleware: EndpointResolverMiddleware( + middleware: EndpointResolverMiddleware( endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: config.endpointParams(withBucket: input.bucket) ) - ) - operation.serializeStep.intercept(position: .after, middleware: UploadPartInputBodyMiddleware()) - operation.serializeStep.intercept(position: .after, middleware: QueryItemMiddleware()) - operation.finalizeStep.intercept( - position: .after, - middleware: ClientRuntime.RetryMiddleware( - options: config.retryStrategyOptions - ) - ) - let sigv4Config = AWSClientRuntime.SigV4Config( + ) + operation.serializeStep.intercept( + position: .after, middleware: ClientRuntime.QueryItemMiddleware(UploadPartInput.queryItemProvider(_:))) + operation.finalizeStep.intercept( + position: .after, + middleware: ClientRuntime.RetryMiddleware( + options: config.retryStrategyOptions)) + let sigv4Config = AWSClientRuntime.SigV4Config( signatureType: .requestQueryParams, useDoubleURIEncode: false, expiration: expiration, unsignedBody: true, - signingAlgorithm: .sigv4 - ) - operation.finalizeStep.intercept( - position: .before, - middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config) - ) - operation.deserializeStep.intercept( - position: .before, - middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware()) - let presignedRequestBuilder = try await operation.presignedRequest(context: context.build(), input: input, next: ClientRuntime.NoopHandler()) + signingAlgorithm: .sigv4) + operation.finalizeStep.intercept( + position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) + operation.deserializeStep.intercept( + position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + operation.deserializeStep.intercept( + position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) + let presignedRequestBuilder = try await operation.presignedRequest( + context: context, input: input, output: UploadPartOutput(), next: ClientRuntime.NoopHandler()) guard let builtRequest = presignedRequestBuilder?.build(), let presignedURL = builtRequest.endpoint.url else { return nil } return presignedURL } + + static func urlPathProvider(_ value: UploadPartInput) -> Swift.String? { + guard let key = value.key else { + return nil + } + return "/\(key.urlPercentEncoding(encodeForwardSlash: false))" + } + } + +extension UploadPartInput { + + static func queryItemProvider(_ value: UploadPartInput) throws -> [ClientRuntime.SDKURLQueryItem] { + var items = [ClientRuntime.SDKURLQueryItem]() + items.append(ClientRuntime.SDKURLQueryItem(name: "x-id", value: "UploadPart")) + guard let partNumber = value.partNumber else { + let message = "Creating a URL Query Item failed. partNumber is required and must not be nil." + throw ClientRuntime.ClientError.unknownError(message) + } + let partNumberQueryItem = ClientRuntime.SDKURLQueryItem(name: "partNumber".urlPercentEncoding(), value: Swift.String(partNumber).urlPercentEncoding()) + items.append(partNumberQueryItem) + guard let uploadId = value.uploadId else { + let message = "Creating a URL Query Item failed. uploadId is required and must not be nil." + throw ClientRuntime.ClientError.unknownError(message) + } + let uploadIdQueryItem = ClientRuntime.SDKURLQueryItem(name: "uploadId".urlPercentEncoding(), value: Swift.String(uploadId).urlPercentEncoding()) + items.append(uploadIdQueryItem) + return items + } +} diff --git a/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Service/Storage/S3ClientProtocol.swift b/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Service/Storage/S3ClientProtocol.swift new file mode 100644 index 0000000000..0a8bba44ae --- /dev/null +++ b/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Service/Storage/S3ClientProtocol.swift @@ -0,0 +1,343 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +import AWSS3 +import ClientRuntime + +protocol S3ClientProtocol { + + /// Performs the `DeleteObject` operation on the `AmazonS3` service. + /// + /// Removes an object from a bucket. The behavior depends on the bucket's versioning state: + /// + /// * If versioning is enabled, the operation removes the null version (if there is one) of an object and inserts a delete marker, which becomes the latest version of the object. If there isn't a null version, Amazon S3 does not remove any objects but will still respond that the command was successful. + /// + /// * If versioning is suspended or not enabled, the operation permanently deletes the object. + /// + /// + /// + /// + /// * Directory buckets - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the versionId query parameter in the request. + /// + /// * Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style requests are not supported. For more information, see [Regional and Zonal endpoints](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) in the Amazon S3 User Guide. + /// + /// + /// To remove a specific version, you must use the versionId query parameter. Using this query parameter permanently deletes the version. If the object deleted is a delete marker, Amazon S3 sets the response header x-amz-delete-marker to true. If the object you want to delete is in a bucket where the bucket versioning configuration is MFA Delete enabled, you must include the x-amz-mfa request header in the DELETE versionId request. Requests that include x-amz-mfa must use HTTPS. For more information about MFA Delete, see [Using MFA Delete](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html) in the Amazon S3 User Guide. To see sample requests that use versioning, see [Sample Request](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete). Directory buckets - MFA delete is not supported by directory buckets. You can delete objects by explicitly calling DELETE Object or calling ([PutBucketLifecycle](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html)) to enable Amazon S3 to remove them for you. If you want to block users or accounts from removing or deleting objects from your bucket, you must deny them the s3:DeleteObject, s3:DeleteObjectVersion, and s3:PutLifeCycleConfiguration actions. Directory buckets - S3 Lifecycle is not supported by directory buckets. Permissions + /// + /// * General purpose bucket permissions - The following permissions are required in your policies when your DeleteObjects request includes specific headers. + /// + /// * s3:DeleteObject - To delete an object from a bucket, you must always have the s3:DeleteObject permission. + /// + /// * s3:DeleteObjectVersion - To delete a specific version of an object from a versiong-enabled bucket, you must have the s3:DeleteObjectVersion permission. + /// + /// + /// + /// + /// * Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the [CreateSession](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html) API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see [CreateSession](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html). + /// + /// + /// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. The following action is related to DeleteObject: + /// + /// * [PutObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html) + /// + /// - Parameter DeleteObjectInput : [no documentation found] + /// + /// - Returns: `DeleteObjectOutput` : [no documentation found] + func deleteObject(input: DeleteObjectInput) async throws -> DeleteObjectOutput + + /// Performs the `ListObjectsV2` operation on the `AmazonS3` service. + /// + /// Returns some or all (up to 1,000) of the objects in a bucket with each request. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK response can contain valid or invalid XML. Make sure to design your application to parse the contents of the response and handle it appropriately. For more information about listing objects, see [Listing object keys programmatically](https://docs.aws.amazon.com/AmazonS3/latest/userguide/ListingKeysUsingAPIs.html) in the Amazon S3 User Guide. To get a list of your buckets, see [ListBuckets](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html). Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style requests are not supported. For more information, see [Regional and Zonal endpoints](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) in the Amazon S3 User Guide. Permissions + /// + /// * General purpose bucket permissions - To use this operation, you must have READ access to the bucket. You must have permission to perform the s3:ListBucket action. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see [Permissions Related to Bucket Subresource Operations](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) and [Managing Access Permissions to Your Amazon S3 Resources](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) in the Amazon S3 User Guide. + /// + /// * Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the [CreateSession](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html) API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see [CreateSession](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html). + /// + /// + /// Sorting order of returned objects + /// + /// * General purpose bucket - For general purpose buckets, ListObjectsV2 returns objects in lexicographical order based on their key names. + /// + /// * Directory bucket - For directory buckets, ListObjectsV2 does not return objects in lexicographical order. + /// + /// + /// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. This section describes the latest revision of this action. We recommend that you use this revised API operation for application development. For backward compatibility, Amazon S3 continues to support the prior version of this API operation, [ListObjects](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html). The following operations are related to ListObjectsV2: + /// + /// * [GetObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) + /// + /// * [PutObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html) + /// + /// * [CreateBucket](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html) + /// + /// - Parameter ListObjectsV2Input : [no documentation found] + /// + /// - Returns: `ListObjectsV2Output` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `NoSuchBucket` : The specified bucket does not exist. + func listObjectsV2(input: ListObjectsV2Input) async throws -> ListObjectsV2Output + + /// Performs the `CreateMultipartUpload` operation on the `AmazonS3` service. + /// + /// This action initiates a multipart upload and returns an upload ID. This upload ID is used to associate all of the parts in the specific multipart upload. You specify this upload ID in each of your subsequent upload part requests (see [UploadPart](https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)). You also include this upload ID in the final request to either complete or abort the multipart upload request. For more information about multipart uploads, see [Multipart Upload Overview](https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html) in the Amazon S3 User Guide. After you initiate a multipart upload and upload one or more parts, to stop being charged for storing the uploaded parts, you must either complete or abort the multipart upload. Amazon S3 frees up the space used to store the parts and stops charging you for storing them only after you either complete or abort a multipart upload. If you have configured a lifecycle rule to abort incomplete multipart uploads, the created multipart upload must be completed within the number of days specified in the bucket lifecycle configuration. Otherwise, the incomplete multipart upload becomes eligible for an abort action and Amazon S3 aborts the multipart upload. For more information, see [Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration](https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config). + /// + /// * Directory buckets - S3 Lifecycle is not supported by directory buckets. + /// + /// * Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style requests are not supported. For more information, see [Regional and Zonal endpoints](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) in the Amazon S3 User Guide. + /// + /// + /// Request signing For request signing, multipart upload is just a series of regular requests. You initiate a multipart upload, send one or more requests to upload parts, and then complete the multipart upload process. You sign each request individually. There is nothing special about signing multipart upload requests. For more information about signing, see [Authenticating Requests (Amazon Web Services Signature Version 4)](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html) in the Amazon S3 User Guide. Permissions + /// + /// * General purpose bucket permissions - For information about the permissions required to use the multipart upload API, see [Multipart upload and permissions](https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) in the Amazon S3 User Guide. To perform a multipart upload with encryption by using an Amazon Web Services KMS key, the requester must have permission to the kms:Decrypt and kms:GenerateDataKey* actions on the key. These permissions are required because Amazon S3 must decrypt and read data from the encrypted file parts before it completes the multipart upload. For more information, see [Multipart upload API and permissions](https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions) and [Protecting data using server-side encryption with Amazon Web Services KMS](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html) in the Amazon S3 User Guide. + /// + /// * Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the [CreateSession](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html) API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see [CreateSession](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html). + /// + /// + /// Encryption + /// + /// * General purpose buckets - Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. Amazon S3 automatically encrypts all new objects that are uploaded to an S3 bucket. When doing a multipart upload, if you don't specify encryption information in your request, the encryption setting of the uploaded parts is set to the default encryption configuration of the destination bucket. By default, all buckets have a base level of encryption configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination bucket has a default encryption configuration that uses server-side encryption with an Key Management Service (KMS) key (SSE-KMS), or a customer-provided encryption key (SSE-C), Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the uploaded parts. When you perform a CreateMultipartUpload operation, if you want to use a different type of encryption setting for the uploaded parts, you can request that Amazon S3 encrypts the object with a different encryption key (such as an Amazon S3 managed key, a KMS key, or a customer-provided key). When the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence. If you choose to provide your own encryption key, the request headers you provide in [UploadPart](https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) and [UploadPartCopy](https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html) requests must match the headers you used in the CreateMultipartUpload request. + /// + /// * Use KMS keys (SSE-KMS) that include the Amazon Web Services managed key (aws/s3) and KMS customer managed keys stored in Key Management Service (KMS) – If you want Amazon Web Services to manage the keys used to encrypt data, specify the following headers in the request. + /// + /// * x-amz-server-side-encryption + /// + /// * x-amz-server-side-encryption-aws-kms-key-id + /// + /// * x-amz-server-side-encryption-context + /// + /// + /// + /// + /// * If you specify x-amz-server-side-encryption:aws:kms, but don't provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key (aws/s3 key) in KMS to protect the data. + /// + /// * To perform a multipart upload with encryption by using an Amazon Web Services KMS key, the requester must have permission to the kms:Decrypt and kms:GenerateDataKey* actions on the key. These permissions are required because Amazon S3 must decrypt and read data from the encrypted file parts before it completes the multipart upload. For more information, see [Multipart upload API and permissions](https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions) and [Protecting data using server-side encryption with Amazon Web Services KMS](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html) in the Amazon S3 User Guide. + /// + /// * If your Identity and Access Management (IAM) user or role is in the same Amazon Web Services account as the KMS key, then you must have these permissions on the key policy. If your IAM user or role is in a different account from the key, then you must have the permissions on both the key policy and your IAM user or role. + /// + /// * All GET and PUT requests for an object protected by KMS fail if you don't make them by using Secure Sockets Layer (SSL), Transport Layer Security (TLS), or Signature Version 4. For information about configuring any of the officially supported Amazon Web Services SDKs and Amazon Web Services CLI, see [Specifying the Signature Version in Request Authentication](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version) in the Amazon S3 User Guide. + /// + /// + /// For more information about server-side encryption with KMS keys (SSE-KMS), see [Protecting Data Using Server-Side Encryption with KMS keys](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html) in the Amazon S3 User Guide. + /// + /// * Use customer-provided encryption keys (SSE-C) – If you want to manage your own encryption keys, provide all the following headers in the request. + /// + /// * x-amz-server-side-encryption-customer-algorithm + /// + /// * x-amz-server-side-encryption-customer-key + /// + /// * x-amz-server-side-encryption-customer-key-MD5 + /// + /// + /// For more information about server-side encryption with customer-provided encryption keys (SSE-C), see [ Protecting data using server-side encryption with customer-provided encryption keys (SSE-C)](https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html) in the Amazon S3 User Guide. + /// + /// + /// + /// + /// * Directory buckets -For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) is supported. + /// + /// + /// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. The following operations are related to CreateMultipartUpload: + /// + /// * [UploadPart](https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) + /// + /// * [CompleteMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html) + /// + /// * [AbortMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html) + /// + /// * [ListParts](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html) + /// + /// * [ListMultipartUploads](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html) + /// + /// - Parameter CreateMultipartUploadInput : [no documentation found] + /// + /// - Returns: `CreateMultipartUploadOutput` : [no documentation found] + func createMultipartUpload(input: CreateMultipartUploadInput) async throws -> CreateMultipartUploadOutput + + /// Performs the `ListParts` operation on the `AmazonS3` service. + /// + /// Lists the parts that have been uploaded for a specific multipart upload. To use this operation, you must provide the upload ID in the request. You obtain this uploadID by sending the initiate multipart upload request through [CreateMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html). The ListParts request returns a maximum of 1,000 uploaded parts. The limit of 1,000 parts is also the default value. You can restrict the number of parts in a response by specifying the max-parts request parameter. If your multipart upload consists of more than 1,000 parts, the response returns an IsTruncated field with the value of true, and a NextPartNumberMarker element. To list remaining uploaded parts, in subsequent ListParts requests, include the part-number-marker query string parameter and set its value to the NextPartNumberMarker field value from the previous response. For more information on multipart uploads, see [Uploading Objects Using Multipart Upload](https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html) in the Amazon S3 User Guide. Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style requests are not supported. For more information, see [Regional and Zonal endpoints](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) in the Amazon S3 User Guide. Permissions + /// + /// * General purpose bucket permissions - For information about permissions required to use the multipart upload API, see [Multipart Upload and Permissions](https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) in the Amazon S3 User Guide. If the upload was created using server-side encryption with Key Management Service (KMS) keys (SSE-KMS) or dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), you must have permission to the kms:Decrypt action for the ListParts request to succeed. + /// + /// * Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the [CreateSession](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html) API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see [CreateSession](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html). + /// + /// + /// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. The following operations are related to ListParts: + /// + /// * [CreateMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) + /// + /// * [UploadPart](https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) + /// + /// * [CompleteMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html) + /// + /// * [AbortMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html) + /// + /// * [GetObjectAttributes](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html) + /// + /// * [ListMultipartUploads](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html) + /// + /// - Parameter ListPartsInput : [no documentation found] + /// + /// - Returns: `ListPartsOutput` : [no documentation found] + func listParts(input: ListPartsInput) async throws -> ListPartsOutput + + /// Performs the `CompleteMultipartUpload` operation on the `AmazonS3` service. + /// + /// Completes a multipart upload by assembling previously uploaded parts. You first initiate the multipart upload and then upload all parts using the [UploadPart](https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) operation or the [UploadPartCopy](https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html) operation. After successfully uploading all relevant parts of an upload, you call this CompleteMultipartUpload operation to complete the upload. Upon receiving this request, Amazon S3 concatenates all the parts in ascending order by part number to create a new object. In the CompleteMultipartUpload request, you must provide the parts list and ensure that the parts list is complete. The CompleteMultipartUpload API operation concatenates the parts that you provide in the list. For each part in the list, you must provide the PartNumber value and the ETag value that are returned after that part was uploaded. The processing of a CompleteMultipartUpload request could take several minutes to finalize. After Amazon S3 begins processing the request, it sends an HTTP response header that specifies a 200 OK response. While processing is in progress, Amazon S3 periodically sends white space characters to keep the connection from timing out. A request could fail after the initial 200 OK response has been sent. This means that a 200 OK response can contain either a success or an error. The error response might be embedded in the 200 OK response. If you call this API operation directly, make sure to design your application to parse the contents of the response and handle it appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The SDKs detect the embedded error and apply error handling per your configuration settings (including automatically retrying the request as appropriate). If the condition persists, the SDKs throw an exception (or, for the SDKs that don't use exceptions, they return an error). Note that if CompleteMultipartUpload fails, applications should be prepared to retry the failed requests. For more information, see [Amazon S3 Error Best Practices](https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html). You can't use Content-Type: application/x-www-form-urlencoded for the CompleteMultipartUpload requests. Also, if you don't provide a Content-Type header, CompleteMultipartUpload can still return a 200 OK response. For more information about multipart uploads, see [Uploading Objects Using Multipart Upload](https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html) in the Amazon S3 User Guide. Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style requests are not supported. For more information, see [Regional and Zonal endpoints](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) in the Amazon S3 User Guide. Permissions + /// + /// * General purpose bucket permissions - For information about permissions required to use the multipart upload API, see [Multipart Upload and Permissions](https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) in the Amazon S3 User Guide. + /// + /// * Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the [CreateSession](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html) API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see [CreateSession](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html). + /// + /// + /// Special errors + /// + /// * Error Code: EntityTooSmall + /// + /// * Description: Your proposed upload is smaller than the minimum allowed object size. Each part must be at least 5 MB in size, except the last part. + /// + /// * HTTP Status Code: 400 Bad Request + /// + /// + /// + /// + /// * Error Code: InvalidPart + /// + /// * Description: One or more of the specified parts could not be found. The part might not have been uploaded, or the specified ETag might not have matched the uploaded part's ETag. + /// + /// * HTTP Status Code: 400 Bad Request + /// + /// + /// + /// + /// * Error Code: InvalidPartOrder + /// + /// * Description: The list of parts was not in ascending order. The parts list must be specified in order by part number. + /// + /// * HTTP Status Code: 400 Bad Request + /// + /// + /// + /// + /// * Error Code: NoSuchUpload + /// + /// * Description: The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed. + /// + /// * HTTP Status Code: 404 Not Found + /// + /// + /// + /// + /// + /// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. The following operations are related to CompleteMultipartUpload: + /// + /// * [CreateMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) + /// + /// * [UploadPart](https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) + /// + /// * [AbortMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html) + /// + /// * [ListParts](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html) + /// + /// * [ListMultipartUploads](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html) + /// + /// - Parameter CompleteMultipartUploadInput : [no documentation found] + /// + /// - Returns: `CompleteMultipartUploadOutput` : [no documentation found] + func completeMultipartUpload(input: CompleteMultipartUploadInput) async throws -> CompleteMultipartUploadOutput + + /// Performs the `AbortMultipartUpload` operation on the `AmazonS3` service. + /// + /// This operation aborts a multipart upload. After a multipart upload is aborted, no additional parts can be uploaded using that upload ID. The storage consumed by any previously uploaded parts will be freed. However, if any part uploads are currently in progress, those part uploads might or might not succeed. As a result, it might be necessary to abort a given multipart upload multiple times in order to completely free all storage consumed by all parts. To verify that all parts have been removed and prevent getting charged for the part storage, you should call the [ListParts](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html) API operation and ensure that the parts list is empty. Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style requests are not supported. For more information, see [Regional and Zonal endpoints](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) in the Amazon S3 User Guide. Permissions + /// + /// * General purpose bucket permissions - For information about permissions required to use the multipart upload, see [Multipart Upload and Permissions](https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) in the Amazon S3 User Guide. + /// + /// * Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the [CreateSession](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html) API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see [CreateSession](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html). + /// + /// + /// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. The following operations are related to AbortMultipartUpload: + /// + /// * [CreateMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) + /// + /// * [UploadPart](https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) + /// + /// * [CompleteMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html) + /// + /// * [ListParts](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html) + /// + /// * [ListMultipartUploads](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html) + /// + /// - Parameter AbortMultipartUploadInput : [no documentation found] + /// + /// - Returns: `AbortMultipartUploadOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `NoSuchUpload` : The specified multipart upload does not exist. + func abortMultipartUpload(input: AbortMultipartUploadInput) async throws -> AbortMultipartUploadOutput + + /// Performs the `HeadObject` operation on the `AmazonS3` service. + /// + /// The HEAD operation retrieves metadata from an object without returning the object itself. This operation is useful if you're interested only in an object's metadata. A HEAD request has the same options as a GET operation on an object. The response is identical to the GET response except that there is no response body. Because of this, if the HEAD request generates an error, it returns a generic code, such as 400 Bad Request, 403 Forbidden, 404 Not Found, 405 Method Not Allowed, 412 Precondition Failed, or 304 Not Modified. It's not possible to retrieve the exact exception of these error codes. Request headers are limited to 8 KB in size. For more information, see [Common Request Headers](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html). Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style requests are not supported. For more information, see [Regional and Zonal endpoints](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) in the Amazon S3 User Guide. Permissions + /// + /// * General purpose bucket permissions - To use HEAD, you must have the s3:GetObject permission. You need the relevant read object (or version) permission for this operation. For more information, see [Actions, resources, and condition keys for Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html) in the Amazon S3 User Guide. If the object you request doesn't exist, the error that Amazon S3 returns depends on whether you also have the s3:ListBucket permission. + /// + /// * If you have the s3:ListBucket permission on the bucket, Amazon S3 returns an HTTP status code 404 Not Found error. + /// + /// * If you don’t have the s3:ListBucket permission, Amazon S3 returns an HTTP status code 403 Forbidden error. + /// + /// + /// + /// + /// * Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the [CreateSession](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html) API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see [CreateSession](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html). + /// + /// + /// Encryption Encryption request headers, like x-amz-server-side-encryption, should not be sent for HEAD requests if your object uses server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side encryption with Amazon S3 managed encryption keys (SSE-S3). The x-amz-server-side-encryption header is used when you PUT an object to S3 and want to specify the encryption method. If you include this header in a HEAD request for an object that uses these types of keys, you’ll get an HTTP 400 Bad Request error. It's because the encryption method can't be changed when you retrieve the object. If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve the metadata from the object, you must use the following headers to provide the encryption key for the server to be able to retrieve the object's metadata. The headers are: + /// + /// * x-amz-server-side-encryption-customer-algorithm + /// + /// * x-amz-server-side-encryption-customer-key + /// + /// * x-amz-server-side-encryption-customer-key-MD5 + /// + /// + /// For more information about SSE-C, see [Server-Side Encryption (Using Customer-Provided Encryption Keys)](https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html) in the Amazon S3 User Guide. Directory bucket permissions - For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) is supported. Versioning + /// + /// * If the current version of the object is a delete marker, Amazon S3 behaves as if the object was deleted and includes x-amz-delete-marker: true in the response. + /// + /// * If the specified version is a delete marker, the response returns a 405 Method Not Allowed error and the Last-Modified: timestamp response header. + /// + /// + /// + /// + /// * Directory buckets - Delete marker is not supported by directory buckets. + /// + /// * Directory buckets - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the versionId query parameter in the request. + /// + /// + /// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. The following actions are related to HeadObject: + /// + /// * [GetObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) + /// + /// * [GetObjectAttributes](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html) + /// + /// - Parameter HeadObjectInput : [no documentation found] + /// + /// - Returns: `HeadObjectOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `NotFound` : The specified content does not exist. + func headObject(input: HeadObjectInput) async throws -> HeadObjectOutput + +} + +extension S3Client: S3ClientProtocol { } diff --git a/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Support/Utils/HttpClientEngineProxy.swift b/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Support/Utils/HttpClientEngineProxy.swift index 0319d37d5c..407dc79756 100644 --- a/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Support/Utils/HttpClientEngineProxy.swift +++ b/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Support/Utils/HttpClientEngineProxy.swift @@ -21,11 +21,11 @@ import Foundation /// * [CommonRuntime.HttpClientEngine](x-source-tag://HttpClientEngine) /// /// - Tag: HttpClientEngineProxy -protocol HttpClientEngineProxy: HttpClientEngine { +protocol HttpClientEngineProxy: HTTPClient { /// The actual engine performing the requests. This must be set before the receiver gets its first call to /// `execute(request:)`. /// /// - Tag: HttpClientEngineProxy.target - var target: HttpClientEngine? { get set } + var target: HTTPClient? { get set } } diff --git a/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Configuration/S3ClientConfigurationProxyTests.swift b/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Configuration/S3ClientConfigurationProxyTests.swift index 77d1ec3b3d..5ac3ba6a9a 100644 --- a/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Configuration/S3ClientConfigurationProxyTests.swift +++ b/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Configuration/S3ClientConfigurationProxyTests.swift @@ -78,8 +78,7 @@ final class S3ClientConfigurationAccelerateTestCase: XCTestCase { useDualStack: .random(), useFIPS: .random(), retryMode: .adaptive, - appID: UUID().uuidString, - connectTimeoutMs: .random(in: UInt32.min...UInt32.max) + appID: UUID().uuidString ) return baseConfiguration diff --git a/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Mocks/MockS3Client.swift b/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Mocks/MockS3Client.swift index 4e1f296d91..a8c8f9f4b1 100644 --- a/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Mocks/MockS3Client.swift +++ b/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Mocks/MockS3Client.swift @@ -7,6 +7,7 @@ import AWSS3 import Foundation +@testable import AWSS3StoragePlugin /// - Tag: MockS3Client final class MockS3Client { diff --git a/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Service/Storage/AWSS3StorageServiceGetPreSignedURLBehaviorTests.swift b/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Service/Storage/AWSS3StorageServiceGetPreSignedURLBehaviorTests.swift index 5e438e735f..fc65aa9322 100644 --- a/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Service/Storage/AWSS3StorageServiceGetPreSignedURLBehaviorTests.swift +++ b/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Service/Storage/AWSS3StorageServiceGetPreSignedURLBehaviorTests.swift @@ -43,7 +43,7 @@ class AWSS3StorageServiceGetPreSignedURLBehaviorTests: XCTestCase { bucket: bucket, storageTransferDatabase: database) systemUnderTest.preSignedURLBuilder = builder - systemUnderTest.client = client + systemUnderTest.client = client let url = try XCTUnwrap(presignedURL) builder.getPreSignedURLHandler = { (_,_,_) in @@ -145,9 +145,7 @@ class AWSS3StorageServiceGetPreSignedURLBehaviorTests: XCTestCase { /// - Then: An SdkError.service is thrown func testvalidateObjectExistenceForNonExistentKeyWithSdkServiceError() async throws { client.headObjectHandler = { _ in - throw try await AWSS3.NotFound( - httpResponse: HttpResponse(body: .none, statusCode: .notFound) - ) + throw AWSS3.NotFound() } let nonExistentKey = UUID().uuidString do { diff --git a/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Service/Storage/AWSS3StorageServiceTests.swift b/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Service/Storage/AWSS3StorageServiceTests.swift index 7555e75ad1..470ab13c7c 100644 --- a/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Service/Storage/AWSS3StorageServiceTests.swift +++ b/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Service/Storage/AWSS3StorageServiceTests.swift @@ -387,11 +387,11 @@ class AWSS3StorageServiceTests: XCTestCase { } private class MockHttpClientEngineProxy: HttpClientEngineProxy { - var target: HttpClientEngine? = nil + var target: HTTPClient? = nil var executeCount = 0 var executeRequest: SdkHttpRequest? - func execute(request: SdkHttpRequest) async throws -> HttpResponse { + func send(request: SdkHttpRequest) async throws -> HttpResponse { executeCount += 1 executeRequest = request return .init(body: .empty, statusCode: .accepted) diff --git a/AmplifyPlugins/Storage/Tests/StorageHostApp/AWSS3StoragePluginIntegrationTests/AWSS3StoragePluginRequestRecorder.swift b/AmplifyPlugins/Storage/Tests/StorageHostApp/AWSS3StoragePluginIntegrationTests/AWSS3StoragePluginRequestRecorder.swift index 808d1d8a42..973dead62d 100644 --- a/AmplifyPlugins/Storage/Tests/StorageHostApp/AWSS3StoragePluginIntegrationTests/AWSS3StoragePluginRequestRecorder.swift +++ b/AmplifyPlugins/Storage/Tests/StorageHostApp/AWSS3StoragePluginIntegrationTests/AWSS3StoragePluginRequestRecorder.swift @@ -11,7 +11,7 @@ import ClientRuntime import Foundation class AWSS3StoragePluginRequestRecorder { - var target: HttpClientEngine? = nil + var target: HTTPClient? = nil var sdkRequests: [SdkHttpRequest] = [] var urlRequests: [URLRequest] = [] init() { @@ -19,12 +19,12 @@ class AWSS3StoragePluginRequestRecorder { } extension AWSS3StoragePluginRequestRecorder: HttpClientEngineProxy { - func execute(request: SdkHttpRequest) async throws -> HttpResponse { + func send(request: SdkHttpRequest) async throws -> HttpResponse { guard let target = target else { throw ClientError.unknownError("HttpClientEngine is not set") } sdkRequests.append(request) - return try await target.execute(request: request) + return try await target.send(request: request) } } diff --git a/AmplifyPlugins/Storage/Tests/StorageHostApp/StorageHostApp.xcodeproj/project.pbxproj b/AmplifyPlugins/Storage/Tests/StorageHostApp/StorageHostApp.xcodeproj/project.pbxproj index d6c2a2c236..da28c91c22 100644 --- a/AmplifyPlugins/Storage/Tests/StorageHostApp/StorageHostApp.xcodeproj/project.pbxproj +++ b/AmplifyPlugins/Storage/Tests/StorageHostApp/StorageHostApp.xcodeproj/project.pbxproj @@ -748,7 +748,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = W3DRXD72QU; + DEVELOPMENT_TEAM = ""; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_CFBundleDisplayName = "$(APP_DISPLAY_NAME)"; LD_RUNPATH_SEARCH_PATHS = ( @@ -774,7 +774,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = W3DRXD72QU; + DEVELOPMENT_TEAM = ""; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_CFBundleDisplayName = "$(APP_DISPLAY_NAME)"; LD_RUNPATH_SEARCH_PATHS = ( diff --git a/Package.resolved b/Package.resolved index c81f54c67e..a5613ee721 100644 --- a/Package.resolved +++ b/Package.resolved @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/awslabs/aws-crt-swift", "state" : { - "revision" : "fd1756b6e5c9fd1a906edfb743f7cb64c2c98639", - "version" : "0.17.0" + "revision" : "0d0a0cf2e2cb780ceeceac190b4ede94f4f96902", + "version" : "0.26.0" } }, { @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/awslabs/aws-sdk-swift.git", "state" : { - "revision" : "387016f3e62119e9962da4357c63671c694554e6", - "version" : "0.31.0" + "revision" : "485501db8b0c57d6636c2b33a03dcd77ee0911f9", + "version" : "0.36.1" } }, { @@ -59,8 +59,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/smithy-lang/smithy-swift", "state" : { - "revision" : "ab999a9f0c972adcb350beda3c630a35697f7e8e", - "version" : "0.35.0" + "revision" : "64e66f3e3ac07d4180c2460a7af6e4ba4b92e9cb", + "version" : "0.41.0" } }, { @@ -81,15 +81,6 @@ "version" : "4.0.4" } }, - { - "identity" : "swift-collections", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-collections", - "state" : { - "revision" : "94cf62b3ba8d4bed62680a282d4c25f9c63c2efb", - "version" : "1.1.0" - } - }, { "identity" : "swift-log", "kind" : "remoteSourceControl", @@ -98,15 +89,6 @@ "revision" : "e97a6fcb1ab07462881ac165fdbb37f067e205d5", "version" : "1.5.4" } - }, - { - "identity" : "xmlcoder", - "kind" : "remoteSourceControl", - "location" : "https://github.com/MaxDesiatov/XMLCoder.git", - "state" : { - "revision" : "80b4a1646399b8e4e0ce80711653476a85bd5e37", - "version" : "0.17.0" - } } ], "version" : 2 diff --git a/Package.swift b/Package.swift index deb1475cf5..43065db332 100644 --- a/Package.swift +++ b/Package.swift @@ -9,7 +9,7 @@ let platforms: [SupportedPlatform] = [ .watchOS(.v9) ] let dependencies: [Package.Dependency] = [ - .package(url: "https://github.com/awslabs/aws-sdk-swift.git", exact: "0.31.0"), + .package(url: "https://github.com/awslabs/aws-sdk-swift.git", exact: "0.36.1"), .package(url: "https://github.com/aws-amplify/aws-appsync-realtime-client-ios.git", from: "3.0.0"), .package(url: "https://github.com/stephencelis/SQLite.swift.git", exact: "0.13.2"), .package(url: "https://github.com/mattgallagher/CwlPreconditionTesting.git", from: "2.1.0"),