start_schema_extension
async
¶
start_schema_extension(
directory_id: DirectoryId,
create_snapshot_before_schema_extension: CreateSnapshotBeforeSchemaExtension,
ldif_content: LdifContent,
description: Description,
*,
config_overrides: Optional[AsyncDirectoryServiceClientConfig] = None,
) -> StartSchemaExtensionResult
Applies a schema extension to a Microsoft AD directory.
Parameters:
-
directory_id(DirectoryId) –The identifier of the directory for which the schema extension will be applied to.
-
create_snapshot_before_schema_extension(CreateSnapshotBeforeSchemaExtension) –If true, creates a snapshot of the directory before applying the schema extension.
-
ldif_content(LdifContent) –The LDIF file represented as a string. To construct the LdifContent string, precede each line as it would be formatted in an ldif file with \n. See the example request below for more details. The file size can be no larger than 1MB.
-
description(Description) –A description of the schema extension.
Raises:
-
ClientException–A client exception has occurred.
-
DirectoryUnavailableException–The specified directory is unavailable.
-
EntityDoesNotExistException–The specified entity could not be found.
-
InvalidParameterException–One or more parameters are not valid.
-
ServiceException–An exception has occurred in Directory Service.
-
SnapshotLimitExceededException–The maximum number of manual snapshots for the directory has been reached. You can use the GetSnapshotLimits operation to determine the snapshot limits for a directory.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To start a schema extension The following example applies a schema extension to a specified Microsoft AD directory.
>>> await client.start_schema_extension(create_snapshot_before_schema_extension=True, directory_id='d-92654abfed', ldif_content='dn: CN=User,CN=Schema,CN=Configuration,DC=sales,DC=example,DC=com\nchangetype: modify\nadd: mayContain\nmayContain: drink\n-\n\nDN:\nchangetype: modify\nreplace: schemaupdatenow\nschemaupdatenow: 1\n-', description='Adds maycontain attribute to user class. Precede each line as it would be formatted in an ldif file.')
Source code in docs_src/capo_directory_service/_services/async_directory_service.py
5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 | |