create_microsoft_ad
¶
create_microsoft_ad(
name: DirectoryName,
password: Password,
vpc_settings: DirectoryVpcSettings,
*,
config_overrides: Optional[DirectoryServiceClientConfig] = None,
short_name: Optional[DirectoryShortName] = None,
description: Optional[Description] = None,
edition: Optional[DirectoryEdition] = None,
tags: Optional[Tags] = None,
network_type: Optional[NetworkType] = None,
) -> CreateMicrosoftADResult
Creates a Microsoft AD directory in the Amazon Web Services Cloud. For more information, see Managed Microsoft AD in the Directory Service Admin Guide.
Before you call CreateMicrosoftAD, ensure that all of the required permissions have been explicitly granted through a policy. For details about what permissions are required to run the CreateMicrosoftAD operation, see Directory Service API Permissions: Actions, Resources, and Conditions Reference.
Parameters:
-
name(DirectoryName) –The fully qualified domain name for the Managed Microsoft AD directory, such as
corp.example.com. This name will resolve inside your VPC only. It does not need to be publicly resolvable. -
short_name(Optional[DirectoryShortName], default:None) –The NetBIOS name for your domain, such as
CORP. If you don't specify a NetBIOS name, it will default to the first part of your directory DNS. For example,CORPfor the directory DNScorp.example.com. -
password(Password) –The password for the default administrative user named
Admin.If you need to change the password for the administrator account, you can use the ResetUserPassword API call.
-
description(Optional[Description], default:None) –A description for the directory. This label will appear on the Amazon Web Services console
Directory Detailspage after the directory is created. -
vpc_settings(DirectoryVpcSettings) –Contains VPC information for the CreateDirectory or CreateMicrosoftAD operation.
-
edition(Optional[DirectoryEdition], default:None) –Managed Microsoft AD is available in two editions:
StandardandEnterprise.Enterpriseis the default. -
tags(Optional[Tags], default:None) –The tags to be assigned to the Managed Microsoft AD directory.
-
network_type(Optional[NetworkType], default:None) –The network type for your domain. The default value is
IPv4orIPv6based on the provided subnet capabilities.
Raises:
-
ClientException–A client exception has occurred.
-
DirectoryLimitExceededException–The maximum number of directories in the region has been reached. You can use the GetDirectoryLimits operation to determine your directory limits in the region.
-
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 Microsoft AD directory The following example creates a Microsoft AD directory in the AWS cloud.
>>> client.create_microsoft_ad(name='ad.example.com', short_name='ad', password='Str0ngP@ssw0rd', description='Corporate AD directory', vpc_settings={'SubnetIds': ['subnet-ba0146de', 'subnet-bef46bc8'], 'VpcId': 'vpc-45025421'})
Source code in docs_src/capo_directory_service/_services/directory_service.py
1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 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 | |