createDirectory
inline suspend fun CloudDirectoryClient.createDirectory(crossinline block: CreateDirectoryRequest.Builder.() -> Unit): CreateDirectoryResponse
Creates a Directory by copying the published schema into the directory. A directory cannot be created without a schema.
You can also quickly create a directory using a managed schema, called the QuickStartSchema
. For more information, see Managed Schema in the Amazon Cloud Directory Developer Guide.
Samples
fun main() {
//sampleStart
val resp = cloudDirectoryClient.createDirectory {
name = "ExampleCD"
schemaArn = "arn:aws:clouddirectory:us-west-2:45132example:schema/published/person/1"
}
//sampleEnd
}