create_trust
¶
create_trust(
directory_id: DirectoryId,
remote_domain_name: RemoteDomainName,
trust_password: TrustPassword,
trust_direction: TrustDirection,
*,
config_overrides: Optional[DirectoryServiceClientConfig] = 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.
>>> 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/directory_service.py
1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 | |