Skip to content

delete_malware_protection_plan async

delete_malware_protection_plan(
    malware_protection_plan_id: String,
    *,
    config_overrides: Optional[AsyncGuardDutyClientConfig] = None,
) -> None

Deletes the Malware Protection plan ID associated with the Malware Protection plan resource. Use this API only when you no longer want to protect the resource associated with this Malware Protection plan ID.

Parameters:

  • malware_protection_plan_id (String) –

    A unique identifier associated with Malware Protection plan resource.

Raises:

Source code in docs_src/capo_guardduty/_services/async_guard_duty.py
async def delete_malware_protection_plan(
    self,
    malware_protection_plan_id: "capo_guardduty.types.string.String",
    *,
    config_overrides: Optional[AsyncGuardDutyClientConfig] = None,
) -> None:
    """<p>Deletes the Malware Protection plan ID associated with the Malware Protection plan resource. Use this API only when you no longer want to protect the resource associated with this Malware Protection plan ID.</p>

    Args:
        malware_protection_plan_id: <p>A unique identifier associated with Malware Protection plan resource.</p>

    Raises:
        capo_guardduty.errors.access_denied_exception.AccessDeniedException: <p>An access denied exception object.</p>
        capo_guardduty.errors.bad_request_exception.BadRequestException: <p>A bad request exception object.</p>
        capo_guardduty.errors.internal_server_error_exception.InternalServerErrorException: <p>An internal server error exception object.</p>
        capo_guardduty.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource can't be found.</p>
        capo_guardduty.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_guardduty.types.delete_malware_protection_plan_request.DeleteMalwareProtectionPlanRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_guardduty._operations.guard_duty_api_service.delete_malware_protection_plan

        (
            output,
            http_response,
        ) = await capo_guardduty._operations.guard_duty_api_service.delete_malware_protection_plan.async_delete_malware_protection_plan(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteMalwareProtectionPlan")
    )
    input_: capo_guardduty.types.delete_malware_protection_plan_request.DeleteMalwareProtectionPlanRequest = {
        "malware_protection_plan_id": malware_protection_plan_id
    }

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