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
6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 | |