IoTSecureTunneling
Service object for interacting with AWS IoTSecureTunneling service.
public struct IoTSecureTunneling: AWSService
AWS IoT Secure Tunnling enables you to create remote connections to devices deployed in the field.
For more information about how AWS IoT Secure Tunneling works, see AWS IoT Secure Tunneling.
Inheritance
AWSService
Initializers
init(client:region:partition:endpoint:timeout:byteBufferAllocator:options:)
Initialize the IoTSecureTunneling client
public init(client: AWSClient, region: SotoCore.Region? = nil, partition: AWSPartition = .aws, endpoint: String? = nil, timeout: TimeAmount? = nil, byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(), options: AWSServiceConfig.Options = [])
Parameters
- client: AWSClient used to process requests
- region: Region of server you want to communicate with. This will override the partition parameter.
- partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
- endpoint: Custom endpoint URL to use instead of standard AWS servers
- timeout: Timeout value for HTTP requests
init(from:patch:)
Initializer required by AWSService.with(middlewares:timeout:byteBufferAllocator:options)
. You are not able to use this initializer directly as there are no public initializers for AWSServiceConfig.Patch
. Please use AWSService.with(middlewares:timeout:byteBufferAllocator:options)
instead.
public init(from: IoTSecureTunneling, patch: AWSServiceConfig.Patch)
Properties
client
Client used for communication with AWS
let client: AWSClient
config
Service configuration
let config: AWSServiceConfig
Methods
closeTunnel(_:logger:on:)
public func closeTunnel(_ input: CloseTunnelRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<CloseTunnelResponse>
Closes a tunnel identified by the unique tunnel id. When a CloseTunnel
request is received, we close the WebSocket connections between the client and proxy server so no data can be transmitted.
describeTunnel(_:logger:on:)
public func describeTunnel(_ input: DescribeTunnelRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<DescribeTunnelResponse>
Gets information about a tunnel identified by the unique tunnel id.
listTagsForResource(_:logger:on:)
public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<ListTagsForResourceResponse>
Lists the tags for the specified resource.
listTunnels(_:logger:on:)
public func listTunnels(_ input: ListTunnelsRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<ListTunnelsResponse>
List all tunnels for an AWS account. Tunnels are listed by creation time in descending order, newer tunnels will be listed before older tunnels.
openTunnel(_:logger:on:)
public func openTunnel(_ input: OpenTunnelRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<OpenTunnelResponse>
Creates a new tunnel, and returns two client access tokens for clients to use to connect to the AWS IoT Secure Tunneling proxy server.
tagResource(_:logger:on:)
public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<TagResourceResponse>
A resource tag.
untagResource(_:logger:on:)
public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<UntagResourceResponse>
Removes a tag from a resource.
listTunnelsPaginator(_:_:logger:on:onPage:)
public func listTunnelsPaginator<Result>(_ input: ListTunnelsRequest, _ initialValue: Result, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil, onPage: @escaping (Result, ListTunnelsResponse, EventLoop) -> EventLoopFuture<(Bool, Result)>) -> EventLoopFuture<Result>
List all tunnels for an AWS account. Tunnels are listed by creation time in descending order, newer tunnels will be listed before older tunnels.
Provide paginated results to closure onPage
for it to combine them into one result. This works in a similar manner to Array.reduce<Result>(_:_:) -> Result
.
Parameters:
- input: Input for request
- initialValue: The value to use as the initial accumulating value.
initialValue
is passed toonPage
the first time it is called.
- logger: Logger used flot logging
- eventLoop: EventLoop to run this process on
- onPage: closure called with each paginated response. It combines an accumulating result with the contents of response. This combined result is then returned along with a boolean indicating if the paginate operation should continue.
listTunnelsPaginator(_:logger:on:onPage:)
Provide paginated results to closure onPage
.
public func listTunnelsPaginator(_ input: ListTunnelsRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil, onPage: @escaping (ListTunnelsResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
Parameters
- input: Input for request
- logger: Logger used flot logging
- eventLoop: EventLoop to run this process on
- onPage: closure called with each block of entries. Returns boolean indicating whether we should continue.