Skip to content

delete_flow_logs async

delete_flow_logs(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    flow_log_ids: Optional[FlowLogIdList] = None,
) -> DeleteFlowLogsResult

Deletes one or more flow logs.

Parameters:

  • dry_run (Optional[Boolean], default: None ) –

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • flow_log_ids (Optional[FlowLogIdList], default: None ) –

    One or more flow log IDs.

    Constraint: Maximum of 1000 flow log IDs.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def delete_flow_logs(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    flow_log_ids: Optional["capo_ec2.types.flow_log_id_list.FlowLogIdList"] = None,
) -> "capo_ec2.types.delete_flow_logs_result.DeleteFlowLogsResult":
    """<p>Deletes one or more flow logs.</p>

    Args:
        dry_run: <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
        flow_log_ids: <p>One or more flow log IDs.</p> <p>Constraint: Maximum of 1000 flow log IDs.</p>

    Raises:
        capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ec2.types.delete_flow_logs_request.DeleteFlowLogsRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.delete_flow_logs_result.DeleteFlowLogsResult"
    ]:
        import capo_ec2._operations.amazon_ec2.delete_flow_logs

        (
            output,
            http_response,
        ) = await capo_ec2._operations.amazon_ec2.delete_flow_logs.async_delete_flow_logs(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteFlowLogs")
    )
    input_: capo_ec2.types.delete_flow_logs_request.DeleteFlowLogsRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if flow_log_ids is not None:
        input_["flow_log_ids"] = flow_log_ids

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