antimatter.session_mixins.general_mixin
#
Module Contents#
Classes#
Session mixin defining CRUD functionality for other general functionality. |
- class antimatter.session_mixins.general_mixin.GeneralMixin(domain: str, client_func: Callable[[], antimatter.client.DefaultApi], **kwargs)#
Session mixin defining CRUD functionality for other general functionality.
- Parameters:
domain – The domain to use for the session.
client – The client to use for the session.
- get_private_info() Dict[str, Any] #
Returns a Domain’s summary information.
- Returns:
The private summary info for a domain
- get_public_info() Dict[str, Any] #
Returns a Domain’s summary information. This endpoint does not require authorization
- Returns:
The public summary info for a domain
- get_settings() Dict[str, Any] #
Return the domain settings.
- patch_settings(*patch: antimatter.builders.settings_patch.SettingsPatchBuilder) Dict[str, Any] #
Applies the given patch to the domain settings. The user must have permissions on all resources the patch references.
- Parameters:
patch – The patch or patches to make to the settings. The path is the patch is a JSON pointer path.
- Returns:
The domain settings after applying the patch
- get_status() Dict[str, Any] #
Return the domain status, which contains important notifications for administrators of the domain.
- list_hooks() List[Dict[str, Any]] #
Return a list of available hooks in this domain. A hook is a data processor, like a PII classifier
- list_resources() Dict[str, Any] #
Return a list of resource strings that can be used in policy rules, and the set of permissions that you can assign to them.
- query_access_log(start_date: datetime.datetime | None = None, end_date: datetime.datetime | None = None, session: str | None = None, location: str | None = None, location_prefixed: bool | None = None, operation_type: str | None = None, allowed_tag: str | None = None, redacted_or_tokenized_tag: str | None = None, capsule_id: str | None = None) Iterator[Dict[str, Any]] #
Query the data access log for this domain. This contains all operations interacting with capsules within this domain. An iterator is returned over the results in reverse chronological order.
- Parameters:
start_date – The earlier date of the date range. As results are returned in reverse chronological order, this date corresponds with the end of the result set. This should be a timezone-aware datetime, or else will be treated as the system timezone
end_date – The later date of the date range. As results are returned in reverse chronological order, this date corresponds with the beginning of the result set. If not specified, defaults to the current time. This should be a timezone-aware datetime, or else will be treated as the system timezone
session – The session you would like to filter on. This will return results for only the provided session. If not specified, this field is ignored
location – The location you would like to filter on. This is a matched filter and will return results starting with the provided string. If not specified, this field is ignored
location_prefixed – A boolean indicator to indicate that the location you provided is a prefix or not. If this is set to true, then the filter provided in location is treated as a prefix. If not specified, this is treated as false
operation_type – The operation you would like to filter on. This will filter on the provided operation type and return all results using the provided operation type. If not specified, this field is ignored
allowed_tag – The allow tag key you would like to filter on. This accepts tag key only and will return all allowed tag results matching the provided tag key. If not specified, this field is ignored
redacted_or_tokenized_tag – The redacted or tokenized tag key you would like ot filter on. This accepts a tag key only and will return all redacted and tokenized tag key results matching the provided tag key. If not specified, this field is ignored
capsule_id – The ID for a specific capsule. Use this to limit results to a single capsule
- Returns:
An iterator over the access logs matching the filters
- query_control_log(start_date: datetime.datetime | None = None, end_date: datetime.datetime | None = None, session: str | None = None, url: str | None = None, description: str | None = None) Iterator[Dict[str, Any]] #
Query the domain control-plane audit log. An iterator is returned over the results in reverse chronological order.
- Parameters:
start_date – The earlier date of the date range. As results are returned in reverse chronological order, this date corresponds with the end of the result set. This should be a timezone-aware datetime, or else will be treated as the system timezone
end_date – The later date of the date range. As results are returned in reverse chronological order, this date corresponds with the beginning of the result set. If not specified, defaults to the current time. This should be a timezone-aware datetime, or else will be treated as the system timezone
session – The session you would like to filter on. This will return results for only the provided session. If not specified, this field is ignored
url – The URL you would like to filter on. This is a prefix matched filter and will return results starting with the provided string. If not specified, this field is ignored
description – The description you would like to filter on. This is an in matched filter and will return results that contain the provided string. If not specified, this field is ignored
- Returns:
An iterator over the control logs matching the filters