batchGetWorker
inline suspend fun DeadlineClient.batchGetWorker(crossinline block: BatchGetWorkerRequest.Builder.() -> Unit): BatchGetWorkerResponse
Retrieves multiple workers in a single request. This is a batch version of the GetWorker API.
The result of getting each worker is reported individually in the response. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.
Samples
import aws.sdk.kotlin.services.deadline.model.BatchGetWorkerIdentifier
fun main() {
//sampleStart
// Get multiple workers in a single request
deadlineClient.batchGetWorker {
identifiers = listOf<BatchGetWorkerIdentifier>(
BatchGetWorkerIdentifier {
farmId = "farm-1234567890abcdef1234567890abcdef"
fleetId = "fleet-1234567890abcdef1234567890abcdef"
workerId = "worker-1234567890abcdef1234567890abcdef"
},
BatchGetWorkerIdentifier {
farmId = "farm-1234567890abcdef1234567890abcdef"
fleetId = "fleet-1234567890abcdef1234567890abcdef"
workerId = "worker-234567890abcdef1234567890abcdef1"
}
)
}
//sampleEnd
}