Skip to main content

Policy Management

set_policies()

Updates the client’s default policy configuration. The provided policies are merged with the existing policy state, overriding any pre-existing configurations for the same PolicyName. Signature:
def set_policies(self, policies_to_set: Policy) -> None
Parameters:
ParameterTypeDescription
policies_to_setPolicyRequired. A Policy object containing the rules to set.
Returns: None

get_enabled_policies()

Retrieves the currently active policies configured on the client instance. This method filters out any policies set to Action.DISABLED. Signature:
def get_enabled_policies(self) -> Policy
Parameters: None Returns: Policy - A dictionary containing only the enabled policies from the client’s current state.

clear_policies()

Resets the client’s policy state, effectively disabling all policies. After this call, the client will have no default policy until a new one is set via set_policies(). Signature:
def clear_policies(self) -> None
Parameters: None Returns: None

Asset Management (Platform Tier Only)

These methods are only functional for clients initialized with a Platform Tier (i.e., rsk_) API key.

set_asset_id()

Sets or changes the default asset_id for the client instance. This method verifies that the provided asset_id exists and is accessible by the authenticated API key. Signature:
def set_asset_id(self, asset_id: str) -> None
Parameters:
ParameterTypeDescription
asset_idstrRequired. The Asset ID to set as the default.
Returns: NoneExceptions: ArgusNotFoundError if the asset does not exist.

get_asset_id()

Retrieves the current default asset_id configured on the client instance. Signature:
def get_asset_id(self) -> Optional[str]
Parameters: None Returns: Optional[str] - The current default Asset ID, or None if not set.

clear_asset_id()

Removes the default asset_id from the client’s configuration state. Signature:
def clear_asset_id(self) -> None
Parameters: None Returns: None

Session Management (Platform Tier Only)

These methods are only functional for clients initialized with a Platform Tier (i.e., rsk_) API key.

set_session_id()

Sets or changes the default session_id for the client instance. Signature:
def set_session_id(self, session_id: str) -> None
Parameters:
ParameterTypeDescription
session_idstrRequired. The Session ID to set as the default.
Returns: None

get_session_id()

Retrieves the current default session_id configured on the client instance. Signature:
def get_session_id(self) -> Optional[str]
Parameters: None Returns: Optional[str] - The current default Session ID, or None if not set.

clear_session_id()

Removes the default session_id from the client’s configuration state. Signature:
def clear_session_id(self) -> None
Parameters: None Returns: None