@@ 4168-4190 (lines=23) @@ | ||
4165 | ||
4166 | return self._send_xml_command(cmd) |
|
4167 | ||
4168 | def delete_asset( |
|
4169 | self, *, asset_id: Optional[str] = None, report_id: Optional[str] = None |
|
4170 | ) -> Any: |
|
4171 | """Deletes an existing asset |
|
4172 | ||
4173 | Arguments: |
|
4174 | asset_id: UUID of the single asset to delete. |
|
4175 | report_id: UUID of report from which to get all |
|
4176 | assets to delete. |
|
4177 | """ |
|
4178 | if not asset_id and not report_id: |
|
4179 | raise RequiredArgument( |
|
4180 | function=self.delete_asset.__name__, |
|
4181 | argument='asset_id or report_id', |
|
4182 | ) |
|
4183 | ||
4184 | cmd = XmlCommand("delete_asset") |
|
4185 | if asset_id: |
|
4186 | cmd.set_attribute("asset_id", asset_id) |
|
4187 | else: |
|
4188 | cmd.set_attribute("report_id", report_id) |
|
4189 | ||
4190 | return self._send_xml_command(cmd) |
|
4191 | ||
4192 | def delete_config( |
|
4193 | self, config_id: str, *, ultimate: Optional[bool] = False |
@@ 2291-2313 (lines=23) @@ | ||
2288 | ||
2289 | return self._send_xml_command(cmd) |
|
2290 | ||
2291 | def delete_asset( |
|
2292 | self, *, asset_id: Optional[str] = None, report_id: Optional[str] = None |
|
2293 | ) -> Any: |
|
2294 | """Deletes an existing asset |
|
2295 | ||
2296 | Arguments: |
|
2297 | asset_id: UUID of the single asset to delete. |
|
2298 | report_id: UUID of report from which to get all |
|
2299 | assets to delete. |
|
2300 | """ |
|
2301 | if not asset_id and not report_id: |
|
2302 | raise RequiredArgument( |
|
2303 | function=self.delete_asset.__name__, |
|
2304 | argument='asset_id or report_id', |
|
2305 | ) |
|
2306 | ||
2307 | cmd = XmlCommand("delete_asset") |
|
2308 | if asset_id: |
|
2309 | cmd.set_attribute("asset_id", asset_id) |
|
2310 | else: |
|
2311 | cmd.set_attribute("report_id", report_id) |
|
2312 | ||
2313 | return self._send_xml_command(cmd) |
|
2314 | ||
2315 | def delete_config( |
|
2316 | self, config_id: str, *, ultimate: Optional[bool] = False |