コード例 #1
0
    def copy(self, scan_id=None, schedule_uuid=None):
        """Creates a copy of a scan.

        :param scan_id: The scan ID.
        :param schedule_uuid: The scan schedule UUID, this value will be used when specified and when scan_id is not present.
        :return: An instance of :class:`tenable_io.api.models.Scan`.
        """
        response = self._client.post('scans/%(scan_id)s/copy',
                                     {},
                                     path_params={'scan_id': scan_id or schedule_uuid})
        return Scan.from_json(response.text)
コード例 #2
0
 def copy(self, scan_id):
     response = self._client.post('scans/%(scan_id)s/copy', {},
                                  path_params={'scan_id': scan_id})
     return Scan.from_json(response.text)