Activates the switch for the specific directory to always use LDAP secure calls.
Parameters:
-
directory_id
(DirectoryId)
–
The identifier of the directory.
-
type
(LDAPSType)
–
The type of LDAP security to enable. Currently only the value Client is supported.
Raises:
Source code in docs_src/capo_directory_service/_services/async_directory_service.py
| async def enable_ldaps(
self,
directory_id: "capo_directory_service.types.directory_id.DirectoryId",
type: "capo_directory_service.types.ldaps_type.LDAPSType",
*,
config_overrides: Optional[AsyncDirectoryServiceClientConfig] = None,
) -> "capo_directory_service.types.enable_ldaps_result.EnableLDAPSResult":
"""<p>Activates the switch for the specific directory to always use LDAP secure calls.</p>
Args:
directory_id: <p>The identifier of the directory.</p>
type: <p>The type of LDAP security to enable. Currently only the value <code>Client</code> is supported.</p>
Raises:
capo_directory_service.errors.client_exception.ClientException: <p>A client exception has occurred.</p>
capo_directory_service.errors.directory_does_not_exist_exception.DirectoryDoesNotExistException: <p>The specified directory does not exist in the system.</p>
capo_directory_service.errors.directory_unavailable_exception.DirectoryUnavailableException: <p>The specified directory is unavailable.</p>
capo_directory_service.errors.invalid_ldaps_status_exception.InvalidLDAPSStatusException: <p>The LDAP activities could not be performed because they are limited by the LDAPS status.</p>
capo_directory_service.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters are not valid.</p>
capo_directory_service.errors.no_available_certificate_exception.NoAvailableCertificateException: <p>Client authentication setup could not be completed because at least one valid certificate must be registered in the system.</p>
capo_directory_service.errors.service_exception.ServiceException: <p>An exception has occurred in Directory Service.</p>
capo_directory_service.errors.unsupported_operation_exception.UnsupportedOperationException: <p>The operation is not supported.</p>
capo_directory_service.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_directory_service.types.enable_ldaps_request.EnableLDAPSRequest]",
) -> AsyncOperationResponse[
"capo_directory_service.types.enable_ldaps_result.EnableLDAPSResult"
]:
import capo_directory_service._operations.directory_service_20150416.enable_ldaps
(
output,
http_response,
) = await capo_directory_service._operations.directory_service_20150416.enable_ldaps.async_enable_ldaps(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("EnableLDAPS")
)
input_: capo_directory_service.types.enable_ldaps_request.EnableLDAPSRequest = {
"directory_id": directory_id,
"type": type,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|