Skip to content

delete_analyzer

delete_analyzer(
    analyzer_name: AnalyzerName,
    *,
    config_overrides: Optional[AccessAnalyzerClientConfig] = None,
    client_token: Optional[str] = None,
) -> None

Deletes the specified analyzer. When you delete an analyzer, IAM Access Analyzer is disabled for the account or organization in the current or specific Region. All findings that were generated by the analyzer are deleted. You cannot undo this action.

Parameters:

  • analyzer_name (AnalyzerName) –

    The name of the analyzer to delete.

  • client_token (Optional[str], default: None ) –

    A client token.

Raises:

Source code in docs_src/capo_accessanalyzer/_services/access_analyzer.py
def delete_analyzer(
    self,
    analyzer_name: "capo_accessanalyzer.types.analyzer_name.AnalyzerName",
    *,
    config_overrides: Optional[AccessAnalyzerClientConfig] = None,
    client_token: Optional[str] = None,
) -> None:
    """<p>Deletes the specified analyzer. When you delete an analyzer, IAM Access Analyzer is disabled for the account or organization in the current or specific Region. All findings that were generated by the analyzer are deleted. You cannot undo this action.</p>

    Args:
        analyzer_name: <p>The name of the analyzer to delete.</p>
        client_token: <p>A client token.</p>

    Raises:
        capo_accessanalyzer.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_accessanalyzer.errors.internal_server_exception.InternalServerException: <p>Internal server error.</p>
        capo_accessanalyzer.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource could not be found.</p>
        capo_accessanalyzer.errors.throttling_exception.ThrottlingException: <p>Throttling limit exceeded error.</p>
        capo_accessanalyzer.errors.validation_exception.ValidationException: <p>Validation exception error.</p>
        capo_accessanalyzer.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_accessanalyzer.types.delete_analyzer_request.DeleteAnalyzerRequest]",
    ) -> OperationResponse[None]:
        import capo_accessanalyzer._operations.access_analyzer.delete_analyzer

        output, http_response = (
            capo_accessanalyzer._operations.access_analyzer.delete_analyzer.delete_analyzer(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteAnalyzer")
    )
    input_: capo_accessanalyzer.types.delete_analyzer_request.DeleteAnalyzerRequest = {
        "analyzer_name": analyzer_name
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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