createAlias

inline suspend fun DirectoryClient.createAlias(crossinline block: CreateAliasRequest.Builder.() -> Unit): CreateAliasResponse

Creates an alias for a directory and assigns the alias to the directory. The alias is used to construct the access URL for the directory, such as http://<alias>.awsapps.com.

After an alias has been created, it cannot be deleted or reused, so this operation should only be used when absolutely necessary.

Samples


fun main() { 
   //sampleStart 
   // The following example creates an alias for a directory.
val resp = directoryClient.createAlias {
    directoryId = "d-92654abfed"
    alias = "salesorg"
} 
   //sampleEnd
}