createTrust
inline suspend fun DirectoryClient.createTrust(crossinline block: CreateTrustRequest.Builder.() -> Unit): CreateTrustResponse
Directory Service for Microsoft Active Directory allows you to configure trust relationships. For example, you can establish a trust between your Managed Microsoft AD directory, and your existing self-managed Microsoft Active Directory. This would allow you to provide users and groups access to resources in either domain, with a single set of credentials.
This action initiates the creation of the Amazon Web Services side of a trust relationship between an Managed Microsoft AD directory and an external domain. You can create either a forest trust or an external trust.
Samples
import aws.sdk.kotlin.services.directoryservice.model.TrustDirection
import aws.sdk.kotlin.services.directoryservice.model.TrustType
fun main() {
//sampleStart
// The following example creates a trust between Microsoft AD in the AWS cloud and an external domain.
val resp = directoryClient.createTrust {
directoryId = "d-92654abfed"
remoteDomainName = "europe.example.com"
trustPassword = "Str0ngP@ssw0rd"
trustDirection = TrustDirection.fromValue("One-Way: Outgoing")
trustType = TrustType.fromValue("Forest")
conditionalForwarderIpAddrs = listOf<String>(
"172.30.21.228"
)
}
//sampleEnd
}