AWSServiceClient
public protocol AWSServiceClient
The AWS service client, which can be used to interact with AWS via MongoDB Stitch.
-
Executes the AWS request.
Declaration
Swift
func execute(request: AWSRequest, _ completionHandler: @escaping (StitchResult<Void>) -> Void)
Parameters
completionHandler
The completion handler to call when the request is complete or the operation fails. This handler is executed on a non-main global
DispatchQueue
. If the operation is successful, the result will be ignored. -
Executes the AWS request. Also accepts a timeout. Use this for functions that may run longer than the client-wide default timeout (15 seconds by default).
Declaration
Swift
func execute(request: AWSRequest, withRequestTimeout requestTimeout: TimeInterval, _ completionHandler: @escaping (StitchResult<Void>) -> Void)
Parameters
withRequestTimeout
The number of seconds the client should wait for a response from the server before failing with an error.
completionHandler
The completion handler to call when the request is complete or the operation fails. This handler is executed on a non-main global
DispatchQueue
. If the operation is successful, the result will be ignored. -
Executes the AWS request, and decodes the result into an instance of the type parameter T.
Declaration
Swift
func execute<T: Decodable>(request: AWSRequest, _ completionHandler: @escaping (StitchResult<T>) -> Void)
Parameters
completionHandler
The completion handler to call when the request is complete or the operation fails. This handler is executed on a non-main global
DispatchQueue
. If the operation is successful, the result will decoded into the type T and will be included in the result. -
Executes the AWS request, and decodes the result into an instance of the type parameter T. Also accepts a timeout. Use this for functions that may run longer than the client-wide default timeout (15 seconds by default).
Declaration
Swift
func execute<T: Decodable>(request: AWSRequest, withRequestTimeout requestTimeout: TimeInterval, _ completionHandler: @escaping (StitchResult<T>) -> Void)
Parameters
withRequestTimeout
The number of seconds the client should wait for a response from the server before failing with an error.
completionHandler
The completion handler to call when the request is complete or the operation fails. This handler is executed on a non-main global
DispatchQueue
. If the operation is successful, the result will decoded into the type T and will be included in the result.