Skip to content

delete_directory_registration

delete_directory_registration(
    directory_registration_arn: DirectoryRegistrationArn,
    *,
    config_overrides: Optional[PcaConnectorAdClientConfig] = None,
) -> None

Deletes a directory registration. Deleting a directory registration deauthorizes Amazon Web Services Private CA with the directory.

Parameters:

Raises:

  • AccessDeniedException –

    You can receive this error if you attempt to create a resource share when you don't have the required permissions. This can be caused by insufficient permissions in policies attached to your Amazon Web Services Identity and Access Management (IAM) principal. It can also happen because of restrictions in place from an Amazon Web Services Organizations service control policy (SCP) that affects your Amazon Web Services account.

  • ConflictException –

    This request cannot be completed for one of the following reasons because the requested resource was being concurrently modified by another request.

  • InternalServerException –

    The request processing has failed because of an unknown error, exception or failure with an internal server.

  • ThrottlingException –

    The limit on the number of requests per second was exceeded.

  • ValidationException –

    An input validation error occurred. For example, invalid characters in a template name, or if a pagination token is invalid.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_pca_connector_ad/_services/pca_connector_ad.py
def delete_directory_registration(
    self,
    directory_registration_arn: "capo_pca_connector_ad.types.directory_registration_arn.DirectoryRegistrationArn",
    *,
    config_overrides: Optional[PcaConnectorAdClientConfig] = None,
) -> None:
    """<p>Deletes a directory registration. Deleting a directory registration deauthorizes Amazon Web Services Private CA with the directory. </p>

    Args:
        directory_registration_arn: <p>The Amazon Resource Name (ARN) that was returned when you called <a href="https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_CreateDirectoryRegistration.html">CreateDirectoryRegistration</a>.</p>

    Raises:
        capo_pca_connector_ad.errors.access_denied_exception.AccessDeniedException: <p>You can receive this error if you attempt to create a resource share when you don't have the required permissions. This can be caused by insufficient permissions in policies attached to your Amazon Web Services Identity and Access Management (IAM) principal. It can also happen because of restrictions in place from an Amazon Web Services Organizations service control policy (SCP) that affects your Amazon Web Services account. </p>
        capo_pca_connector_ad.errors.conflict_exception.ConflictException: <p>This request cannot be completed for one of the following reasons because the requested resource was being concurrently modified by another request.</p>
        capo_pca_connector_ad.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure with an internal server. </p>
        capo_pca_connector_ad.errors.throttling_exception.ThrottlingException: <p>The limit on the number of requests per second was exceeded. </p>
        capo_pca_connector_ad.errors.validation_exception.ValidationException: <p>An input validation error occurred. For example, invalid characters in a template name, or if a pagination token is invalid. </p>
        capo_pca_connector_ad.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_pca_connector_ad.types.delete_directory_registration_request.DeleteDirectoryRegistrationRequest]",
    ) -> OperationResponse[None]:
        import capo_pca_connector_ad._operations.pca_connector_ad.delete_directory_registration

        output, http_response = (
            capo_pca_connector_ad._operations.pca_connector_ad.delete_directory_registration.delete_directory_registration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteDirectoryRegistration")
    )
    input_: capo_pca_connector_ad.types.delete_directory_registration_request.DeleteDirectoryRegistrationRequest = {
        "directory_registration_arn": directory_registration_arn
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output