@@ 1760-1778 (lines=19) @@ | ||
1757 | ||
1758 | return self._send_xml_command(cmd) |
|
1759 | ||
1760 | def delete_policy( |
|
1761 | self, policy_id: str, *, ultimate: Optional[bool] = False |
|
1762 | ) -> Any: |
|
1763 | """Deletes an existing policy |
|
1764 | ||
1765 | Arguments: |
|
1766 | policy_id: UUID of the policy to be deleted. |
|
1767 | ultimate: Whether to remove entirely, or to the trashcan. |
|
1768 | """ |
|
1769 | if not policy_id: |
|
1770 | raise RequiredArgument( |
|
1771 | function=self.delete_policy.__name__, argument='policy_id' |
|
1772 | ) |
|
1773 | ||
1774 | cmd = XmlCommand("delete_config") |
|
1775 | cmd.set_attribute("config_id", policy_id) |
|
1776 | cmd.set_attribute("ultimate", _to_bool(ultimate)) |
|
1777 | ||
1778 | return self._send_xml_command(cmd) |
|
1779 | ||
1780 | def delete_tls_certificate(self, tls_certificate_id: str) -> Any: |
|
1781 | """Deletes an existing tls certificate |
@@ 1633-1651 (lines=19) @@ | ||
1630 | ||
1631 | return self._send_xml_command(cmd) |
|
1632 | ||
1633 | def delete_policy( |
|
1634 | self, policy_id: str, *, ultimate: Optional[bool] = False |
|
1635 | ) -> Any: |
|
1636 | """Deletes an existing policy |
|
1637 | ||
1638 | Arguments: |
|
1639 | policy_id: UUID of the policy to be deleted. |
|
1640 | ultimate: Whether to remove entirely, or to the trashcan. |
|
1641 | """ |
|
1642 | if not policy_id: |
|
1643 | raise RequiredArgument( |
|
1644 | function=self.delete_policy.__name__, argument='policy_id' |
|
1645 | ) |
|
1646 | ||
1647 | cmd = XmlCommand("delete_config") |
|
1648 | cmd.set_attribute("config_id", policy_id) |
|
1649 | cmd.set_attribute("ultimate", _to_bool(ultimate)) |
|
1650 | ||
1651 | return self._send_xml_command(cmd) |
|
1652 | ||
1653 | def delete_tls_certificate(self, tls_certificate_id: str) -> Any: |
|
1654 | """Deletes an existing tls certificate |