Skip to content

delete_application

delete_application(
    resource_group_name: ResourceGroupName,
    *,
    config_overrides: Optional[ApplicationInsightsClientConfig] = None,
) -> DeleteApplicationResponse

Removes the specified application from monitoring. Does not delete the application.

Parameters:

Raises:

Source code in docs_src/capo_application_insights/_services/application_insights.py
def delete_application(
    self,
    resource_group_name: "capo_application_insights.types.resource_group_name.ResourceGroupName",
    *,
    config_overrides: Optional[ApplicationInsightsClientConfig] = None,
) -> "capo_application_insights.types.delete_application_response.DeleteApplicationResponse":
    """<p>Removes the specified application from monitoring. Does not delete the application.</p>

    Args:
        resource_group_name: <p>The name of the resource group.</p>

    Raises:
        capo_application_insights.errors.bad_request_exception.BadRequestException: <p>The request is not understood by the server.</p>
        capo_application_insights.errors.internal_server_exception.InternalServerException: <p>The server encountered an internal error and is unable to complete the request.</p>
        capo_application_insights.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource does not exist in the customer account.</p>
        capo_application_insights.errors.validation_exception.ValidationException: <p>The parameter is not valid.</p>
        capo_application_insights.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_application_insights.types.delete_application_request.DeleteApplicationRequest]",
    ) -> OperationResponse[
        "capo_application_insights.types.delete_application_response.DeleteApplicationResponse"
    ]:
        import capo_application_insights._operations.ec2_windows_barley_service.delete_application

        output, http_response = (
            capo_application_insights._operations.ec2_windows_barley_service.delete_application.delete_application(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteApplication")
    )
    input_: capo_application_insights.types.delete_application_request.DeleteApplicationRequest = {
        "resource_group_name": resource_group_name
    }

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