antimatter.session_mixins.read_context_mixin
#
Module Contents#
Classes#
Session mixin defining CRUD functionality for read contexts. |
- class antimatter.session_mixins.read_context_mixin.ReadContextMixin(domain: str, client_func: Callable[[], antimatter.client.DefaultApi], **kwargs)#
Session mixin defining CRUD functionality for read contexts.
- Parameters:
domain – The domain to use for the session.
client – The client to use for the session.
- add_read_context(name: str, builder: antimatter.builders.ReadContextBuilder) None #
Upserts a read context for the current domain and auth
- Parameters:
name – The name of the read context to add or update
builder – The builder containing read context configuration
- list_read_context() List[Dict[str, Any]] #
Returns a list of read contexts available for the current domain and auth
- describe_read_context(name: str) Dict[str, Any] #
Returns the read context with the given name for the current domain and auth
- Parameters:
name – The name of the read context to describe
- Returns:
The full details of the read context
- delete_read_context(name: str) None #
Delete a read context. All configuration associated with this read context will also be deleted. Domain policy rules referencing this read context will be left as-is.
- Parameters:
name – The name of the read context to delete
- list_read_context_rules(name: str) List[Dict[str, Any]] #
List all rules for the read context
- Parameters:
name – The name of the read context to list rules from
- Returns:
The list of read context rules
- add_read_context_rules(name: str, rule_builder: antimatter.builders.ReadContextRuleBuilder) str #
Adds rules to a read context
- Parameters:
name – The name of the read context to add rules to
rule_builder – The builder containing rule configuration for the read context
- Returns:
The unique ID for the added read context rule
- update_read_context_rule(name: str, rule_id: str, rule_builder: antimatter.builders.ReadContextRuleBuilder) None #
Update a read context configuration rule. The rule must already exist.
- Parameters:
name – The name of the read context to update a rule for
rule_id – The unique ID of the rule to update
rule_builder – The builder containing rule configuration
- delete_read_context_rule(name: str, rule_id: str) None #
Deletes a rule from a read context
- Parameters:
name – The name of the read context to delete a rule from
rule_id – The unique ID of the rule to delete
- delete_read_context_rules(name: str) None #
Deletes all the read context rules
- Parameters:
name – The name of the read context to delete all the rules from