<filename>plugins/automox/icon_automox/actions/action_on_vulnerability_sync_batch/action.py<gh_stars>0
import insightconnect_plugin_runtime
from .schema import ActionOnVulnerabilitySyncBatchInput, ActionOnVulnerabilitySyncBatchOutput, Input, Output, Component

# Custom imports below


class ActionOnVulnerabilitySyncBatch(insightconnect_plugin_runtime.Action):
    def __init__(self):
        super(self.__class__, self).__init__(
            name="action_on_vulnerability_sync_batch",
            description=Component.DESCRIPTION,
            input=ActionOnVulnerabilitySyncBatchInput(),
            output=ActionOnVulnerabilitySyncBatchOutput(),
        )

    def run(self, params={}):
        self.connection.automox_api.update_vulnerability_sync_batch(
            params.get(Input.ORG_ID), params.get(Input.BATCH_ID), params.get(Input.ACTION)
        )

        return {Output.SUCCESS: True}

<filename>plugins/automox/icon_automox/actions/action_on_vulnerability_sync_batch/action.py<gh_stars>0
import insightconnect_plugin_runtime
from .schema import ActionOnVulnerabilitySyncBatchInput, ActionOnVulnerabilitySyncBatchOutput, Input, Output, Component

# Custom imports below


class ActionOnVulnerabilitySyncBatch(insightconnect_plugin_runtime.Action):
    def __init__(self):
        super(self.__class__, self).__init__(
            name="action_on_vulnerability_sync_batch",
            description=Component.DESCRIPTION,
            input=ActionOnVulnerabilitySyncBatchInput(),
            output=ActionOnVulnerabilitySyncBatchOutput(),
        )

    def run(self, params={}):
        self.connection.automox_api.update_vulnerability_sync_batch(
            params.get(Input.ORG_ID), params.get(Input.BATCH_ID), params.get(Input.ACTION)
        )

        return {Output.SUCCESS: True}

# Custom imports below