Options
Additional options
struct Options
Additional options
struct Options
import SotoCore
final class AWSClient
Client managing communication with AWS services
init(credentialProvider credentialProviderFactory: CredentialProviderFactory = .default, retryPolicy retryPolicyFactory: RetryPolicyFactory = .default, middleware: some AWSMiddlewareProtocol, options: Options = Options(), httpClient: AWSHTTPClient = HTTPClient.shared, logger: Logger = AWSClient.loggingDisabled)
Initialize an AWSClient struct
init(credentialProvider credentialProviderFactory: CredentialProviderFactory = .default, retryPolicy retryPolicyFactory: RetryPolicyFactory = .default, options: Options = Options(), httpClient: AWSHTTPClient = HTTPClient.shared, logger: Logger = AWSClient.loggingDisabled)
Initialize an AWSClient struct
static let loggingDisabled: Logger
Default logger that logs nothing
let credentialProvider: CredentialProvider
AWS credentials provider
let httpClient: AWSHTTPClient
HTTP client used by AWSClient
let logger: Logger
Logger used for non-request based output
let middleware: AWSMiddlewareProtocol
Middleware 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 -> 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: 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 ClientError
Errors returned by AWSClient
code
struct PaginatorSequence<Input, Output> where Input : AWSPaginateToken, Output : AWSShape, Input.Token : Equatable
Used to access paginated results.
struct Waiter<Input, Output> where Input : Sendable, Output : Sendable
A waiter is a client side abstraction used to poll a resource until a desired state is reached
enum WaiterState
Waiter state
protocol Sendable
init(requestLogLevel: Logger.Level = .debug, errorLogLevel: Logger.Level = .debug)
Initialize AWSClient.Options