antimatter.session_mixins.datapolicy_mixin
#
Module Contents#
Classes#
Data policy mixin defining CRUD functionality for data policies |
- class antimatter.session_mixins.datapolicy_mixin.DataPolicyMixin(authz: antimatter.authz.Authorization, **kwargs)#
Bases:
antimatter.session_mixins.base.BaseMixin
Data policy mixin defining CRUD functionality for data policies
- list_data_policies() List[antimatter_api.DataPolicy] #
Returns a list of data policies available for the current domain and auth
- Returns:
A list of data policies
- create_data_policy(name: str, description: str) antimatter_api.DomainCreateDataPolicy200Response #
Create a new data policy for the current domain and auth
- Parameters:
name – The name for this data policy
description – The human-readable description of the data policy
- describe_data_policy(policy_id: str) antimatter_api.ExtendedDataPolicy #
Describe a data policy by ID
- Parameters:
policy_id – The ID of the data policy
- Returns:
The data policy details
- update_data_policy(policy_id: str, name: str, description: str) None #
Update a data policy by ID
- Parameters:
policy_id – The ID of the data policy
name – The name for this data policy
description – The human-readable description of the data policy
- delete_data_policy(policy_id: str) None #
Delete a data policy by ID
- Parameters:
policy_id – The ID of the data policy
- renumber_data_policy_rules(policy_id: str) None #
Renumber the rules of a data policy by ID
- Parameters:
policy_id – The ID of the data policy
- update_data_policy_rules(policy_id: str, rules: antimatter.builders.data_policy.DataPolicyRuleChangesBuilder) antimatter_api.DataPolicyRuleChangeResponse #
Update a rule of a data policy by ID
- Parameters:
policy_id – The ID of the data policy
rules – The rules to apply to the data policy, constructed using the DataPolicyRuleChangesBuilder
- describe_data_policy_rule(policy_id: str, rule_id: str) antimatter_api.DataPolicyRule #
Describe a rule of a data policy by ID
- Parameters:
policy_id – The ID of the data policy
rule_id – The ID of the rule to describe
- Returns:
The data policy rule details for the given policy and rule
- update_data_policy_rule(policy_id: str, rule_id: str, rules: antimatter.builders.data_policy.NewDataPolicyRuleBuilder) None #
Update a rule of a data policy by ID
- Parameters:
policy_id – The ID of the data policy
rule_id – The ID of the rule to update
rules – The rules to apply to the data policy, constructed using the NewDataPolicyRuleBuilder
- delete_data_policy_rule(policy_id: str, rule_id: str) None #
Delete a rule of a data policy by ID
- Parameters:
policy_id – The ID of the data policy
rule_id – The ID of the rule to delete
- describe_data_policy_binding(policy_id: str, binding_id: str) antimatter_api.DataPolicyBindingInfo #
Describe a binding of a data policy by ID
- Parameters:
policy_id – The ID of the data policy
binding_id – The ID of the binding to describe
- Returns:
The data policy binding details for the given policy and binding ID
- set_data_policy_binding(policy_id: str, default_attachment: antimatter.builders.data_policy.Attachment, read_contexts: List[Tuple[str, antimatter.builders.data_policy.Attachment]]) None #
Set a binding of a data policy by ID
- Parameters:
policy_id – The ID of the data policy
default_attachment – The default attachment for the data policy