AWSServiceConfig
public final class AWSServiceConfig
Configuration class defining an AWS service
-
Region where service is running
Declaration
Swift
public let region: Region
-
The destination service of the request. Added as a header value, along with the operation name
Declaration
Swift
public let amzTarget: String?
-
Name of service
Declaration
Swift
public let service: String
-
Name used to sign requests
Declaration
Swift
public let signingName: String
-
Protocol used by service json/xml/query
Declaration
Swift
public let serviceProtocol: ServiceProtocol
-
Version of the Service API, added as a header in query protocol based services
Declaration
Swift
public let apiVersion: String
-
The url to use in requests
Declaration
Swift
public let endpoint: String
-
An array of the possible error types returned by the service
Declaration
Swift
public let errorType: AWSErrorType.Type?
-
Middleware code specific to the service used to edit requests before they sent and responses before they are decoded
Declaration
Swift
public let middlewares: [AWSServiceMiddleware]
-
timeout value for HTTP requests
Declaration
Swift
public let timeout: TimeAmount
-
ByteBuffer allocator used by service
Declaration
Swift
public let byteBufferAllocator: ByteBufferAllocator
-
options
Declaration
Swift
public let options: Options
-
init(region:
partition: amzTarget: service: signingName: serviceProtocol: apiVersion: endpoint: serviceEndpoints: partitionEndpoints: errorType: middlewares: timeout: byteBufferAllocator: options: ) Create a ServiceConfig object
Declaration
Swift
public init( region: Region?, partition: AWSPartition, amzTarget: String? = nil, service: String, signingName: String? = nil, serviceProtocol: ServiceProtocol, apiVersion: String, endpoint: String? = nil, serviceEndpoints: [String: String] = [:], partitionEndpoints: [AWSPartition: (endpoint: String, region: Region)] = [:], errorType: AWSErrorType.Type? = nil, middlewares: [AWSServiceMiddleware] = [], timeout: TimeAmount? = nil, byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(), options: Options = [] )
Parameters
region
Region of server you want to communicate with
partition
Amazon endpoint partition. This is ignored if region is set. If no region is set then this is used along side partitionEndpoints to calculate endpoint
amzTarget
“x-amz-target” header value
service
Name of service endpoint
signingName
Name that all AWS requests are signed with
serviceProtocol
protocol of service (.json, .xml, .query etc)
apiVersion
“Version” header value
endpoint
Custom endpoint URL to use instead of standard AWS servers
serviceEndpoints
Dictionary of endpoints to URLs
partitionEndpoints
Default endpoint to use, if no region endpoint is supplied
possibleErrorTypes
Array of possible error types that the client can throw
middlewares
Array of middlewares to apply to requests and responses
timeout
Time out value for HTTP requests
byteBufferAllocator
byte buffer allocator used throughout AWSClient
options
options used by client when processing requests
-
Return new version of serviceConfig with a modified parameters
Declaration
Swift
public func with(patch: Patch) -> AWSServiceConfig
Parameters
patch
parameters to patch service config
Return Value
New AWSServiceConfig
-
Service config parameters you can patch
Declaration
Swift
public struct Patch
-
Options used by client when processing requests
See moreDeclaration
Swift
public struct Options : OptionSet