create_trust
async
¶
create_trust(
directory_id: DirectoryId,
remote_domain_name: RemoteDomainName,
trust_password: TrustPassword,
trust_direction: TrustDirection,
*,
config_overrides: Optional[AsyncDirectoryServiceClientConfig] = None,
trust_type: Optional[TrustType] = None,
conditional_forwarder_ip_addrs: Optional[DnsIpAddrs] = None,
conditional_forwarder_ipv6_addrs: Optional[DnsIpv6Addrs] = None,
selective_auth: Optional[SelectiveAuth] = None,
) -> CreateTrustResult
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.
Parameters:
-
directory_id(DirectoryId) –The Directory ID of the Managed Microsoft AD directory for which to establish the trust relationship.
-
remote_domain_name(RemoteDomainName) –The Fully Qualified Domain Name (FQDN) of the external domain for which to create the trust relationship.
-
trust_password(TrustPassword) –The trust password. The trust password must be the same password that was used when creating the trust relationship on the external domain.
-
trust_direction(TrustDirection) –The direction of the trust relationship.
-
trust_type(Optional[TrustType], default:None) –The trust relationship type.
Forestis the default. -
conditional_forwarder_ip_addrs(Optional[DnsIpAddrs], default:None) –The IP addresses of the remote DNS server associated with RemoteDomainName.
-
conditional_forwarder_ipv6_addrs(Optional[DnsIpv6Addrs], default:None) –The IPv6 addresses of the remote DNS server associated with RemoteDomainName.
-
selective_auth(Optional[SelectiveAuth], default:None) –Optional parameter to enable selective authentication for the trust.
Raises:
-
ClientException–A client exception has occurred.
-
EntityAlreadyExistsException–The specified entity already exists.
-
EntityDoesNotExistException–The specified entity could not be found.
-
InvalidParameterException–One or more parameters are not valid.
-
ServiceException–An exception has occurred in Directory Service.
-
UnsupportedOperationException–The operation is not supported.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To create a trust The following example creates a trust between Microsoft AD in the AWS cloud and an external domain.
>>> await client.create_trust(directory_id='d-92654abfed', remote_domain_name='europe.example.com', trust_password='Str0ngP@ssw0rd', trust_direction='One-Way: Outgoing', trust_type='Forest', conditional_forwarder_ip_addrs=['172.30.21.228'])
Source code in docs_src/capo_directory_service/_services/async_directory_service.py
1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 | |