start_schema_extension
¶
start_schema_extension(
directory_id: DirectoryId,
create_snapshot_before_schema_extension: CreateSnapshotBeforeSchemaExtension,
ldif_content: LdifContent,
description: Description,
*,
config_overrides: Optional[DirectoryServiceClientConfig] = 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.
>>> 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/directory_service.py
5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 | |