createUser
inline suspend fun DirectoryServiceDataClient.createUser(crossinline block: CreateUserRequest.Builder.() -> Unit): CreateUserResponse
Creates a new user.
Samples
import aws.sdk.kotlin.services.directoryservicedata.model.AttributeValue
fun main() {
//sampleStart
// The following command
val resp = directoryServiceDataClient.createUser {
clientToken = "550e8400-e29b-41d4-a716-446655440000"
directoryId = "d-12233abcde"
emailAddress = "pcandella@exampledomain.com"
givenName = "Pat Candella"
otherAttributes = mapOf<String, AttributeValue>(
"department" to AttributeValue.S("HR"),
"homePhone" to AttributeValue.S("212-555-0100")
)
samAccountName = "pcandella"
surname = "Candella"
}
//sampleEnd
}