create_microsoft_ad
async
¶
create_microsoft_ad(
name: DirectoryName,
password: Password,
vpc_settings: DirectoryVpcSettings,
*,
config_overrides: Optional[AsyncDirectoryServiceClientConfig] = 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.
>>> await 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/async_directory_service.py
1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 | |