@@ 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 |
@@ 4200-4222 (lines=23) @@ | ||
4197 | ||
4198 | return self._send_xml_command(cmd) |
|
4199 | ||
4200 | def delete_asset( |
|
4201 | self, *, asset_id: Optional[str] = None, report_id: Optional[str] = None |
|
4202 | ) -> Any: |
|
4203 | """Deletes an existing asset |
|
4204 | ||
4205 | Arguments: |
|
4206 | asset_id: UUID of the single asset to delete. |
|
4207 | report_id: UUID of report from which to get all |
|
4208 | assets to delete. |
|
4209 | """ |
|
4210 | if not asset_id and not report_id: |
|
4211 | raise RequiredArgument( |
|
4212 | function=self.delete_asset.__name__, |
|
4213 | argument='asset_id or report_id', |
|
4214 | ) |
|
4215 | ||
4216 | cmd = XmlCommand("delete_asset") |
|
4217 | if asset_id: |
|
4218 | cmd.set_attribute("asset_id", asset_id) |
|
4219 | else: |
|
4220 | cmd.set_attribute("report_id", report_id) |
|
4221 | ||
4222 | return self._send_xml_command(cmd) |
|
4223 | ||
4224 | def delete_config( |
|
4225 | self, config_id: str, *, ultimate: Optional[bool] = False |