ClientError
Errors returned by AWSClient code
struct ClientErrorErrors returned by AWSClient code
struct ClientErrorimport SotoCorefinal class AWSClientClient managing communication with AWS services
init(credentialProvider credentialProviderFactory: CredentialProviderFactory = .default, retryPolicy retryPolicyFactory: RetryPolicyFactory = .default, middleware: some AWSMiddlewareProtocol, options: AWSClient.Options = Options(), httpClient: any AWSHTTPClient = HTTPClient.shared, logger: Logger = AWSClient.loggingDisabled) Initialize an AWSClient struct
init(credentialProvider credentialProviderFactory: CredentialProviderFactory = .default, retryPolicy retryPolicyFactory: RetryPolicyFactory = .default, options: AWSClient.Options = Options(), httpClient: any AWSHTTPClient = HTTPClient.shared, logger: Logger = AWSClient.loggingDisabled) Initialize an AWSClient struct
static let loggingDisabled: LoggerDefault logger that logs nothing
let credentialProvider: any CredentialProviderAWS credentials provider
let httpClient: any AWSHTTPClientHTTP client used by AWSClient
let logger: LoggerLogger used for non-request based output
let middleware: any AWSMiddlewareProtocolMiddleware code to be applied to requests and responses
func execute<Output>(operation operationName: String, path: String, httpMethod: HTTPMethod, serviceConfig: AWSServiceConfig, input: some AWSEncodableShape, hostPrefix: String? = nil, logger: Logger = AWSClient.loggingDisabled) async throws -> Output where Output : AWSDecodableShape Execute a request with an input object and return the output object generated from the response
func execute(operation operationName: String, path: String, httpMethod: HTTPMethod, serviceConfig: AWSServiceConfig, input: some AWSEncodableShape, hostPrefix: String? = nil, logger: Logger = AWSClient.loggingDisabled) async throws Execute a request with an input object and an empty response
func execute<Output>(operation operationName: String, path: String, httpMethod: HTTPMethod, serviceConfig: AWSServiceConfig, logger: Logger = AWSClient.loggingDisabled) async throws -> Output where Output : AWSDecodableShape Execute an empty request and return the output object generated from the response
func execute(operation operationName: String, path: String, httpMethod: HTTPMethod, serviceConfig: AWSServiceConfig, logger: Logger = AWSClient.loggingDisabled) async throws Execute an empty request and an empty response
func getCredential(logger: Logger = AWSClient.loggingDisabled) async throws -> any Credential Get credential used by client
func shutdown() async throws Shutdown AWSClient asynchronously.
func signHeaders(url: URL, httpMethod: HTTPMethod, headers: HTTPHeaders = HTTPHeaders(), body: AWSHTTPBody, serviceConfig: AWSServiceConfig, logger: Logger = AWSClient.loggingDisabled) async throws -> HTTPHeaders Generate signed headers
func signURL(url: URL, httpMethod: HTTPMethod, headers: HTTPHeaders = HTTPHeaders(), expires: TimeAmount, serviceConfig: AWSServiceConfig, logger: Logger = AWSClient.loggingDisabled) async throws -> URL Generate a signed URL
func syncShutdown() throws Shutdown client synchronously.
func waitUntil<Input, Output>(_ input: Input, waiter: AWSClient.Waiter<Input, Output>, maxWaitTime: TimeAmount? = nil, logger: Logger = AWSClient.loggingDisabled) async throws where Input : Sendable, Output : Sendable Returns when waiter polling returns a success state or returns an error if the polling returns an error or timesout
struct OptionsAdditional options
struct PaginatorSequence<Input, Output> where Input : AWSPaginateToken, Output : AWSShape, Input.Token : EquatableUsed to access paginated results.
struct Waiter<Input, Output> where Input : Sendable, Output : SendableA waiter is a client side abstraction used to poll a resource until a desired state is reached
enum WaiterStateWaiter state
protocol CopyableA type whose values can be implicitly or explicitly copied.
protocol CustomStringConvertibleA type with a customized textual representation.
protocol EquatableA type that can be compared for value equality.
protocol Error : SendableA type representing an error value that can be thrown.
protocol Escapableprotocol SendableA thread-safe type whose values can be shared across arbitrary concurrent contexts without introducing a risk of data races. Values of the type may have no shared mutable state, or they may protect that state with a lock or by forcing it to only be accessed from a specific actor.
static var alreadyShutdown: AWSClient.ClientError { get }client has already been shutdown
static var bodyLengthMismatch: AWSClient.ClientError { get }Data supplied to the Request does not equal length indicated
static var failedToAccessPayload: AWSClient.ClientError { get }Failed to access payload while building request
static var invalidARN: AWSClient.ClientError { get }ARN provided to client is invalid
static var invalidURL: AWSClient.ClientError { get }URL provided to client is invalid
static var waiterFailed: AWSClient.ClientError { get }Waiter failed, but without an error. ie a successful api call was an error
static var waiterTimeout: AWSClient.ClientError { get }Waiter failed to complete in time alloted
var description: String { get }return human readable description of error
var localizedDescription: String { get }Retrieve the localized description for this error.
static func != (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether two values are not equal.