Manage Servers
Provides your users with the ability to list servers used to establish a connection.
Property
Description
Retrieving Servers
listServers(
countriesFilter: [],
limit:,
nextToken:,
cachePolicy:)var allServers: [SudoVPNServer] = []
do {
var serverResult =
try await vpnClient.listServers(
countriesFilter: ["AU"],
limit: 2000,
nextToken: nil)
allServers.append(contentsOf: serverResult.items)
// If you wish to handle all retrievals in a single task context
while serverResult.nextToken != nil {
serverResult =
try await vpnClient.listServers(
countriesFilter:["AU"],
limit: 2000,
nextToken: serverResult.nextToken)
} catch {
// Handle errors
}Last updated