antimatter.session_mixins.domain_mixin#

Module Contents#

Classes#

DomainMixin

Session mixin defining CRUD functionality for domains, including peering.

class antimatter.session_mixins.domain_mixin.DomainMixin(authz: antimatter.authz.Authorization, **kwargs)#

Bases: antimatter.session_mixins.base.BaseMixin

Session mixin defining CRUD functionality for domains, including peering.

new_peer_domain(import_alias_for_child: str, display_name_for_child: str, nicknames: List[str] | None = None, import_alias_for_parent: str | None = None, display_name_for_parent: str | None = None, link_all: bool = True, link_identity_providers: bool = None, link_facts: bool = None, link_read_contexts: bool = None, link_write_contexts: bool = None, link_capabilities: bool = None, link_domain_policy: bool = None, link_root_encryption_keys: bool = None, link_capsule_access_log: bool = None, link_control_log: bool = None, link_capsule_manifest: bool = None) antimatter_api.NewDomainResponse#

Creates a new peer domain

Parameters:
  • import_alias_for_child – The import alias for the child domain

  • display_name_for_child – The display name for the child domain

  • nicknames – The nicknames for the child domain

  • import_alias_for_parent – The import alias for the parent domain

  • display_name_for_parent – The display name for the parent domain

  • link_all – Whether to link all capabilities

  • link_identity_providers – Whether to link identity providers

  • link_facts – Whether to link facts

  • link_read_contexts – Whether to link read contexts

  • link_write_contexts – Whether to link write contexts

  • link_capabilities – Whether to link capabilities

  • link_domain_policy – Whether to link domain policy

  • link_root_encryption_keys – Whether to link root encryption keys

  • link_capsule_access_log – Whether to link capsule access log

  • link_control_log – Whether to link control log

  • link_capsule_manifest – Whether to link capsule manifest

Returns:

The new peer domain

get_peer(nickname: str | None = None, alias: str | None = None) str#

Retrieve the domain ID of a domain that is configured as a peer of this session’s domain by using either its alias or one of its nicknames.

Parameters:
  • nickname – The nickname for the peer domain

  • alias – One of the aliases of the peer domain

Returns:

The domain ID

list_peers() List[antimatter_api.DomainPeerListPeersInner]#

Return a list of the peers of this session’s domain.

Returns:

The peer list, containing IDs and other information about the domains

get_peer_config(peer_domain_id: str | None = None, nickname: str | None = None, alias: str | None = None) antimatter_api.DomainPeerConfig#

Get a peer configuration using one of the peer’s domain ID, nickname, or alias.

Parameters:
  • peer_domain_id – The domain ID of the peer

  • nickname – The nickname for the peer domain

  • alias – One of the aliases of the peer domain

Returns:

The full peer configuration

update_peer(display_name: str, peer_domain_id: str | None = None, nickname: str | None = None, alias: str | None = None, export_identity_providers: List[str] | None = None, export_all_identity_providers: bool | None = None, export_facts: List[str] | None = None, export_all_facts: bool | None = None, export_read_contexts: List[str] | None = None, export_all_read_contexts: bool | None = None, export_write_contexts: List[str] | None = None, export_all_write_contexts: bool | None = None, export_capabilities: List[str] | None = None, export_all_capabilities: bool | None = None, export_domain_policy: bool | None = None, export_root_encryption_keys: bool | None = None, export_capsule_access_log: bool | None = None, export_control_log: bool | None = None, export_capsule_manifest: bool | None = None, export_billing: bool | None = None, export_admin_contact: bool | None = None, export_data_policies: str | None = None, export_all_data_policies: bool | None = None, nicknames: List[str] | None = None, import_alias: str | None = None, forward_billing: bool | None = None, forward_admin_communications: bool | None = None, import_identity_providers: List[str] | None = None, import_all_identity_providers: bool | None = None, import_facts: List[str] | None = None, import_all_facts: bool | None = None, import_read_contexts: List[str] | None = None, import_all_read_contexts: bool | None = None, import_write_contexts: List[str] | None = None, import_all_write_contexts: bool | None = None, import_capabilities: List[str] | None = None, import_all_capabilities: bool | None = None, import_domain_policy: bool | None = None, import_root_encryption_keys: bool | None = None, import_precedence: int | None = None, import_capsule_access_log: bool | None = None, import_control_log: bool | None = None, import_capsule_manifest: bool | None = None, import_data_policies: str | None = None, import_all_data_policies: bool | None = None) None#

Create or update the configuration for this peer using one of the peer’s domain ID, nickname, or alias. Please note, if the configuration already exists, it is updated to reflect the values in the request. This will include setting the fields to their default value if not supplied.

Parameters:
  • display_name – The display name for the peer domain

  • peer_domain_id – The domain ID of the peer

  • nickname – The nickname for the peer domain

  • alias – One of the aliases of the peer domain

  • export_identity_providers – The identity providers to export

  • export_all_identity_providers – Whether to export all identity providers

  • export_facts – The facts to export

  • export_all_facts – Whether to export all facts

  • export_read_contexts – The read contexts to export

  • export_all_read_contexts – Whether to export all read contexts

  • export_write_contexts – The write contexts to export

  • export_all_write_contexts – Whether to export all write contexts

  • export_capabilities – The capabilities to export

  • export_all_capabilities – Whether to export all capabilities

  • export_domain_policy – Whether to export the domain policy

  • export_root_encryption_keys – Whether to export the root encryption keys

  • export_capsule_access_log – Whether to export the capsule access log

  • export_control_log – Whether to export the control log

  • export_capsule_manifest – Whether to export the capsule manifest

  • export_billing – Whether to export billing information

  • export_admin_contact – Whether to export the admin contact

  • nicknames – The nicknames for the peer domain

  • import_alias – The import alias for the peer domain

  • forward_billing – Whether to forward billing information

  • forward_admin_communications – Whether to forward admin communications

  • import_identity_providers – The identity providers to import

  • import_all_identity_providers – Whether to import all identity providers

  • import_facts – The facts to import

  • import_all_facts – Whether to import all facts

  • import_read_contexts – The read contexts to import

  • import_all_read_contexts – Whether to import all read contexts

  • import_write_contexts – The write contexts to import

  • import_all_write_contexts – Whether to import all write contexts

  • import_capabilities – The capabilities to import

  • import_all_capabilities – Whether to import all capabilities

  • import_domain_policy – Whether to import the domain policy

  • import_root_encryption_keys – Whether to import the root encryption keys

  • import_precedence – The precedence of the import

  • import_capsule_access_log – Whether to import the capsule access log

  • import_control_log – Whether to import the control log

  • import_capsule_manifest – Whether to import the capsule manifest

delete_peer(peer_domain_id: str | None = None, nickname: str | None = None, alias: str | None = None) None#

Remove the peering relationship with the given domain, using one of the peer’s domain ID, nickname, or alias.

Parameters:
  • peer_domain_id – The domain ID of the peer

  • nickname – The nickname for the peer domain

  • alias – One of the aliases of the peer domain

get_top_tags() List[str]#

Get domain tag info returns a list containing the top 100 tag names for the current session’s domain.