antimatter.session_mixins.write_context_mixin#

Module Contents#

Classes#

WriteContextMixin

Session mixin defining CRUD functionality for write contexts.

class antimatter.session_mixins.write_context_mixin.WriteContextMixin(domain: str, client_func: Callable[[], antimatter.client.DefaultApi], **kwargs)#

Session mixin defining CRUD functionality for write contexts.

Parameters:
  • domain – The domain to use for the session.

  • client – The client to use for the session.

add_write_context(name: str, builder: antimatter.builders.WriteContextBuilder) None#

Upserts a write context for the current domain and auth

Parameters:
  • name – The name of the write context to add or update

  • builder – The builder containing write context configuration

list_write_context() List[Dict[str, Any]]#

Returns a list of write contexts available for the current domain and auth

describe_write_context(name: str) Dict[str, Any]#

Returns the write context with the given name for the current domain and auth

Parameters:

name – The name of the write context to describe

Returns:

The full details of the write context

upsert_write_context_configuration(name: str, builder: antimatter.builders.WriteContextConfigurationBuilder) None#

Update a write context configuration. The write context must already exist.

Parameters:
  • name – The name of the write context to update the configuration for

  • builder – The builder containing write context configuration

delete_write_context(name: str) None#

Delete a write context. All configuration associated with this write context will also be deleted. Domain policy rules referencing this write context will be left as-is.

Parameters:

name – The name of the write context to delete

list_write_context_regex_rules(context_name: str) List[Dict[str, Any]]#

List all regex rules for the write context.

Parameters:

context_name – The name of the write context

Returns:

The list of rules

insert_write_context_regex_rule(context_name: str, builder: antimatter.builders.WriteContextRegexRuleBuilder) str#

Create a new regex rule for a write context.

Parameters:
  • context_name – The name of the write context

  • builder – The builder containing write context regex rule configuration

delete_write_context_regex_rule(context_name: str, rule_id: str) None#

Delete a regex classifier rule for the context.

Parameters:
  • context_name – The name of the write context

  • rule_id – The ID of the rule to delete

delete_write_context_regex_rules(context_name: str) None#

Delete the regex classifier rules for the context.

Parameters:

context_name – The name of the write context