For the specified directory, lists all the certificates registered for a secure LDAP or client certificate authentication.
Parameters:
-
directory_id
(DirectoryId)
–
The identifier of the directory.
-
next_token
(Optional[NextToken], default:
None
)
–
A token for requesting another page of certificates if the NextToken response element indicates that more certificates are available. Use the value of the returned NextToken element in your request until the token comes back as null. Pass null if this is the first call.
-
limit
(Optional[PageLimit], default:
None
)
–
The number of items that should show up on one page
Raises:
Source code in docs_src/capo_directory_service/_services/async_directory_service.py
| async def list_certificates(
self,
directory_id: "capo_directory_service.types.directory_id.DirectoryId",
*,
config_overrides: Optional[AsyncDirectoryServiceClientConfig] = None,
next_token: Optional[
"capo_directory_service.types.next_token.NextToken"
] = None,
limit: Optional["capo_directory_service.types.page_limit.PageLimit"] = None,
) -> "capo_directory_service.types.list_certificates_result.ListCertificatesResult":
"""<p>For the specified directory, lists all the certificates registered for a secure LDAP or client certificate authentication.</p>
Args:
directory_id: <p>The identifier of the directory.</p>
next_token: <p>A token for requesting another page of certificates if the <code>NextToken</code> response element indicates that more certificates are available. Use the value of the returned <code>NextToken</code> element in your request until the token comes back as <code>null</code>. Pass <code>null</code> if this is the first call.</p>
limit: <p>The number of items that should show up on one page</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.invalid_next_token_exception.InvalidNextTokenException: <p>The <code>NextToken</code> value is not valid.</p>
capo_directory_service.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters are not valid.</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.list_certificates_request.ListCertificatesRequest]",
) -> AsyncOperationResponse[
"capo_directory_service.types.list_certificates_result.ListCertificatesResult"
]:
import capo_directory_service._operations.directory_service_20150416.list_certificates
(
output,
http_response,
) = await capo_directory_service._operations.directory_service_20150416.list_certificates.async_list_certificates(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListCertificates")
)
input_: capo_directory_service.types.list_certificates_request.ListCertificatesRequest = {
"directory_id": directory_id
}
if next_token is not None:
input_["next_token"] = next_token
if limit is not None:
input_["limit"] = limit
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|