Skip to content

delete_service_linked_analyzer async

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

Deletes a service-linked analyzer. This operation can be invoked by both authorized Amazon Web Services services and customers.

When invoked by a customer, IAM Access Analyzer performs a callback to the managing service to verify whether the analyzer is still in use and can be deleted. If the service indicates the analyzer is still in use, the deletion is rejected with ConflictException.

Parameters:

  • analyzer_name (AnalyzerName) –

    The name of the service-linked analyzer to delete. Service-linked analyzer names follow the format _AccessAnalyzerFor{ServiceName}-{Id}.

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

    A client token.

Raises:

Source code in docs_src/capo_accessanalyzer/_services/async_access_analyzer.py
async def delete_service_linked_analyzer(
    self,
    analyzer_name: "capo_accessanalyzer.types.analyzer_name.AnalyzerName",
    *,
    config_overrides: Optional[AsyncAccessAnalyzerClientConfig] = None,
    client_token: Optional[str] = None,
) -> None:
    """<p>Deletes a service-linked analyzer. This operation can be invoked by both authorized Amazon Web Services services and customers.</p> <p>When invoked by a customer, IAM Access Analyzer performs a callback to the managing service to verify whether the analyzer is still in use and can be deleted. If the service indicates the analyzer is still in use, the deletion is rejected with <code>ConflictException</code>.</p>

    Args:
        analyzer_name: <p>The name of the service-linked analyzer to delete. Service-linked analyzer names follow the format <code>_AccessAnalyzerFor{ServiceName}-{Id}</code>.</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.conflict_exception.ConflictException: <p>A conflict exception error.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_accessanalyzer.types.delete_service_linked_analyzer_request.DeleteServiceLinkedAnalyzerRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_accessanalyzer._operations.access_analyzer.delete_service_linked_analyzer

        (
            output,
            http_response,
        ) = await capo_accessanalyzer._operations.access_analyzer.delete_service_linked_analyzer.async_delete_service_linked_analyzer(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

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

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output