| @@ 2335-2354 (lines=20) @@ | ||
| 2332 | ||
| 2333 | return self._send_xml_command(cmd) |
|
| 2334 | ||
| 2335 | def delete_credential( |
|
| 2336 | self, credential_id: str, *, ultimate: Optional[bool] = False |
|
| 2337 | ) -> Any: |
|
| 2338 | """Deletes an existing credential |
|
| 2339 | ||
| 2340 | Arguments: |
|
| 2341 | credential_id: UUID of the credential to be deleted. |
|
| 2342 | ultimate: Whether to remove entirely, or to the trashcan. |
|
| 2343 | """ |
|
| 2344 | if not credential_id: |
|
| 2345 | raise RequiredArgument( |
|
| 2346 | function=self.delete_credential.__name__, |
|
| 2347 | argument='credential_id', |
|
| 2348 | ) |
|
| 2349 | ||
| 2350 | cmd = XmlCommand("delete_credential") |
|
| 2351 | cmd.set_attribute("credential_id", credential_id) |
|
| 2352 | cmd.set_attribute("ultimate", _to_bool(ultimate)) |
|
| 2353 | ||
| 2354 | return self._send_xml_command(cmd) |
|
| 2355 | ||
| 2356 | def delete_filter( |
|
| 2357 | self, filter_id: str, *, ultimate: Optional[bool] = False |
|
| @@ 4244-4263 (lines=20) @@ | ||
| 4241 | ||
| 4242 | return self._send_xml_command(cmd) |
|
| 4243 | ||
| 4244 | def delete_credential( |
|
| 4245 | self, credential_id: str, *, ultimate: Optional[bool] = False |
|
| 4246 | ) -> Any: |
|
| 4247 | """Deletes an existing credential |
|
| 4248 | ||
| 4249 | Arguments: |
|
| 4250 | credential_id: UUID of the credential to be deleted. |
|
| 4251 | ultimate: Whether to remove entirely, or to the trashcan. |
|
| 4252 | """ |
|
| 4253 | if not credential_id: |
|
| 4254 | raise RequiredArgument( |
|
| 4255 | function=self.delete_credential.__name__, |
|
| 4256 | argument='credential_id', |
|
| 4257 | ) |
|
| 4258 | ||
| 4259 | cmd = XmlCommand("delete_credential") |
|
| 4260 | cmd.set_attribute("credential_id", credential_id) |
|
| 4261 | cmd.set_attribute("ultimate", _to_bool(ultimate)) |
|
| 4262 | ||
| 4263 | return self._send_xml_command(cmd) |
|
| 4264 | ||
| 4265 | def delete_filter( |
|
| 4266 | self, filter_id: str, *, ultimate: Optional[bool] = False |
|