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
5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 | |